#NEWLINE# def create_node( self , name , image , size , **kwargs ) : #NEWLINE# #INDENT# 'Create a new VPS.net node\n\n        See L{NodeDriver.create_node} for more keyword args.\n        @keyword    ex_backups_enabled: Enable automatic backups\n        @type       ex_backups_enabled: C{bool}\n\n        @keyword    ex_fqdn:   Fully Qualified domain of the node\n        @type       ex_fqdn:   C{string}\n        ' #NEWLINE# headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } #NEWLINE# request = { #NEWLINE# #INDENT# 'virtual_machine' : { #NEWLINE# #INDENT# 'label' : image , #NEWLINE# 'fqdn' : kwargs . get ( 'ex_fqdn' , '' ) , #NEWLINE# 'system_template_id' : image . id , #NEWLINE# 'backups_enabled' : kwargs . get ( 'ex_backups_enabled' , 0 ) , #NEWLINE# 'slices_required' : size . id , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# res = self . connection . request ( ( '/virtual_machines.%s' % ( API_VERSION , ) ) , data = json . dumps ( request ) , headers = headers , method = 'POST' ) #NEWLINE# node = self . _to_node ( res . object [ 'virtual_machine' ] ) #NEWLINE# return node