libcloud.compute.drivers.vcl module
VCL driver
- class libcloud.compute.drivers.vcl.VCLConnection(user_id, key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]
Bases:
XMLRPCConnection
,ConnectionUserAndKey
Initialize user_id and key; set secure to an
int
based on passed value.
- class libcloud.compute.drivers.vcl.VCLNodeDriver(key, secret, secure=True, host=None, port=None, *args, **kwargs)[source]
Bases:
NodeDriver
VCL node driver
- Parameters:
host (
str
) – The VCL host to which you make requests(required)key (
str
) – API key or username to used (required)secret (
str
) – Secret password to be used (required)secure (
bool
) – Whether to use HTTPS or HTTP.host – Override hostname used for connections. (required)
port (
int
) – Override port used for connections.
- Return type:
None
- NODE_STATE_MAP: Dict[str, NodeState] = {'error': NodeState.UNKNOWN, 'failed': NodeState.TERMINATED, 'future': NodeState.PENDING, 'loading': NodeState.PENDING, 'notavailable': NodeState.TERMINATED, 'notready': NodeState.PENDING, 'ready': NodeState.RUNNING, 'success': NodeState.PENDING, 'time': NodeState.PENDING, 'timedout': NodeState.TERMINATED}
- connectionCls
alias of
VCLConnection
- create_node(image, start=None, length='60')[source]
Create a new VCL reservation size and name ignored, image is the id from list_image
@inherits:
NodeDriver.create_node
- Parameters:
image (
str
) – image is the id from list_imagestart (
str
) – start time as unix timestamplength (
str
) – length of time in minutes
- destroy_node(node)[source]
End VCL reservation for the node passed in. Throws error if request fails.
- Parameters:
node (
Node
) – The node to be destroyed- Return type:
bool
- ex_extend_request_time(node, minutes)[source]
Time in minutes to extend the requested node’s reservation time
- Parameters:
node (
Node
) – the reservation node to updateminutes (
str
) – the number of mintes to update
- Returns:
true on success, throws error on failure
- Return type:
bool
- ex_get_request_end_time(node)[source]
Get the ending time of the node reservation.
- Parameters:
node (
Node
) – the reservation node to update- Returns:
unix timestamp
- Return type:
int
- ex_update_node_access(node, ipaddr)[source]
Update the remote ip accessing the node.
- Parameters:
node (
Node
) – the reservation node to updateipaddr (
str
) – the ipaddr used to access the node
- Returns:
node with updated information
- Return type:
Node
- list_images(location=None)[source]
List images available to the user provided credentials
@inherits:
NodeDriver.list_images
- list_nodes(ipaddr)[source]
List nodes
- Parameters:
ipaddr (
str
) – IP address which should be used- Return type:
list
ofNode
- class libcloud.compute.drivers.vcl.VCLResponse(response, connection)[source]
Bases:
XMLRPCResponse
- Parameters:
response (
httplib.HTTPResponse
) – HTTP response object. (optional)connection (
Connection
) – Parent connection object.
- exceptions: Dict[str, Type[LibcloudError]] = {'VCL_Account': <class 'libcloud.common.types.InvalidCredsError'>}