#NEWLINE# def plug_services( self , context , deployment ) : #NEWLINE# #INDENT# if deployment : #NEWLINE# #INDENT# provider = deployment [ 0 ] [ 'context' ] . provider #NEWLINE# management = deployment [ 0 ] [ 'context' ] . management #NEWLINE# self . _sort_deployment ( deployment ) #NEWLINE# for part in deployment : #NEWLINE# #INDENT# info = part [ 'plumbing_info' ] #NEWLINE# if ( not info ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# part_context = part [ 'context' ] #NEWLINE# self . _create_service_target ( context , part_context , info . get ( 'management' , [ ] ) , management , 'management' ) #NEWLINE# jump_ptg = None #NEWLINE# LOG . info ( _LI ( "Plumbing service of type '%s'" ) , info [ 'plumbing_type' ] ) #NEWLINE# if ( info [ 'plumbing_type' ] == common . PLUMBING_TYPE_ENDPOINT ) : #NEWLINE# #INDENT# info [ 'provider' ] [ 0 ] [ 'name' ] = 'tscp_endpoint_service_' #NEWLINE# self . _create_service_target ( context , part_context , info . get ( 'provider' , [ ] ) , provider , 'provider' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( info [ 'plumbing_type' ] == common . PLUMBING_TYPE_GATEWAY ) : #NEWLINE# #INDENT# jump_ptg = self . _create_l3_jump_group ( context , provider , part [ 'context' ] . current_position ) #NEWLINE# info [ 'provider' ] [ 0 ] [ 'group_default_gateway' ] = True #NEWLINE# self . _create_service_target ( context , part_context , info [ 'provider' ] , provider , 'provider' ) #NEWLINE# info [ 'consumer' ] [ 0 ] [ 'proxy_gateway' ] = True #NEWLINE# self . _create_service_target ( context , part_context , info [ 'consumer' ] , management , 'consumer' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( info [ 'plumbing_type' ] == common . PLUMBING_TYPE_TRANSPARENT ) : #NEWLINE# #INDENT# self . _create_service_target ( context , part_context , info . get ( 'provider' , [ ] ) , provider , 'provider' ) #NEWLINE# jump_ptg = self . _create_l2_jump_group ( context , provider , part [ 'context' ] . current_position ) #NEWLINE# self . _create_service_target ( context , part_context , info [ 'consumer' ] , jump_ptg , 'consumer' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . warning ( _LW ( 'Unsupported plumbing type %s' ) , info [ 'plumbing_type' ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# provider = ( jump_ptg or provider )