Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROCESS: ./commands/script.py
- VERSION: 15.05.1+microservices.9141.4c85fb66
- BRANCH: microservices CHANGESET: 4c85fb66
- ERROR FINGERPRINT: e22a6b9a-21a6-5f94-b2eb-c109c4bc8ae5
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <type 'exceptions.AttributeError'> 'NoneType' object has no attribute 'endswith'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: sa/profiles/MikroTik/RouterOS/__init__.py (Line: 43)
- Function: setup_script
- 36 Starting from v3.14 we can specify console options
- 37 during login process
- 38 :param script:
- 39 :return:
- 40 """
- 41 if script.parent is None:
- 42 user = script.credentials.get("user", "")
- 43 ==> if not user.endswith("+ct255w255h"):
- 44 script.credentials["user"] = user + "+ct255w255h"
- 45 self.add_script_method(script, "cli_detail", self.cli_detail)
- 46
- 47 def setup_session(self, script):
- 48 # MikroTik Remove duplicates prompt
- 49 script.cli("\n")
- Variables:
- self = <noc.sa.profiles.MikroTik.RouterOS.Profile object at 0x7fb749274050>
- user = None
- script =
- <noc.sa.profiles.MikroTik.RouterOS.get_config.Script object at 0x7fb749274310>
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 186)
- Function: __init__
- 179 version
- 180 )
- 181 # Fill matchers
- 182 if not self.name.endswith(".get_version"):
- 183 self.apply_matchers()
- 184 #
- 185 if self.profile.setup_script:
- 186 ==> self.profile.setup_script(self)
- 187
- 188 def __call__(self, *args, **kwargs):
- 189 self.args = kwargs
- 190 return self.run()
- 191
- 192 def apply_matchers(self):
- Variables:
- service = <__main__.ServiceStub object at 0x7fb749258f10>
- version =
- {'platform': u'RB2011UiAS-2HnD', 'vendor': u'MikroTik', 'version': u'6.40.5'}
- args = {}
- name = u'MikroTik.RouterOS.get_config'
- parent = None
- self =
- <noc.sa.profiles.MikroTik.RouterOS.get_config.Script object at 0x7fb749274310>
- collect_beef = False
- capabilities = {}
- s = [u'MikroTik', u'RouterOS', u'get_config']
- session = None
- session_idle_timeout = None
- timeout = 3600
- credentials =
- {'access_preference': u'C',
- 'address': u'xxx.xxx.16.1',
- 'cli_protocol': 'telnet',
- 'password': None,
- 'path': None,
- 'raise_privileges': True,
- 'snmp_ro': u'xxxxx',
- 'snmp_version': 'v2c',
- 'super_password': None,
- 'user': None}
- ------------------------------------------------------------------------
- File: commands/script.py (Line: 116)
- Function: handle
- 109 service=service,
- 110 credentials=credentials,
- 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
- Variables:
- obj = <ManagedObject: MikroTik_KUUG>
- beef = None
- service = <__main__.ServiceStub object at 0x7fb749258f10>
- script = u'MikroTik.RouterOS.get_config'
- script_class = <class 'noc.sa.profiles.MikroTik.RouterOS.get_config.Script'>
- self = <__main__.Command object at 0x7fb755be5b50>
- args = {}
- use_snmp = True
- caps = {}
- yaml = False
- object_name = ['MikroTik_KUUG']
- version =
- {'platform': u'RB2011UiAS-2HnD', 'vendor': u'MikroTik', 'version': u'6.40.5'}
- arguments = []
- pretty = True
- credentials =
- {'access_preference': u'C',
- 'address': u'xxx.xxx.16.1',
- 'cli_protocol': 'telnet',
- 'password': None,
- 'path': None,
- 'raise_privileges': True,
- 'snmp_ro': u'xxxxx',
- 'snmp_version': 'v2c',
- 'super_password': None,
- 'user': None}
- options = {}
- access_preference = None
- ------------------------------------------------------------------------
- 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': ['MikroTik_KUUG'],
- 'pretty': True,
- 'script': ['get_config'],
- 'use_snmp': True,
- 'yaml': False}
- argv = ['--debug', '--pretty', 'get_config', 'MikroTik_KUUG']
- self = <__main__.Command object at 0x7fb755be5b50>
- show_metrics = False
- options =
- Namespace(access_preference=None, arguments=[], beef=None, object_name=['MikroTik_KUUG'], pretty=True, script=['get_config'], use_snmp=True, yaml=False)
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement