Advertisement
Guest User

Untitled

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