Advertisement
Izya12

debug

Apr 22nd, 2018
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 26.29 KB | None | 0 0
  1. root@Node1:/opt/noc# ./noc script --debug --pretty get_lldp_neighbors "CPS-WBS-4"
  2. 2018-04-22 15:17:25,906 [noc.core.dcs.base] Resolve near service postgres
  3. 2018-04-22 15:17:25,906 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
  4. 2018-04-22 15:17:25,909 [noc.core.http.client] HTTP Response 200
  5. 2018-04-22 15:17:25,909 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
  6. 2018-04-22 15:17:26,779 [noc.core.dcs.base] Running resolver for service mongo
  7. 2018-04-22 15:17:26,780 [noc.core.dcs.base] [mongo] Starting resolver
  8. 2018-04-22 15:17:26,780 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
  9. 2018-04-22 15:17:26,781 [noc.core.http.client] HTTP Response 200
  10. 2018-04-22 15:17:26,782 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
  11. 2018-04-22 15:17:26,782 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=1918691&passing=1
  12. 2018-04-22 15:17:26,783 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'readPreference': 'secondaryPreferred', 'replicaSet': 'noc', 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:********@10.220.21.122:27017/noc', 'password': '********'}
  13. 2018-04-22 15:17:26,843 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  14. 2018-04-22 15:17:26,903 [noc.main.models.doccategory] Registering Capability
  15. 2018-04-22 15:17:26,904 [noc.main.models.doccategory] Registering MetricType
  16. 2018-04-22 15:17:26,938 [noc.main.models.doccategory] Registering ConnectionType
  17. 2018-04-22 15:17:26,942 [noc.main.models.doccategory] Registering ObjectModel
  18. 2018-04-22 15:17:26,951 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  19. 2018-04-22 15:17:26,967 [noc.main.models.textindex] Adding FTS index for ip.vrf
  20. 2018-04-22 15:17:26,970 [noc.main.models.textindex] Adding FTS index for vc.vc
  21. 2018-04-22 15:17:26,973 [noc.main.models.textindex] Adding FTS index for ip.prefix
  22. 2018-04-22 15:17:26,977 [noc.main.models.textindex] Adding FTS index for ip.address
  23. 2018-04-22 15:17:27,027 [noc.core.script.loader] Loading script InfiNet.WANFlexX.get_lldp_neighbors
  24. 2018-04-22 15:17:27,044 [noc.core.profile.loader] Loading profile InfiNet.WANFlexX
  25. 2018-04-22 15:17:27,044 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] Filling get_version cache with {'platform': u'R5000', 'version': u'H08S01-MINTv1.90.29', 'vendor': u'INFINET'}
  26. 2018-04-22 15:17:27,044 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] Running. Input arguments: {}, timeout 3600
  27. 2018-04-22 15:17:27,044 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] Open telnet CLI
  28. 2018-04-22 15:17:27,046 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Creating IOLoop
  29. 2018-04-22 15:17:27,048 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Connecting (u'10.20.56.33', 23)
  30. 2018-04-22 15:17:27,073 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Connected
  31. 2018-04-22 15:17:27,073 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <START>
  32. 2018-04-22 15:17:27,073 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Setting timeout: 60s
  33. 2018-04-22 15:17:27,097 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '\r\n'
  34. 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received WILL ECHO
  35. 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send DO ECHO
  36. 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DONT LINEMODE
  37. 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WONT LINEMODE
  38. 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DO SGA
  39. 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WILL SGA
  40. 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DO NAWS
  41. 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WILL NAWS
  42. 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send IAC SB '\x1f' '\x00\x80\x00\x80' IAC SE
  43. 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: 'WANFleX Access Control 0\r\nCPS-WBS-4 / 224053\r\n\r\n\rLogin:\r\x1b[6C\x1b[K\r\x1b[6C'
  44. 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
  45. 2018-04-22 15:17:27,124 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <USERNAME>
  46. 2018-04-22 15:17:27,124 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send: '1\r'
  47. 2018-04-22 15:17:27,124 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Setting timeout: 30s
  48. 2018-04-22 15:17:27,147 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DONT SGA
  49. 2018-04-22 15:17:27,147 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WONT SGA
  50. 2018-04-22 15:17:27,179 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '1\r\n\rPassword:'
  51. 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: [Pp]ass[Ww]ord: ?
  52. 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <PASSWORD>
  53. 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send: '1\r'
  54. 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Setting timeout: 30s
  55. 2018-04-22 15:17:27,205 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '\r\n'
  56. 2018-04-22 15:17:27,270 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '\r\n\r\n R5000\r\n InfiNet Wireless\r\n www.infinetwireless.com\r\n All rights reserved, 1997-2017\r\n R5000 WANFleX H08S01-MINTv1.90.29 * Oct  5 2017 11:14:37 * SN:224053\r\n\r\nDevice name: CPS-WBS-4\r\n\r\n  *** Please setup correct DATE & TIME via "date" or "sntp" command ***\r\n\r\nUptime: 135 days 06:38:19\r\nLast reboot reason: unexpected restart\r\n*** Please change default Login and Password !!! ***\r\n\r\n\rCPS-WBS-4#2> \r\x1b[13C\x1b[K\r\x1b[13C'
  57. 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: (?P<hostname>\S+?)#\d+>
  58. 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <PROMT>
  59. 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Refining pattern prompt to 'CPS\\-WBS\\-4#\\d+>'
  60. 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Resetting timeouts
  61. 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send: 'lldp report\r'
  62. 2018-04-22 15:17:27,297 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: 'l'
  63. 2018-04-22 15:17:27,297 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: 'ldp report\r\n                         LLDP Neighbors Table on eth0                          \r\n+---------------+-------------------------------------------------------------+\r\n|                     LLDP Mode: TxRx,  Forward: disabled                     |\r\n+---------------+-------------------------------------------------------------+\r\n| ChassisID:    | 08:CC:A7:E5:D1:00 (mac)                                     |\r\n| SysName:      | Switch-UzelSvyzi                                            |\r\n| SysDescr:     | Cisco IOS Software, C2960X Software                         |\r\n|               | (C2960X-UNIVERSALK9-M), Version 15.2(2)E6, RELEASE          |\r\n|               | SOFTWARE (fc1)?Technical Support:                           |\r\n|               | http://www.cisco.com/techsupport?Copyright (c) 1986-2016    |\r\n|               | by Cisco Systems, Inc.?Compiled Fri 16-Dec-16 21:27 by      |\r\n|               | prod_rel_team                                               |\r\n| Caps:         | Bridge*, Router                                             |\r\n| PortID:       | Gi1/0/4 (ifName)                                            |\r\n| PortDescr:    | - Infinet BS |                                              |\r\n| AutoNeg:      | Supported, Enabled 0x6c01                                   |\r\n| MAU:          | 100BASE-TX-FD                                               |\r\n| MgmtIP:       | 10.20.52.51      '
  64. 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '                                           |\r\n| PVID:         | 1                                                           |\r\n| Last report:  | 20 seconds ago, TTL 120 seconds, Age 41 days 23:26:17       |\r\n+---------------+-------------------------------------------------------------+\r\n\r\n\rCPS-WBS-4#2> \r\x1b[13C\x1b[K\r\x1b[13C'
  65. 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: CPS\-WBS\-4#\d+>
  66. 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <PROMT>
  67. 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Command: lldp report
  68.  lldp report
  69.                          LLDP Neighbors Table on eth0
  70. +---------------+-------------------------------------------------------------+
  71. |                     LLDP Mode: TxRx,  Forward: disabled                     |
  72. +---------------+-------------------------------------------------------------+
  73. | ChassisID:    | 08:CC:A7:E5:D1:00 (mac)                                     |
  74. | SysName:      | Switch-UzelSvyzi                                            |
  75. | SysDescr:     | Cisco IOS Software, C2960X Software                         |
  76. |               | (C2960X-UNIVERSALK9-M), Version 15.2(2)E6, RELEASE          |
  77. |               | SOFTWARE (fc1)?Technical Support:                           |
  78. |               | http://www.cisco.com/techsupport?Copyright (c) 1986-2016    |
  79. |               | by Cisco Systems, Inc.?Compiled Fri 16-Dec-16 21:27 by      |
  80. |               | prod_rel_team                                               |
  81. | Caps:         | Bridge*, Router                                             |
  82. | PortID:       | Gi1/0/4 (ifName)                                            |
  83. | PortDescr:    | - Infinet BS |                                              |
  84. | AutoNeg:      | Supported, Enabled 0x6c01                                   |
  85. | MAU:          | 100BASE-TX-FD                                               |
  86. | MgmtIP:       | 10.20.52.51                                                 |
  87. | PVID:         | 1                                                           |
  88. | Last report:  | 20 seconds ago, TTL 120 seconds, Age 41 days 23:26:17       |
  89. +---------------+-------------------------------------------------------------+
  90.  
  91.  
  92. 2018-04-22 15:17:27,323 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Closing IOLoop
  93. 2018-04-22 15:17:27,500 [noc.core.debug] UNHANDLED EXCEPTION (2018-04-22 15:17:27.335683)
  94. PROCESS: ./commands/script.py
  95. VERSION: 15.05.1+microservices.9321.98fb0ac3
  96. BRANCH: microservices CHANGESET: 98fb0ac3
  97. ERROR FINGERPRINT: 45e798d6-0bc4-5fce-a763-e244cbfea681
  98. WORKING DIRECTORY: /opt/noc
  99. EXCEPTION: <type 'exceptions.ValueError'> DictParameter: {'neighbors': [{'remote_port_subtype': 5, 'remote_port': 'Gi1/0/4', 'remote_chassis_id': '08:CC:A7:E5:D1:00', 'remote_chassis_id_subtype': 'mac'}], 'local_interface': 'eth0'}. Invalid value for 'neighbors': DictParameter: {'remote_port_subtype': 5, 'remote_port': 'Gi1/0/4', 'remote_chassis_id': '08:CC:A7:E5:D1:00', 'remote_chassis_id_subtype': 'mac'}. Invalid value for 'remote_chassis_id_subtype': IntParameter: 'mac'.
  100. START OF TRACEBACK
  101. ------------------------------------------------------------------------
  102. File: core/interface/parameter.py (Line: 37)
  103. Function: raise_error
  104.    30             :param value: Value where error detected
  105.    31             :type value: Arbitrary python type
  106.    32             :param msg: Optional message
  107.    33             :type msg: String
  108.    34             :raises InterfaceTypeError
  109.    35             """
  110.   36             raise InterfaceTypeError("%s: %s. %s" % (self.__class__.__name__,
  111.   37 ==>                                                  repr(value), msg))
  112.   38
  113.   39         def clean(self, value):
  114.   40             """
  115.    41             Input parameter normalization
  116.    42
  117.    43             :param value: Input parameter
  118. Variables:
  119.                  msg =
  120. "Invalid value for 'neighbors': DictParameter: {'remote_port_subtype': 5, 'remote_port': 'Gi1/0/4', 'remote_chassis_id': '08:CC:A7:E5:D1:00', 'remote_chassis_id_subtype': 'mac'}. Invalid value for 'remote_chassis_id_subtype': IntParameter: 'mac'. "
  121.                 self = <noc.sa.interfaces.base.DictParameter object at 0x7f8aa6b20310>
  122.                value =
  123. {'local_interface': 'eth0',
  124.  'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  125.                 'remote_chassis_id_subtype': 'mac',
  126.                 'remote_port': 'Gi1/0/4',
  127.                 'remote_port_subtype': 5}]}
  128. ------------------------------------------------------------------------
  129. File: sa/interfaces/base.py (Line: 543)
  130. Function: clean
  131.   536                             if attr.default:
  132.   537                                 out_value[a_name] = attr.default
  133.   538                             else:
  134.   539                                 pass
  135.   540                         else:
  136.   541                             self.raise_error(
  137.   542                                 value,
  138.   543 ==>                             "Invalid value for '%s': %s" % (a_name, e))
  139.   544                     del in_value[a_name]
  140.   545             # Copy left items
  141.   546             if not self.truncate:
  142.   547                 for k, v in in_value.items():
  143.   548                     out_value[k] = v
  144.   549             return out_value
  145. Variables:
  146.             in_value =
  147. {'local_interface': 'eth0',
  148.  'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  149.                 'remote_chassis_id_subtype': 'mac',
  150.                 'remote_port': 'Gi1/0/4',
  151.                 'remote_port_subtype': 5}]}
  152.                    e =
  153. ValueError("DictParameter: {'remote_port_subtype': 5, 'remote_port': 'Gi1/0/4', 'remote_chassis_id': '08:CC:A7:E5:D1:00', 'remote_chassis_id_subtype': 'mac'}. Invalid value for 'remote_chassis_id_subtype': IntParameter: 'mac'. ",)
  154.                 attr = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b20290>
  155.                 self = <noc.sa.interfaces.base.DictParameter object at 0x7f8aa6b20310>
  156.                value =
  157. {'local_interface': 'eth0',
  158.  'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  159.                 'remote_chassis_id_subtype': 'mac',
  160.                 'remote_port': 'Gi1/0/4',
  161.                 'remote_port_subtype': 5}]}
  162.            out_value = {}
  163.               a_name = 'neighbors'
  164. ------------------------------------------------------------------------
  165. File: sa/interfaces/base.py (Line: 465)
  166. Function: clean
  167.   458                 return self.default
  168.   459             if self.convert and not isinstance(value, (list, tuple)):
  169.   460                 value = [value]
  170.   461             v = super(ListOfParameter, self).clean(value)
  171.   462             if self.is_list:
  172.   463                 return [[e.clean(vv) for e, vv in zip(self.element, v)] for v in value]
  173.   464             else:
  174.   465 ==>             return [self.element.clean(x) for x in v]
  175.   466
  176.   467         def script_clean_input(self, profile, value):
  177.   468             if value is None and self.default is not None:
  178.   469                 return self.default
  179.   470             v = super(ListOfParameter, self).script_clean_input(profile, value)
  180.   471             if self.is_list:
  181. Variables:
  182.                    x =
  183. {'local_interface': 'eth0',
  184.  'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  185.                 'remote_chassis_id_subtype': 'mac',
  186.                 'remote_port': 'Gi1/0/4',
  187.                 'remote_port_subtype': 5}]}
  188.                 self = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
  189.                value =
  190. [{'local_interface': 'eth0',
  191.   'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  192.                  'remote_chassis_id_subtype': 'mac',
  193.                  'remote_port': 'Gi1/0/4',
  194.                  'remote_port_subtype': 5}]}]
  195.                    v =
  196. [{'local_interface': 'eth0',
  197.   'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  198.                  'remote_chassis_id_subtype': 'mac',
  199.                  'remote_port': 'Gi1/0/4',
  200.                  'remote_port_subtype': 5}]}]
  201. ------------------------------------------------------------------------
  202. File: core/interface/parameter.py (Line: 73)
  203. Function: script_clean_result
  204.    66
  205.    67             :param profile: Profile
  206.    68             :type profile: Profile instance
  207.    69             :param value: Input parameter
  208.    70             :type value: Arbitrary python type
  209.    71             :return: Normalized value
  210.    72             """
  211.   73 ==>         return self.clean(value)
  212.   74
  213.   75         def form_clean(self, value):
  214.   76             """
  215.    77             Clean up form field
  216.    78
  217.    79             :param value: Input parameter
  218. Variables:
  219.              profile = <noc.sa.profiles.InfiNet.WANFlexX.Profile object at 0x7f8aa6b20610>
  220.                 self = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
  221.                value =
  222. [{'local_interface': 'eth0',
  223.   'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  224.                  'remote_chassis_id_subtype': 'mac',
  225.                  'remote_port': 'Gi1/0/4',
  226.                  'remote_port_subtype': 5}]}]
  227. ------------------------------------------------------------------------
  228. File: sa/interfaces/base.py (Line: 479)
  229. Function: script_clean_result
  230.   472                 return [[e.script_clean_input(profile, vv) for e, vv in zip(self.element, v)] for v in value]
  231.   473             else:
  232.   474                 return [self.element.script_clean_input(profile, x) for x in v]
  233.   475
  234.   476         def script_clean_result(self, profile, value):
  235.   477             if value is None and self.default is not None:
  236.   478                 return self.default
  237.   479 ==>         v = super(ListOfParameter, self).script_clean_result(profile, value)
  238.   480             if self.is_list:
  239.   481                 return [[e.script_clean_result(profile, vv) for e, vv in zip(self.element, v)] for v in value]
  240.   482             else:
  241.   483                 return [self.element.script_clean_result(profile, x) for x in v]
  242.   484
  243.   485
  244. Variables:
  245.              profile = <noc.sa.profiles.InfiNet.WANFlexX.Profile object at 0x7f8aa6b20610>
  246.                 self = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
  247.                value =
  248. [{'local_interface': 'eth0',
  249.   'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  250.                  'remote_chassis_id_subtype': 'mac',
  251.                  'remote_port': 'Gi1/0/4',
  252.                  'remote_port_subtype': 5}]}]
  253. ------------------------------------------------------------------------
  254. File: core/interface/base.py (Line: 78)
  255. Function: script_clean_result
  256.    71             return self.clean(__profile, **kwargs)
  257.    72
  258.    73         def script_clean_result(self, __profile, result):
  259.    74             try:
  260.    75                 rp = self.returns
  261.    76             except AttributeError:
  262.    77                 return result
  263.    78 ==>         return rp.script_clean_result(__profile, result)
  264.    79
  265.    80         def template_clean_result(self, __profile, result):
  266.    81             return result
  267.    82
  268.    83         def requires_input(self):
  269.    84             for n, p in self.gen_parameters():
  270. Variables:
  271. _BaseInterface__profile = <noc.sa.profiles.InfiNet.WANFlexX.Profile object at 0x7f8aa6b20610>
  272.                 self =
  273. <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x7f8aa649d2d0>
  274.                   rp = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
  275.               result =
  276. [{'local_interface': 'eth0',
  277.   'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  278.                  'remote_chassis_id_subtype': 'mac',
  279.                  'remote_port': 'Gi1/0/4',
  280.                  'remote_port_subtype': 5}]}]
  281. ------------------------------------------------------------------------
  282. File: core/script/base.py (Line: 224)
  283. Function: clean_output
  284.   217             """
  285.  218             return self.interface().script_clean_input(self.profile, **args)
  286.  219
  287.  220         def clean_output(self, result):
  288.  221             """
  289.   222             Clean script result against interface
  290.   223             """
  291.  224 ==>         return self.interface().script_clean_result(self.profile, result)
  292.  225
  293.  226         def run(self):
  294.  227             """
  295.   228             Run script
  296.   229             """
  297.  230             with Span(server="activator", service=self.name,
  298. Variables:
  299.                self =
  300. <noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script object at 0x7f8aa6b20c90>
  301.              result =
  302. [{'local_interface': 'eth0',
  303.  'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  304.                 'remote_chassis_id_subtype': 'mac',
  305.                 'remote_port': 'Gi1/0/4',
  306.                 'remote_port_subtype': 5}]}]
  307. ------------------------------------------------------------------------
  308. File: core/script/base.py (Line: 260)
  309. Function: run
  310.  253                             # Close SNMP socket when necessary
  311.  254                             self.snmp.close()
  312.  255                             # Close CLI socket when necessary
  313.  256                             self.close_cli_stream()
  314.  257                             # Close HTTP Client
  315.  258                             self.http.close()
  316.  259                 # Clean result
  317.  260 ==>             result = self.clean_output(result)
  318.  261                 self.logger.debug("Result: %s", result)
  319.  262                 runtime = time.time() - self.start_time
  320.  263                 self.logger.info("Complete (%.2fms)", runtime * 1000)
  321.  264             return result
  322.  265
  323.  266         @classmethod
  324. Variables:
  325.           cache_hit = False
  326.                self =
  327. <noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script object at 0x7f8aa6b20c90>
  328.              result =
  329. [{'local_interface': 'eth0',
  330.  'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
  331.                 'remote_chassis_id_subtype': 'mac',
  332.                 'remote_port': 'Gi1/0/4',
  333.                 'remote_port_subtype': 5}]}]
  334. ------------------------------------------------------------------------
  335. File: commands/script.py (Line: 118)
  336. Function: handle
  337.  111                 capabilities=caps,
  338.  112                 args=args,
  339.  113                 version=version,
  340.  114                 timeout=3600,
  341.  115                 name=script,
  342.  116                 collect_beef=bool(beef)
  343.  117             )
  344.  118 ==>         result = scr.run()
  345.  119             if pretty:
  346.  120                 pprint.pprint(result)
  347.  121             elif yaml:
  348.  122                 import yaml
  349.  123                 import sys
  350.  124                 yaml.dump(result, sys.stdout)
  351. Variables:
  352.                 obj = <ManagedObject: CPS-WBS-4>
  353.                beef = None
  354.             service = <__main__.ServiceStub object at 0x7f8aa6b20690>
  355.              script = u'InfiNet.WANFlexX.get_lldp_neighbors'
  356.        script_class = <class 'noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script'>
  357.                self = <__main__.Command object at 0x7f8abb4c4110>
  358.                args = {}
  359.            use_snmp = True
  360.                caps =
  361. {u'DB | Interfaces': 6,
  362. u'SNMP': True,
  363. u'SNMP | Bulk': True,
  364. u'SNMP | IF-MIB': True,
  365. u'SNMP | IF-MIB | HC': True,
  366. u'SNMP | v1': True,
  367. u'SNMP | v2c': True,
  368. u'SNMP | v3': False}
  369.                yaml = False
  370.         object_name = ['CPS-WBS-4']
  371.             version =
  372. {'platform': u'R5000', 'vendor': u'INFINET', 'version': u'H08S01-MINTv1.90.29'}
  373.           arguments = []
  374.              pretty = True
  375.         credentials =
  376. {'access_preference': u'CS',
  377. 'address': u'10.20.56.33',
  378. 'cli_protocol': 'telnet',
  379. 'password': u'1',
  380. 'path': None,
  381. 'raise_privileges': True,
  382. 'snmp_ro': u'kondaro',
  383. 'snmp_version': 'v2c',
  384. 'super_password': None,
  385. 'user': u'1'}
  386.   access_preference = None
  387.             options = {}
  388.                 scr =
  389. <noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script object at 0x7f8aa6b20c90>
  390. ------------------------------------------------------------------------
  391. File: core/management/base.py (Line: 75)
  392. Function: run_from_argv
  393.   68             enable_profiling = cmd_options.pop("enable_profiling", False)
  394.   69             show_metrics = cmd_options.pop("show_metrics", False)
  395.   70             if enable_profiling:
  396.   71                 # Start profiler
  397.   72                 import yappi
  398.   73                 yappi.start()
  399.   74             try:
  400.   75 ==>             return self.handle(*args, **cmd_options) or 0
  401.   76             except CommandError as e:
  402.   77                 self.print(str(e))
  403.   78                 return 1
  404.   79             except KeyboardInterrupt:
  405.   80                 self.print("Ctrl+C")
  406.   81                 return 3
  407. Variables:
  408.              parser =
  409. ArgumentParser(prog='script.py', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  410.            loglevel = 'debug'
  411.    enable_profiling = False
  412.                args = ()
  413.         cmd_options =
  414. {'access_preference': None,
  415. 'arguments': [],
  416. 'beef': None,
  417. 'object_name': ['CPS-WBS-4'],
  418. 'pretty': True,
  419. 'script': ['get_lldp_neighbors'],
  420. 'use_snmp': True,
  421. 'yaml': False}
  422.                argv = ['--debug', '--pretty', 'get_lldp_neighbors', 'CPS-WBS-4']
  423.                self = <__main__.Command object at 0x7f8abb4c4110>
  424.        show_metrics = False
  425.             options =
  426. Namespace(access_preference=None, arguments=[], beef=None, object_name=['CPS-WBS-4'], pretty=True, script=['get_lldp_neighbors'], use_snmp=True, yaml=False)
  427. ------------------------------------------------------------------------
  428. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement