#NEWLINE# def _create_subnet( self , plugin , ctx , network_id , cidr = '10.0.0.0/8' , name = 'subnet' , tenant_id = 'tenant1' ) : #NEWLINE# #INDENT# subnet = { #NEWLINE# #INDENT# 'subnet' : { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'ip_version' : 4 , #NEWLINE# 'network_id' : network_id , #NEWLINE# 'cidr' : cidr , #NEWLINE# 'gateway_ip' : constants . ATTR_NOT_SPECIFIED , #NEWLINE# 'allocation_pools' : constants . ATTR_NOT_SPECIFIED , #NEWLINE# 'dns_nameservers' : constants . ATTR_NOT_SPECIFIED , #NEWLINE# 'host_routes' : constants . ATTR_NOT_SPECIFIED , #NEWLINE# 'tenant_id' : tenant_id , #NEWLINE# 'enable_dhcp' : True , #NEWLINE# 'ipv6_ra_mode' : constants . ATTR_NOT_SPECIFIED , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# created_subnet = plugin . create_subnet ( ctx , subnet ) #NEWLINE# return created_subnet