l.c.d.o.OpenNebulaNodeDriver(NodeDriver) : class documentation

Part of libcloud.compute.drivers.opennebula View Source View In Hierarchy

Known subclasses: libcloud.compute.drivers.opennebula.OpenNebula_1_4_NodeDriver, libcloud.compute.drivers.opennebula.OpenNebula_2_0_NodeDriver

OpenNebula.org node driver.
Method __new__ Undocumented
Method create_node Create a new OpenNebula node.
Method destroy_node Destroy a node.
Method list_nodes List all nodes @return: list of node objects @rtype: C{list} of L{Node}
Method list_images List images on a provider
Method list_sizes Return list of sizes on a provider.
Method list_locations List data centers for a provider
Method ex_list_networks List virtual networks on a provider.
Method ex_node_action Build action representation and instruct node to commit action.
Method _to_images Request a list of images and convert that list to a list of NodeImage objects.
Method _to_image Take XML object containing an image description and convert to NodeImage object.
Method _to_networks Request a list of networks and convert that list to a list of OpenNebulaNetwork objects.
Method _to_network Take XML object containing a network description and convert to OpenNebulaNetwork object.
Method _to_nodes Request a list of compute nodes and convert that list to a list of Node objects.
Method _to_node Take XML object containing a compute node description and convert to Node object.
Method _extract_networks Extract networks from a compute node XML representation.
Method _extract_images Extract image disks from a compute node XML representation.

Inherited from NodeDriver:

Method __init__ @param key: API key or username to be used (required) @type key: C{str}
Method reboot_node Reboot a node.
Method deploy_node Create a new node, and start deployment.
Method create_volume Create a new volume.
Method destroy_volume Destroys a storage volume.
Method attach_volume Attaches volume to node.
Method detach_volume Detaches a volume from a node.
Method wait_until_running Block until the given nodes are fully booted and have an IP address assigned.
Method _wait_until_running Undocumented
Method _ssh_client_connect Try to connect to the remote SSH server. If a connection times out or is refused it is retried up to timeout number of seconds.
Method _connect_and_run_deployment_script Undocumented
Method _run_deployment_script Run the deployment script on the provided node. At this point it is assumed that SSH connection has already been established.
Method _get_size_price Undocumented

Inherited from BaseDriver (via NodeDriver):

Method _ex_connection_class_kwargs Return extra connection keyword arguments which are passed to the Connection class constructor.
def __new__(cls, key, secret=None, api_version=DEFAULT_API_VERSION, **kwargs): (source)
Undocumented
def create_node(self, **kwargs): (source)
Create a new OpenNebula node.

@inherits: L{NodeDriver.create_node}

@keyword networks: List of virtual networks to which this node should
                   connect. (optional)
@type    networks: L{OpenNebulaNetwork} or
    C{list} of L{OpenNebulaNetwork}
def destroy_node(self, node): (source)
Destroy a node.

Depending upon the provider, this may destroy all data associated with
the node, including backups.

@param node: The node to be destroyed
@type node: L{Node}

@return: True if the destroy was successful, otherwise False
@rtype: C{bool}
def list_nodes(self): (source)
List all nodes
@return:  list of node objects
@rtype: C{list} of L{Node}
def list_images(self, location=None): (source)
List images on a provider

@keyword location: The location at which to list images
@type location: L{NodeLocation}

@return: list of node image objects
@rtype: C{list} of L{NodeImage}
def list_sizes(self, location=None): (source)
Return list of sizes on a provider.

@inherits: L{NodeDriver.list_sizes}

@return: List of compute node sizes supported by the cloud provider.
@rtype:  C{list} of L{OpenNebulaNodeSize}
def list_locations(self): (source)
List data centers for a provider

@return: list of node location objects
@rtype: C{list} of L{NodeLocation}
def ex_list_networks(self, location=None): (source)
List virtual networks on a provider.

@type  location: L{NodeLocation}
@param location: Location from which to request a list of virtual
                 networks. (optional)

@return: List of virtual networks available to be connected to a
         compute node.
@rtype:  C{list} of L{OpenNebulaNetwork}
def ex_node_action(self, node, action): (source)
Build action representation and instruct node to commit action.

Build action representation from the compute node ID, and the
action which should be carried out on that compute node. Then
instruct the node to carry out that action.

@param node: Compute node instance.
@type  node: L{Node}

@param action: Action to be carried out on the compute node.
@type  action: C{str}

@return: False if an HTTP Bad Request is received, else, True is
         returned.
@rtype:  C{bool}
def _to_images(self, object): (source)
Request a list of images and convert that list to a list of NodeImage
objects.

Request a list of images from the OpenNebula web interface, and
issue a request to convert each XML object representation of an image
to a NodeImage object.

@rtype:  C{list} of L{NodeImage}
@return: List of images.
def _to_image(self, image): (source)
Take XML object containing an image description and convert to
NodeImage object.

@type  image: L{ElementTree}
@param image: XML representation of an image.

@rtype:  L{NodeImage}
@return: The newly extracted L{NodeImage}.
def _to_networks(self, object): (source)
Request a list of networks and convert that list to a list of
OpenNebulaNetwork objects.

Request a list of networks from the OpenNebula web interface, and
issue a request to convert each XML object representation of a network
to an OpenNebulaNetwork object.

@rtype:  C{list} of L{OpenNebulaNetwork}
@return: List of virtual networks.
def _to_network(self, element): (source)
Take XML object containing a network description and convert to
OpenNebulaNetwork object.

Take XML representation containing a network description and
convert to OpenNebulaNetwork object.

@rtype:  L{OpenNebulaNetwork}
@return: The newly extracted L{OpenNebulaNetwork}.
def _to_nodes(self, object): (source)
Request a list of compute nodes and convert that list to a list of
Node objects.

Request a list of compute nodes from the OpenNebula web interface, and
issue a request to convert each XML object representation of a node
to a Node object.

@rtype:  C{list} of L{Node}
@return: A list of compute nodes.
def _to_node(self, compute): (source)
Take XML object containing a compute node description and convert to
Node object.

Take XML representation containing a compute node description and
convert to Node object.

@type  compute: L{ElementTree}
@param compute: XML representation of a compute node.

@rtype:  L{Node}
@return: The newly extracted L{Node}.
def _extract_networks(self, compute): (source)
Extract networks from a compute node XML representation.

Extract network descriptions from a compute node XML representation,
converting each network to an OpenNebulaNetwork object.

@type  compute: L{ElementTree}
@param compute: XML representation of a compute node.

@rtype:  C{list} of L{OpenNebulaNetwork}s.
@return: List of virtual networks attached to the compute node.
def _extract_images(self, compute): (source)
Extract image disks from a compute node XML representation.

Extract image disk descriptions from a compute node XML representation,
converting the disks to an NodeImage object.

@type  compute: L{ElementTree}
@param compute: XML representation of a compute node.

@rtype:  L{NodeImage}.
@return: First disk attached to a compute node.
API Documentation for libcloud, generated by pydoctor at 2013-07-01 17:02:02.