#NEWLINE# def ex_create_pool_member( self , pool , node , port = None ) : #NEWLINE# #INDENT# '\n        Create a new member in an existing pool from an existing node\n\n        :param pool: Instance of ``DimensionDataPool`` (required)\n        :type  pool: ``DimensionDataPool``\n\n        :param node: Instance of ``DimensionDataVIPNode`` (required)\n        :type  node: ``DimensionDataVIPNode``\n\n        :param port: Port the the service will listen on\n        :type  port: ``str``\n\n        :return: The node member, instance of ``DimensionDataPoolMember``\n        :rtype: ``DimensionDataPoolMember``\n        ' #NEWLINE# create_pool_m = ET . Element ( 'addPoolMember' , { #NEWLINE# #INDENT# 'xmlns' : TYPES_URN , #NEWLINE# #UNINDENT# } ) #NEWLINE# ET . SubElement ( create_pool_m , 'poolId' ) . text = pool . id #NEWLINE# ET . SubElement ( create_pool_m , 'nodeId' ) . text = member_id . id #NEWLINE# if ( port is not None ) : #NEWLINE# #INDENT# ET . SubElement ( create_pool_m , 'port' ) . text = str ( port ) #NEWLINE# #UNINDENT# ET . SubElement ( create_pool_m , 'status' ) . text = 'ENABLED' #NEWLINE# response = self . connection . request_with_orgId_api_2 ( 'networkDomainVip/addPoolMember' , method = 'POST' , data = ET . tostring ( create_pool_m ) ) . object #NEWLINE# member_id = None #NEWLINE# node_name = None #NEWLINE# for info in findall ( response , 'info' , TYPES_URN ) : #NEWLINE# #INDENT# if ( info . get ( 'name' ) == 'poolMemberId' ) : #NEWLINE# #INDENT# member_id = info . get ( 'value' ) #NEWLINE# #UNINDENT# if ( info . get ( 'name' ) == 'nodeName' ) : #NEWLINE# #INDENT# node_name = info . get ( 'value' ) #NEWLINE# #UNINDENT# #UNINDENT# return DimensionDataPoolMember ( id = member_id , name = node_name , status = State . RUNNING , ip = node . ip , port = port , node_id = node . id )