283
API get_slot_info
get_slot_info
Use
get_slot_info
to get information about a card.
Syntax
get_slot_info()
Returns
A dictionary object in the format of {'Slot':
slot-number
, 'Status': '
status
', 'Chassis':
chassis-number
,
'Role': '
role
', 'Cpu':
CPU-number
}. The
slot-number
argument indicates the slot number of the card.
The
status
argument indicates the status of the card. The
chassis-number
argument indicates the
member ID of the device. The
role
argument indicates the role of the card. The
CPU-number
argument indicates the ID of the main CPU on the card.
Examples
# Get information about a card.
<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_slot_info(1)
Sample output
{'Slot': 1, 'Status': 'Normal', 'Chassis': 0, 'Role': 'Master', 'Cpu': 0}
Содержание FlexNetwork 10500 Series
Страница 139: ...130 Sysname display version ...