pyhpecw7.features.facts module

Gather device facts on HPCOM7 devices.

class pyhpecw7.features.facts.Facts(device)[source]

Bases: object

Gather device facts from a HP Comware 7 device.

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

connected instance of a pyhpecw7.comware.HPCOM7 object.

Type:HPCOM7
facts

this is a read-only attribute. Details can be seen in get_facts.

Type:dict
facts
get_facts()[source]

Gather facts from the HP Comware 7 device

Returns:This returns a dictionary with several key/value pairs describing the device. See example below.

Example:

{
    'hostname': 'HP5930_1',
    'interface_list': ["FortyGigE1/0/1", "FortyGigE1/0/2",
        "FortyGigE1/0/3", "FortyGigE1/0/4"],
    'localtime': '2016-01-30T01:47:07',
    'model': 'HP FF 5930-32QSFP+ Switch',
    'os': '7.1.045 Release 2418P01',
    'serial_number': 'CN43G9800T',
    'uptime': '6d 23hr 25min 18sec',
    'vendor': 'hp',
    'hardware': 'Ver.A'
}