Part of libcloud.compute.drivers.linode View Source View In Hierarchy
libcloud driver for the Linode API Rough mapping of which is which: list_nodes linode.list reboot_node linode.reboot destroy_node linode.delete create_node linode.create, linode.update, linode.disk.createfromdistribution, linode.disk.create, linode.config.create, linode.ip.addprivate, linode.boot list_sizes avail.linodeplans list_images avail.distributions list_locations avail.datacenters For more information on the Linode API, be sure to read the reference: http://www.linode.com/api/
Method | __init__ | Instantiate the driver with the given API key |
Method | list_nodes | List all Linodes that the API key can access |
Method | reboot_node | Reboot the given Linode |
Method | destroy_node | Destroy the given Linode |
Method | create_node | Create a new Linode, deploy a Linux distribution, and boot |
Method | list_sizes | List available Linode plans |
Method | list_images | List available Linux distributions |
Method | list_locations | List available facilities for deployment |
Method | linode_set_datacenter | Set the default datacenter for Linode creation |
Method | _to_nodes | Convert returned JSON Linodes into Node instances |
Inherited from NodeDriver:
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 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. |
Parameters | key | the API key to use (type: str ) |
Unknown Field: requires | key |
List all Linodes that the API key can access This call will return all Linodes that the API key in use has access to. If a node is in this list, rebooting will work; however, creation and destruction are a separate grant. @return: List of node objects that the API key can access @rtype: C{list} of L{Node}
Will issue a shutdown job followed by a boot job, using the last booted configuration. In most cases, this will be the only configuration.
Parameters | node | the Linode to reboot (type: Node ) |
Returns | (type: bool ) |
Will remove the Linode from the account and issue a prorated credit. A grant for removing Linodes from the account is required, otherwise this method will fail.
In most cases, all disk images must be removed from a Linode before the Linode can be removed; however, this call explicitly skips those safeguards. There is no going back from this method.
Parameters | node | the Linode to destroy (type: Node ) |
Returns | (type: bool ) |
This call abstracts much of the functionality of provisioning a Linode and getting it booted. A global grant to add Linodes to the account is required, as this call will result in a billing charge.
Note that there is a safety valve of 5 Linodes per hour, in order to prevent a runaway script from ruining your day.
Parameters | name | the name to assign the Linode (mandatory) (type: str ) |
image | which distribution to deploy on the Linode (mandatory) (type: NodeImage ) | |
size | the plan size to create (mandatory) (type: NodeSize ) | |
auth | an SSH key or root password (mandatory) (type: NodeAuthSSHKey
or NodeAuthPassword ) | |
location | which datacenter to create the Linode in (type: NodeLocation ) | |
ex_swap | size of the swap partition in MB (128) (type: int ) | |
ex_rsize | size of the root partition in MB (plan size - swap). (type: int ) | |
ex_kernel | a kernel ID from avail.kernels (Latest 2.6 Stable). (type: str ) | |
ex_payment | one of 1, 12, or 24; subscription length (1) (type: int ) | |
ex_comment | a small comment for the configuration (libcloud) (type: str ) | |
ex_private | whether or not to request a private IP (False) (type: bool ) | |
lconfig | what to call the configuration (generated) (type: str ) | |
lroot | what to call the root image (generated) (type: str ) | |
lswap | what to call the swap space (generated) (type: str ) | |
Returns | Node representing the newly-created Linode (type: Node ) |
Gets the sizes that can be used for creating a Linode. Since available Linode plans vary per-location, this method can also be passed a location to filter the availability.
Parameters | location | the facility to retrieve plans in (type: NodeLocation ) |
Returns | (type: list of NodeSize ) |
Retrieve all Linux distributions that can be deployed to a Linode.
Returns | (type: list of NodeImage ) |
Retrieve all facilities that a Linode can be deployed in.
Returns | (type: list of NodeLocation ) |
Since Linodes must be created in a facility, this function sets the
default that create_node
will use. If a location
keyword is not passed to create_node
,
this method must have already been used.
Parameters | dc | the datacenter to create Linodes in unless specified (type: NodeLocation ) |
Returns | (type: bool ) |