Created
February 12, 2013 19:34
-
-
Save roaet/4772664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res = {'id': subnet.get('id'), | |
'name': subnet.get('name'), | |
'tenant_id': subnet.get('tenant_id'), | |
'network_id': subnet.get('network_id'), | |
'ip_version': subnet.get('ip_version'), | |
'cidr': subnet.get('_cidr'), | |
'enable_dhcp': subnet.get('enable_dhcp'),} | |
#'dns_nameservers': [dns.get('address') | |
# for dns in subnet.get('dns_nameservers')], | |
#'gateway_ip': subnet.get('gateway_ip'), | |
#'host_routes': [{'destination': route.get('destination'), | |
# 'nexthop': route.get('nexthop')} | |
# for route in subnet.get('routes', [])], | |
#'shared': subnet.get('shared') | |
#} | |
#'allocation_pools': [{'start': pool.get('first_ip'), | |
# 'end': pool.get('last_ip')} | |
# for pool in subnet.get('allocation_pools')], | |
#} | |
#if subnet.get('gateway_ip'): | |
# res['gateway_ip'] = subnet.get('gateway_ip') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment