libcloud.compute.drivers.rimuhosting module
RimuHosting Driver
- class libcloud.compute.drivers.rimuhosting.RimuHostingConnection(key, secure=True, retry_delay=None, backoff=None, timeout=None)[source]
Bases:
ConnectionKeyConnection class for the RimuHosting driver
Initialize user_id and key; set secure to an
intbased on passed value.- add_default_headers(headers)[source]
Adds default headers (such as Authorization, X-Foo-Bar) to the passed headers
Should return a dictionary.
- api_context = '/r'
- port = 443
- request(action, params=None, data='', headers=None, method='GET')[source]
Request a given action.
Basically a wrapper around the connection object’s request that does some helpful pre-processing.
- Parameters:
action (
str) – A path. This can include arguments. If included, any extra parameters are appended to the existing ones.params (
dict) – Optional mapping of additional parameters to send. If None, leave as an emptydict.data (
unicode) – A body of data to send with the request.headers (
dict) – Extra headers to add to the request None, leave as an emptydict.method (
str) – An HTTP method such as “GET” or “POST”.raw (
bool) – True to perform a “raw” request aka only send the headers and use the rawResponseCls class. This is used with storage API when uploading a file.stream (
bool) – True to return an iterator in Response.iter_content and allow streaming of the response data (for downloading large files)retry_failed – True if failed requests should be retried. This argument can override module level constant and environment variable value on per-request basis.
- Returns:
An
Responseinstance.- Return type:
Responseinstance
- responseCls
alias of
RimuHostingResponse
- exception libcloud.compute.drivers.rimuhosting.RimuHostingException[source]
Bases:
ExceptionException class for RimuHosting driver
- class libcloud.compute.drivers.rimuhosting.RimuHostingNodeDriver(key, host='rimuhosting.com', port=443, api_context='/r', secure=True)[source]
Bases:
NodeDriverRimuHosting node driver
- Parameters:
key (
str) – API key (required)host (
str) – hostname for connectionport (
int) – Override port used for connections.api_context (
str) – Optional API context.secure (
bool) – Whether to use HTTPS or HTTP.
- Return type:
None
- connectionCls
alias of
RimuHostingConnection
- create_node(name, size, image, auth=None, ex_billing_oid=None, ex_host_server_oid=None, ex_vps_order_oid_to_clone=None, ex_num_ips=1, ex_extra_ip_reason=None, ex_memory_mb=None, ex_disk_space_mb=None, ex_disk_space_2_mb=None, ex_control_panel=None)[source]
Creates a RimuHosting instance
@inherits:
NodeDriver.create_node- Parameters:
name (
str) – Must be a FQDN. e.g example.com.ex_billing_oid (
str) – If not set, a billing method is automatically picked.ex_host_server_oid (
str) – The host server to set the VPS up on.ex_vps_order_oid_to_clone (
str) – Clone another VPS to use as the image for the new VPS.ex_num_ips (
int) – Number of IPs to allocate. Defaults to 1.ex_extra_ip_reason (
str) – Reason for needing the extra IPs.ex_memory_mb (
int) – Memory to allocate to the VPS.ex_disk_space_mb (
int) – Diskspace to allocate to the VPS. Defaults to 4096 (4GB).ex_disk_space_2_mb (
int) – Secondary disk size allocation. Disabled by default.ex_control_panel (
str) – Control panel to install on the VPS.
- destroy_node(node)[source]
Destroy a node.
Depending upon the provider, this may destroy all data associated with the node, including backups.
- Parameters:
node (
Node) – The node to be destroyed- Returns:
True if the destroy was successful, False otherwise.
- Return type:
bool
- features: Dict[str, List[str]] = {'create_node': ['password']}
- List of available features for a driver.
libcloud.compute.base.NodeDriver.create_node()ssh_key: Supports
NodeAuthSSHKeyas an authentication method for nodes.password: Supports
NodeAuthPasswordas an authentication method for nodes.generates_password: Returns a password attribute on the Node object returned from creation.
- list_images(location=None)[source]
List images on a provider.
- Parameters:
location (
NodeLocation) – The location at which to list images.- Returns:
list of node image objects.
- Return type:
listofNodeImage
- list_locations()[source]
List data centers for a provider
- Returns:
list of node location objects
- Return type:
listofNodeLocation
- list_sizes(location=None)[source]
List sizes on a provider
- Parameters:
location (
NodeLocation) – The location at which to list sizes- Returns:
list of node size objects
- Return type:
listofNodeSize
- class libcloud.compute.drivers.rimuhosting.RimuHostingResponse(response, connection)[source]
Bases:
JsonResponseResponse Class for RimuHosting driver
- Parameters:
response (
httplib.HTTPResponse) – HTTP response object. (optional)connection (
Connection) – Parent connection object.