def get_host_disks(self, host, filter=None):
    hosts = self.get_hosts()
    selected_host = [h for h in hosts if (h['id'] == host['id'])]
    disks = json.loads(selected_host[0]['inventory'])['disks']
    if (not filter):
        return [disk for disk in disks]
    else:
        return [disk for disk in disks if filter(disk)]
def get_host_disks(self, host, filter=None):
    hosts = self.get_hosts()
    selected_host = [h for h in hosts if (h['id'] == host['id'])]
    disks = json.loads(selected_host[0]['inventory'])['disks']
    if (not filter):
        return [disk for disk in disks]
    else:
        return [disk for disk in disks if filter(disk)]