cfme.infrastructure.pxe module

A model of a PXE Server in CFME

class cfme.infrastructure.pxe.CustomizationTemplate(name=None, description=None, image_type=None, script_type=None, script_data=None)[source]

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

Model of a Customization Template in CFME

Parameters:
  • name – The name of the template.
  • description – Template description.
  • image_type – Image type name, must be one of an existing System Image Type.
  • script_type – Script type, either Kickstart, Cloudinit or Sysprep.
  • script_data – The scripts data.
create(cancel=False)[source]

Creates a Customization Template object

Parameters:cancel (boolean) – Whether to cancel out of the creation. The cancel is done after all the information present in the CT has been filled in the UI.
delete(cancel=True)[source]

Deletes a Customization Template server from CFME

Parameters:cancel – Whether to cancel the deletion, defaults to True
exists(db=True)[source]

Checks if the Customization template already exists

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

Updates a Customization Template server 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.
class cfme.infrastructure.pxe.ISODatastore(provider=None)[source]

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

Model of a PXE Server object in CFME

Parameters:provider – Provider name.
create(cancel=False, refresh=True, refresh_timeout=120)[source]

Creates an ISO datastore object

Parameters:
  • cancel (boolean) – Whether to cancel out of the creation. The cancel is done after all the information present in the ISO datastore has been filled in the UI.
  • refresh (boolean) – Whether to run the refresh operation on the ISO datastore after the add has been completed.
delete(cancel=True)[source]

Deletes an ISO Datastore from CFME

Parameters:cancel – Whether to cancel the deletion, defaults to True
exists(db=True)[source]

Checks if the ISO Datastore already exists

pretty_attrs = ['provider']
refresh(wait=True, timeout=120)[source]

Refreshes the PXE relationships and waits for it to be updated

set_iso_image_type(image_name, image_type)[source]

Function to set the image type of a PXE image

class cfme.infrastructure.pxe.PXEServer(name=None, depot_type=None, uri=None, userid=None, password=None, access_url=None, pxe_dir=None, windows_dir=None, customize_dir=None, menu_filename=None)[source]

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

Model of a PXE Server object in CFME

Parameters:
  • name – Name of PXE server.
  • depot_type – Depot type, either Samba or Network File System.
  • uri – The Depot URI.
  • userid – The Samba username.
  • password – The Samba password.
  • access_url – HTTP access path for PXE server.
  • pxe_dir – The PXE dir for accessing configuration.
  • windows_dir – Windows source directory.
  • customize_dir – Customization directory for templates.
  • menu_filename – Menu filename for iPXE/syslinux menu.
create(cancel=False, refresh=True, refresh_timeout=120)[source]

Creates a PXE server object

Parameters:
  • cancel (boolean) – Whether to cancel out of the creation. The cancel is done after all the information present in the PXE Server has been filled in the UI.
  • refresh (boolean) – Whether to run the refresh operation on the PXE server after the add has been completed.
delete(cancel=True)[source]

Deletes a PXE server from CFME

Parameters:cancel – Whether to cancel the deletion, defaults to True
exists(db=True)[source]

Checks if the PXE server already exists

get_pxe_image_type(image_name, db=True)[source]
pretty_attrs = ['name', 'uri', 'access_url']
refresh(wait=True, timeout=120)[source]

Refreshes the PXE relationships and waits for it to be updated

set_pxe_image_type(image_name, image_type)[source]

Function to set the image type of a PXE image

update(updates, cancel=False)[source]

Updates a PXE server 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.
class cfme.infrastructure.pxe.SystemImageType(name=None, provision_type=None)[source]

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

Model of a System Image Type in CFME.

Parameters:
  • name – The name of the System Image Type.
  • provision_type – The provision type, either Vm or Host.
create(cancel=False)[source]

Creates a System Image Type object

Parameters:cancel (boolean) – Whether to cancel out of the creation. The cancel is done after all the information present in the SIT has been filled in the UI.
delete(cancel=True)[source]

Deletes a System Image Type from CFME

Parameters:cancel – Whether to cancel the deletion, defaults to True
pretty_attrs = ['name', 'provision_type']
update(updates, cancel=False)[source]

Updates a System Image Type 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.
cfme.infrastructure.pxe.get_pxe_server_from_config(pxe_config_name)[source]

Convenience function to grab the details for a pxe server fomr the yamls.

cfme.infrastructure.pxe.get_template_from_config(template_config_name)[source]

Convenience function to grab the details for a template from the yamls.

cfme.infrastructure.pxe.remove_all_pxe_servers()[source]

Convenience function to remove all PXE servers