def addressgroup_list(request):
    r = _list(request, 'dhaddressgroup')
    return [AddressGroup(item['name'], item['id']) for item in r.get('addressgroups', {})]
def addressgroup_list(request):
    r = _list(request, 'dhaddressgroup')
    return [AddressGroup(item['name'], item['id']) for item in r.get('addressgroups', {})]