281
Examples
# Download the
test.cfg
file from TFTP server 1.1.1.1 and get the error information from the
operation.
<Sysname> python
Python 2.7.3 (default)
[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
“Timeout was reached”
API get_self_slot
get_self_slot
In standalone mode, use
get_self_slot
to get the slot number of the active MPU.
In IRF mode, use
get_self_slot
to get the slot number of the global active MPU.
Syntax
get_self_slot()
Returns
(In standalone mode.) A list object in the format of [-1,
slot-number
]. The
slot-number
indicates the
slot number of the active MPU.
(In IRF 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.
Examples
# Get the slot number of the active MPU (in standalone mode) or global active MPU (in IRF mode).
<Sysname> python
Python 2.7.3 (default)
[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
In standalone mode, use
get_standby_slot
to get the slot number of the standby MPU.
In IRF mode, use
get_standby_slot
to get the slot numbers of the global standby MPUs.
Summary of Contents for FlexNetwork 10500 Series
Page 139: ...130 Sysname display version ...