cloudmesh-cloud.cloudmesh.compute.docker.Provider
¶
Module Contents¶
Classes¶
-
class
cloudmesh-cloud.cloudmesh.compute.docker.Provider.
Provider
(name=None, configuration='~/.cloudmesh/.cloudmesh.yaml')¶ Bases:
cloudmesh.abstract.ComputeNodeABC.ComputeNodeABC
-
kind
= docker¶
-
output
¶
-
run_command
(self, command)¶
-
update_dict
(self, entry, kind='node')¶ updates the dict with
- “cm”: {
“kind”: …, “name”: …, “cloud”: …, “driver” …, }
- Parameters
entry (dict) – the entry
kind (string) – a string representing the kind
- Returns
the modified entry
- Return type
dict
-
version
(self)¶ This command returns the versions ov vagrant and virtual box :return: A dict with the information
Description:
The output looks like this
-
list
(self, raw=True)¶ list all nodes id
- Returns
an array of dicts representing the nodes
-
images
(self)¶ Lists the images on the cloud :return: dict
-
delete_image
(self, name=None)¶
-
add_image
(self, name=None)¶
-
abstract
_check_version
(self, r)¶ checks if vagrant version is up to date
- Returns
-
start
(self, name, version, directory)¶ start a node
- Parameters
version –
directory –
name – the unique node name
- Returns
The dict representing the node
-
abstract
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)¶
-
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
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
delete
(self, name=None)¶
-
dockerfile
(self, name=None, directory='~/.cloudmesh/docker/', os='ubuntu', version='18.04', **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
-
rename
(self, source=None, destination=None)¶ rename a node
- Parameters
destination –
source – the current name
- Returns
the dict with the new name
-
flavors
(self)¶ Lists the flavors on the cloud
- Returns
dict of flavors
-
keys
(self)¶ Lists the keys on the cloud
- Returns
dict
-
key_upload
(self, key)¶ uploads the key specified in the yaml configuration to the cloud :param key: :return:
-