The argus.util Module

argus.util.decrypt_password(private_key, password)

Decode password and unencrypts it with private key.

Requires openssl binary available in the path.

argus.util.get_logger(name='argus', format_string='%(asctime)s - %(name)s - %(levelname)s - %(message)s', logging_file='argus.log')

Obtain a new logger object.

The name parameter will be the name of the logger and format_string will be the format it will use for logging. logging_file is a file where the messages will be written.

argus.util.get_resource(resource)

Get the given resource from the list of known resources.

class argus.util.cached_property(func, name=None)

A property which caches the result on access.

argus.util.run_once(func, state={}, errors={})

A memoization decorator, whose purpose is to cache calls.

argus.util.rand_name(name='')

Generate a random name

If name is given, then it will be prepended to the generated string, separated by a minus sign.

argus.util.get_public_keys()

Get the public_keys resource.

Used by the cloudbaseinit’s tests.

argus.util.get_certificate()

Get the certificate resource.

Used by the cloudbaseinit’s tests.