'Creates an ElasticStack instance
@inherits: :class:`NodeDriver.create_node`
:keyword    name: String with a name for this new node (required)
:type       name: ``str``
:keyword    smp: Number of virtual processors or None to calculate
based on the cpu speed
:type       smp: ``int``
:keyword    nic_model: e1000, rtl8139 or virtio
(if not specified, e1000 is used)
:type       nic_model: ``str``
:keyword    vnc_password: If set, the same password is also used for
SSH access with user toor,
otherwise VNC access is disabled and
no SSH login is possible.
:type       vnc_password: ``str``'

def create_node(self, **kwargs):

    size = kwargs['size']
    image = kwargs['image']
    smp = kwargs.get('smp', 'auto')
    nic_model = kwargs.get('nic_model', 'e1000')
    vnc_password = ssh_password = kwargs.get('vnc_password', None)
    if (nic_model not in ('e1000', 'rtl8139', 'virtio')):
        raise ElasticStackException('Invalid    NIC    model    specified')
    drive_data = {}
    drive_data.update({'name': kwargs['name'], 'size': ('%sG' % kwargs['size'].disk)})
    response = self.connection.request(action='/drives/create', data=json.dumps(drive_data), method='POST').object
    if (not response):
        raise ElasticStackException('Drive    creation    failed')
    drive_uuid = response['drive']
    response = self.connection.request(action=('/drives/%s/image/%s/gunzip' % (drive_uuid, image.id)), method='POST')
    if (response.status not in (200, 204)):
        raise ElasticStackException('Drive    imaging    failed')
    response = self.connection.request(action=('/drives/%s/info' % drive_uuid)).object
    imaging_start = time.time()
    while ('imaging' in response):
        response = self.connection.request(action=('/drives/%s/info' % drive_uuid)).object
        elapsed_time = (time.time() - imaging_start)
        if (('imaging' in response) and (elapsed_time >= IMAGING_TIMEOUT)):
            raise ElasticStackException('Drive    imaging    timed    out')
        time.sleep(1)
    node_data = {}
    node_data.update({'name': kwargs['name'], 'cpu': size.cpu, 'mem': size.ram, 'ide:0:0': drive_uuid, 'boot': 'ide:0:0', 'smp': smp})
    node_data.update({'nic:0:model': nic_model, 'nic:0:dhcp': 'auto'})
    if vnc_password:
        node_data.update({'vnc': 'auto', 'vnc:password': vnc_password})
    response = self.connection.request(action='/servers/create', data=json.dumps(node_data), method='POST').object
    if isinstance(response, list):
        nodes = [self._to_node(node, ssh_password) for node in response]
    else:
        nodes = self._to_node(response, ssh_password)
    return nodes
