pyhpecw7.features.install_os module¶
Install an operating system on HPCOM7 devices.
-
class
pyhpecw7.features.install_os.
InstallOs
(device)[source]¶ Bases:
object
This class is used to get and build the startup software image. It is often used in conjunction with
file_copy.FileCopy
, which can transfer an image.Parameters: device (HPCOM7) – connected instance of a pyhpecw7.comware.HPCOM7
object.-
build
(os_type, ipe=None, boot=None, system=None, delete_ipe=False, stage=False)[source]¶ Stage or execute the configuration commands for changing the primary startup image.
Parameters: - os_type (str) – REQUIRED - ‘ipe’ (for IPE packages) or ‘bootsys’ (for separate boot and system files.
- ipe (str) – REQUIRED if
os_type
is ‘ipe’ - The full path of the remote IPE file. - boot (str) – REQUIRED if
os_type
is ‘bootsys’ - The full path of the remote boot .bin file. - system (str) – REQUIRED if
os_type
is ‘bootsys’ - The full path of the remote system .bin file. - delete_ipe (bool) – OPTIONAL - Whether to delete the remote IPE file
after config change. Defaults to
False
. - stage (bool) – whether to stage the commands or execute immediately
Returns: True if stage=True and successfully staged etree.Element XML response if immediate execution
-
get_config
()[source]¶ Return a dictionary of current and startup image names.
Returns: A dictionary of ‘current’, ‘startup-primary’, and ‘startup-backup’ image file names. For each, there is a ‘boot’ image and a ‘system’ image: { 'current': { 'boot' : <current boot image>, 'system': <current system image>, } 'startup-primary': { 'boot' : <primary startup boot image>, 'system': <primary startup system image>, } 'startup-backup': { 'boot': <backup startup boot image>, 'system': <backup startup system image> } }
-