Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@Node1:/opt/noc# ./noc script --debug --pretty get_lldp_neighbors "CPS-WBS-4"
- 2018-04-22 15:17:25,906 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-22 15:17:25,906 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-22 15:17:25,909 [noc.core.http.client] HTTP Response 200
- 2018-04-22 15:17:25,909 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-22 15:17:26,779 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-22 15:17:26,780 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-22 15:17:26,780 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-22 15:17:26,781 [noc.core.http.client] HTTP Response 200
- 2018-04-22 15:17:26,782 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-22 15:17:26,782 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=1918691&passing=1
- 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': '********'}
- 2018-04-22 15:17:26,843 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-22 15:17:26,903 [noc.main.models.doccategory] Registering Capability
- 2018-04-22 15:17:26,904 [noc.main.models.doccategory] Registering MetricType
- 2018-04-22 15:17:26,938 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-22 15:17:26,942 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-22 15:17:26,951 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-22 15:17:26,967 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-22 15:17:26,970 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-22 15:17:26,973 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-22 15:17:26,977 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-22 15:17:27,027 [noc.core.script.loader] Loading script InfiNet.WANFlexX.get_lldp_neighbors
- 2018-04-22 15:17:27,044 [noc.core.profile.loader] Loading profile InfiNet.WANFlexX
- 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'}
- 2018-04-22 15:17:27,044 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] Running. Input arguments: {}, timeout 3600
- 2018-04-22 15:17:27,044 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] Open telnet CLI
- 2018-04-22 15:17:27,046 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Creating IOLoop
- 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)
- 2018-04-22 15:17:27,073 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Connected
- 2018-04-22 15:17:27,073 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <START>
- 2018-04-22 15:17:27,073 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Setting timeout: 60s
- 2018-04-22 15:17:27,097 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '\r\n'
- 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received WILL ECHO
- 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send DO ECHO
- 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DONT LINEMODE
- 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WONT LINEMODE
- 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DO SGA
- 2018-04-22 15:17:27,122 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WILL SGA
- 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DO NAWS
- 2018-04-22 15:17:27,123 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WILL NAWS
- 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
- 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'
- 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): ?
- 2018-04-22 15:17:27,124 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <USERNAME>
- 2018-04-22 15:17:27,124 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send: '1\r'
- 2018-04-22 15:17:27,124 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Setting timeout: 30s
- 2018-04-22 15:17:27,147 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received DONT SGA
- 2018-04-22 15:17:27,147 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send WONT SGA
- 2018-04-22 15:17:27,179 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '1\r\n\rPassword:'
- 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <PASSWORD>
- 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send: '1\r'
- 2018-04-22 15:17:27,180 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Setting timeout: 30s
- 2018-04-22 15:17:27,205 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: '\r\n'
- 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'
- 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: (?P<hostname>\S+?)#\d+>
- 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <PROMT>
- 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+>'
- 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Resetting timeouts
- 2018-04-22 15:17:27,271 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Send: 'lldp report\r'
- 2018-04-22 15:17:27,297 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Received: 'l'
- 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 '
- 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'
- 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Match: CPS\-WBS\-4#\d+>
- 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] State: <PROMT>
- 2018-04-22 15:17:27,322 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Command: lldp report
- lldp report
- LLDP Neighbors Table on eth0
- +---------------+-------------------------------------------------------------+
- | LLDP Mode: TxRx, Forward: disabled |
- +---------------+-------------------------------------------------------------+
- | ChassisID: | 08:CC:A7:E5:D1:00 (mac) |
- | SysName: | Switch-UzelSvyzi |
- | SysDescr: | Cisco IOS Software, C2960X Software |
- | | (C2960X-UNIVERSALK9-M), Version 15.2(2)E6, RELEASE |
- | | SOFTWARE (fc1)?Technical Support: |
- | | http://www.cisco.com/techsupport?Copyright (c) 1986-2016 |
- | | by Cisco Systems, Inc.?Compiled Fri 16-Dec-16 21:27 by |
- | | prod_rel_team |
- | Caps: | Bridge*, Router |
- | PortID: | Gi1/0/4 (ifName) |
- | PortDescr: | - Infinet BS | |
- | AutoNeg: | Supported, Enabled 0x6c01 |
- | MAU: | 100BASE-TX-FD |
- | MgmtIP: | 10.20.52.51 |
- | PVID: | 1 |
- | Last report: | 20 seconds ago, TTL 120 seconds, Age 41 days 23:26:17 |
- +---------------+-------------------------------------------------------------+
- 2018-04-22 15:17:27,323 [script] [InfiNet.WANFlexX.get_lldp_neighbors|10.20.56.33] [telnet] Closing IOLoop
- 2018-04-22 15:17:27,500 [noc.core.debug] UNHANDLED EXCEPTION (2018-04-22 15:17:27.335683)
- PROCESS: ./commands/script.py
- VERSION: 15.05.1+microservices.9321.98fb0ac3
- BRANCH: microservices CHANGESET: 98fb0ac3
- ERROR FINGERPRINT: 45e798d6-0bc4-5fce-a763-e244cbfea681
- WORKING DIRECTORY: /opt/noc
- 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'.
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: core/interface/parameter.py (Line: 37)
- Function: raise_error
- 30 :param value: Value where error detected
- 31 :type value: Arbitrary python type
- 32 :param msg: Optional message
- 33 :type msg: String
- 34 :raises InterfaceTypeError
- 35 """
- 36 raise InterfaceTypeError("%s: %s. %s" % (self.__class__.__name__,
- 37 ==> repr(value), msg))
- 38
- 39 def clean(self, value):
- 40 """
- 41 Input parameter normalization
- 42
- 43 :param value: Input parameter
- Variables:
- msg =
- "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'. "
- self = <noc.sa.interfaces.base.DictParameter object at 0x7f8aa6b20310>
- value =
- {'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}
- ------------------------------------------------------------------------
- File: sa/interfaces/base.py (Line: 543)
- Function: clean
- 536 if attr.default:
- 537 out_value[a_name] = attr.default
- 538 else:
- 539 pass
- 540 else:
- 541 self.raise_error(
- 542 value,
- 543 ==> "Invalid value for '%s': %s" % (a_name, e))
- 544 del in_value[a_name]
- 545 # Copy left items
- 546 if not self.truncate:
- 547 for k, v in in_value.items():
- 548 out_value[k] = v
- 549 return out_value
- Variables:
- in_value =
- {'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}
- e =
- 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'. ",)
- attr = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b20290>
- self = <noc.sa.interfaces.base.DictParameter object at 0x7f8aa6b20310>
- value =
- {'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}
- out_value = {}
- a_name = 'neighbors'
- ------------------------------------------------------------------------
- File: sa/interfaces/base.py (Line: 465)
- Function: clean
- 458 return self.default
- 459 if self.convert and not isinstance(value, (list, tuple)):
- 460 value = [value]
- 461 v = super(ListOfParameter, self).clean(value)
- 462 if self.is_list:
- 463 return [[e.clean(vv) for e, vv in zip(self.element, v)] for v in value]
- 464 else:
- 465 ==> return [self.element.clean(x) for x in v]
- 466
- 467 def script_clean_input(self, profile, value):
- 468 if value is None and self.default is not None:
- 469 return self.default
- 470 v = super(ListOfParameter, self).script_clean_input(profile, value)
- 471 if self.is_list:
- Variables:
- x =
- {'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}
- self = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
- value =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- v =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- ------------------------------------------------------------------------
- File: core/interface/parameter.py (Line: 73)
- Function: script_clean_result
- 66
- 67 :param profile: Profile
- 68 :type profile: Profile instance
- 69 :param value: Input parameter
- 70 :type value: Arbitrary python type
- 71 :return: Normalized value
- 72 """
- 73 ==> return self.clean(value)
- 74
- 75 def form_clean(self, value):
- 76 """
- 77 Clean up form field
- 78
- 79 :param value: Input parameter
- Variables:
- profile = <noc.sa.profiles.InfiNet.WANFlexX.Profile object at 0x7f8aa6b20610>
- self = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
- value =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- ------------------------------------------------------------------------
- File: sa/interfaces/base.py (Line: 479)
- Function: script_clean_result
- 472 return [[e.script_clean_input(profile, vv) for e, vv in zip(self.element, v)] for v in value]
- 473 else:
- 474 return [self.element.script_clean_input(profile, x) for x in v]
- 475
- 476 def script_clean_result(self, profile, value):
- 477 if value is None and self.default is not None:
- 478 return self.default
- 479 ==> v = super(ListOfParameter, self).script_clean_result(profile, value)
- 480 if self.is_list:
- 481 return [[e.script_clean_result(profile, vv) for e, vv in zip(self.element, v)] for v in value]
- 482 else:
- 483 return [self.element.script_clean_result(profile, x) for x in v]
- 484
- 485
- Variables:
- profile = <noc.sa.profiles.InfiNet.WANFlexX.Profile object at 0x7f8aa6b20610>
- self = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
- value =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- ------------------------------------------------------------------------
- File: core/interface/base.py (Line: 78)
- Function: script_clean_result
- 71 return self.clean(__profile, **kwargs)
- 72
- 73 def script_clean_result(self, __profile, result):
- 74 try:
- 75 rp = self.returns
- 76 except AttributeError:
- 77 return result
- 78 ==> return rp.script_clean_result(__profile, result)
- 79
- 80 def template_clean_result(self, __profile, result):
- 81 return result
- 82
- 83 def requires_input(self):
- 84 for n, p in self.gen_parameters():
- Variables:
- _BaseInterface__profile = <noc.sa.profiles.InfiNet.WANFlexX.Profile object at 0x7f8aa6b20610>
- self =
- <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x7f8aa649d2d0>
- rp = <noc.sa.interfaces.base.ListOfParameter object at 0x7f8aa6b203d0>
- result =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 224)
- Function: clean_output
- 217 """
- 218 return self.interface().script_clean_input(self.profile, **args)
- 219
- 220 def clean_output(self, result):
- 221 """
- 222 Clean script result against interface
- 223 """
- 224 ==> return self.interface().script_clean_result(self.profile, result)
- 225
- 226 def run(self):
- 227 """
- 228 Run script
- 229 """
- 230 with Span(server="activator", service=self.name,
- Variables:
- self =
- <noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script object at 0x7f8aa6b20c90>
- result =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 260)
- Function: run
- 253 # Close SNMP socket when necessary
- 254 self.snmp.close()
- 255 # Close CLI socket when necessary
- 256 self.close_cli_stream()
- 257 # Close HTTP Client
- 258 self.http.close()
- 259 # Clean result
- 260 ==> result = self.clean_output(result)
- 261 self.logger.debug("Result: %s", result)
- 262 runtime = time.time() - self.start_time
- 263 self.logger.info("Complete (%.2fms)", runtime * 1000)
- 264 return result
- 265
- 266 @classmethod
- Variables:
- cache_hit = False
- self =
- <noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script object at 0x7f8aa6b20c90>
- result =
- [{'local_interface': 'eth0',
- 'neighbors': [{'remote_chassis_id': '08:CC:A7:E5:D1:00',
- 'remote_chassis_id_subtype': 'mac',
- 'remote_port': 'Gi1/0/4',
- 'remote_port_subtype': 5}]}]
- ------------------------------------------------------------------------
- File: commands/script.py (Line: 118)
- Function: handle
- 111 capabilities=caps,
- 112 args=args,
- 113 version=version,
- 114 timeout=3600,
- 115 name=script,
- 116 collect_beef=bool(beef)
- 117 )
- 118 ==> result = scr.run()
- 119 if pretty:
- 120 pprint.pprint(result)
- 121 elif yaml:
- 122 import yaml
- 123 import sys
- 124 yaml.dump(result, sys.stdout)
- Variables:
- obj = <ManagedObject: CPS-WBS-4>
- beef = None
- service = <__main__.ServiceStub object at 0x7f8aa6b20690>
- script = u'InfiNet.WANFlexX.get_lldp_neighbors'
- script_class = <class 'noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script'>
- self = <__main__.Command object at 0x7f8abb4c4110>
- args = {}
- use_snmp = True
- caps =
- {u'DB | Interfaces': 6,
- u'SNMP': True,
- u'SNMP | Bulk': True,
- u'SNMP | IF-MIB': True,
- u'SNMP | IF-MIB | HC': True,
- u'SNMP | v1': True,
- u'SNMP | v2c': True,
- u'SNMP | v3': False}
- yaml = False
- object_name = ['CPS-WBS-4']
- version =
- {'platform': u'R5000', 'vendor': u'INFINET', 'version': u'H08S01-MINTv1.90.29'}
- arguments = []
- pretty = True
- credentials =
- {'access_preference': u'CS',
- 'address': u'10.20.56.33',
- 'cli_protocol': 'telnet',
- 'password': u'1',
- 'path': None,
- 'raise_privileges': True,
- 'snmp_ro': u'kondaro',
- 'snmp_version': 'v2c',
- 'super_password': None,
- 'user': u'1'}
- access_preference = None
- options = {}
- scr =
- <noc.sa.profiles.InfiNet.WANFlexX.get_lldp_neighbors.Script object at 0x7f8aa6b20c90>
- ------------------------------------------------------------------------
- File: core/management/base.py (Line: 75)
- Function: run_from_argv
- 68 enable_profiling = cmd_options.pop("enable_profiling", False)
- 69 show_metrics = cmd_options.pop("show_metrics", False)
- 70 if enable_profiling:
- 71 # Start profiler
- 72 import yappi
- 73 yappi.start()
- 74 try:
- 75 ==> return self.handle(*args, **cmd_options) or 0
- 76 except CommandError as e:
- 77 self.print(str(e))
- 78 return 1
- 79 except KeyboardInterrupt:
- 80 self.print("Ctrl+C")
- 81 return 3
- Variables:
- parser =
- ArgumentParser(prog='script.py', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
- loglevel = 'debug'
- enable_profiling = False
- args = ()
- cmd_options =
- {'access_preference': None,
- 'arguments': [],
- 'beef': None,
- 'object_name': ['CPS-WBS-4'],
- 'pretty': True,
- 'script': ['get_lldp_neighbors'],
- 'use_snmp': True,
- 'yaml': False}
- argv = ['--debug', '--pretty', 'get_lldp_neighbors', 'CPS-WBS-4']
- self = <__main__.Command object at 0x7f8abb4c4110>
- show_metrics = False
- options =
- Namespace(access_preference=None, arguments=[], beef=None, object_name=['CPS-WBS-4'], pretty=True, script=['get_lldp_neighbors'], use_snmp=True, yaml=False)
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement