This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.api.openstack.create_instance_helper Module

exception nova.api.openstack.create_instance_helper.CreateFault(fault)

Bases: nova.exception.NovaException

class nova.api.openstack.create_instance_helper.CreateInstanceHelper(controller)

Bases: object

This is the base class for OS API Controllers that are capable of creating instances (currently Servers and Zones).

Once we stabilize the Zones portion of the API we may be able to move this code back into servers.py

create_instance(req, body, create_method)

Creates a new server for the given user. The approach used depends on the create_method. For example, the standard POST /server call uses compute.api.create(), while POST /zones/server uses compute.api.create_all_at_once().

The problem is, both approaches return different values (i.e. [instance dicts] vs. reservation_id). So the handling of the return type from this method is left to the caller.

class nova.api.openstack.create_instance_helper.ServerXMLDeserializer(metadata=None)

Bases: nova.api.openstack.wsgi.XMLDeserializer

Deserializer to handle xml-formatted server create requests.

Handles standard server attributes as well as optional metadata and personality attributes

create(string)

Deserialize an xml-formatted server create request

class nova.api.openstack.create_instance_helper.ServerXMLDeserializerV11(metadata=None)

Bases: nova.api.openstack.wsgi.MetadataXMLDeserializer

Deserializer to handle xml-formatted server create requests.

Handles standard server attributes as well as optional metadata and personality attributes

action(string)
create(string)

Deserialize an xml-formatted server create request