'Create a new SoftLayer node
@inherits: :class:`NodeDriver.create_node`
:keyword    ex_domain: e.g. libcloud.org
:type       ex_domain: ``str``
:keyword    ex_cpus: e.g. 2
:type       ex_cpus: ``int``
:keyword    ex_disk: e.g. 100
:type       ex_disk: ``int``
:keyword    ex_ram: e.g. 2048
:type       ex_ram: ``int``
:keyword    ex_bandwidth: e.g. 100
:type       ex_bandwidth: ``int``
:keyword    ex_local_disk: e.g. True
:type       ex_local_disk: ``bool``
:keyword    ex_datacenter: e.g. Dal05
:type       ex_datacenter: ``str``
:keyword    ex_os: e.g. UBUNTU_LATEST
:type       ex_os: ``str``
:keyword    ex_keyname: The name of the key pair
:type       ex_keyname: ``str``'

def create_node(self, **kwargs):

    name = kwargs['name']
    os = 'DEBIAN_LATEST'
    if ('ex_os' in kwargs):
        os = kwargs['ex_os']
    elif ('image' in kwargs):
        os = kwargs['image'].id
    size = kwargs.get('size', NodeSize(id=123, name='Custom', ram=None, disk=None, bandwidth=None, price=None, driver=self.connection.driver))
    ex_size_data = (SL_TEMPLATES.get(int(size.id)) or {})
    cpu_count = (kwargs.get('ex_cpus') or ex_size_data.get('cpus') or DEFAULT_CPU_SIZE)
    ram = (kwargs.get('ex_ram') or ex_size_data.get('ram') or DEFAULT_RAM_SIZE)
    bandwidth = (kwargs.get('ex_bandwidth') or size.bandwidth or 10)
    hourly = ('true' if kwargs.get('ex_hourly', True) else 'false')
    local_disk = 'true'
    if (ex_size_data.get('local_disk') is False):
        local_disk = 'false'
    if (kwargs.get('ex_local_disk') is False):
        local_disk = 'false'
    disk_size = DEFAULT_DISK_SIZE
    if size.disk:
        disk_size = size.disk
    if kwargs.get('ex_disk'):
        disk_size = kwargs.get('ex_disk')
    datacenter = ''
    if ('ex_datacenter' in kwargs):
        datacenter = kwargs['ex_datacenter']
    elif ('location' in kwargs):
        datacenter = kwargs['location'].id
    domain = kwargs.get('ex_domain')
    if (domain is None):
        if (name.find('.') != (-1)):
            domain = name[(name.find('.') + 1):]
    if (domain is None):
        domain = DEFAULT_DOMAIN
    newCCI = {'hostname': name, 'domain': domain, 'startCpus': cpu_count, 'maxMemory': ram, 'networkComponents': [{'maxSpeed': bandwidth}], 'hourlyBillingFlag': hourly, 'operatingSystemReferenceCode': os, 'localDiskFlag': local_disk, 'blockDevices': [{'device': '0', 'diskImage': {'capacity': disk_size}}]}
    if datacenter:
        newCCI['datacenter'] = {'name': datacenter}
    if ('ex_keyname' in kwargs):
        newCCI['sshKeys'] = [{'id': self._key_name_to_id(kwargs['ex_keyname'])}]
    res = self.connection.request('SoftLayer_Virtual_Guest', 'createObject', newCCI).object
    node_id = res['id']
    raw_node = self._get_order_information(node_id)
    return self._to_node(raw_node)
