#NEWLINE# @ log . log_method_call #NEWLINE# def create_nat_pool( self , context , nat_pool ) : #NEWLINE# #INDENT# np = nat_pool [ 'nat_pool' ] #NEWLINE# tenant_id = self . _get_tenant_id_for_create ( context , np ) #NEWLINE# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# np_db = NATPool ( id = uuidutils . generate_uuid ( ) , tenant_id = tenant_id , name = np [ 'name' ] , description = np [ 'description' ] , shared = np . get ( 'shared' , False ) , ip_version = np [ 'ip_version' ] , ip_pool = np [ 'ip_pool' ] , external_segment_id = np [ 'external_segment_id' ] ) #NEWLINE# context . session . add ( np_db ) #NEWLINE# #UNINDENT# return self . _make_nat_pool_dict ( np_db )