pyhpecw7.features.reboot module

Reboot HPCOM7 devices.

class pyhpecw7.features.reboot.Reboot(device)[source]

Bases: object

This class is used to reboot a HP COM7 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, **reboot)[source]

Build command list to reboot the switch and send to staging

Parameters:
  • stage (bool) – whether to stage the commands or execute immediately
  • reboot – see Keyword Args
Keyword Arguments:
 
  • reboot (bool) – REQUIRED - set to True to reboot (safety)
  • time (str) – OPTIONAL - must be in HH:MM format
  • date (str) – OPTIONAL - must be in MM/DD/YYYY format
  • delay (str) – OPTIONAL - number representing delay in minutes
Returns:

True if stage=True and successfully staged etree.Element XML response if immediate execution

param_check(**reboot)[source]

Param validation for time & date.

Parameters:

reboot – see Keyword Args

Keyword Arguments:
 
  • time (str) – OPTIONAL - must be in HH:MM format
  • date (str) – OPTIONAL - must be in MM/DD/YYYY format