'Show a list of all physical hosts. Filter by zone.
args: [zone]'

def list(self, zone=None):

    print(('%-25s DCTB %-15s' % (_('host'), _('zone'))))
    ctxt = context.get_admin_context()
    services = db.service_get_all(ctxt)
    services = availability_zones.set_availability_zones(ctxt, services)
    if zone:
        services = [s for s in services if (s['availability_zone'] == zone)]
    hosts = []
    for srv in services:
        if (not [h for h in hosts if (h['host'] == srv['host'])]):
            hosts.append(srv)
    for h in hosts:
        print(('%-25s DCTB %-15s' % (h['host'], h['availability_zone'])))
