l.c.d.i.IBMNodeDriver(NodeDriver) : class documentation

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

Node driver for IBM SmartCloud Enterprise
Method create_node Creates a node in the IBM SmartCloud Enterprise.
Method create_volume Create a new block storage volume (virtual disk)
Method create_image Create a new node image from an existing volume or image.
Method destroy_node Destroy a node.
Method destroy_volume Destroys a storage volume.
Method ex_destroy_image Destroys an image.
Method attach_volume Attaches volume to node.
Method detach_volume Detaches a volume from a node.
Method reboot_node Reboot 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_volumes List storage volumes.
Method list_sizes No summary
Method list_locations List data centers for a provider
Method ex_list_storage_offerings List the storage center offerings
Method ex_allocate_address Allocate a new reserved IP address
Method ex_list_addresses List the reserved IP addresses
Method ex_copy_to Copies a node image to a storage volume
Method ex_delete_address Delete a reserved IP address
Method ex_wait_storage_state Block until storage volume state changes to the given value
Method _to_nodes Undocumented
Method _to_node Undocumented
Method _to_images Undocumented
Method _to_image Undocumented
Method _to_locations Undocumented
Method _to_location Undocumented
Method _to_node_sizes Undocumented
Method _to_node_size Undocumented
Method _to_volumes Undocumented
Method _to_volume Undocumented
Method _to_volume_offerings Undocumented
Method _to_volume_offering Undocumented
Method _to_addresses Undocumented
Method _to_address Undocumented

Inherited from NodeDriver:

Method __init__ @param key: API key or username to be used (required) @type key: C{str}
Method deploy_node Create a new node, and start deployment.
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 _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 create_node(self, **kwargs): (source)
Creates a node in the IBM SmartCloud Enterprise.

See L{NodeDriver.create_node} for more keyword args.

@inherits: L{NodeDriver.create_node}

@keyword    auth: Name of the pubkey to use. When constructing
    C{NodeAuthSSHKey} instance, 'pubkey' argument must be the name of
    the public key to use. You chose this name when creating
    a new public key on the IBM server.
@type       auth: L{NodeAuthSSHKey}

@keyword    ex_configurationData: Image-specific configuration
    parameters. Configuration parameters are defined in the parameters
    .xml file.  The URL to this file is defined in the NodeImage at
    extra[parametersURL].
    Note: This argument must be specified when launching a Windows
    instance. It must contain 'UserName' and 'Password' keys.
@type       ex_configurationData: C{dict}
def create_volume(self, size, name, location, **kwargs): (source)
Create a new block storage volume (virtual disk)

@param      size: Size of volume in gigabytes (required).
                  Find out the possible sizes from the
                  offerings/storage REST interface
@type       size: C{int}

@keyword    name: Name of the volume to be created (required)
@type       name: C{str}

@keyword    location: Which data center to create a volume in. If
                      empty, it will fail for IBM SmartCloud Enterprise
                      (required)
@type       location: L{NodeLocation}

@keyword    snapshot:  Not supported for IBM SmartCloud Enterprise
@type       snapshot:  C{str}

@keyword    kwargs.format:  Either RAW or EXT3 for IBM SmartCloud
                            Enterprise (optional)
@type       kwargs.format:  C{str}

@keyword    kwargs.offering_id:  The storage offering ID for IBM
                                 SmartCloud Enterprise
                                 Find this from the REST interface
                                 storage/offerings. (optional)
@type       kwargs.offering_id:  C{str}

@keyword    kwargs.source_disk_id:  If cloning a volume, the storage
                                    disk to make a copy from (optional)
@type       kwargs.source_disk_id:  C{str}

@keyword    kwargs.storage_area_id:  The id of the storage availability
                                     area to create the volume in
                                     (optional)
@type       kwargs.storage_area_id:  C{str}

@keyword    kwargs.target_location_id:  If cloning a volume, the
                                        storage disk to make a copy
                                        from (optional)
@type       kwargs.target_location_id:  C{str}

@return: The newly created L{StorageVolume}.
@rtype: L{StorageVolume}
def create_image(self, name, description=None, **kwargs): (source)
Create a new node image from an existing volume or image.

@param      name: Name of the image to be created (required)
@type       name: C{str}

