'@inherits: :class:`NodeDriver.create_node`
:param name: The name for this new node (required)
:type name: ``str``
:param image: The image to use when creating this node (required)
:type image: `NodeImage`
:param size: The size of the node to create (required)
:type size: `NodeSize`
:keyword auth: Initial authentication information for the node
(optional)
:type auth: :class:`NodeAuthSSHKey` or :class:`NodeAuthPassword`
:keyword ex_security_group_id: The id of the security group the
new created node is attached to.
(required)
:type ex_security_group_id: ``str``
:keyword ex_description: A description string for this node (optional)
:type ex_description: ``str``
:keyword ex_internet_charge_type: The internet charge type (optional)
:type ex_internet_charge_type: a ``str`` of \'PayByTraffic\'
or \'PayByBandwidth\'
:keyword ex_internet_max_bandwidth_out: The max output bandwidth,
in Mbps (optional)
Required for \'PayByTraffic\'
internet charge type
:type ex_internet_max_bandwidth_out: a ``int`` in range [0, 100]
a ``int`` in range [1, 100] for
\'PayByTraffic\' internet charge
type
:keyword ex_internet_max_bandwidth_in: The max input bandwidth,
in Mbps (optional)
:type ex_internet_max_bandwidth_in: a ``int`` in range [1, 200]
default to 200 in server side
:keyword ex_hostname: The hostname for the node (optional)
:type ex_hostname: ``str``
:keyword ex_io_optimized: Whether the node is IO optimized (optional)
:type ex_io_optimized: ``boll``
:keyword ex_system_disk: The system disk for the node (optional)
:type ex_system_disk: ``dict``
:keyword ex_data_disks: The data disks for the node (optional)
:type ex_data_disks: a `list` of `dict`
:keyword ex_vswitch_id: The id of vswitch for a VPC type node
(optional)
:type ex_vswitch_id: ``str``
:keyword ex_private_ip_address: The IP address in private network
(optional)
:type ex_private_ip_address: ``str``
:keyword ex_client_token: A token generated by client to keep
requests idempotency (optional)
:type keyword ex_client_token: ``str``'

def create_node(self, name, size, image, auth=None, ex_security_group_id=None, ex_description=None, ex_internet_charge_type=None, ex_internet_max_bandwidth_out=None, ex_internet_max_bandwidth_in=None, ex_hostname=None, ex_io_optimized=None, ex_system_disk=None, ex_data_disks=None, ex_vswitch_id=None, ex_private_ip_address=None, ex_client_token=None, **kwargs):

    params = {'Action': 'CreateInstance', 'RegionId': self.region, 'ImageId': image.id, 'InstanceType': size.id, 'InstanceName': name}
    if (not ex_security_group_id):
        raise AttributeError('ex_security_group_id    is    mandatory')
    params['SecurityGroupId'] = ex_security_group_id
    if ex_description:
        params['Description'] = ex_description
    inet_params = self._get_internet_related_params(ex_internet_charge_type, ex_internet_max_bandwidth_in, ex_internet_max_bandwidth_out)
    if inet_params:
        params.update(inet_params)
    if ex_hostname:
        params['HostName'] = ex_hostname
    if auth:
        auth = self._get_and_check_auth(auth)
        params['Password'] = auth.password
    if (ex_io_optimized is not None):
        optimized = ex_io_optimized
        if isinstance(optimized, bool):
            optimized = ('optimized' if optimized else 'none')
        params['IoOptimized'] = optimized
    if ex_system_disk:
        system_disk = self._get_system_disk(ex_system_disk)
        if system_disk:
            params.update(system_disk)
    if ex_data_disks:
        data_disks = self._get_data_disks(ex_data_disks)
        if data_disks:
            params.update(data_disks)
    if ex_vswitch_id:
        params['VSwitchId'] = ex_vswitch_id
    if ex_private_ip_address:
        if (not ex_vswitch_id):
            raise AttributeError('must    provide    ex_private_ip_address        and    ex_vswitch_id    at    the    same    time')
        else:
            params['PrivateIpAddress'] = ex_private_ip_address
    if ex_client_token:
        params['ClientToken'] = ex_client_token
    resp = self.connection.request(self.path, params=params)
    node_id = findtext(resp.object, xpath='InstanceId', namespace=self.namespace)
    nodes = self.list_nodes(ex_node_ids=[node_id])
    if (len(nodes) != 1):
        raise LibcloudError(('could    not    find    the    new    created    node    with    id    %s.    ' % node_id), driver=self)
    node = nodes[0]
    self.ex_start_node(node)
    self._wait_until_state(nodes, NodeState.RUNNING)
    return node
