cloudmesh-cloud.cloudmesh.compute.virtualbox.Provider

Module Contents

Classes

Provider

class cloudmesh-cloud.cloudmesh.compute.virtualbox.Provider.Provider(name=None, configuration='~/.cloudmesh/.cloudmesh.yaml')

Bases: cloudmesh.abstract.ComputeNodeABC.ComputeNodeABC

kind = virtualbox
output
run_command(self, command)
update_dict(self, entry, kind='node')
version(self)

This command returns the versions ov vagrant and virtual box :return: A dict with the information

Description:

The output looks like this

{‘vagrant’: ‘2.2.4’,
‘virtualbox’: {‘extension’: {
‘description’: ‘USB 2.0 and USB 3.0 Host ‘

‘Controller, Host Webcam, ‘ ‘VirtualBox RDP, PXE ROM, Disk ‘ ‘Encryption, NVMe.’,

‘extensionpack’: True, ‘revision’: ‘128413’, ‘usable’: ‘true’, ‘version’: ‘6.0.4’},

‘version’: ‘6.0.4’}}

images(self)

Lists the images on the cloud :return: dict

delete_image(self, name=None)
add_image(self, name=None)
_check_version(self, r)

checks if vagrant version is up to date

Returns

start(self, name)

start a node

Parameters

name – the unique node name

Returns

The dict representing the node

vagrant_nodes(self, verbose=False)

list all nodes id

Returns

an array of dicts representing the nodes

create(self, **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

execute(self, name, command, cwd=None)
to_dict(self, lst, id='name')
_convert_assignment_to_dict(self, content)
find(self, nodes=None, name=None)
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

suspend(self, name=None)

NOT IMPLEMENTED

suspends the node with the given name

Parameters

name – the name of the node

Returns

The dict representing the node

resume(self, name=None)

NOT IMPLEMENTED

Default: resume(start) all the VMs specified. If @name is provided, only the named VM is started.

Parameters

name – [optional], name of the Vagrant VM.

Returns

resume(self, name=None)

resume the named node

Parameters

name – the name of the node

Returns

the dict of the node

stop(self, name=None)

NOT IMPLEMENTED

stops the node with the given name

Parameters

name – the name of the node

Returns

The dict representing the node

destroy(self, name=None)

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

delete(self, name=None)
vagrantfile(self, **kwargs)
_get_specification(self, cloud=None, name=None, port=None, image=None, **kwargs)
create_spec(self, name=None, image=None, size=1024, timeout=360, port=80, **kwargs)

creates a named node

Parameters
  • port

  • 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

classmethod find_image(cls, keywords)

Finds an image on hashicorps web site

Parameters

keywords – The keywords to narrow down the search

list(self, raw=True)

list all nodes id

Returns

an array of dicts representing the nodes

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

rename a node

Parameters
  • destination

  • name – the current name

Returns

the dict with the new name

list_os(self)
Returns

the dict with the new name

abstract key_upload(self, key)

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