Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.46 KB | None | 0 0
  1. noc-node1:/opt/noc$ sudo ./noc script --debug --pretty get_config "Cisco Catalyst 2960XR - RTU Switch (EQ.88754)"
  2. 2017-04-27 13:44:16,526 [root] Loading PeriodicRegistry
  3. 2017-04-27 13:44:16,599 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'replicaSet': 'noc'
  4. , 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:noc@192.168.110.75:27017/noc', 'password': '********', 'slave_okay': T
  5. rue}
  6. 2017-04-27 13:44:16,616 [noc.core.cache.base] Using cache backend: noc.core.cache.memcached.MemcachedCache
  7. 2017-04-27 13:44:16,621 [noc.core.cache.memcached] Starting memcached pool: hosts=192.168.110.75:11211, pool size=8
  8. 2017-04-27 13:44:16,644 [noc.main.models.doccategory] Registering Capability
  9. 2017-04-27 13:44:16,645 [noc.main.models.doccategory] Registering MetricType
  10. 2017-04-27 13:44:16,861 [noc.main.models.doccategory] Registering ConnectionType
  11. 2017-04-27 13:44:16,864 [noc.main.models.doccategory] Registering ObjectModel
  12. 2017-04-27 13:44:16,876 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  13. 2017-04-27 13:44:16,896 [noc.main.models.textindex] Adding FTS index for ip.vrf
  14. 2017-04-27 13:44:16,900 [noc.main.models.textindex] Adding FTS index for vc.vc
  15. 2017-04-27 13:44:16,903 [noc.main.models.textindex] Adding FTS index for ip.prefix
  16. 2017-04-27 13:44:16,905 [noc.main.models.textindex] Adding FTS index for ip.address
  17. 2017-04-27 13:44:16,930 [noc.core.script.loader] Loading script Cisco.IOS.get_config
  18. 2017-04-27 13:44:16,954 [noc.core.profile.loader] Loading profile Cisco.IOS
  19. 2017-04-27 13:44:16,954 [script] [Cisco.IOS.get_config|192.168.110.56] Filling get_version cache with {'platform': u'C2960X', 'versio
  20. n': u'15.0(2)EX5', 'vendor': u'Cisco'}
  21. 2017-04-27 13:44:16,954 [script] [Cisco.IOS.get_config|192.168.110.56] Running. Input arguments: {}, timeout 3600
  22. 2017-04-27 13:44:16,955 [script] [Cisco.IOS.get_config|192.168.110.56] Open ssh CLI
  23. 2017-04-27 13:44:16,960 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Setup session
  24. 2017-04-27 13:44:16,960 [script] [Cisco.IOS.get_config|192.168.110.56] Disable paging
  25. 2017-04-27 13:44:16,960 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Creating IOLoop
  26. 2017-04-27 13:44:16,961 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Connecting (u'192.168.110.56', 22)
  27. 2017-04-27 13:44:16,962 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Connected
  28. 2017-04-27 13:44:16,963 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Startup ssh session for user 'rancid'
  29. 2017-04-27 13:44:17,514 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Connected. Host fingerprint is c3edcac7c84f28aee2522d741755d9e16740070c
  30. 2017-04-27 13:44:17,516 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Supported authentication methods: publickey, keyboard-interactive, password
  31. 2017-04-27 13:44:17,516 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Trying publickey authentication
  32. 2017-04-27 13:44:17,516 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] public_key=var/etc/ssh/default/id_rsa.pub private_key=var/etc/ssh/default/id_rsa
  33. 2017-04-27 13:44:19,516 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Failed: Username/PublicKey combination invalid (Code: -18)
  34. 2017-04-27 13:44:19,516 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Trying keyboard-interactive
  35. 2017-04-27 13:44:19,523 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Success
  36. 2017-04-27 13:44:19,523 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] User is authenticated
  37. 2017-04-27 13:44:19,523 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Open channel
  38. 2017-04-27 13:44:19,527 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] State: <START>
  39. 2017-04-27 13:44:19,527 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Setting timeout: 60s
  40. 2017-04-27 13:44:19,528 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Received: 'CC\r\n=== RTU Switch - Catalyst 2960 EQ.88754 ===\r\n'
  41. 2017-04-27 13:44:19,529 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Received: '\r\nRTU_switch/EQ.88754>'
  42. 2017-04-27 13:44:19,529 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Match: ^\S+?>
  43. 2017-04-27 13:44:19,529 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] State: <UNPRIVILEGED_PROMPT>
  44. 2017-04-27 13:44:19,529 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Send: 'enable\n'
  45. 2017-04-27 13:44:19,530 [tornado.application] Future exception was never retrieved: Traceback (most recent call last):
  46. File "/opt/noc/local/lib/python2.7/site-packages/tornado/gen.py", line 307, in wrapper
  47. yielded = next(result)
  48. File "/opt/noc/core/script/cli/base.py", line 217, in send
  49. yield self.iostream.write(cmd)
  50. File "/opt/noc/local/lib/python2.7/site-packages/tornado/iostream.py", line 406, in write
  51. self._handle_write()
  52. File "/opt/noc/local/lib/python2.7/site-packages/tornado/iostream.py", line 862, in _handle_write
  53. memoryview(self._write_buffer)[start:start + size])
  54. File "/opt/noc/core/script/cli/ssh.py", line 89, in write_to_fd
  55. return self.channel.write(data)
  56. File "/opt/noc/local/lib/python2.7/site-packages/libssh2/channel.py", line 255, in write
  57. return self._channel.write(message)
  58. TypeError: must be string or read-only buffer, not memoryview
  59. 2017-04-27 13:44:19,530 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Setting timeout: 10s
  60. 2017-04-27 13:44:29,540 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Timeout error
  61. 2017-04-27 13:44:29,540 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Closing channel
  62. 2017-04-27 13:44:29,642 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Cannot close channel clearly: Unable to close the channel.
  63. 2017-04-27 13:44:29,642 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Closing ssh session
  64. 2017-04-27 13:44:29,643 [tornado.application] Exception in Future <tornado.concurrent.Future object at 0x7f6338031090> after timeout
  65. Traceback (most recent call last):
  66. File "/opt/noc/local/lib/python2.7/site-packages/tornado/gen.py", line 910, in error_callback
  67. future.result()
  68. File "/opt/noc/local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
  69. raise_exc_info(self._exc_info)
  70. File "<string>", line 3, in raise_exc_info
  71. StreamClosedError: Stream is closed
  72. 2017-04-27 13:44:29,643 [script] [Cisco.IOS.get_config|192.168.110.56] [ssh] Closing IOLoop
  73. 2017-04-27 13:44:29,693 [noc.lib.debug] UNHANDLED EXCEPTION (2017-04-27 13:44:29.644311)
  74. BRANCH: feature/microservices TIP: 832fe316629a
  75. PROCESS: ./commands/script.py
  76. ERROR FINGERPRINT: 90c09177-9ed2-5979-bd36-f5fdd980b553
  77. WORKING DIRECTORY: /opt/noc
  78. EXCEPTION: <class 'tornado.gen.TimeoutError'> Timeout
  79. START OF TRACEBACK
  80. ------------------------------------------------------------------------
  81. File: core/script/cli/base.py (Line: 262)
  82. Function: read_until_prompt
  83. 255 if not connect_retries:
  84. 256 raise tornado.iostream.StreamClosedError()
  85. 257 continue
  86. 258 else:
  87. 259 raise tornado.iostream.StreamClosedError()
  88. 260 except tornado.gen.TimeoutError:
  89. 261 self.logger.info("Timeout error")
  90. 262 ==> raise tornado.gen.TimeoutError("Timeout")
  91. 263 self.logger.debug("Received: %r", r)
  92. 264 # Clean input
  93. 265 if self.buffer.find(
  94. 266 "\x1b",
  95. 267 -self.MATCH_MISSED_CONTROL_TAIL) != -1:
  96. 268 self.buffer = self.cleaned_input(self.buffer + r)
  97. Variables:
  98. f = <tornado.concurrent.Future object at 0x7f6338031090>
  99. handler =
  100. <bound method SSHCLI.on_unprivileged_prompt of <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>>
  101. self = <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>
  102. rx = <_sre.SRE_Pattern object at 0x7f6326248570>
  103. connect_retries = 3
  104. r = None
  105. offset = 0
  106. match = <_sre.SRE_Match object at 0x7f6325feb030>
  107. matched = 'CC\n=== RTU Switch - Catalyst 2960 EQ.88754 ===\n\n'
  108. ------------------------------------------------------------------------
  109. File: local/lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  110. Function: run
  111. 1056 except Exception:
  112. 1057 self.had_exception = True
  113. 1058 exc_info = sys.exc_info()
  114. 1059 future = None
  115. 1060
  116. 1061 if exc_info is not None:
  117. 1062 try:
  118. 1063 ==> yielded = self.gen.throw(*exc_info)
  119. 1064 finally:
  120. 1065 # Break up a reference to itself
  121. 1066 # for faster GC on CPython.
  122. 1067 exc_info = None
  123. 1068 else:
  124. 1069 yielded = self.gen.send(value)
  125. Variables:
  126. exc_info = None
  127. self = <tornado.gen.Runner object at 0x7f6338028fd0>
  128. future = None
  129. orig_stack_contexts = ((), None)
  130. ------------------------------------------------------------------------
  131. File: local/lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  132. Function: result
  133. 231 before the `Future` is done, so the ``timeout`` is never used.
  134. 232 """
  135. 233 self._clear_tb_log()
  136. 234 if self._result is not None:
  137. 235 return self._result
  138. 236 if self._exc_info is not None:
  139. 237 try:
  140. 238 ==> raise_exc_info(self._exc_info)
  141. 239 finally:
  142. 240 self = None
  143. 241 self._check_done()
  144. 242 return self._result
  145. 243
  146. 244 def exception(self, timeout=None):
  147. Variables:
  148. self = None
  149. timeout = None
  150. ------------------------------------------------------------------------
  151. File: local/lib/python2.7/site-packages/tornado/gen.py (Line: 1055)
  152. Function: run
  153. 1048 return
  154. 1049 self.future = None
  155. 1050 try:
  156. 1051 orig_stack_contexts = stack_context._state.contexts
  157. 1052 exc_info = None
  158. 1053
  159. 1054 try:
  160. 1055 ==> value = future.result()
  161. 1056 except Exception:
  162. 1057 self.had_exception = True
  163. 1058 exc_info = sys.exc_info()
  164. 1059 future = None
  165. 1060
  166. 1061 if exc_info is not None:
  167. Variables:
  168. exc_info = None
  169. self = <tornado.gen.Runner object at 0x7f632625b350>
  170. future = None
  171. orig_stack_contexts = ((), None)
  172. ------------------------------------------------------------------------
  173. File: core/script/cli/base.py (Line: 185)
  174. Function: submit
  175. 178 self.error = self.CLIError("Connection refused")
  176. 179 raise tornado.gen.Return(None)
  177. 180 self.logger.debug("Connected")
  178. 181 yield self.iostream.startup()
  179. 182 # Perform all necessary login procedures
  180. 183 if not self.is_started:
  181. 184 self.on_start()
  182. 185 ==> self.motd = yield self.read_until_prompt()
  183. 186 self.script.set_motd(self.motd)
  184. 187 self.is_started = True
  185. 188 # Send command
  186. 189 # @todo: encode to object's encoding
  187. 190 self.send(self.command)
  188. 191 parser = parser or self.read_until_prompt
  189. Variables:
  190. self = <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>
  191. parser =
  192. <bound method SSHCLI.read_until_prompt of <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>>
  193. address = (u'192.168.110.56', 22)
  194. ------------------------------------------------------------------------
  195. File: local/lib/python2.7/site-packages/tornado/gen.py (Line: 1063)
  196. Function: run
  197. 1056 except Exception:
  198. 1057 self.had_exception = True
  199. 1058 exc_info = sys.exc_info()
  200. 1059 future = None
  201. 1060
  202. 1061 if exc_info is not None:
  203. 1062 try:
  204. 1063 ==> yielded = self.gen.throw(*exc_info)
  205. 1064 finally:
  206. 1065 # Break up a reference to itself
  207. 1066 # for faster GC on CPython.
  208. 1067 exc_info = None
  209. 1068 else:
  210. 1069 yielded = self.gen.send(value)
  211. Variables:
  212. exc_info = None
  213. self = <tornado.gen.Runner object at 0x7f632625b350>
  214. future = None
  215. orig_stack_contexts = ((), None)
  216. ------------------------------------------------------------------------
  217. File: local/lib/python2.7/site-packages/tornado/concurrent.py (Line: 238)
  218. Function: result
  219. 231 before the `Future` is done, so the ``timeout`` is never used.
  220. 232 """
  221. 233 self._clear_tb_log()
  222. 234 if self._result is not None:
  223. 235 return self._result
  224. 236 if self._exc_info is not None:
  225. 237 try:
  226. 238 ==> raise_exc_info(self._exc_info)
  227. 239 finally:
  228. 240 self = None
  229. 241 self._check_done()
  230. 242 return self._result
  231. 243
  232. 244 def exception(self, timeout=None):
  233. Variables:
  234. self = None
  235. timeout = None
  236. ------------------------------------------------------------------------
  237. File: local/lib/python2.7/site-packages/tornado/ioloop.py (Line: 458)
  238. Function: run_sync
  239. 451 if timeout is not None:
  240. 452 timeout_handle = self.add_timeout(self.time() + timeout, self.stop)
  241. 453 self.start()
  242. 454 if timeout is not None:
  243. 455 self.remove_timeout(timeout_handle)
  244. 456 if not future_cell[0].done():
  245. 457 raise TimeoutError('Operation timed out after %s seconds' % timeout)
  246. 458 ==> return future_cell[0].result()
  247. 459
  248. 460 def time(self):
  249. 461 """Returns the current time according to the `IOLoop`'s clock.
  250. 462
  251. 463 The return value is a floating-point number relative to an
  252. 464 unspecified time in the past.
  253. Variables:
  254. self = <tornado.platform.epoll.EPollIOLoop object at 0x7f632625b8d0>
  255. run = <function run at 0x7f6326267ed8>
  256. func = <functools.partial object at 0x7f63262ad3c0>
  257. timeout = None
  258. future_cell = [<tornado.concurrent.Future object at 0x7f632625b650>]
  259. ------------------------------------------------------------------------
  260. File: core/script/cli/base.py (Line: 158)
  261. Function: execute
  262. 151 if obj_parser:
  263. 152 parser = functools.partial(
  264. 153 self.parse_object_stream,
  265. 154 obj_parser, cmd_next, cmd_stop
  266. 155 )
  267. 156 else:
  268. 157 parser = self.read_until_prompt
  269. 158 ==> self.ioloop.run_sync(functools.partial(self.submit, parser))
  270. 159 if self.error:
  271. 160 raise self.error
  272. 161 else:
  273. 162 return self.result
  274. 163
  275. 164 @tornado.gen.coroutine
  276. Variables:
  277. cmd = 'terminal length 0\n'
  278. obj_parser = None
  279. self = <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>
  280. parser =
  281. <bound method SSHCLI.read_until_prompt of <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>>
  282. cmd_stop = None
  283. cmd_next = None
  284. ------------------------------------------------------------------------
  285. File: core/script/base.py (Line: 657)
  286. Function: cli
  287. 650 r = self.root.cli_cache.get(cmd)
  288. 651 if r is not None:
  289. 652 self.logger.debug("Use cached result")
  290. 653 return format_result(r)
  291. 654 command_submit = command_submit or self.profile.command_submit
  292. 655 stream = self.get_cli_stream()
  293. 656 r = stream.execute(cmd + command_submit, obj_parser=obj_parser,
  294. 657 ==> cmd_next=cmd_next, cmd_stop=cmd_stop)
  295. 658 if isinstance(r, basestring):
  296. 659 if self.beef:
  297. 660 self.beef.set_cli(cmd, r)
  298. 661 # Check for syntax errors
  299. 662 if not ignore_errors:
  300. 663 # Check for syntax error
  301. Variables:
  302. command_submit = '\n'
  303. format_result = <function format_result at 0x7f632625d848>
  304. nowait = False
  305. stream = <noc.core.script.cli.ssh.SSHCLI object at 0x7f63262a0810>
  306. cached = False
  307. obj_parser = None
  308. bulk_lines = None
  309. cmd = 'terminal length 0'
  310. cmd_stop = None
  311. cmd_next = None
  312. file = None
  313. list_re = None
  314. ignore_errors = True
  315. self = <noc.sa.profiles.Cisco.IOS.get_config.Script object at 0x7f632627cc50>
  316. ------------------------------------------------------------------------
  317. File: core/script/base.py (Line: 722)
  318. Function: get_cli_stream
  319. 715 # @todo: Move to CLI
  320. 716 if self.to_disable_pager:
  321. 717 self.logger.debug("Disable paging")
  322. 718 self.to_disable_pager = False
  323. 719 if isinstance(self.profile.command_disable_pager, basestring):
  324. 720 self.cli(
  325. 721 self.profile.command_disable_pager,
  326. 722 ==> ignore_errors=True
  327. 723 )
  328. 724 elif isinstance(self.profile.command_disable_pager, list):
  329. 725 for cmd in self.profile.command_disable_pager:
  330. 726 self.cli(cmd, ignore_errors=True)
  331. 727 else:
  332. 728 raise self.UnexpectedResultError
  333. Variables:
  334. self = <noc.sa.profiles.Cisco.IOS.get_config.Script object at 0x7f632627cc50>
  335. protocol = 'ssh'
  336. ------------------------------------------------------------------------
  337. File: core/script/base.py (Line: 655)
  338. Function: cli
  339. 648 return format_result(f.read())
  340. 649 if cached:
  341. 650 r = self.root.cli_cache.get(cmd)
  342. 651 if r is not None:
  343. 652 self.logger.debug("Use cached result")
  344. 653 return format_result(r)
  345. 654 command_submit = command_submit or self.profile.command_submit
  346. 655 ==> stream = self.get_cli_stream()
  347. 656 r = stream.execute(cmd + command_submit, obj_parser=obj_parser,
  348. 657 cmd_next=cmd_next, cmd_stop=cmd_stop)
  349. 658 if isinstance(r, basestring):
  350. 659 if self.beef:
  351. 660 self.beef.set_cli(cmd, r)
  352. 661 # Check for syntax errors
  353. Variables:
  354. command_submit = '\n'
  355. format_result = <function format_result at 0x7f63262926e0>
  356. nowait = False
  357. cached = False
  358. obj_parser = None
  359. bulk_lines = None
  360. cmd = 'show running-config'
  361. cmd_stop = None
  362. cmd_next = None
  363. file = None
  364. list_re = None
  365. ignore_errors = False
  366. self = <noc.sa.profiles.Cisco.IOS.get_config.Script object at 0x7f632627cc50>
  367. ------------------------------------------------------------------------
  368. File: sa/profiles/Cisco/IOS/get_config.py (Line: 19)
  369. Function: execute
  370. 12
  371. 13
  372. 14 class Script(BaseScript):
  373. 15 name = "Cisco.IOS.get_config"
  374. 16 interface = IGetConfig
  375. 17
  376. 18 def execute(self):
  377. 19 ==> config = self.cli("show running-config")
  378. 20 config = self.strip_first_lines(config, 3)
  379. 21 return self.cleaned_config(config)
  380. Variables:
  381. self = <noc.sa.profiles.Cisco.IOS.get_config.Script object at 0x7f632627cc50>
  382. ------------------------------------------------------------------------
  383. File: core/script/base.py (Line: 216)
  384. Function: run
  385. 209 self.logger.info("Using cached result")
  386. 210 cache_hit = True
  387. 211 except KeyError:
  388. 212 pass
  389. 213 # Execute script
  390. 214 if not cache_hit:
  391. 215 try:
  392. 216 ==> result = self.execute(**self.args)
  393. 217 if self.cache and self.parent and result:
  394. 218 self.logger.info("Caching result")
  395. 219 self.set_cache(self.name, self.args, result)
  396. 220 finally:
  397. 221 if not self.parent:
  398. 222 # Close SNMP socket when necessary
  399. Variables:
  400. cache_hit = False
  401. self = <noc.sa.profiles.Cisco.IOS.get_config.Script object at 0x7f632627cc50>
  402. ------------------------------------------------------------------------
  403. File: commands/script.py (Line: 119)
  404. Function: handle
  405. 112 capabilities=caps,
  406. 113 args=args,
  407. 114 version=version,
  408. 115 timeout=3600,
  409. 116 name=script,
  410. 117 collect_beef=bool(beef)
  411. 118 )
  412. 119 ==> result = scr.run()
  413. 120 if pretty:
  414. 121 pprint.pprint(result)
  415. 122 elif yaml:
  416. 123 import yaml
  417. 124 import sys
  418. 125 yaml.dump(result, sys.stdout)
  419. Variables:
  420. obj = <ManagedObject: Cisco Catalyst 2960XR - RTU Switch (EQ.88754)>
  421. beef = None
  422. service = <__main__.ServiceStub object at 0x7f632627ced0>
  423. script = u'Cisco.IOS.get_config'
  424. script_class = <class 'noc.sa.profiles.Cisco.IOS.get_config.Script'>
  425. self = <__main__.Command object at 0x7f6336045f90>
  426. args = {}
  427. use_snmp = True
  428. caps =
  429. {u'DB | Interfaces': 31,
  430. u'Network | CDP': True,
  431. u'Network | IPv6': True,
  432. u'Network | LLDP': True,
  433. u'Network | STP': True,
  434. u'SNMP': True,
  435. u'SNMP | Bulk': True,
  436. u'SNMP | IF-MIB': True,
  437. u'SNMP | IF-MIB | HC': True,
  438. u'SNMP | v1': True,
  439. u'SNMP | v2c': True,
  440. u'SNMP | v3': False}
  441. yaml = False
  442. object_name = ['Cisco Catalyst 2960XR - RTU Switch (EQ.88754)']
  443. version = {'platform': u'C2960X', 'version': u'15.0(2)EX5', 'vendor': u'Cisco'}
  444. arguments = []
  445. pretty = True
  446. v =
  447. Version(profile=u'Cisco.IOS', vendor=u'Cisco', platform=u'C2960X', version=u'15.0(2)EX5')
  448. credentials =
  449. {'address': u'192.168.110.56',
  450. 'cli_port': 22,
  451. 'cli_protocol': 'ssh',
  452. 'password': u'hfywbl22',
  453. 'path': None,
  454. 'snmp_ro': u'snss-iskranet',
  455. 'snmp_version': 'v2c',
  456. 'super_password': u'c2960t',
  457. 'user': u'rancid'}
  458. config = 'etc/noc.yml'
  459. options = {}
  460. scr = <noc.sa.profiles.Cisco.IOS.get_config.Script object at 0x7f632627cc50>
  461. ------------------------------------------------------------------------
  462. File: core/management/base.py (Line: 55)
  463. Function: run_from_argv
  464. 48 options = parser.parse_args(argv)
  465. 49 cmd_options = vars(options)
  466. 50 args = cmd_options.pop("args", ())
  467. 51 loglevel = cmd_options.pop("loglevel")
  468. 52 if loglevel:
  469. 53 self.setup_logging(loglevel)
  470. 54 try:
  471. 55 ==> return self.handle(*args, **cmd_options) or 0
  472. 56 except CommandError, why:
  473. 57 self.stderr.write(str(why))
  474. 58 self.stderr.write("\n")
  475. 59 self.stderr.flush()
  476. 60 return 1
  477. 61 except Exception:
  478. Variables:
  479. args = ()
  480. loglevel = 'debug'
  481. self = <__main__.Command object at 0x7f6336045f90>
  482. parser =
  483. ArgumentParser(prog='script.py', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  484. cmd_options =
  485. {'arguments': [],
  486. 'beef': None,
  487. 'config': 'etc/noc.yml',
  488. 'object_name': ['Cisco Catalyst 2960XR - RTU Switch (EQ.88754)'],
  489. 'pretty': True,
  490. 'script': ['get_config'],
  491. 'use_snmp': True,
  492. 'yaml': False}
  493. argv =
  494. ['--debug',
  495. '--pretty',
  496. 'get_config',
  497. 'Cisco Catalyst 2960XR - RTU Switch (EQ.88754)']
  498. options =
  499. Namespace(arguments=[], beef=None, config='etc/noc.yml', object_name=['Cisco Catalyst 2960XR - RTU Switch (EQ.88754)'], pretty=True, script=['get_config'], use_snmp=True, yaml=False)
  500. ------------------------------------------------------------------------
  501. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement