The argus.backends.base Module

class argus.backends.base.BaseBackend(name=None, userdata=None, metadata=None, availability_zone=None)

Class for managing instances

The backend is used for building and managing an underlying instance, being it an OpenStack instance, OpenNebula instance or a containerized OS.

Parameters:
  • name – The name of the instance that will be created.
  • userdata – If any, the userdata which will be available in the instance to the corresponding cloud initialization service.
  • metadata – If any, the metadata which should be available in the instance to the corresponding cloud initialization service.
cleanup()

Destroy and cleanup the relevant resources.

Cleanup the resources created by setup_instance(), such as the keypairs, floating ips and credentials.

get_remote_client(**kwargs)

Get a remote client to the underlying instance.

remote_client

An astract property which should return the default client.

setup_instance()

Setup an underlying instance.

class argus.backends.base.CloudBackend(name=None, userdata=None, metadata=None, availability_zone=None)

Base backend for cloud related tasks.

floating_ip()

Get the floating ip that was attached to the underlying instance.

get_remote_client(username=None, password=None, **kwargs)

Get a remote client

This is different than remote_client, because that will always return a client with predefined credentials, while this method allows for a fine-grained control over this aspect. password can be omitted if authentication by SSH key is used. The **kwargs parameter can be used for additional options (currently none).

instance_output(limit=None)

Get the underlying’s instance output, if any.

Parameters:limit – Number of lines to fetch from the end of console log.
instance_password()

Get the underlying instance password, if any.

internal_instance_id()

Get the underlying’s instance id.

Gets the id depending on the internals of the backend.

private_key()

Get the underlying private key.

public_key()

Get the underlying public key.

reboot_instance()

Reboot the underlying instance.

save_instance_output(suffix=None)

Retrieve and save all data written through the COM port.

If a suffix is provided, then the log name is preceded by it.