#NEWLINE# def create_node( self , **kwargs ) : #NEWLINE# #INDENT# '\n        Creates a node in the IBM Developer Cloud.\n\n        See L{NodeDriver.create_node} for more keyword args.\n\n        @keyword    ex_configurationData: Image-specific configuration parameters.\n                                       Configuration parameters are defined in\n                                       the parameters.xml file.  The URL to\n                                       this file is defined in the NodeImage\n                                       at extra[parametersURL].\n        @type       ex_configurationData: C{dict}\n        ' #NEWLINE# data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'name' : kwargs [ 'name' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'imageID' : kwargs [ 'image' ] . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'instanceType' : kwargs [ 'size' ] . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( 'location' in kwargs ) : #NEWLINE# #INDENT# data . update ( { #NEWLINE# #INDENT# 'location' : kwargs [ 'location' ] . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data . update ( { #NEWLINE# #INDENT# 'location' : '1' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# if ( ( 'auth' in kwargs ) and isinstance ( kwargs [ 'auth' ] , NodeAuthSSHKey ) ) : #NEWLINE# #INDENT# data . update ( { #NEWLINE# #INDENT# 'publicKey' : kwargs [ 'auth' ] . pubkey , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# if ( 'ex_configurationData' in kwargs ) : #NEWLINE# #INDENT# configurationData = kwargs [ 'ex_configurationData' ] #NEWLINE# for key in configurationData . keys ( ) : #NEWLINE# #INDENT# data . update ( { #NEWLINE# #INDENT# key : configurationData . get ( key ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# resp = self . connection . request ( action = ( REST_BASE + 'instances' ) , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/x-www-form-urlencoded' , #NEWLINE# #UNINDENT# } , method = 'POST' , data = data ) . object #NEWLINE# return self . _to_nodes ( resp ) [ 0 ]