cfme.common.provider module

class cfme.common.provider.BaseProvider[source]

Bases: cfme.common.Taggable

class Credential(**kwargs)[source]

Bases: cfme.Credential, utils.update.Updateable

Provider credentials

Parameters:
  • type – One of [amqp, candu, ssh, token] (optional)
  • domain – Domain for default credentials (optional)
BaseProvider.STATS_TO_MATCH = []
BaseProvider.add_provider_button = None
BaseProvider.category[source]
BaseProvider.create(cancel=False, validate_credentials=False)[source]

Creates a provider in the UI

Parameters:
  • cancel (boolean) – Whether to cancel out of the creation. The cancel is done after all the information present in the Provider has been filled in the UI.
  • validate_credentials (boolean) – Whether to validate credentials - if True and the credentials are invalid, an error will be raised.
BaseProvider.data[source]
BaseProvider.delete(cancel=True)[source]

Deletes a provider from CFME

Parameters:cancel – Whether to cancel the deletion, defaults to True
BaseProvider.delete_if_exists(*args, **kwargs)[source]

Combines .exists and .delete() as a shortcut for request.addfinalizer

BaseProvider.detail_page_suffix = ''
BaseProvider.edit_page_suffix = ''
BaseProvider.exists[source]
BaseProvider.get_detail(*ident, **kwargs)[source]

Gets details from the details infoblock

The function first ensures that we are on the detail page for the specific provider.

Parameters:*ident – An InfoBlock title, followed by the Key name, e.g. “Relationships”, “Images”
Keywords:
use_icon: Whether to use icon matching

Returns: A string representing the contents of the InfoBlock’s value.

BaseProvider.get_mgmt_system()[source]

Returns the mgmt_system using the utils.providers.get_mgmt() method.

BaseProvider.get_yaml_data()[source]

Returns yaml data for this provider.

BaseProvider.load_details(refresh=False)[source]

To be compatible with the Taggable and PolicyProfileAssignable mixins.

BaseProvider.mgmt[source]
BaseProvider.page_name = ''
BaseProvider.properties_form = None
BaseProvider.quad_name = None
BaseProvider.refresh_provider_relationships(from_list_view=False)[source]

Clicks on Refresh relationships button in provider

BaseProvider.save_button = None
BaseProvider.string_name = ''
BaseProvider.type[source]
BaseProvider.update(updates, cancel=False, validate_credentials=False)[source]

Updates a provider in the UI. Better to use utils.update.update context manager than call this directly.

Parameters:
  • updates (dict) – fields that are changing.
  • cancel (boolean) – whether to cancel out of the update.
BaseProvider.validate(db=True)[source]

Validates that the detail page matches the Providers information.

This method logs into the provider using the mgmt_system interface and collects a set of statistics to be matched against the UI. The details page is then refreshed continuously until the matching of all items is complete. A error will be raised if the match is not complete within a certain defined time period.

BaseProvider.version[source]
BaseProvider.wait_for_delete()[source]
class cfme.common.provider.CloudInfraProvider[source]

Bases: cfme.common.provider.BaseProvider, cfme.common.PolicyProfileAssignable

get_assigned_policy_profiles()[source]

Return a set of Policy Profiles which are available and assigned.

Returns: set of str of Policy Profile names

get_unassigned_policy_profiles()[source]

Return a set of Policy Profiles which are available but not assigned.

Returns: set of str of Policy Profile names

load_all_provider_images()[source]
load_all_provider_instances()[source]
load_all_provider_templates()[source]

Loads the list of images that are available under the provider.

If it could click through the link in infoblock, returns True. If it sees that the number of images is 0, it returns False.

load_all_provider_vms()[source]

Loads the list of instances that are running under the provider.

If it could click through the link in infoblock, returns True. If it sees that the number of instances is 0, it returns False.

num_template(db=True)[source]

Returns the providers number of templates, as shown on the Details page.

num_vm(db=True)[source]

Returns the providers number of instances, as shown on the Details page.

wait_for_creds_ok()[source]

Waits for provider’s credentials to become O.K. (circumvents the summary rails exc.)

cfme.common.provider.cleanup_vm(vm_name, provider)[source]