@profiler.trace
def network_create(request, **kwargs):
 LOG.debug(('network_create(): kwargs = %s' % kwargs))
 if ('net_profile_id' in kwargs):
  kwargs['n1kv:profile'] = kwargs.pop('net_profile_id')
 if ('tenant_id' not in kwargs):
  kwargs['tenant_id'] = request.user.project_id
 body = {'network': kwargs}
 network = neutronclient(request).create_network(body=body).get('network')
 return Network(network)

@ profiler . trace def network_create ( request , ** kwargs ) : LOG . debug ( ( 'network_create(): kwargs = %s' % kwargs ) ) if ( 'net_profile_id' in kwargs ) : kwargs [ 'n1kv:profile' ] = kwargs . pop ( 'net_profile_id' ) if ( 'tenant_id' not in kwargs ) : kwargs [ 'tenant_id' ] = request . user . project_id body = { 'network' : kwargs } network = neutronclient ( request ) . create_network ( body = body ) . get ( 'network' ) return Network ( network )
create private network cli example: .