libcloud.compute.drivers.brightbox module

Brightbox Driver

class libcloud.compute.drivers.brightbox.BrightboxNodeDriver(key, secret=None, secure=True, host=None, port=None, api_version='1.0', **kwargs)[source]

Bases: NodeDriver

Brightbox node driver

Parameters:
  • key (str) – API key or username to be used (required)

  • secret (str) – Secret password to be used (required)

  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.

  • host (str) – Override hostname used for connections.

  • port (int) – Override port used for connections.

  • api_version (str) – Optional API version. Only used by drivers which support multiple API versions.

  • region (str) – Optional driver region. Only used by drivers which support multiple regions.

Return type:

None

NODE_STATE_MAP: Dict[str, NodeState] = {'active': NodeState.RUNNING, 'creating': NodeState.PENDING, 'deleted': NodeState.TERMINATED, 'deleting': NodeState.UNKNOWN, 'failed': NodeState.UNKNOWN, 'inactive': NodeState.UNKNOWN, 'unavailable': NodeState.UNKNOWN}
connectionCls

alias of BrightboxConnection

create_node(name, size, image, location=None, ex_userdata=None, ex_servergroup=None)[source]

Create a new Brightbox node

Reference: https://api.gb1.brightbox.com/1.0/#server_create_server

@inherits: NodeDriver.create_node

Parameters:
  • ex_userdata (str) – User data

  • ex_servergroup (str or list of str) – Name or list of server group ids to add server to

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

ex_create_cloud_ip(reverse_dns=None)[source]

Requests a new cloud IP address for the account

@note: This is an API extension for use on Brightbox

Parameters:

reverse_dns (str) – Reverse DNS hostname

Return type:

dict

ex_destroy_cloud_ip(cloud_ip_id)[source]

Release the cloud IP address from the account’s ownership

@note: This is an API extension for use on Brightbox

Parameters:

cloud_ip_id (str) – The id of the cloud ip.

Returns:

True if the unmap was successful.

Return type:

bool

ex_list_cloud_ips()[source]

List Cloud IPs

@note: This is an API extension for use on Brightbox

Return type:

list of dict

ex_map_cloud_ip(cloud_ip_id, interface_id)[source]

Maps (or points) a cloud IP address at a server’s interface or a load balancer to allow them to respond to public requests

@note: This is an API extension for use on Brightbox

Parameters:
  • cloud_ip_id (str) – The id of the cloud ip.

  • interface_id (str) – The Interface ID or LoadBalancer ID to which this Cloud IP should be mapped to

Returns:

True if the mapping was successful.

Return type:

bool

ex_unmap_cloud_ip(cloud_ip_id)[source]

Unmaps a cloud IP address from its current destination making it available to remap. This remains in the account’s pool of addresses

@note: This is an API extension for use on Brightbox

Parameters:

cloud_ip_id (str) – The id of the cloud ip.

Returns:

True if the unmap was successful.

Return type:

bool

ex_update_cloud_ip(cloud_ip_id, reverse_dns)[source]

Update some details of the cloud IP address

@note: This is an API extension for use on Brightbox

Parameters:
  • cloud_ip_id (str) – The id of the cloud ip.

  • reverse_dns (str) – Reverse DNS hostname

Return type:

dict

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:

list of NodeImage

list_locations()[source]

List data centers for a provider

Returns:

list of node location objects

Return type:

list of NodeLocation

list_nodes()[source]

List all nodes.

Returns:

list of node objects

Return type:

list of Node

list_sizes()[source]

List sizes on a provider

Parameters:

location (NodeLocation) – The location at which to list sizes

Returns:

list of node size objects

Return type:

list of NodeSize

name: str = 'Brightbox'
type: Provider | str = 'brightbox'
website: str = 'http://www.brightbox.co.uk/'