Part of libcloud.compute.drivers.gandi View Source View In Hierarchy
Method | list_nodes | List all nodes @return: list of Node objects |
Method | reboot_node | Reboot a node. @return: bool True if the reboot was
successful, otherwise False |
Method | destroy_node | Destroy a node. |
Method | deploy_node | Create a new node, and start deployment. |
Method | create_node | Create a new Gandi node |
Method | list_images | List images on a provider @return: list of NodeImage
objects |
Method | list_sizes | List sizes on a provider @return: list of NodeSize
objects |
Method | list_locations | List data centers for a provider @return: list of NodeLocation
objects |
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 | _node_info | Undocumented |
Method | _to_node | Undocumented |
Method | _to_nodes | Undocumented |
Method | _to_image | Undocumented |
Method | _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 | __init__ | Undocumented |
Method | _wait_operation | Wait for an operation to succeed |
Inherited from NodeDriver:
Method | __init__ | |
Method | _wait_until_running | Block until node is fully booted and has an IP address assigned. |
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. |
Returns | bool True if the reboot was successful, otherwise False |
Depending upon the provider, this may destroy all data associated with the node, including backups.
Returns | bool True if the destroy was successful, otherwise False |
Depends on a Provider Driver supporting either using a specific password or returning a generated password.
This function may raise a DeploymentException
, if a
create_node call was successful, but there is a later error (like SSH
failing or timing out). This exception includes a Node object which you
may want to destroy if incomplete deployments are not desirable.
Parameters | deploy | Deployment to run once machine is online and availble to SSH. (type: Deployment ) |
ssh_username | Optional name of the account which is used when connecting to SSH server
(default is root) (type: str ) | |
ssh_port | Optional SSH server port (default is 22) (type: int ) | |
ssh_timeout | Optional SSH connection timeout in seconds (default is None) (type: float ) | |
auth | Initial authentication information for the node (optional) (type: NodeAuthSSHKey
or NodeAuthPassword ) | |
ssh_key | A path (or paths) to an SSH private key with which to attempt to
authenticate. (optional) (type: string or list of string s
See >>> from libcloud.compute.drivers.dummy import DummyNodeDriver >>> from libcloud.compute.deployment import ScriptDeployment >>> from libcloud.compute.deployment import MultiStepDeployment >>> from libcloud.compute.base import NodeAuthSSHKey >>> driver = DummyNodeDriver(0) >>> key = NodeAuthSSHKey('...') # read from file >>> script = ScriptDeployment("yum -y install emacs strace tcpdump") >>> msd = MultiStepDeployment([key, script]) >>> def d(): ... try: ... node = driver.deploy_node(deploy=msd) ... except NotImplementedError: ... print "not implemented for dummy driver" >>> d() not implemented for dummy driver Deploy node is typically not overridden in subclasses. The existing implementation should be able to handle most such. ) |
Parameters | name | String with a name for this new node (required) (type: str) |
image | OS Image to boot on node. (required) (type: NodeImage ) | |
location | Which data center to create a node in. If empty, undefined behavoir will be
selected. (optional) (type: NodeLocation ) | |
size | The size of resources allocated to this node. (required) (type: NodeSize ) | |
login | user name to create for login on machine (required) (type: String) | |
password | password for user that'll be created (required) (type: String) | |
Unknown Field: keywork | inet_family | version of ip to use, default 4 (optional) |
Returns | list of NodeImage
objects |
Returns | list of NodeSize
objects |
Returns | list of NodeLocation
objects |