Advertisement
Izya12

Cisco-3850-capabilities

May 1st, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 21.73 KB | None | 0 0
  1. root@Node1:/opt/noc# ./noc script --debug --pretty get_capabilities "sw3850"
  2. 2018-05-01 11:16:37,024 [noc.core.dcs.base] Resolve near service postgres
  3. 2018-05-01 11:16:37,025 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
  4. 2018-05-01 11:16:37,028 [noc.core.http.client] HTTP Response 200
  5. 2018-05-01 11:16:37,028 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
  6. 2018-05-01 11:16:37,876 [noc.core.dcs.base] Running resolver for service mongo
  7. 2018-05-01 11:16:37,876 [noc.core.dcs.base] [mongo] Starting resolver
  8. 2018-05-01 11:16:37,877 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
  9. 2018-05-01 11:16:37,878 [noc.core.http.client] HTTP Response 200
  10. 2018-05-01 11:16:37,878 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
  11. 2018-05-01 11:16:37,878 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2342803&passing=1
  12. 2018-05-01 11:16:37,879 [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-05-01 11:16:37,948 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  14. 2018-05-01 11:16:38,010 [noc.main.models.doccategory] Registering Capability
  15. 2018-05-01 11:16:38,011 [noc.main.models.doccategory] Registering MetricType
  16. 2018-05-01 11:16:38,044 [noc.main.models.doccategory] Registering ConnectionType
  17. 2018-05-01 11:16:38,048 [noc.main.models.doccategory] Registering ObjectModel
  18. 2018-05-01 11:16:38,057 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  19. 2018-05-01 11:16:38,072 [noc.main.models.textindex] Adding FTS index for ip.vrf
  20. 2018-05-01 11:16:38,075 [noc.main.models.textindex] Adding FTS index for vc.vc
  21. 2018-05-01 11:16:38,077 [noc.main.models.textindex] Adding FTS index for ip.prefix
  22. 2018-05-01 11:16:38,081 [noc.main.models.textindex] Adding FTS index for ip.address
  23. 2018-05-01 11:16:38,129 [noc.core.script.loader] Loading script Cisco.IOS.get_capabilities
  24. 2018-05-01 11:16:38,132 [noc.core.mib] Loading compiled MIBs
  25. 2018-05-01 11:16:38,132 [noc.core.mib] Loading compiled MIBs from 'cmibs'
  26. 2018-05-01 11:16:38,132 [noc.core.mib] Loading MIB: ENTITY-STATE-MIB
  27. 2018-05-01 11:16:38,132 [noc.core.mib] Loading MIB: SNMPv2-MIB
  28. 2018-05-01 11:16:38,133 [noc.core.mib] Loading MIB: CISCO-PPPOE-MIB
  29. 2018-05-01 11:16:38,133 [noc.core.mib] Loading MIB: RMON2-MIB
  30. 2018-05-01 11:16:38,133 [noc.core.mib] Loading MIB: IF-MIB
  31. 2018-05-01 11:16:38,133 [noc.core.mib] Loading MIB: RFC1213-MIB
  32. 2018-05-01 11:16:38,134 [noc.core.mib] Loading MIB: BRIDGE-MIB
  33. 2018-05-01 11:16:38,134 [noc.core.mib] Loading MIB: EtherLike-MIB
  34. 2018-05-01 11:16:38,134 [noc.core.mib] Loading MIB: ENTITY-MIB
  35. 2018-05-01 11:16:38,134 [noc.core.mib] Loading MIB: IP-MIB
  36. 2018-05-01 11:16:38,134 [noc.core.mib] Loading MIB: ENTITY-SENSOR-MIB
  37. 2018-05-01 11:16:38,135 [noc.core.mib] Loading MIB: CISCO-VPDN-MGMT-MIB
  38. 2018-05-01 11:16:38,135 [noc.core.mib] Loading MIB: LLDP-MIB
  39. 2018-05-01 11:16:38,154 [noc.core.profile.loader] Loading profile Cisco.IOS
  40. 2018-05-01 11:16:38,155 [script] [Cisco.IOS.get_capabilities|10.220.20.100] Running. Input arguments: {}, timeout 3600
  41. 2018-05-01 11:16:38,155 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [snmp] Creating IOLoop
  42. 2018-05-01 11:16:38,155 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [snmp] Create UDP socket
  43. 2018-05-01 11:16:38,155 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GET ['1.3.6.1.2.1.1.2.0']
  44. 2018-05-01 11:16:38,158 [noc.core.ioloop.snmp] [10.220.20.100] GET result: '1.3.6.1.4.1.9.1.1745'
  45. 2018-05-01 11:16:38,158 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GET ['1.3.6.1.2.1.1.2.0']
  46. 2018-05-01 11:16:38,160 [noc.core.ioloop.snmp] [10.220.20.100] GET result: '1.3.6.1.4.1.9.1.1745'
  47. 2018-05-01 11:16:38,160 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GETNEXT 1.3.6.1.2.1.1.1
  48. 2018-05-01 11:16:38,162 [noc.core.ioloop.snmp] [10.220.20.100] GETNEXT result: [('1.3.6.1.2.1.1.1.0', 'Cisco IOS Software [Denali], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.3.5b, RELEASE SOFTWARE (fc1)\r\nTechnical Support: http://www.cisco.com/techsupport\r\nCopyright (c) 1986-2017 by Cisco Systems, Inc.\r\nCompiled Thu 02-Nov-17 11:07 ')]
  49. 2018-05-01 11:16:38,163 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GETNEXT 1.3.6.1.2.1.2.2.1.1
  50. 2018-05-01 11:16:38,166 [noc.core.ioloop.snmp] [10.220.20.100] GETNEXT result: [('1.3.6.1.2.1.2.2.1.1.1', 1)]
  51. 2018-05-01 11:16:38,166 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GETNEXT 1.3.6.1.2.1.31.1.1.1.6
  52. 2018-05-01 11:16:38,169 [noc.core.ioloop.snmp] [10.220.20.100] GETNEXT result: [('1.3.6.1.2.1.31.1.1.1.6.1', 5743866954)]
  53. 2018-05-01 11:16:38,169 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GET ['1.3.6.1.4.1.9.10.24.1.1.4.1.2.2']
  54. 2018-05-01 11:16:38,171 [noc.core.ioloop.snmp] [10.220.20.100] GET result: None
  55. 2018-05-01 11:16:38,171 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GET ['1.3.6.1.4.1.9.9.194.1.1.1.0']
  56. 2018-05-01 11:16:38,172 [noc.core.ioloop.snmp] [10.220.20.100] GET result: None
  57. 2018-05-01 11:16:38,173 [noc.core.ioloop.snmp] [10.220.20.100] SNMP GET ['1.3.6.1.4.1.9.10.24.1.1.4.1.2.3']
  58. 2018-05-01 11:16:38,174 [noc.core.ioloop.snmp] [10.220.20.100] GET result: None
  59. 2018-05-01 11:16:38,174 [script] [Cisco.IOS.get_capabilities|10.220.20.100] Open telnet CLI
  60. 2018-05-01 11:16:38,177 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [telnet] Setup session
  61. 2018-05-01 11:16:38,177 [script] [Cisco.IOS.get_capabilities|10.220.20.100] Disable paging
  62. 2018-05-01 11:16:38,177 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [telnet] Creating IOLoop
  63. 2018-05-01 11:16:38,177 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [telnet] Connecting (u'10.220.20.100', 23)
  64. 2018-05-01 11:16:38,179 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [telnet] Connection refused
  65. 2018-05-01 11:16:38,179 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [snmp] Closing UDP socket
  66. 2018-05-01 11:16:38,179 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [snmp] Closing IOLoop
  67. 2018-05-01 11:16:38,179 [script] [Cisco.IOS.get_capabilities|10.220.20.100] [telnet] Closing IOLoop
  68. 2018-05-01 11:16:38,355 [noc.core.debug] UNHANDLED EXCEPTION (2018-05-01 11:16:38.191016)
  69. PROCESS: ./commands/script.py
  70. VERSION: 15.05.1+microservices.9559.0ce3c50f
  71. BRANCH: microservices CHANGESET: 0ce3c50f
  72. ERROR FINGERPRINT: ec2ee0cd-9c68-51fc-b692-1f5faa5df5d4
  73. WORKING DIRECTORY: /opt/noc
  74. EXCEPTION: <class 'noc.core.script.cli.error.CLIConnectionRefused'> Connection refused
  75. START OF TRACEBACK
  76. ------------------------------------------------------------------------
  77. File: core/script/cli/base.py (Line: 179)
  78. Function: execute
  79.   172                 parser = self.read_until_prompt
  80.   173             with Span(server=self.script.credentials.get("address"),
  81.   174                       service=self.name, in_label=cmd) as s:
  82.   175                 self.ioloop.run_sync(functools.partial(self.submit, parser))
  83.   176                 if self.error:
  84.   177                     if s:
  85.   178                         s.error_text = str(self.error)
  86.   179 ==>                 raise self.error
  87.   180                 else:
  88.   181                     return self.result
  89.   182
  90.   183         @tornado.gen.coroutine
  91.   184         def submit(self, parser=None):
  92.   185             # Create iostream and connect, when necessary
  93. Variables:
  94.                  cmd = 'terminal length 0\n'
  95.           obj_parser = None
  96.                 self = <noc.core.script.cli.telnet.TelnetCLI object at 0x7fc071d98910>
  97.               parser =
  98. <bound method TelnetCLI.read_until_prompt of <noc.core.script.cli.telnet.TelnetCLI object at 0x7fc071d98910>>
  99.             cmd_stop = None
  100.             cmd_next = None
  101.                    s = <noc.core.span.Span object at 0x7fc071db2750>
  102.        ignore_errors = True
  103. ------------------------------------------------------------------------
  104. File: core/script/base.py (Line: 768)
  105. Function: cli
  106.   761                 if r is not None:
  107.   762                     self.logger.debug("Use cached result")
  108.   763                     return format_result(r)
  109.   764             command_submit = command_submit or self.profile.command_submit
  110.   765             stream = self.get_cli_stream()
  111.   766             r = stream.execute(cmd + command_submit, obj_parser=obj_parser,
  112.   767                                cmd_next=cmd_next, cmd_stop=cmd_stop,
  113.   768 ==>                            ignore_errors=ignore_errors)
  114.   769             if isinstance(r, six.string_types):
  115.   770                 if self.beef:
  116.   771                     self.beef.set_cli(cmd, r)
  117.   772                 # Check for syntax errors
  118.   773                 if not ignore_errors:
  119.   774                     # Then check for operation error
  120. Variables:
  121.       command_submit = '\n'
  122.        format_result = <function format_result at 0x7fc071db7488>
  123.               nowait = False
  124.               stream = <noc.core.script.cli.telnet.TelnetCLI object at 0x7fc071d98910>
  125.               cached = False
  126.           obj_parser = None
  127.           bulk_lines = None
  128.                  cmd = 'terminal length 0'
  129.             cmd_stop = None
  130.             cmd_next = None
  131.                 file = None
  132.              list_re = None
  133.        ignore_errors = True
  134.                 self =
  135. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  136. ------------------------------------------------------------------------
  137. File: core/script/base.py (Line: 830)
  138. Function: get_cli_stream
  139.   823                 # @todo: Move to CLI
  140.   824                 if self.to_disable_pager:
  141.   825                     self.logger.debug("Disable paging")
  142.   826                     self.to_disable_pager = False
  143.   827                     if isinstance(self.profile.command_disable_pager, six.string_types):
  144.   828                         self.cli(
  145.   829                             self.profile.command_disable_pager,
  146.   830 ==>                         ignore_errors=True
  147.   831                         )
  148.   832                     elif isinstance(self.profile.command_disable_pager, list):
  149.   833                         for cmd in self.profile.command_disable_pager:
  150.   834                             self.cli(cmd, ignore_errors=True)
  151.   835                     else:
  152.   836                         raise UnexpectedResultError
  153. Variables:
  154.                 self =
  155. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  156.             protocol = 'telnet'
  157. ------------------------------------------------------------------------
  158. File: core/script/base.py (Line: 765)
  159. Function: cli
  160.   758                     return format_result(f.read())
  161.   759             if cached:
  162.   760                 r = self.root.cli_cache.get(cmd)
  163.   761                 if r is not None:
  164.   762                     self.logger.debug("Use cached result")
  165.   763                     return format_result(r)
  166.   764             command_submit = command_submit or self.profile.command_submit
  167.   765 ==>         stream = self.get_cli_stream()
  168.   766             r = stream.execute(cmd + command_submit, obj_parser=obj_parser,
  169.   767                                cmd_next=cmd_next, cmd_stop=cmd_stop,
  170.   768                                ignore_errors=ignore_errors)
  171.   769             if isinstance(r, six.string_types):
  172.   770                 if self.beef:
  173.   771                     self.beef.set_cli(cmd, r)
  174. Variables:
  175.       command_submit = '\n'
  176.        format_result = <function format_result at 0x7fc071d92230>
  177.               nowait = False
  178.               cached = False
  179.           obj_parser = None
  180.           bulk_lines = None
  181.                  cmd = 'show spanning-tree'
  182.             cmd_stop = None
  183.             cmd_next = None
  184.                 file = None
  185.              list_re = None
  186.        ignore_errors = False
  187.                 self =
  188. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  189. ------------------------------------------------------------------------
  190. File: sa/profiles/Cisco/IOS/get_capabilities.py (Line: 80)
  191. Function: has_stp_cli
  192.    73             return "% OAM is not enabled" not in r  # @todo:  not tested
  193.    74
  194.    75         @false_on_cli_error
  195.    76         def has_stp_cli(self):
  196.    77             """
  197.   78             Check box has stp enabled
  198.   79             """
  199.    80 ==>         r = self.cli("show spanning-tree")
  200.    81             if ("No spanning tree instance exists" in r or
  201.    82                     "No spanning tree instances exist" in r):
  202.    83                 return False
  203.    84             return True
  204.    85
  205.    86         @false_on_cli_error
  206. Variables:
  207.                 self =
  208. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  209. ------------------------------------------------------------------------
  210. File: sa/profiles/Generic/get_capabilities.py (Line: 415)
  211. Function: wrapper
  212.   408             self.capabilities[name] = value
  213.   409
  214.   410
  215.   411     def false_on_cli_error(f):
  216.   412         @functools.wraps(f)
  217.   413         def wrapper(*args, **kwargs):
  218.   414             try:
  219.   415 ==>             return f(*args, **kwargs)
  220.   416             except (BaseScript.CLIOperationError, BaseScript.CLISyntaxError):
  221.   417                 return False
  222.   418         return wrapper
  223. Variables:
  224.                 args =
  225. (<noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>,)
  226.                    f = <function has_stp_cli at 0x7fc071d908c0>
  227.               kwargs = {}
  228. ------------------------------------------------------------------------
  229. File: core/script/base.py (Line: 422)
  230. Function: call_method
  231.   415                 if isinstance(handler, six.string_types):
  232.   416                     handler = getattr(self, handler, None)
  233.   417                 if handler is None:
  234.   418                     self.logger.debug("No '%s' handler. Passing to next method" % m)
  235.   419                     continue
  236.   420                 # Call handler
  237.   421                 try:
  238.   422 ==>                 r = handler(**kwargs)
  239.   423                     if isinstance(r, PartialResult):
  240.   424                         if self.partial_result:
  241.   425                             self.partial_result.update(r.result)
  242.   426                         else:
  243.   427                             self.partial_result = r.result
  244.   428                         self.logger.debug("Partial result: %r. Passing to next method", self.partial_result)
  245. Variables:
  246.                 self =
  247. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  248.                    m = u'C'
  249.     fallback_handler =
  250. <bound method Script.return_false of <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>>
  251.          cli_handler = 'has_stp_cli'
  252.              handler =
  253. <bound method Script.has_stp_cli of <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>>
  254.               kwargs = {}
  255.         snmp_handler = 'has_stp_snmp'
  256.    access_preference = u'CS*'
  257. ------------------------------------------------------------------------
  258. File: sa/profiles/Generic/get_capabilities.py (Line: 144)
  259. Function: has_stp
  260.   137         def has_stp(self):
  261.   138             """
  262.  139             Returns True when STP is enabled
  263.  140             """
  264.   141             return self.call_method(
  265.   142                 cli_handler="has_stp_cli",
  266.   143                 snmp_handler="has_stp_snmp",
  267.   144 ==>             fallback_handler=self.return_false
  268.   145             )
  269.   146
  270.   147         def has_udld(self):
  271.   148             """
  272.  149             Returns True when UDLD is enabled
  273.  150             """
  274. Variables:
  275.                 self =
  276. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  277. ------------------------------------------------------------------------
  278. File: sa/profiles/Generic/get_capabilities.py (Line: 343)
  279. Function: execute
  280.   336                 for cap, oid in self.CHECK_SNMP_GET.iteritems():
  281.   337                     if self.check_snmp_get(oid):
  282.   338                         caps[cap] = True
  283.   339             else:
  284.   340                 caps["SNMP"] = False
  285.   341                 for v in self.SNMP_CAPS:
  286.   342                     caps[v] = False
  287.   343 ==>         if self.has_stp():
  288.   344                 caps["Network | STP"] = True
  289.   345             if self.has_lldp():
  290.   346                 caps["Network | LLDP"] = True
  291.   347             if self.has_cdp():
  292.   348                 caps["Network | CDP"] = True
  293.   349             if self.has_oam():
  294. Variables:
  295.                  oid = '1.3.6.1.4.1.9.10.24.1.1.4.1.2.3'
  296.                 self =
  297. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  298.                  cap = 'BRAS | PPTP'
  299.                 caps =
  300. {'SNMP': True,
  301.  'SNMP | Bulk': True,
  302.  'SNMP | IF-MIB': True,
  303.  'SNMP | IF-MIB | HC': True,
  304.  'SNMP | v1': True,
  305.  'SNMP | v2c': True,
  306.  'SNMP | v3': False}
  307.                    v = 3
  308.                  svs = set([0, 1])
  309. ------------------------------------------------------------------------
  310. File: core/script/base.py (Line: 247)
  311. Function: run
  312.   240                         self.logger.info("Using cached result")
  313.   241                         cache_hit = True
  314.   242                     except KeyError:
  315.   243                         pass
  316.   244                 # Execute script
  317.   245                 if not cache_hit:
  318.   246                     try:
  319.   247 ==>                     result = self.execute(**self.args)
  320.   248                         if self.cache and self.parent and result:
  321.   249                             self.logger.info("Caching result")
  322.   250                             self.set_cache(self.name, self.args, result)
  323.   251                     finally:
  324.   252                         if not self.parent:
  325.   253                             # Close SNMP socket when necessary
  326. Variables:
  327.            cache_hit = False
  328.                 self =
  329. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  330. ------------------------------------------------------------------------
  331. File: commands/script.py (Line: 118)
  332. Function: handle
  333.   111                 capabilities=caps,
  334.   112                 args=args,
  335.   113                 version=version,
  336.   114                 timeout=3600,
  337.   115                 name=script,
  338.   116                 collect_beef=bool(beef)
  339.   117             )
  340.   118 ==>         result = scr.run()
  341.   119             if pretty:
  342.   120                 pprint.pprint(result)
  343.   121             elif yaml:
  344.   122                 import yaml
  345.   123                 import sys
  346.   124                 yaml.dump(result, sys.stdout)
  347. Variables:
  348.                  obj = <ManagedObject: sw3850>
  349.                 beef = None
  350.              service = <__main__.ServiceStub object at 0x7fc071ddc590>
  351.               script = u'Cisco.IOS.get_capabilities'
  352.         script_class = <class 'noc.sa.profiles.Cisco.IOS.get_capabilities.Script'>
  353.                 self = <__main__.Command object at 0x7fc086ddf3d0>
  354.                 args = {}
  355.             use_snmp = True
  356.                 caps =
  357. {u'Cisco | IOS | Syntax | IP SLA': 0,
  358.  u'DB | Interfaces': 75,
  359.  u'Network | CDP': True,
  360.  u'Network | IPv6': True,
  361.  u'Network | LACP': True,
  362.  u'Network | OAM': True,
  363.  u'Network | STP': True,
  364.  u'SNMP': True,
  365.  u'SNMP | Bulk': True,
  366.  u'SNMP | IF-MIB': True,
  367.  u'SNMP | IF-MIB | HC': True,
  368.  u'SNMP | v1': True,
  369.  u'SNMP | v2c': True,
  370.  u'SNMP | v3': False}
  371.                 yaml = False
  372.          object_name = ['sw3850']
  373.              version = None
  374.            arguments = []
  375.               pretty = True
  376.          credentials =
  377. {'access_preference': u'CS',
  378.  'address': u'10.220.20.100',
  379.  'cli_protocol': 'telnet',
  380.  'password': u'xxxxxxx',
  381.  'path': None,
  382.  'raise_privileges': True,
  383.  'snmp_ro': u'xxxxxx',
  384.  'snmp_version': 'v2c',
  385.  'super_password': u'cisco',
  386.  'user': u'noc'}
  387.    access_preference = None
  388.              options = {}
  389.                  scr =
  390. <noc.sa.profiles.Cisco.IOS.get_capabilities.Script object at 0x7fc071d8ec50>
  391. ------------------------------------------------------------------------
  392. File: core/management/base.py (Line: 76)
  393. Function: run_from_argv
  394.    69             enable_profiling = cmd_options.pop("enable_profiling", False)
  395.    70             show_metrics = cmd_options.pop("show_metrics", False)
  396.    71             if enable_profiling:
  397.    72                 # Start profiler
  398.    73                 import yappi
  399.    74                 yappi.start()
  400.    75             try:
  401.    76 ==>             return self.handle(*args, **cmd_options) or 0
  402.    77             except CommandError as e:
  403.    78                 self.print(str(e))
  404.    79                 return 1
  405.    80             except KeyboardInterrupt:
  406.    81                 self.print("Ctrl+C")
  407.    82                 return 3
  408. Variables:
  409.               parser =
  410. ArgumentParser(prog='script.py', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  411.             loglevel = 'debug'
  412.     enable_profiling = False
  413.                 args = ()
  414.          cmd_options =
  415. {'access_preference': None,
  416.  'arguments': [],
  417.  'beef': None,
  418.  'object_name': ['sw3850'],
  419.  'pretty': True,
  420.  'script': ['get_capabilities'],
  421.  'use_snmp': True,
  422.  'yaml': False}
  423.                 argv = ['--debug', '--pretty', 'get_capabilities', 'sw3850']
  424.                 self = <__main__.Command object at 0x7fc086ddf3d0>
  425.         show_metrics = False
  426.              options =
  427. Namespace(access_preference=None, arguments=[], beef=None, object_name=['sw3850'], pretty=True, script=['get_capabilities'], use_snmp=True, yaml=False)
  428. ------------------------------------------------------------------------
  429. END OF TRACEBACK
  430. 2018-05-01 11:16:38,365 [noc.core.debug] Writing CP report to /var/lib/noc/cp/crashinfo/new/ec2ee0cd-9c68-51fc-b692-1f5faa5df5d4.json
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement