cloudmesh.management.configuration.generic_config

Module Contents

Classes

GenericConfig

class cloudmesh.management.configuration.generic_config.GenericConfig(config_path)

Bases: object

get(self, key, default=None)

A helper function for reading values from the config without a chain of get() calls.

Usage:

mongo_conn = conf.get(‘db.mongo.MONGO_CONNECTION_STRING’) default_db = conf.get(‘default.db’) az_credentials = conf.get(‘data.service.azure.credentials’)

Parameters
  • default

  • key – A string representing the value’s path in the config.

set(self, key, value)

A helper function for setting values in the config without a chain of set() calls.

Usage:

mongo_conn = conf.get(‘db.mongo.MONGO_CONNECTION_STRING’, “https://localhost:3232”)

Parameters
  • key – A string representing the value’s path in the config.

  • value – value to be set.

deep_set(self, keys, value=None)

A helper function for setting values in the config without a chain of set() calls.

Usage:

mongo_conn = conf.get(‘db.mongo.MONGO_CONNECTION_STRING’, “https://localhost:3232”)

Parameters
  • keys – A string representing the value’s path in the config.

  • value – value to be set.

keys(self)

Print the key names :return:

remove(self, path, key_to_remove)
Returns