'Creates a RimuHosting instance
@inherits: :class:`NodeDriver.create_node`
:keyword    name: Must be a FQDN. e.g example.com.
:type       name: ``str``
:keyword    ex_billing_oid: If not set,
a billing method is automatically picked.
:type       ex_billing_oid: ``str``
:keyword    ex_host_server_oid: The host server to set the VPS up on.
:type       ex_host_server_oid: ``str``
:keyword    ex_vps_order_oid_to_clone: Clone another VPS to use as
the image for the new VPS.
:type       ex_vps_order_oid_to_clone: ``str``
:keyword    ex_num_ips: Number of IPs to allocate. Defaults to 1.
:type       ex_num_ips: ``int``
:keyword    ex_extra_ip_reason: Reason for needing the extra IPs.
:type       ex_extra_ip_reason: ``str``
:keyword    ex_memory_mb: Memory to allocate to the VPS.
:type       ex_memory_mb: ``int``
:keyword    ex_disk_space_mb: Diskspace to allocate to the VPS.
Defaults to 4096 (4GB).
:type       ex_disk_space_mb: ``int``
:keyword    ex_disk_space_2_mb: Secondary disk size allocation.
Disabled by default.
:type       ex_disk_space_2_mb: ``int``
:keyword    ex_control_panel: Control panel to install on the VPS.
:type       ex_control_panel: ``str``'

def create_node(self, **kwargs):

    name = kwargs['name']
    image = kwargs['image']
    size = kwargs['size']
    data = {'instantiation_options': {'domain_name': name, 'distro': image.id}, 'pricing_plan_code': size.id, 'vps_parameters': {}}
    if ('ex_control_panel' in kwargs):
        data['instantiation_options']['control_panel'] = kwargs['ex_control_panel']
    auth = self._get_and_check_auth(kwargs.get('auth'))
    data['instantiation_options']['password'] = auth.password
    if ('ex_billing_oid' in kwargs):
        data['billing_oid'] = kwargs['ex_billing_oid']
    if ('ex_host_server_oid' in kwargs):
        data['host_server_oid'] = kwargs['ex_host_server_oid']
    if ('ex_vps_order_oid_to_clone' in kwargs):
        data['vps_order_oid_to_clone'] = kwargs['ex_vps_order_oid_to_clone']
    if (('ex_num_ips' in kwargs) and (int(kwargs['ex_num_ips']) > 1)):
        if ('ex_extra_ip_reason' not in kwargs):
            raise RimuHostingException('Need    an    reason    for    having    an    extra    IP')
        else:
            if ('ip_request' not in data):
                data['ip_request'] = {}
            data['ip_request']['num_ips'] = int(kwargs['ex_num_ips'])
            data['ip_request']['extra_ip_reason'] = kwargs['ex_extra_ip_reason']
    if ('ex_memory_mb' in kwargs):
        data['vps_parameters']['memory_mb'] = kwargs['ex_memory_mb']
    if ('ex_disk_space_mb' in kwargs):
        data['vps_parameters']['disk_space_mb'] = kwargs['ex_disk_space_mb']
    if ('ex_disk_space_2_mb' in kwargs):
        data['vps_parameters']['disk_space_2_mb'] = kwargs['ex_disk_space_2_mb']
    if (not data['vps_parameters']):
        del data['vps_parameters']
    res = self.connection.request('/orders/new-vps', method='POST', data=json.dumps({'new-vps': data})).object
    node = self._to_node(res['about_order'])
    node.extra['password'] = res['new_order_request']['instantiation_options']['password']
    return node
