cfme.infrastructure.repositories module

Infrastructure / Repositories

class cfme.infrastructure.repositories.Repository(name=None, path=None)[source]

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

Model of an infrastructure repository in cfme.

Parameters:
  • name – Name of the repository host
  • path – UNC path to the repository share

Usage:

myrepo = Repository(name='vmware', path='//hostname/path/to/share')
myrepo.create()
create(cancel=False, validate_credentials=False)[source]

Creates a repository in the UI

Parameters:
  • cancel (boolean) – Whether to cancel out of the creation. The cancel is done after all the information present in the Host 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.
delete(cancel=False)[source]

Deletes a repository from CFME

Parameters:cancel – Whether to cancel the deletion, defaults to False
exists[source]
get_detail(*ident)[source]

Gets details from the details infoblock

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

Parameters:*ident – An InfoBlock title, followed by the Key name, e.g. “Relationships”, “Images”

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

pretty_attrs = ['name', 'path']
update(updates, cancel=False, validate_credentials=False)[source]

Updates a repository 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.