Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Cisco_IOS_get_spanning_tree_Test(ScriptTestCase):
- script = "Cisco.IOS.get_spanning_tree"
- vendor = "Cisco"
- platform = "C3750"
- version = "12.2(35)SE5"
- input = {}
- result = {'instances': [{'bridge_id': '00:22:56:AE:40:80',
- 'bridge_priority': 32768,
- 'id': 3,
- 'interfaces': [{'designated_bridge_id': '00:22:56:AE:40:80',
- 'designated_bridge_priority': 32771,
- 'designated_port_id': '128.103',
- 'edge': False,
- 'interface': 'Gi 2/0/49',
- 'point_to_point': True,
- 'port_id': '128.103',
- 'priority': 128,
- 'role': 'designated',
- 'state': 'forwarding'},
- {'designated_bridge_id': '00:1E:F7:41:5D:40',
- 'designated_bridge_priority': 32771,
- 'designated_port_id': '128.1800',
- 'edge': False,
- 'interface': 'Gi 2/0/50',
- 'point_to_point': True,
- 'port_id': '128.104',
- 'priority': 128,
- 'role': 'root',
- 'state': 'forwarding'}],
- 'root_id': '00:09:B7:11:CC:00',
- 'root_priority': 32771,
- ================================================================================
- # -*- coding: utf-8 -*-
- ##----------------------------------------------------------------------
- ## Cisco.IOS.get_spanning_tree test
- ## Auto-generated by ./noc debug-script at 25.01.2013 11:18:01
- ##----------------------------------------------------------------------
- ## Copyright (C) 2007-2013 The NOC Project
- ## See LICENSE for details
- ##----------------------------------------------------------------------
- ## NOC modules
- from noc.lib.test import ScriptTestCase
- class Cisco_IOS_get_spanning_tree_Test(ScriptTestCase):
- script = "Cisco.IOS.get_spanning_tree"
- vendor = "Cisco"
- platform = "C3750"
- version = "12.2(35)SE5"
- input = {}
- result = u'<type \'exceptions.KeyError\'>\n\'lis\'\nSTART OF TRACEBACK\n---------------------------------------
- ---------------------------------\nFile: /opt/noc/sa/profiles/Cisco/IOS/get_spanning_tree.py (Line: 59)\nFunction:
- get_ports_attrs\n 52 "state": {\n 53 "dis": "disabled",\n
- 54 "blk": "discarding",\n 55 "bkn": "broken",\n 56
- "lrn": "learning",\n 57 "??": "learning",\n 58
- "fwd": "forwarding"\n 59 ==> }[R[2].lower()], # @todo: refine states\n 60
- }\n 61 return ports\n 62 \n 63 ##\n 64 ## PVST+/rapid-
- PVST+ Parsing\n 65 ##\nVariables:\n instance_sep = \'\\nVLAN\'\n settings = \'P2p\'\n
- I = \'2569\\n Spanning tree enabled protocol ieee\\n Root ID Priority 35337\\n
- Address 0022.56ae.4080\\n This bridge is the root\\n Hello Time 2 sec Max Age 20 se
- c Forward Delay 15 sec\\n\\n Bridge ID Priority 35337 (priority 32768 sys-id-ext 2569)\\n Addres
- s 0022.56ae.4080\\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\\n Aging T
- ime 15 \\n\\nInterface Role Sts Cost Prio.Nbr Type\\n---------------- ---- --- --------- -------- -----
- ---------------------------\\nGi2/0/19 Desg LIS 19 128.73 P2p \\nGi2/0/49 Desg FWD 4
- 128.103 P2p \\n\\n\'\n self = <Script(script-10.200.200.48-Cisco.IOS.get_spanning_tree, started
- 139924357089024)>\n cli_stp = \'\\nVLAN0003\\n Spanning tree enabled protocol ieee\\n Root ID Prio
- rity 32771\\n Address 0009.b711.cc00\\n Cost 12\\n Port 10
- 4 (GigabitEthernet2/0/50)\\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\\n\\n Bridge ID
- Priority 32771 (priority 32768 sys-id-ext 3)\\n Address 0022.56ae.4080\\n Hello Ti
- me 2 sec Max Age 20 sec Forward Delay 15 sec\\n Aging Time 300\\n\\nInterface Role Sts Cost
- Prio.Nbr Type\\n---------------- ---- --- --------- -------- --------------------------------\\nGi2/0/49
- Desg FWD 4 128.103 P2p \\nGi2/0/50 Root FWD 4 128.104 P2p \\n\\n\\nVLAN0077\\n Spanni
- ng tree enabled protocol ieee\\n Root ID Priority 32845\\n Address 000a.b8df.f380\\n
- Cost 12\\n Port 104 (GigabitEthernet2/0/50)\\n Hello Time 2 sec Max A
- ge 20 sec Forward Delay 15 sec\\n\\n Bridge ID Priority 32845 (priority 32768 sys-id-ext 77)\\n
- Address 0022.56ae.4080\\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\\n A
- ging Time 300\\n\\nInterface Role Sts Cost Prio.Nbr Type\\n---------------- ---- --- --------- --------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement