Advertisement
Guest User

Untitled

a guest
Feb 26th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 68.74 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2014-02-26 12:11:11.830606) Working directory: /opt/noc <class 'pymongo.errors.OperationFailure'> command SON([('authenticate', 1), ('user', u'noc'), ('nonce', u'5803d4693218b2b5'), ('key', u'd8f89eb126a111824809a95155154dff')]) failed: auth fails START OF TRACEBACK ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/pymongo/helpers.py (Line: 147) Function: _check_command_response 140 ex_msg += (", assertionCode: %d" % 141 (details["assertionCode"],)) 142 raise OperationFailure(ex_msg, details.get("assertionCode")) 143 code = details.get("code") 144 # findAndModify with upsert can raise duplicate key error 145 if code in (11000, 11001, 12582): 146 raise DuplicateKeyError(errmsg, code) 147 ==> raise OperationFailure(msg % errmsg, code) 148 149 150 def _fields_list_to_dict(fields): 151 """Takes a list of field names and returns a matching dictionary. 152 153 ["a", "b"] becomes {"a": 1, "b": 1} Variables: reset = None code = None allowable_errors = [] details = {u'ok': 0.0, u'errmsg': u'auth fails'} msg = "command SON([('authenticate', 1), ('user', u'noc'), ('nonce', u'5803d4693218b2b5'), ('key', u'd8f89eb126a111824809a95155154dff')]) failed: %s" response = {u'ok': 0.0, u'errmsg': u'auth fails'} errmsg = u'auth fails' ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py (Line: 607) Function: __simple_command 600 except: 601 sock_info.close() 602 raise 603 604 end = time.time() 605 response = helpers._unpack_response(response)['data'][0] 606 msg = "command %r failed: %%s" % spec 607 ==> helpers._check_command_response(response, None, msg) 608 return response, end - start 609 610 def __try_node(self, node): 611 """Try to connect to this node and see if it works for our connection 612 type. Returns ((host, port), ismaster, isdbgrid, res_time). 613 Variables: end = 1393402271.830473 rqst_id = 1681692777 self = Connection('localhost', 27017) dbname = u'noc' spec = SON([('authenticate', 1), ('user', u'noc'), ('nonce', u'5803d4693218b2b5'), ('key', u'd8f89eb126a111824809a95155154dff')]) start = 1393402271.830239 sock_info = SocketInfo(<socket._socketobject object at 0x30e3050>) at 51470864 msg = "command SON([('authenticate', 1), ('user', u'noc'), ('nonce', u'5803d4693218b2b5'), ('key', u'd8f89eb126a111824809a95155154dff')]) failed: %s" response = {u'ok': 0.0, u'errmsg': u'auth fails'} _ = 107 ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/pymongo/auth.py (Line: 194) Function: _authenticate_mongo_cr 187 key = _auth_key(nonce, username, password) 188 189 # Actually authenticate 190 query = SON([('authenticate', 1), 191 ('user', username), 192 ('nonce', nonce), 193 ('key', key)]) 194 ==> cmd_func(sock_info, source, query) 195 196 197 _AUTH_MAP = { 198 'GSSAPI': _authenticate_gssapi, 199 'MONGODB-CR': _authenticate_mongo_cr, 200 'MONGODB-X509': _authenticate_x509, Variables: nonce = u'5803d4693218b2b5' username = u'noc' sock_info = SocketInfo(<socket._socketobject object at 0x30e3050>) at 51470864 source = u'noc' cmd_func = <bound method Connection.__simple_command of Connection('localhost', 27017)> key = u'd8f89eb126a111824809a95155154dff' credentials = (u'noc', u'noc', u'noc') query = SON([('authenticate', 1), ('user', u'noc'), ('nonce', u'5803d4693218b2b5'), ('key', u'd8f89eb126a111824809a95155154dff')]) password = u'noc' response = {u'nonce': u'5803d4693218b2b5', u'ok': 1.0} _ = 0.015182971954345703 ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/pymongo/auth.py (Line: 214) Function: authenticate 207 """ 208 mechanism = credentials[0] 209 if mechanism == 'GSSAPI': 210 if not HAVE_KERBEROS: 211 raise ConfigurationError('The "kerberos" module must be ' 212 'installed to use GSSAPI authentication.') 213 auth_func = _AUTH_MAP.get(mechanism) 214 ==> auth_func(credentials[1:], sock_info, cmd_func) 215 Variables: sock_info = SocketInfo(<socket._socketobject object at 0x30e3050>) at 51470864 auth_func = <function _authenticate_mongo_cr at 0x2fa5a28> cmd_func = <bound method Connection.__simple_command of Connection('localhost', 27017)> mechanism = 'MONGODB-CR' credentials = ('MONGODB-CR', u'noc', u'noc', u'noc') ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py (Line: 441) Function: _cache_credentials 434 'to this database. You must logout first.') 435 436 if connect: 437 sock_info = self.__socket() 438 try: 439 # Since __check_auth was called in __socket 440 # there is no need to call it here. 441 ==> auth.authenticate(credentials, sock_info, self.__simple_command) 442 sock_info.authset.add(credentials) 443 finally: 444 self.__pool.maybe_return_socket(sock_info) 445 446 self.__auth_credentials[source] = credentials 447 Variables: credentials = ('MONGODB-CR', u'noc', u'noc', u'noc') self = Connection('localhost', 27017) connect = True sock_info = SocketInfo(<socket._socketobject object at 0x30e3050>) at 51470864 source = u'noc' ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/pymongo/database.py (Line: 746) Function: authenticate 739 normalized, val = common.validate_auth_option(option, value) 740 validated_options[normalized] = val 741 742 credentials = auth._build_credentials_tuple(mechanism, 743 source or self.name, unicode(name), 744 password and unicode(password) or None, 745 validated_options) 746 ==> self.connection._cache_credentials(self.name, credentials) 747 return True 748 749 def logout(self): 750 """Deauthorize use of this database for this client instance. 751 752 .. note:: Other databases may still be authenticated, and other Variables: validated_options = {} name = 'noc' self = Database(Connection('localhost', 27017), u'noc') mechanism = 'MONGODB-CR' source = None kwargs = {} credentials = ('MONGODB-CR', u'noc', u'noc', u'noc') password = 'noc' ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/mongoengine/connection.py (Line: 142) Function: get_db 135 if alias not in _dbs: 136 conn = get_connection(alias) 137 conn_settings = _connection_settings[alias] 138 _dbs[alias] = conn[conn_settings['name']] 139 # Authenticate if necessary 140 if conn_settings['username'] and conn_settings['password']: 141 _dbs[alias].authenticate(conn_settings['username'], 142 ==> conn_settings['password']) 143 return _dbs[alias] 144 145 146 def connect(db, alias=DEFAULT_CONNECTION_NAME, **kwargs): 147 """Connect to the database specified by the 'db' argument. 148 Variables: alias = 'default' reconnect = False conn = Connection('localhost', 27017) conn_settings = {'host': 'localhost', 'is_slave': False, 'name': 'noc', 'password': 'noc', 'port': 27017, 'read_preference': False, 'slaves': [], 'username': 'noc'} ------------------------------------------------------------------------ File: /opt/noc/lib/nosql.py (Line: 64) Function: get_db 57 58 59 def get_connection(): 60 return mongoengine.connection._get_connection() 61 62 63 def get_db(): 64 ==> return mongoengine.connection._get_db() 65 66 67 class PlainReferenceField(BaseField): 68 """ 69 A reference to the document that will be automatically 70 dereferenced on access (lazily). Maps to plain ObjectId Variables: ------------------------------------------------------------------------ File: /opt/noc/lib/nosql.py (Line: 287) Function: __init__ 280 return self.format % s["value"] 281 282 283 class IntSequence(object): 284 FIELD = "v" 285 def __init__(self, name): 286 self.name = name 287 ==> self.isequences = get_db().noc.isequences 288 self.isequences.insert({"_id": self.name, self.FIELD: 0L}) 289 290 def next(self): 291 s = self.isequences.find_and_modify( 292 query={"_id": self.name}, 293 update={"$inc": {self.FIELD: 1}}, Variables: self = <noc.lib.nosql.IntSequence object at 0x472ae10> name = 'pm.ts' ------------------------------------------------------------------------ File: /opt/noc/pm/models/ts.py (Line: 21) Function: <module> 14 ## NOC Modules 15 from noc.lib.nosql import Document, PlainReferenceField, IntSequence 16 from storage import PMStorage 17 from check import PMCheck 18 19 20 ## TS id 21 ==> seq_ts = IntSequence("pm.ts") 22 23 24 class PMTS(Document): 25 """ 26 Time Series 27 """ Variables: Document = None __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <function _gmpy_pow at 0x21ea7d0>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} fields = None __file__ = None datetime = None PMStorage = None PlainReferenceField = None PMCheck = None time = None __name__ = None __package__ = None __doc__ = None IntSequence = None ------------------------------------------------------------------------ File: /opt/noc/pm/models/__init__.py (Line: 13) Function: <module> 6 ## See LICENSE for details 7 ##---------------------------------------------------------------------- 8 9 from db import PMDatabase 10 from storage import PMStorage 11 from probe import PMProbe 12 from check import PMCheck 13 ==> from ts import PMTS Variables: check = None PMProbe = None __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <function _gmpy_pow at 0x21ea7d0>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} storage = None __file__ = None probe = None db = None __package__ = None __path__ = None PMStorage = None PMCheck = None __name__ = None PMDatabase = None __doc__ = None ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/utils/importlib.py (Line: 35) Function: import_module 28 raise TypeError("relative imports require the 'package' argument") 29 level = 0 30 for character in name: 31 if character != '.': 32 break 33 level += 1 34 name = _resolve_name(name[level:], package, level) 35 ==> __import__(name) 36 return sys.modules[name] Variables: package = 'noc.pm' character = 'm' name = 'noc.pm.models' level = 1 ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/loading.py (Line: 88) Function: load_app 81 Loads the app with the provided fully qualified name, and returns the 82 model module. 83 """ 84 self.handled[app_name] = None 85 self.nesting_level += 1 86 app_module = import_module(app_name) 87 try: 88 ==> models = import_module('.models', app_name) 89 except ImportError: 90 self.nesting_level -= 1 91 # If the app doesn't have a models module, we can just ignore the 92 # ImportError and return no models for it. 93 if not module_has_submodule(app_module, 'models'): 94 return None Variables: self = <django.db.models.loading.AppCache object at 0x2e0a610> app_name = 'noc.pm' app_module = <module 'noc.pm' from '/opt/noc/pm/__init__.pyc'> can_postpone = True ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/loading.py (Line: 64) Function: _populate 57 self.write_lock.acquire() 58 try: 59 if self.loaded: 60 return 61 for app_name in settings.INSTALLED_APPS: 62 if app_name in self.handled: 63 continue 64 ==> self.load_app(app_name, True) 65 if not self.nesting_level: 66 for app_name in self.postponed: 67 self.load_app(app_name) 68 self.loaded = True 69 finally: 70 self.write_lock.release() Variables: self = <django.db.models.loading.AppCache object at 0x2e0a610> app_name = 'noc.pm' ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/loading.py (Line: 181) Function: get_models 174 you specify include_deferred, they will be. 175 """ 176 cache_key = (app_mod, include_auto_created, include_deferred, only_installed) 177 try: 178 return self._get_models_cache[cache_key] 179 except KeyError: 180 pass 181 ==> self._populate() 182 if app_mod: 183 if app_mod in self.app_store: 184 app_list = [self.app_models.get(self._label_for(app_mod), 185 SortedDict())] 186 else: 187 app_list = [] Variables: app_mod = None self = <django.db.models.loading.AppCache object at 0x2e0a610> only_installed = False include_deferred = False include_auto_created = False cache_key = (None, False, False, False) ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/options.py (Line: 443) Function: _fill_related_many_to_many_cache 436 for obj, model in parent._meta.get_all_related_m2m_objects_with_model(): 437 if obj.field.creation_counter < 0 and obj.model not in parent_list: 438 continue 439 if not model: 440 cache[obj] = parent 441 else: 442 cache[obj] = model 443 ==> for klass in get_models(only_installed=False): 444 for f in klass._meta.local_many_to_many: 445 if f.rel and not isinstance(f.rel.to, basestring) and self == f.rel.to._meta: 446 cache[RelatedObject(f.rel.to, klass, f)] = None 447 if app_cache_ready(): 448 self._related_many_to_many_cache = cache 449 return cache Variables: parent_list = set([]) self = <Options for DBTrigger> cache = {} ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/options.py (Line: 429) Function: get_all_related_m2m_objects_with_model 422 """ 423 Returns a list of (related-m2m-object, model) pairs. Similar to 424 get_fields_with_model(). 425 """ 426 try: 427 cache = self._related_many_to_many_cache 428 except AttributeError: 429 ==> cache = self._fill_related_many_to_many_cache() 430 return cache.items() 431 432 def _fill_related_many_to_many_cache(self): 433 cache = SortedDict() 434 parent_list = self.get_parent_list() 435 for parent in self.parents: Variables: self = <Options for DBTrigger> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/options.py (Line: 341) Function: init_name_map 334 def init_name_map(self): 335 """ 336 Initialises the field name -> field object mapping. 337 """ 338 cache = {} 339 # We intentionally handle related m2m objects first so that symmetrical 340 # m2m accessor names can be overridden, if necessary. 341 ==> for f, model in self.get_all_related_m2m_objects_with_model(): 342 cache[f.field.related_query_name()] = (f, model, False, True) 343 for f, model in self.get_all_related_objects_with_model(): 344 cache[f.field.related_query_name()] = (f, model, False, False) 345 for f, model in self.get_m2m_with_model(): 346 cache[f.name] = (f, model, True, True) 347 for f, model in self.get_fields_with_model(): Variables: self = <Options for DBTrigger> cache = {} ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/options.py (Line: 311) Function: get_field_by_name 304 305 Uses a cache internally, so after the first access, this is very fast. 306 """ 307 try: 308 try: 309 return self._name_map[name] 310 except AttributeError: 311 ==> cache = self.init_name_map() 312 return cache[name] 313 except KeyError: 314 raise FieldDoesNotExist('%s has no field named %r' 315 % (self.object_name, name)) 316 317 def get_all_field_names(self): Variables: self = <Options for DBTrigger> name = 'is_active' ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/sql/query.py (Line: 1304) Function: setup_joins 1297 if int_alias is not None: 1298 exclusions.add(int_alias) 1299 exclusions.add(alias) 1300 last.append(len(joins)) 1301 if name == 'pk': 1302 name = opts.pk.name 1303 try: 1304 ==> field, model, direct, m2m = opts.get_field_by_name(name) 1305 except FieldDoesNotExist: 1306 for f in opts.fields: 1307 if allow_explicit_fk and name == f.attname: 1308 # XXX: A hack to allow foo_id to work in values() for 1309 # backwards compatibility purposes. If we dropped that 1310 # feature, this could be removed. Variables: last = [0, 1] name = 'is_active' dupe_multis = True alias = 'main_dbtrigger' self = <django.db.models.sql.query.Query object at 0x35b44d0> int_alias = None pos = 0 exclusions = set(['main_dbtrigger']) process_extras = True allow_many = True names = ['is_active'] joins = ['main_dbtrigger'] negate = False allow_explicit_fk = True can_reuse = set([]) extra_filters = [] dupe_set = set([]) opts = <Options for DBTrigger> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/sql/query.py (Line: 1122) Function: add_filter 1115 alias = self.get_initial_alias() 1116 allow_many = trim or not negate 1117 1118 try: 1119 field, target, opts, join_list, last, extra_filters = self.setup_joins( 1120 parts, opts, alias, True, allow_many, allow_explicit_fk=True, 1121 can_reuse=can_reuse, negate=negate, 1122 ==> process_extras=process_extras) 1123 except MultiJoin, e: 1124 self.split_exclude(filter_expr, LOOKUP_SEP.join(parts[:e.level]), 1125 can_reuse) 1126 return 1127 1128 table_promote = False Variables: having_clause = False trim = False force_having = False process_extras = True lookup_type = 'exact' filter_expr = ('is_active', True) value = True self = <django.db.models.sql.query.Query object at 0x35b44d0> connector = 'AND' alias = 'main_dbtrigger' parts = ['is_active'] num_parts = 1 arg = 'is_active' negate = False can_reuse = set([]) allow_many = True opts = <Options for DBTrigger> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/sql/query.py (Line: 1250) Function: add_q 1243 self.having.start_subtree(connector) 1244 else: 1245 self.where.start_subtree(connector) 1246 if isinstance(child, Node): 1247 self.add_q(child, used_aliases, force_having=force_having) 1248 else: 1249 self.add_filter(child, connector, q_object.negated, 1250 ==> can_reuse=used_aliases, force_having=force_having) 1251 if force_having: 1252 self.having.end_subtree() 1253 else: 1254 self.where.end_subtree() 1255 1256 if connector == OR: Variables: used_aliases = set([]) force_having = False q_object = <django.db.models.query_utils.Q object at 0x35b45d0> self = <django.db.models.sql.query.Query object at 0x35b44d0> subtree = False connector = 'AND' child = ('is_active', True) ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/query.py (Line: 642) Function: _filter_or_exclude 635 assert self.query.can_filter(), \ 636 "Cannot filter a query once a slice has been taken." 637 638 clone = self._clone() 639 if negate: 640 clone.query.add_q(~Q(*args, **kwargs)) 641 else: 642 ==> clone.query.add_q(Q(*args, **kwargs)) 643 return clone 644 645 def complex_filter(self, filter_obj): 646 """ 647 Returns a new QuerySet instance with filter_obj added to the filters. 648 Variables: negate = False clone = [] args = () self = [] kwargs = {'is_active': True} ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/query.py (Line: 624) Function: filter 617 return self._clone() 618 619 def filter(self, *args, **kwargs): 620 """ 621 Returns a new QuerySet instance with the args ANDed to the existing 622 set. 623 """ 624 ==> return self._filter_or_exclude(False, *args, **kwargs) 625 626 def exclude(self, *args, **kwargs): 627 """ 628 Returns a new QuerySet instance with NOT (args) ANDed to the existing 629 set. 630 """ Variables: self = [] args = () kwargs = {'is_active': True} ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/models/manager.py (Line: 143) Function: filter 136 def create(self, **kwargs): 137 return self.get_query_set().create(**kwargs) 138 139 def bulk_create(self, *args, **kwargs): 140 return self.get_query_set().bulk_create(*args, **kwargs) 141 142 def filter(self, *args, **kwargs): 143 ==> return self.get_query_set().filter(*args, **kwargs) 144 145 def aggregate(self, *args, **kwargs): 146 return self.get_query_set().aggregate(*args, **kwargs) 147 148 def annotate(self, *args, **kwargs): 149 return self.get_query_set().annotate(*args, **kwargs) Variables: self = <django.db.models.manager.Manager object at 0x359ff50> args = () kwargs = {'is_active': True} ------------------------------------------------------------------------ File: /opt/noc/main/models/__init__.py (Line: 722) Function: refresh_cache 715 def refresh_cache(cls, *args, **kwargs): 716 # Clear cache 717 cls._pre_save_triggers = {} 718 cls._post_save_triggers = {} 719 cls._pre_delete_triggers = {} 720 cls._post_delete_triggers = {} 721 # Add all active triggers 722 ==> for t in cls.objects.filter(is_active=True).order_by("order"): 723 for r in ["pre_save", "post_save", "pre_delete", "post_delete"]: 724 c = getattr(cls, "_%s_triggers" % r) 725 rule = getattr(t, "%s_rule" % r) 726 if rule: 727 try: 728 c[t.model] += [rule] Variables: cls = <class 'noc.main.models.DBTrigger'> args = () kwargs = {} ------------------------------------------------------------------------ File: /opt/noc/main/models/__init__.py (Line: 951) Function: <module> 944 from stompaccess import StompAccess 945 from tag import Tag 946 947 ## 948 ## Install triggers 949 ## 950 if settings.IS_WEB and not settings.IS_TEST: 951 ==> DBTrigger.refresh_cache() # Load existing triggers 952 # Trigger cache syncronization 953 post_save.connect(DBTrigger.refresh_cache, sender=DBTrigger) 954 post_delete.connect(DBTrigger.refresh_cache, sender=DBTrigger) 955 # Install signal hooks 956 pre_save.connect(DBTrigger.pre_save_dispatch) 957 post_save.connect(DBTrigger.post_save_dispatch) Variables: nosql = <module 'noc.lib.nosql' from '/opt/noc/lib/nosql.pyc'> model_choices = <function model_choices at 0x3598938> datetime = <module 'datetime' from '/opt/noc/lib/python2.7/lib-dynload/datetime.so'> fts_queue = <module 'noc.main.models.fts_queue' from '/opt/noc/main/models/fts_queue.pyc'> __path__ = ['/opt/noc/main/models'] userprofilecontact = <module 'noc.main.models.userprofilecontact' from '/opt/noc/main/models/userprofilecontact.pyc'> ResourceState = <class 'noc.main.models.resourcestate.ResourceState'> Template = <class 'noc.main.models.Template'> style = <module 'noc.main.models.style' from '/opt/noc/main/models/style.pyc'> Schedule = <class 'noc.main.models.Schedule'> AuditTrail = <class 'noc.main.models.audittrail.AuditTrail'> StompAccess = <class 'noc.main.models.stompaccess.StompAccess'> MIMEType = <class 'noc.main.models.MIMEType'> on_new_model = <function on_new_model at 0x33ef230> permission = <module 'noc.main.models.permission' from '/opt/noc/main/models/permission.pyc'> __file__ = '/opt/noc/main/models/__init__.pyc' pre_save = <django.dispatch.dispatcher.Signal object at 0x2e8dbd0> RefBookField = <class 'noc.main.models.RefBookField'> userprofile = <module 'noc.main.models.userprofile' from '/opt/noc/main/models/userprofile.pyc'> customfieldenumgroup = <module 'noc.main.models.customfieldenumgroup' from '/opt/noc/main/models/customfieldenumgroup.pyc'> downloader_registry = <noc.main.refbooks.downloaders.DownloaderRegistry object at 0x33d9410> settings = <module 'noc.settings' from '/opt/noc/settings.pyc'> check_mimetype = <function inner_validator at 0x27adf50> Shard = <class 'noc.main.models.Shard'> threading = <module 'threading' from '/usr/lib/python2.7/threading.pyc'> Tag = <class 'noc.main.models.tag.Tag'> TimePatternList = <class 'noc.lib.timepattern.TimePatternList'> DBS = <class 'noc.lib.database_storage.DatabaseStorage'> FTSQueue = <class 'noc.main.models.fts_queue.FTSQueue'> DatabaseStorage = <class 'noc.main.models.DatabaseStorage'> favorites = <module 'noc.main.models.favorites' from '/opt/noc/main/models/favorites.pyc'> with_statement = _Feature((2, 5, 0, 'alpha', 1), (2, 6, 0, 'alpha', 0), 32768) rx_mac_3_octets = <_sre.SRE_Pattern object at 0x35feb50> UserProfileManager = <class 'noc.main.models.userprofile.UserProfileManager'> MongoSession = <class 'mongoengine.django.sessions.MongoSession'> UserState = <class 'noc.main.models.UserState'> Permission = <class 'noc.main.models.permission.Permission'> notification = <module 'noc.main.models.notification' from '/opt/noc/main/models/notification.pyc'> resourcestate = <module 'noc.main.models.resourcestate' from '/opt/noc/main/models/resourcestate.pyc'> re = <module 're' from '/opt/noc/lib/python2.7/re.pyc'> NotificationGroup = <class 'noc.main.models.notificationgroup.NotificationGroup'> audit_trail_save = <function audit_trail_save at 0x33ef2a8> is_int = <function is_int at 0x270d6e0> post_delete = <django.dispatch.dispatcher.Signal object at 0x2e8dc90> NoPyRuleException = <class 'noc.main.models.NoPyRuleException'> PrefixTable = <class 'noc.main.models.prefixtable.PrefixTable'> TimePatternTerm = <class 'noc.main.models.timepatternterm.TimePatternTerm'> UserSession = <class 'noc.main.models.UserSession'> __name__ = 'noc.main.models' _ = <function ugettext at 0x20a2668> PrefixTablePrefix = <class 'noc.main.models.prefixtable.PrefixTablePrefix'> pre_delete = <django.dispatch.dispatcher.Signal object at 0x2e8dc50> fts_models = {'ip.address': <class 'noc.ip.models.address.Address'>, 'ip.prefix': <class 'noc.ip.models.prefix.Prefix'>, 'ip.vrf': <class 'noc.ip.models.vrf.VRF'>, 'sa.managedobject': <class 'noc.sa.models.managedobject.ManagedObject'>, 'vc.vc': <class 'noc.vc.models.vc.VC'>} CustomField = <class 'noc.main.models.customfield.CustomField'> get_request = <function get_request at 0x33db7d0> connection = <django.db.DefaultConnectionProxy object at 0x2bb8b90> notificationgroup = <module 'noc.main.models.notificationgroup' from '/opt/noc/main/models/notificationgroup.pyc'> audittrail = <module 'noc.main.models.audittrail' from '/opt/noc/main/models/audittrail.pyc'> timepattern = <module 'noc.main.models.timepattern' from '/opt/noc/main/models/timepattern.pyc'> Style = <class 'noc.main.models.style.Style'> Group = <class 'django.contrib.auth.models.Group'> Context = <class 'django.template.context.Context'> Notification = <class 'noc.main.models.notification.Notification'> periodic_registry = <noc.lib.periodic.PeriodicRegistry object at 0x33de490> prefixtable = <module 'noc.main.models.prefixtable' from '/opt/noc/main/models/prefixtable.pyc'> SystemNotification = <class 'noc.main.models.SystemNotification'> customfieldenumvalue = <module 'noc.main.models.customfieldenumvalue' from '/opt/noc/main/models/customfieldenumvalue.pyc'> SystemTemplate = <class 'noc.main.models.SystemTemplate'> UserProfile = <class 'noc.main.models.userprofile.UserProfile'> CIDRField = <class 'noc.lib.fields.CIDRField'> CustomFieldEnumGroup = <class 'noc.main.models.customfieldenumgroup.CustomFieldEnumGroup'> audit_trail_delete = <function audit_trail_delete at 0x33ef320> rx_coding = <_sre.SRE_Pattern object at 0x3527850> AUDIT_TRAIL_EXCLUDE = set(['auth_message', 'django_admin_log', 'django_session', 'fm_eventlog', 'kb_kbentryhistory', 'kb_kbentrypreviewlog', 'main_audittrail', 'sa_maptask', 'sa_reducetask']) NOTIFICATION_METHOD_CHOICES = [('mail', 'mail'), ('file', 'file'), ('xmpp', 'xmpp')] timepatternterm = <module 'noc.main.models.timepatternterm' from '/opt/noc/main/models/timepatternterm.pyc'> User = <class 'django.contrib.auth.models.User'> post_save = <django.dispatch.dispatcher.Signal object at 0x2e8dc10> __doc__ = None check_extension = <function inner_validator at 0x27aded8> Language = <class 'noc.main.models.Language'> PyRule = <class 'noc.main.models.PyRule'> Checkpoint = <class 'noc.main.models.Checkpoint'> class_prepared = <django.dispatch.dispatcher.Signal object at 0x2e8da90> RBDManader = <class 'noc.main.models.RBDManader'> DjangoTemplate = <class 'django.template.base.Template'> MaxLengthValidator = <class 'django.core.validators.MaxLengthValidator'> TimePattern = <class 'noc.main.models.timepattern.TimePattern'> TextArrayField = <class 'noc.lib.fields.TextArrayField'> site = <noc.lib.app.site.Site object at 0x311c550> tag = <module 'noc.main.models.tag' from '/opt/noc/main/models/tag.pyc'> update_fts = <function update_fts at 0x33ef1b8> get_user = <function get_user at 0x33db758> DBTrigger = <class 'noc.main.models.DBTrigger'> TP = <class 'noc.lib.timepattern.TimePattern'> __package__ = 'noc.main.models' database_storage = <noc.lib.database_storage.DatabaseStorage object at 0x3583cd0> Favorites = <class 'noc.main.models.favorites.Favorites'> customfield = <module 'noc.main.models.customfield' from '/opt/noc/main/models/customfield.pyc'> USER_NOTIFICATION_METHOD_CHOICES = [('mail', 'mail'), ('xmpp', 'xmpp')] RefBook = <class 'noc.main.models.RefBook'> models = <module 'django.db.models' from '/opt/noc/lib/python2.7/site-packages/django/db/models/__init__.pyc'> stompaccess = <module 'noc.main.models.stompaccess' from '/opt/noc/main/models/stompaccess.pyc'> __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <function _gmpy_pow at 0x21ea7d0>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} CustomFieldEnumValue = <class 'noc.main.models.customfieldenumvalue.CustomFieldEnumValue'> interface_registry = {'IAddVlan': <class 'noc.sa.interfaces.iaddvlan.IAddVlan'>, 'IAlarmTrigger': <class 'noc.sa.interfaces.ialarmtrigger.IAlarmTrigger'>, 'IAuthenticationBackend': <class 'noc.sa.interfaces.iauthenticationbackend.IAuthenticationBackend'>, 'IAuthenticationForm': <class 'noc.sa.interfaces.iauthenticationform.IAuthenticationForm'>, 'ICommands': <class 'noc.sa.interfaces.icommands.ICommands'>, 'IConfigDiffFilter': <class 'noc.sa.interfaces.iconfigdifffilter.IConfigDiffFilter'>, 'IConfigFilter': <class 'noc.sa.interfaces.iconfigfilter.IConfigFilter'>, 'IConfigValidator': <class 'noc.sa.interfaces.iconfigvalidator.IConfigValidator'>, 'IDBPostDelete': <class 'noc.sa.interfaces.idbpostdelete.IDBPostDelete'>, 'IDBPostSave': <class 'noc.sa.interfaces.idbpostsave.IDBPostSave'>, 'IDBPreDelete': <class 'noc.sa.interfaces.idbpredelete.IDBPreDelete'>, 'IDBPreSave': <class 'noc.sa.interfaces.idbpresave.IDBPreSave'>, 'IDispositionCondition': <class 'noc.sa.interfaces.idispositioncondition.IDispositionCondition'>, 'IEvent': <class 'noc.sa.interfaces.ievent.IEvent'>, 'IEventTrigger': <class 'noc.sa.interfaces.ieventtrigger.IEventTrigger'>, 'IGetARP': <class 'noc.sa.interfaces.igetarp.IGetARP'>, 'IGetActivatorInfo': <class 'noc.sa.interfaces.igetactivatorinfo.IGetActivatorInfo'>, 'IGetBFDSessions': <class 'noc.sa.interfaces.igetbfdsessions.IGetBFDSessions'>, 'IGetCDPNeighbors': <class 'noc.sa.interfaces.igetcdpneighbors.IGetCDPNeighbors'>, 'IGetChassisID': <class 'noc.sa.interfaces.igetchassisid.IGetChassisID'>, 'IGetConfig': <class 'noc.sa.interfaces.igetconfig.IGetConfig'>, 'IGetCopperTDRDiag': <class 'noc.sa.interfaces.igetcoppertdrdiag.IGetCopperTDRDiag'>, 'IGetDHCPBinding': <class 'noc.sa.interfaces.igetdhcpbinding.IGetDHCPBinding'>, 'IGetDOMStatus': <class 'noc.sa.interfaces.igetdomstatus.IGetDOMStatus'>, 'IGetDictList': <class 'noc.sa.interfaces.igetdictlist.IGetDictList'>, 'IGetDiscoveryCustom': <class 'noc.sa.interfaces.igetdiscoverycustom.IGetDiscoveryCustom'>, 'IGetDiscoveryID': <class 'noc.sa.interfaces.igetdiscoveryid.IGetDiscoveryID'>, 'IGetDot11Associations': <class 'noc.sa.interfaces.igetdot11associations.IGetDot11Associations'>, 'IGetFDPNeighbors': <class 'noc.sa.interfaces.igetfdpneighbors.IGetFDPNeighbors'>, 'IGetFQDN': <class 'noc.sa.interfaces.igetfqdn.IGetFQDN'>, 'IGetHTTPGet': <class 'noc.sa.interfaces.igethttpget.IGetHTTPGet'>, 'IGetIPDiscovery': <class 'noc.sa.interfaces.igetipdiscovery.IGetIPDiscovery'>, 'IGetIPv6Neighbor': <class 'noc.sa.interfaces.igetipv6neighbor.IGetIPv6Neighbor'>, 'IGetIfIndex': <class 'noc.sa.interfaces.igetifindex.IGetIfIndex'>, 'IGetInterfaceStatus': <class 'noc.sa.interfaces.igetinterfacestatus.IGetInterfaceStatus'>, 'IGetInterfaces': <class 'noc.sa.interfaces.igetinterfaces.IGetInterfaces'>, 'IGetInventory': <class 'noc.sa.interfaces.igetinventory.IGetInventory'>, 'IGetLLDPNeighbors': <class 'noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors'>, 'IGetLicense': <class 'noc.sa.interfaces.igetlicense.IGetLicense'>, 'IGetList': <class 'noc.sa.interfaces.igetlist.IGetList'>, 'IGetLocalUsers': <class 'noc.sa.interfaces.igetlocalusers.IGetLocalUsers'>, 'IGetMACAddressTable': <class 'noc.sa.interfaces.igetmacaddresstable.IGetMACAddressTable'>, 'IGetMPLSVPN': <class 'noc.sa.interfaces.igetmplsvpn.IGetMPLSVPN'>, 'IGetOAMStatus': <class 'noc.sa.interfaces.igetoamstatus.IGetOAMStatus'>, 'IGetObjectStatus': <class 'noc.sa.interfaces.igetobjectstatus.IGetObjectStatus'>, 'IGetObjectsStatus': <class 'noc.sa.interfaces.igetobjectsstatus.IGetObjectsStatus'>, 'IGetPortchannel': <class 'noc.sa.interfaces.igetportchannel.IGetPortchannel'>, 'IGetREPTopology': <class 'noc.sa.interfaces.igetreptopology.IGetREPTopology'>, 'IGetResolverConfig': <class 'noc.sa.interfaces.igetresolverconfig.IGetResolverConfig'>, 'IGetSNMPGet': <class 'noc.sa.interfaces.igetsnmpget.IGetSNMPGet'>, 'IGetSNMPGetNext': <class 'noc.sa.interfaces.igetsnmpgetnext.IGetSNMPGetNext'>, 'IGetSpanningTree': <class 'noc.sa.interfaces.igetspanningtree.IGetSpanningTree'>, 'IGetSwitchport': <class 'noc.sa.interfaces.igetswitchport.IGetSwitchport'>, 'IGetUDLDNeighbors': <class 'noc.sa.interfaces.igetudldneighbors.IGetUDLDNeighbors'>, 'IGetVersion': <class 'noc.sa.interfaces.igetversion.IGetVersion'>, 'IGetVlans': <class 'noc.sa.interfaces.igetvlans.IGetVlans'>, 'IHasLocalUser': <class 'noc.sa.interfaces.ihaslocaluser.IHasLocalUser'>, 'IHasVlan': <class 'noc.sa.interfaces.ihasvlan.IHasVlan'>, 'IInterfaceClassification': <class 'noc.sa.interfaces.iinterfaceclassification.IInterfaceClassification'>, 'INotifySAE': <class 'noc.sa.interfaces.inotifysae.INotifySAE'>, 'IPeriodicTask': <class 'noc.sa.interfaces.iperiodictask.IPeriodicTask'>, 'IPing': <class 'noc.sa.interfaces.iping.IPing'>, 'IPingCheck': <class 'noc.sa.interfaces.ipingcheck.IPingCheck'>, 'IReduceTask': <class 'noc.sa.interfaces.ireducetask.IReduceTask'>, 'IRemoveVlan': <class 'noc.sa.interfaces.iremovevlan.IRemoveVlan'>, 'ISetSwitchport': <class 'noc.sa.interfaces.isetswitchport.ISetSwitchport'>, 'ISyncPrefixLists': <class 'noc.sa.interfaces.isyncprefixlists.ISyncPrefixLists'>, 'ISyncVlans': <class 'noc.sa.interfaces.isyncvlans.ISyncVlans'>, 'Interface': <class 'noc.sa.interfaces.base.Interface'>} BinaryField = <class 'noc.lib.fields.BinaryField'> NotificationGroupOther = <class 'noc.main.models.notificationgroup.NotificationGroupOther'> types = <module 'types' from '/opt/noc/lib/python2.7/types.pyc'> os = <module 'os' from '/opt/noc/lib/python2.7/os.pyc'> UserProfileContact = <class 'noc.main.models.userprofilecontact.UserProfileContact'> RefBookData = <class 'noc.main.models.RefBookData'> NotificationGroupUser = <class 'noc.main.models.notificationgroup.NotificationGroupUser'> ------------------------------------------------------------------------ File: /opt/noc/lib/app/access.py (Line: 9) Function: <module> 2 ##---------------------------------------------------------------------- 3 ## Access control 4 ##---------------------------------------------------------------------- 5 ## Copyright (C) 2007-2009 The NOC Project 6 ## See LICENSE for details 7 ##---------------------------------------------------------------------- 8 from django.db.models import Q 9 ==> import noc.main.models 10 11 12 class PermissionDenied(Exception): 13 """ 14 Basic Permission Denied exception 15 """ Variables: __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <function _gmpy_pow at 0x21ea7d0>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} __file__ = None __package__ = None Q = None __name__ = None __doc__ = None ------------------------------------------------------------------------ File: /opt/noc/lib/app/__init__.py (Line: 9) Function: <module> 2 ##---------------------------------------------------------------------- 3 ## Application classes 4 ##---------------------------------------------------------------------- 5 ## Copyright (C) 2007-2009 The NOC Project 6 ## See LICENSE for details 7 ##---------------------------------------------------------------------- 8 from site import * 9 ==> from access import * 10 from application import * 11 from modelapplication import * 12 from treeapplication import * 13 from extapplication import * 14 from extmodelapplication import * 15 from extdocapplication import * Variables: force_unicode = None defaultdict = None reverse = None ViewDoesNotExist = None os = None reverse_lazy = None HttpResponseNotFound = None get_language = None set_urlconf = None site = None handler403 = None __path__ = None get_callable = None url = None HttpResponseForbidden = None HttpResponse = None NoReverseMatch = None normalize = None handler500 = None get_mod_func = None ImproperlyConfigured = None warnings = None urllib = None __package__ = None re = None module_has_submodule = None patterns = None MultiValueDict = None RegexURLPattern = None get_script_prefix = None include = None local = None __doc__ = None import_module = None json_decode = None lazy = None ResolverMatch = None RegexURLResolver = None LocaleRegexProvider = None __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <function _gmpy_pow at 0x21ea7d0>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} get_resolver = None __file__ = None DynamicMenu = None URL = None glob = None HTTP_METHODS = None __name__ = None LocaleRegexURLResolver = None get_urlconf = None ProxyNode = None types = None INSTALLED_APPS = None clear_url_caches = None hashlib = None resolve = None logging = None smart_str = None handler404 = None settings = None Http404 = None config = None iri_to_uri = None get_ns_resolver = None memoize = None is_valid_path = None Resolver404 = None set_script_prefix = None error_report = None Site = None get_traceback = None JSONEncoder = None ------------------------------------------------------------------------ File: /opt/noc/main/web.py (Line: 139) Function: children_loop 132 sockets = self.server._pending_sockets 133 self.server._pending_sockets = [] 134 self.server.add_sockets(sockets) 135 # Connect to mongodb 136 import noc.lib.nosql 137 # Initialize site 138 logging.info("Registering web applications") 139 ==> from noc.lib.app import site 140 site.autodiscover() 141 # Run children's I/O loop 142 logging.info("Starting to serve requests") 143 tornado.ioloop.IOLoop.instance().start() 144 145 def at_exit(self): Variables: self = <noc.main.web.Web object at 0x7fc84464b450> sockets = [<socket._socketobject object at 0x2b67e50>] noc = <module 'noc' from '/opt/noc/__init__.pyc'> ------------------------------------------------------------------------ File: /opt/noc/main/web.py (Line: 111) Function: run 104 nc = cpu_count() 105 self.t_children = set() 106 while True: 107 # Run children 108 while len(self.t_children) < nc: 109 pid = os.fork() 110 if pid == 0: 111 ==> self.children_loop() 112 elif pid < 0: 113 logging.error("Unable to fork child") 114 else: 115 logging.info("Running child %d" % pid) 116 self.t_children.add(pid) 117 # Wait for status Variables: vi = sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0) self = <noc.main.web.Web object at 0x7fc84464b450> nc = 4 pid = 0 noc_wsgi = <tornado.wsgi.WSGIContainer object at 0x27b1110> application = <tornado.web.Application object at 0x27b1150> address = '127.0.0.1' port = 8000 listen = '127.0.0.1:8000' ------------------------------------------------------------------------ File: /opt/noc/lib/daemon.py (Line: 364) Function: guarded_run 357 358 def guarded_run(self): 359 """ 360 Run daemon and catch common exceptions 361 :return: 362 """ 363 try: 364 ==> self.run() 365 except KeyboardInterrupt: 366 pass 367 except MemoryError: 368 logging.error("Out of memory. Exiting.") 369 except SystemExit: 370 logging.info("Exiting") Variables: self = <noc.main.web.Web object at 0x7fc84464b450> ------------------------------------------------------------------------ END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement