@profiler.trace
def subnet_create(request, network_id, **kwargs):
 LOG.debug(('subnet_create(): netid=%s, kwargs=%s' % (network_id, kwargs)))
 body = {'subnet': {'network_id': network_id}}
 if ('tenant_id' not in kwargs):
  kwargs['tenant_id'] = request.user.project_id
 body['subnet'].update(kwargs)
 subnet = neutronclient(request).create_subnet(body=body).get('subnet')
 return Subnet(subnet)

@ profiler . trace def subnet_create ( request , network_id , ** kwargs ) : LOG . debug ( ( 'subnet_create(): netid=%s, kwargs=%s' % ( network_id , kwargs ) ) ) body = { 'subnet' : { 'network_id' : network_id } } if ( 'tenant_id' not in kwargs ) : kwargs [ 'tenant_id' ] = request . user . project_id body [ 'subnet' ] . update ( kwargs ) subnet = neutronclient ( request ) . create_subnet ( body = body ) . get ( 'subnet' ) return Subnet ( subnet )
create a subnet on a specified network .