robottelo.config

Submodules

Package Contents

Classes

LegacySettings

Robottelo’s settings representation.

SettingsFacade

SettingsNodeWrapper

Functions

setting_is_set(option)

Return either True or False if a Robottelo section setting is

Attributes

dynaconf_validators

logger

legacy_settings

dynaconf_settings

settings_proxy

settings

robottelo.config.dynaconf_validators
exception robottelo.config.ImproperlyConfigured

Bases: Exception

Indicates that Robottelo somehow is improperly configured.

For example, if settings file can not be found or some required configuration is not defined.

class robottelo.config.LegacySettings

Robottelo’s settings representation.

configure(self, settings_path=None)

Read the settings file and parse the configuration.

Parameters

settings_path (str) – path to settings file to read. If None, looks in the project root for a file named ‘robottelo.properties’.

Raises

ImproperlyConfigured if any issue is found during the parsing or validation of the configuration.

_read_robottelo_settings(self)

Read Robottelo’s general settings.

_validate_robottelo_settings(self)

Validate Robottelo’s general settings.

property configured(self)

Returns True if the settings have already been configured.

property all_features(self)

List all expected feature settings sections.

class robottelo.config.SettingsFacade
_cache
_configs = []
classmethod set_configs(cls, *configs)
classmethod _from_cache(cls, key)
classmethod _add_to_cache(cls, key, value)
static _cached_function(fn)
__all_features(self)
__server_get_credentials(self)

Return credentials for interacting with a Foreman deployment API.

Returns

A username-password pair.

Return type

tuple

__server_get_url(self)

Return the base URL of the Foreman deployment being tested.

The following values from the config file are used to build the URL:

  • [server] scheme (default: https)

  • [server] hostname (required)

  • [server] port (default: none)

Setting port to 80 does not imply that scheme is ‘https’. If port is 80 and scheme is unset, scheme will still default to ‘https’.

Returns

A URL.

Return type

str

__server_get_pub_url(self)

Return the pub URL of the server being tested.

The following values from the config file are used to build the URL:

  • main.server.hostname (required)

Returns

The pub directory URL.

Return type

str

__server_get_cert_rpm_url(self)

Return the Katello cert RPM URL of the server being tested.

The following values from the config file are used to build the URL:

  • main.server.hostname (required)

Returns

The Katello cert RPM URL.

Return type

str

__server_version(self)
__server_get_hostname(self, key='hostname')
__capsule_hostname(self)
__ssh_client_command_timeout(self)
__ssh_client_connection_timeout(self)
_robottelo_verbosity(self)

Casts logging level for robottelo framework, for more info refer robottelo.config.casts module

_fake_capsules_port_range(self)

Casts port ranges for fake capsules of type string into tuple

_dispatch_computed_value(self, key)
_dispatch_robottelo_value(self, key)

Returns robottelo setting with dynaconf object in stead of dynaconf.robottelo object

e.g self.verbosity instead of self.robottelo.verbosity

_dispatch_repos_value(self, key)

Returns repos setting with dynaconf object in stead of dynaconf.repos object

e.g self.capsule_repo instead of self.repos.capsule_repo

_get_from_configs(self, key)
get(self, full_path)
__dir__(self)

Default dir() implementation.

class robottelo.config.SettingsNodeWrapper(wrapped, config_provider=None, full_path=None)

Bases: wrapt.CallableObjectProxy

__getattr__(self, name)
__dir__(self)

Default dir() implementation.

__fspath__(self)
__repr__(self)

Return repr(self).

configure_nailgun(self)

Configure NailGun’s entity classes.

Do the following:

  • Set entity_mixins.CREATE_MISSING to True. This causes method

    EntityCreateMixin.create_raw to generate values for empty and required fields.

  • Set nailgun.entity_mixins.DEFAULT_SERVER_CONFIG to whatever is

    returned by robottelo.helpers.get_nailgun_config(). See robottelo.entity_mixins.Entity for more information on the effects of this.

  • Set a default value for nailgun.entities.GPGKey.content.

configure_airgun(self)

Pass required settings to AirGun

configure_logging(self)

Configure logging for the entire framework.

If a config named logging.conf exists in Robottelo’s root directory, the logger is configured using the options in that file. Otherwise, a custom logging output format is set, and default values are used for all other logging options.

configure_third_party_logging(self)

Increase the level of third party packages logging.

robottelo.config.logger
robottelo.config.legacy_settings
robottelo.config.dynaconf_settings
robottelo.config.settings_proxy
robottelo.config.settings
robottelo.config.setting_is_set(option)

Return either True or False if a Robottelo section setting is set or not respectively.