def list_resources(px, pools):
    """
    List resources by pools

    Parameters:
    px (ProxmoxAPI): instance of proxmox API
    pools (array): list of pools names

    Returns:
    tuple: Resource pools list;
           Dict with items headers.
    """
    result = []
    for pool in pools:
        for i in px.pools.get(pool)["members"]:
            result.append(
                {
                    "pool": pool,
                    "vmid": i["vmid"],
                    "name": i["name"],
                    "status": i["status"],
                    "type": i["type"],
                }
            )
    return result, {
        "pool": "pool(s)",
        "vmid": "vmid",
        "name": "name",
        "status": "status",
        "type": "type",
    }