cfme.infrastructure.config_management module

class cfme.infrastructure.config_management.ConfigManager(name, url, ssl, credentials, key=None)[source]

Bases: utils.update.Updateable, utils.pretty.Pretty

Configuration manager object (Foreman, RH Satellite)

Parameters:
  • name – Name of the config. manager
  • url – URL, hostname or IP of the config. manager
  • ssl – Boolean value; True if SSL certificate validity should be checked, False otherwise
  • credentials – Credentials to access the config. manager
  • key – Key to access the cfme_data yaml data (same as name if not specified)

Usage:

.. code-block:: python

    cfg_mgr = ConfigManager('my_foreman', 'my-foreman.example.com', False,
                        ConfigManager.Credential(principal='admin', secret='testing'))
    cfg_mgr.create()
class Credential(principal=None, secret=None, verify_secret=None, **ignore)[source]

Bases: cfme.Credential, utils.update.Updateable

ConfigManager.config_profiles[source]

Returns ‘ConfigProfile’ configuration profiles (hostgroups) available on this manager

ConfigManager.create(cancel=False, validate_credentials=True, validate=True, force=False)[source]

Creates the manager through UI

Parameters:
  • cancel (bool) – Whether to cancel out of the creation. The cancel is done after all the information present in the manager has been filled in the UI.
  • validate_credentials (bool) – Whether to validate credentials - if True and the credentials are invalid, an error will be raised.
  • validate (bool) – Whether we want to wait for the manager’s data to load and show up in it’s detail page. True will also wait, False will only set it up.
  • force (bool) – Whether to force the creation even if the manager already exists. True will try anyway; False will check for its existence and leave, if present.
ConfigManager.delete(cancel=False, wait_deleted=True, force=False)[source]

Deletes the manager through UI

Parameters:
  • cancel (bool) – Whether to cancel out of the deletion, when the alert pops up.
  • wait_deleted (bool) – Whether we want to wait for the manager to disappear from the UI. True will wait; False will only delete it and move on.
  • force (bool) – Whether to try to delete the manager even though it doesn’t exist. True will try to delete it anyway; False will check for its existence and leave, if not present.
ConfigManager.exists[source]

Returns whether the manager exists in the UI or not

classmethod ConfigManager.load_from_yaml(key)[source]

Returns ‘ConfigManager’ object loaded from yamls, based on its key

ConfigManager.navigate()[source]

Navigates to the manager’s detail page

ConfigManager.pretty_attr = ['name', 'url']
ConfigManager.refresh_relationships(cancel=False)[source]

Refreshes relationships and power states of this manager

ConfigManager.systems[source]

Returns ‘ConfigSystem’ configured systems (hosts) available on this manager

ConfigManager.type[source]

Returns presumed type of the manager based on CFME version

Note:
We cannot actually know the type of the provider from the UI. This represents the supported type by CFME version and is to be used in navigation.

This attribute is lazily evaluated and cached.

ConfigManager.update(updates, cancel=False, validate_credentials=False)[source]

Updates the manager through UI

Parameters:
  • updates (dict) – Data to change.
  • cancel (bool) – Whether to cancel out of the update. The cancel is done after all the new information has been filled in the UI.
  • validate_credentials (bool) – Whether to validate credentials - if True and the credentials are invalid, an error will be raised.

Note

utils.update use is recommended over use of this method.

ConfigManager.yaml_data[source]

Returns yaml data for this manager

class cfme.infrastructure.config_management.ConfigProfile(name, manager)[source]

Bases: utils.pretty.Pretty

Configuration profile object (foreman-side hostgroup)

Parameters:
  • name – Name of the profile
  • manager – ConfigManager object which this profile is bound to
navigate()[source]

Navigates to the profile’s detail page

pretty_attr = ['name', 'manager']
systems[source]

Returns ‘ConfigSystem’ objects that are active under this profile

class cfme.infrastructure.config_management.ConfigSystem(name, profile)[source]

Bases: utils.pretty.Pretty

navigate()[source]

Navigates to the system’s detail page

pretty_attr = ['name', 'manager_key']
tag(tag)[source]

Tags the system by given tag

tags[source]

Returns a list of this system’s active tags

untag(tag)[source]

Removes the selected tag off the system