'Create a new node
@inherits: :class:`NodeDriver.create_node`
:keyword    networks: Optional list of networks to launch the server
into.
:type       networks: ``list`` of :class:`.CloudStackNetwork`
:keyword    project: Optional project to create the new node under.
:type       project: :class:`.CloudStackProject`
:keyword    diskoffering:  Optional disk offering to add to the new
node.
:type       diskoffering:  :class:`.CloudStackDiskOffering`
:keyword    ex_keyname:  Name of existing keypair
:type       ex_keyname:  ``str``
:keyword    ex_userdata: String containing user data
:type       ex_userdata: ``str``
:keyword    ex_security_groups: List of security groups to assign to
the node
:type       ex_security_groups: ``list`` of ``str``
:keyword    ex_displayname: String containing instance display name
:type       ex_displayname: ``str``
:keyword    ex_ip_address: String with ipaddress for the default nic
:type       ex_ip_address: ``str``
:keyword    ex_start_vm: Boolean to specify to start VM after creation
Default Cloudstack behaviour is to start a VM,
if not specified.
:type       ex_start_vm: ``bool``
:keyword    ex_rootdisksize: String with rootdisksize for the template
:type       ex_rootdisksize: ``str``
:keyword    ex_affinity_groups: List of affinity groups to assign to
the node
:type       ex_affinity_groups: ``list`` of
:class:`.CloudStackAffinityGroup`
:rtype:     :class:`.CloudStackNode`'

def create_node(self, **kwargs):

    server_params = self._create_args_to_params(None, **kwargs)
    data = self._async_request(command='deployVirtualMachine', params=server_params, method='GET')['virtualmachine']
    node = self._to_node(data=data)
    return node
