pyhpecw7.features.cleanerase module

Factory default HPCOM7 devices.

class pyhpecw7.features.cleanerase.CleanErase(device)[source]

Bases: object

Factory default a HP Comware 7 switch.

Parameters:device (HPCOM7) – connected instance of a pyhpecw7.comware.HPCOM7 object.
device

connected instance of a pyhpecw7.comware.HPCOM7 object.

Type:HPCOM7
build(stage=False, factory_default=False)[source]

Build cmd list to factory default switch and immediately reboot.

Parameters:
  • factory_default (bool) – determines if the switch will be reset to factory defaults. It is a safety measure and must be set to for the factory default to take place.
  • stage (bool) – whether to stage the command for later execution, or execute immediately.
Returns:

True if stage=True and staging is successful. The output of restore command if stage=False