cloudmesh.abstract.ComputeNodeABC

Module Contents

Classes

ComputeProviderPlugin

ComputeNodeABC

class cloudmesh.abstract.ComputeNodeABC.ComputeProviderPlugin
class cloudmesh.abstract.ComputeNodeABC.ComputeNodeABC(service=None)
abstract start(self, name=None)

start a node

Parameters

name – the unique node name

Returns

The dict representing the node

abstract stop(self, name=None)

stops the node with the given name

Parameters

name

Returns

The dict representing the node including updated status

abstract info(self, name=None)

gets the information of a node with a given name

Parameters

name

Returns

The dict representing the node including updated status

abstract suspend(self, name=None)

suspends the node with the given name

Parameters

name – the name of the node

Returns

The dict representing the node

abstract list(self, **kwargs)

list all vms

Returns

an array of dicts representing the nodes

abstract resume(self, name=None)

resume the named node

Parameters

name – the name of the node

Returns

the dict of the node

abstract destroy(self, name=None)

Destroys the node :param name: the name of the node :return: the dict of the node

abstract create(self, name=None, image=None, size=None, timeout=360, group=None, **kwargs)

creates a named node

Parameters
  • group – a list of groups the vm belongs to

  • name – the name of the node

  • image – the image used

  • size – the size of the image

  • timeout – a timeout in seconds that is invoked in case the image does not boot. The default is set to 3 minutes.

  • kwargs – additional arguments passed along at time of boot

Returns

abstract set_server_metadata(self, name, **metadata)

sets the metadata for the server

Parameters
  • name – name of the fm

  • metadata – the metadata

Returns

abstract get_server_metadata(self, name)

gets the metadata for the server

Parameters

name – name of the fm

Returns

abstract delete_server_metadata(self, name)

gets the metadata for the server

Parameters

name – name of the fm

Returns

abstract rename(self, name=None, destination=None)

rename a node

Parameters
  • destination

  • name – the current name

Returns

the dict with the new name

abstract keys(self)

Lists the keys on the cloud

Returns

dict

abstract key_upload(self, key=None)

uploads the key specified in the yaml configuration to the cloud :param key: :return:

abstract key_delete(self, name=None)

deletes the key with the given name :param name: The name of the key :return:

abstract images(self, **kwargs)

Lists the images on the cloud :return: dict

abstract image(self, name=None)

Gets the image with a given nmae :param name: The name of the image :return: the dict of the image

abstract flavors(self, **kwargs)

Lists the flavors on the cloud

Returns

dict of flavors

abstract flavor(self, name=None)

Gets the flavor with a given name :param name: The name of the flavor :return: The dict of the flavor

abstract reboot(self, name=None)

Reboot a list of nodes with the given names

Parameters

name – A list of node names

Returns

A list of dict representing the nodes

abstract attach_public_ip(self, name=None, ip=None)

adds a public ip to the named vm

Parameters
  • name – Name of the vm

  • ip – The ip address

Returns

abstract detach_public_ip(self, name=None, ip=None)

adds a public ip to the named vm

Parameters
  • name – Name of the vm

  • ip – The ip address

Returns

abstract delete_public_ip(self, ip=None)

Deletes the ip address

Parameters

ip – the ip address, if None than all will be deleted

Returns

abstract list_public_ips(self, available=False)

Lists the public ip addresses.

Parameters

available – if True only those that are not allocated will be returned.

Returns

abstract create_public_ip(self)

Creates a new public IP address to use

Returns

The ip address information

abstract find_available_public_ip(self)

Returns a single public available ip address.

Returns

The ip

abstract get_public_ip(self, name=None)

returns the public ip

Parameters

name – name of the server

Returns

list_secgroups(self, name=None)

List the named security group

Parameters

name – The name of the group, if None all will be returned

Returns

abstract list_secgroup_rules(self, name='default')

List the named security group

Parameters

name – The name of the group, if None all will be returned

Returns

abstract upload_secgroup(self, name=None)
abstract add_secgroup(self, name=None, description=None)
abstract add_secgroup_rule(self, name=None, port=None, protocol=None, ip_range=None)
abstract remove_secgroup(self, name=None)
abstract add_rules_to_secgroup(self, name=None, rules=None)
abstract remove_rules_from_secgroup(self, name=None, rules=None)
abstract wait(self, vm=None, interval=None, timeout=None)

wais till the given VM can be logged into

Parameters
  • vm – name of the vm

  • interval – interval for checking

  • timeout – timeout

Returns

abstract console(self, vm=None)

gets the output from the console

Parameters

vm – name of the VM

Returns

abstract log(self, vm=None)