@param      description: Description of the image to be created
@type       description: C{str}

@keyword    image_id:  The ID of the source image if cloning the image
@type       image_id:  C{str}

@keyword    volume_id:  The ID of the storage volume if
                        importing the image
@type       volume_id:  C{str}

@return: The newly created L{NodeImage}.
@rtype: L{NodeImage}
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 destroy_volume(self, volume): (source)
Destroys a storage volume.

@param      volume: Volume to be destroyed
@type       volume: L{StorageVolume}

@rtype: C{bool}
def ex_destroy_image(self, image): (source)
Destroys an image.

@param      image: Image to be destroyed
@type       image: L{NodeImage}

@return: C{bool}
def attach_volume(self, node, volume): (source)
Attaches volume to node.

@param      node: Node to attach volume to
@type       node: L{Node}

@param      volume: Volume to attach
@type       volume: L{StorageVolume}

@rtype: C{bool}
def detach_volume(self, node, volume): (source)
Detaches a volume from a node.

@param      node: Node which should be used
@type       node: L{Node}

@param      volume: Volume to be detached
@type       volume: L{StorageVolume}

@rtype: C{bool}
def reboot_node(self, node): (source)
Reboot a node.

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

@return: True if the reboot 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_volumes(self): (source)
List storage volumes.

@rtype: C{list} of L{StorageVolume}
def list_sizes(self, location=None): (source)
Returns a generic list of sizes.  See list_images() for a list of
supported sizes for specific images.  In particular, you need to have
a size that matches the architecture (32-bit vs 64-bit) of the virtual
machine image operating system.

@inherits: L{NodeDriver.list_sizes}
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_storage_offerings(self): (source)
List the storage center offerings

@rtype: C{list} of L{VolumeOffering}
def ex_allocate_address(self, location_id, offering_id, vlan_id=None): (source)
Allocate a new reserved IP address

@param      location_id: Target data center
@type       location_id: C{str}

@param      offering_id: Offering ID for address to create
@type       offering_id: C{str}

@param      vlan_id: ID of target VLAN
@type       vlan_id: C{str}

@return: L{Address} object
@rtype: L{Address}
def ex_list_addresses(self, resource_id=None): (source)
List the reserved IP addresses

@param      resource_id: If this is supplied only a single address will
 be returned (optional)
@type       resource_id: C{str}

@rtype: C{list} of L{Address}
def ex_copy_to(self, image, volume): (source)
Copies a node image to a storage volume

@param      image: source image to copy
@type       image: L{NodeImage}

@param      volume: Target storage volume to copy to
@type       volume: L{StorageVolume}

@return: C{bool} The success of the operation
@rtype: C{bool}
def ex_delete_address(self, resource_id): (source)
Delete a reserved IP address

@param      resource_id: The address to delete (required)
@type       resource_id: C{str}

@rtype: C{bool}
def ex_wait_storage_state(self, volume, state=VolumeState.DETACHED, wait_period=60, timeout=1200): (source)
Block until storage volume state changes to the given value

@param      volume: Storage volume.
@type       volume: L{StorageVolume}

@param      state: The target state to wait for
@type       state: C{int}

@param      wait_period: How many seconds to between each loop
                         iteration (default is 3)
@type       wait_period: C{int}

@param      timeout: How many seconds to wait before timing out
                     (default is 1200)
@type       timeout: C{int}

@rtype: L{StorageVolume}
def _to_nodes(self, object): (source)
Undocumented
def _to_node(self, instance): (source)
Undocumented
def _to_images(self, object): (source)
Undocumented
def _to_image(self, image): (source)
Undocumented
def _to_locations(self, object): (source)
Undocumented
def _to_location(self, location): (source)
Undocumented
def _to_node_sizes(self, object): (source)
Undocumented
def _to_node_size(self, object): (source)
Undocumented
def _to_volumes(self, object): (source)
Undocumented
def _to_volume(self, object): (source)
Undocumented
def _to_volume_offerings(self, object): (source)
Undocumented
def _to_volume_offering(self, object): (source)
Undocumented
def _to_addresses(self, object): (source)
Undocumented
def _to_address(self, object): (source)
Undocumented
API Documentation for libcloud, generated by pydoctor at 2013-02-18 10:41:20.