l.c.d.g.GandiNodeDriver(BaseGandiDriver, NodeDriver) : class documentation

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

Gandi node driver
Method __init__ @inherits: L{NodeDriver.__init__}
Method list_nodes List all nodes @return: list of node objects @rtype: C{list} of L{Node}
Method reboot_node Reboot a node.
Method destroy_node Destroy a node.
Method deploy_node deploy_node is not implemented for gandi driver
Method create_node Create a new Gandi node
Method list_images List images on a provider
Method list_instance_type Undocumented
Method list_sizes List sizes on a provider
Method list_locations List data centers for a provider
Method list_volumes @rtype: C{list} of L{StorageVolume}
Method create_volume Create a new volume.
Method attach_volume Attaches volume to node.
Method detach_volume Detaches a volume from a node.
Method destroy_volume Destroys a storage volume.
Method ex_list_interfaces Specific method to list network interfaces
Method ex_list_disks Specific method to list all disk
Method ex_node_attach_disk Specific method to attach a disk to a node
Method ex_node_detach_disk Specific method to detach a disk from a node
Method ex_node_attach_interface Specific method to attach an interface to a node
Method ex_node_detach_interface Specific method to detach an interface from a node
Method ex_snapshot_disk Specific method to make a snapshot of a disk
Method ex_update_disk Specific method to update size or name of a disk WARNING: if a server is attached it'll be rebooted
Method _resource_info Undocumented
Method _node_info Undocumented
Method _volume_info Undocumented
Method _to_node Undocumented
Method _to_nodes Undocumented
Method _to_volume Undocumented
Method _to_volumes Undocumented
Method _to_image Undocumented
Method _to_size Undocumented
Method _instance_type_to_size Undocumented
Method _to_loc Undocumented
Method _to_iface Undocumented
Method _to_ifaces Undocumented
Method _to_disk Undocumented
Method _to_disks Undocumented

Inherited from BaseGandiDriver:

Method _wait_operation Wait for an operation to succeed

Inherited from NodeDriver:

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 __init__(self, *args, **kwargs): (source)
@inherits: L{NodeDriver.__init__}
def _resource_info(self, type, id): (source)
Undocumented
def _node_info(self, id): (source)
Undocumented
def _volume_info(self, id): (source)
Undocumented
def _to_node(self, vm): (source)
Undocumented
def _to_nodes(self, vms): (source)
Undocumented
def _to_volume(self, disk): (source)
Undocumented
def _to_volumes(self, disks): (source)
Undocumented
def list_nodes(self): (source)
List all nodes
@return:  list of node objects
@rtype: C{list} of L{Node}
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 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 deploy_node(self, **kwargs): (source)
deploy_node is not implemented for gandi driver

@rtype: C{bool}
def create_node(self, **kwargs): (source)
Create a new Gandi node

@keyword    name:   String with a name for this new node (required)
@type       name:   C{str}

@keyword    image:  OS Image to boot on node. (required)
@type       image:  L{NodeImage}

@keyword    location: Which data center to create a node in. If empty,
                      undefined behavior will be selected. (optional)
@type       location: L{NodeLocation}

@keyword    size:   The size of resources allocated to this node.
                    (required)
@type       size:   L{NodeSize}

@keyword    login: user name to create for login on machine (required)
@type       login: C{str}

@keyword    password: password for user that'll be created (required)
@type       password: C{str}

@keyword    inet_family: version of ip to use, default 4 (optional)
@type       inet_family: C{int}

@rtype: L{Node}
def _to_image(self, img): (source)
Undocumented
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 _to_size(self, id, size): (source)
Undocumented
def _instance_type_to_size(self, instance): (source)
Undocumented
def list_instance_type(self, location=None): (source)
Undocumented
def list_sizes(self, location=None): (source)
List sizes on a provider

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

@return: list of node size objects
@rtype: C{list} of L{NodeSize}
def _to_loc(self, loc): (source)
Undocumented
def list_locations(self): (source)
List data centers for a provider

@return: list of node location objects
@rtype: C{list} of L{NodeLocation}
def list_volumes(self): (source)
@rtype: C{list} of L{StorageVolume}
def create_volume(self, size, name, location=None, snapshot=None): (source)
Create a new volume.

@param      size: Size of volume in gigabytes (required)
@type       size: C{int}

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

@keyword    location: Which data center to create a volume in. If
                       empty, undefined behavoir will be selected.
                       (optional)
@type       location: L{NodeLocation}

@keyword    snapshot:  Name of snapshot from which to create the new
                       volume.  (optional)
@type       snapshot:  C{str}

@return: The newly created volume.
@rtype: L{StorageVolume}
def attach_volume(self, node, volume, device=None): (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}

@param      device: Where the device is exposed,
                    e.g. '/dev/sdb (optional)
@type       device: C{str}

@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 destroy_volume(self, volume): (source)
Destroys a storage volume.

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

@rtype: C{bool}
def _to_iface(self, iface): (source)
Undocumented
def _to_ifaces(self, ifaces): (source)
Undocumented
def ex_list_interfaces(self): (source)
Specific method to list network interfaces

@rtype: C{list} of L{GandiNetworkInterface}
def _to_disk(self, element): (source)
Undocumented
def _to_disks(self, elements): (source)
Undocumented
def ex_list_disks(self): (source)
Specific method to list all disk

@rtype: C{list} of L{GandiDisk}
def ex_node_attach_disk(self, node, disk): (source)
Specific method to attach a disk to a node

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

@param      disk: Disk which should be used
@type       disk: L{GandiDisk}

@rtype: C{bool}
def ex_node_detach_disk(self, node, disk): (source)
Specific method to detach a disk from a node

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

@param      disk: Disk which should be used
@type       disk: L{GandiDisk}

@rtype: C{bool}
def ex_node_attach_interface(self, node, iface): (source)
Specific method to attach an interface to a node

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


@param      iface: Network interface which should be used
@type       iface: L{GandiNetworkInterface}

@rtype: C{bool}
def ex_node_detach_interface(self, node, iface): (source)
Specific method to detach an interface from a node

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


@param      iface: Network interface which should be used
@type       iface: L{GandiNetworkInterface}

@rtype: C{bool}
def ex_snapshot_disk(self, disk, name=None): (source)
Specific method to make a snapshot of a disk

@param      disk: Disk which should be used
@type       disk: L{GandiDisk}

@param      name: Name which should be used
@type       name: C{str}

@rtype: C{bool}
def ex_update_disk(self, disk, new_size=None, new_name=None): (source)
Specific method to update size or name of a disk
WARNING: if a server is attached it'll be rebooted

@param      disk: Disk which should be used
@type       disk: L{GandiDisk}

@param      new_size: New size
@type       new_size: C{int}

@param      new_name: New name
@type       new_name: C{str}

@rtype: C{bool}
API Documentation for libcloud, generated by pydoctor at 2013-09-18 15:42:48.