'Create server.
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/compute/#create-server
:param name: Server name
:param imageRef: Image reference (UUID)
:param flavorRef: Flavor reference (UUID or full URL)
Most parameters except the following are passed to the API without
any changes.
:param disk_config: The name is changed to OS-DCF:diskConfig
:param scheduler_hints: The name is changed to os:scheduler_hints and
the parameter is set in the same level as the parameter \'server\'.'

def create_server(self, **kwargs):

    body = copy.deepcopy(kwargs)
    if body.get('disk_config'):
        body['OS-DCF:diskConfig'] = body.pop('disk_config')
    hints = None
    if body.get('scheduler_hints'):
        hints = {'os:scheduler_hints': body.pop('scheduler_hints')}
    post_body = {'server': body}
    if hints:
        post_body.update(hints)
    post_body = json.dumps(post_body)
    (resp, body) = self.post('servers', post_body)
    body = json.loads(body)
    if ('reservation_id' in body):
        return rest_client.ResponseBody(resp, body)
    if self.enable_instance_password:
        create_schema = schema.create_server_with_admin_pass
    else:
        create_schema = schema.create_server
    self.validate_response(create_schema, resp, body)
    return rest_client.ResponseBody(resp, body)
