Api Get_Self_Slot; Api Get_Standby_Slot - HP 10500 Series Configuration Manual

Hide thumbs Also See for 10500 Series:
Table of Contents

Advertisement

Examples
# Download file test.cfg from TFTP server 1.1.1.1 and get the error information from the operation.
<Sysname> python
Python 2.7.3 (default, May 24 2013, 14:37:26)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import comware
>>> c = comware.Transfer('tftp', '1.1.1.1', 'test.cfg', 'flash:/test.cfg', user='',
password='')
>>> c.get_error()
Sample output
"Couldn't connect to server"

API get_self_slot

get_self_slot
Use get_self_slot to get the slot number of the active MPU. (In standalone mode.)
Use get_self_slot to get the slot number of the global active MPU. (In IRF mode.)
Syntax
get_self_slot()
Returns
A list object in the format of [- 1 ,slot-number]. The slot-number indicates the slot number of the active MPU.
(In standalone mode.)
A list object in the format of [chassis-number,slot-number]. The chassis-number and slot-number indicate
the member ID of the master device and the slot number of the global active MPU on the master device.
(In IRF mode.)
Examples
# Get the slot number of the active MPU. (In standalone mode.)
<Sysname> python
Python 2.7.3 (default, May 24 2013, 14:37:26)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import comware
>>> comware.get_self_slot()
Sample output
[-1,0]

API get_standby_slot

get_standby_slot
Use get_standby_slot to get the slot number of the standby MPU. (In standalone mode.)
Use get_standby_slot to get the slot numbers of the global standby MPUs. (In IRF mode.)
296

Advertisement

Table of Contents
loading

Table of Contents