示例#1
0
def get_address_groups(request):
    head = None
    group_list = []
    for group in neutron_extensions_client.addressgroup_list(request):
        if group.name == 'Any':
            head = (group.id, group.name)
        else:
            group_list.append((group.id, group.name))

    if head:
        group_list.insert(0, head)
    return group_list
示例#2
0
 def get_hosts_data(self):
     return neutron_extensions_client.addressgroup_list(self.request)