def describe_items_aggregated()

in gstack/controllers/__init__.py [0:0]


def describe_items_aggregated(authorization, args, type, gce_type, to_cloudstack, **kwargs):
    from gstack.controllers import zones
    items = {}

    zone_list = zones.get_zone_names(authorization=authorization)

    for zone in zone_list:
        kwargs['zone'] = zone
        zone_items = _get_requested_items(
            authorization, args, type, to_cloudstack, **kwargs)
        items['zone/' + zone] = {}
        if zone_items:
            items['zone/' + zone][gce_type] = zone_items
        else:
            items['zone/' + zone] = errors.no_results_found(zone)

    return items