Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2013-08-02 11:43:58.995234)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- cannot concatenate 'str' and 'ManagedObject' objects
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/main/templatetags/python.py (Line: 89)
- Function: render
- 82 # Prepare block context
- 83 ctx = {
- 84 "render": self.t_render,
- 85 "rendernl": self.t_rendernl,
- 86 "context": context
- 87 }
- 88 # Execute block
- 89 ==> exec self.code in ctx
- 90 # Render output
- 91 return "".join(self.output)
- 92
- 93
- 94 register = template.Library()
- 95 register.tag("var", do_var)
- Variables:
- self = <noc.main.templatetags.python.PythonNode object at 0x5c53a10>
- ctx =
- {'Activator': <class 'noc.sa.models.activator.Activator'>,
- 'ActivatorCapabilitiesCache': <class 'noc.sa.models.activatorcapabilitiescache.ActivatorCapabilitiesCache'>,
- 'Address': <class 'noc.ip.models.address.Address'>,
- 'AddressRange': <class 'noc.ip.models.addressrange.AddressRange'>,
- 'AdministrativeDomain': <class 'noc.sa.models.administrativedomain.AdministrativeDomain'>,
- 'BaseDict': <class 'mongoengine.base.BaseDict'>,
- 'BaseDocument': <class 'mongoengine.base.BaseDocument'>,
- 'BaseField': <class 'mongoengine.base.BaseField'>,
- 'BaseList': <class 'mongoengine.base.BaseList'>,
- 'BinaryField': <class 'mongoengine.fields.BinaryField'>,
- 'BooleanField': <class 'mongoengine.fields.BooleanField'>,
- 'CASCADE': 2,
- 'CommandSnippet': <class 'noc.sa.models.commandsnippet.CommandSnippet'>,
- 'ComplexBaseField': <class 'mongoengine.base.ComplexBaseField'>,
- 'ComplexDateTimeField': <class 'mongoengine.fields.ComplexDateTimeField'>,
- 'ConnectionError': <class 'mongoengine.connection.ConnectionError'>,
- 'DBRef': <class 'bson.dbref.DBRef'>,
- 'DEFAULT_CONNECTION_NAME': 'default',
- 'DENY': 3,
- 'DO_NOTHING': 0,
- 'DateTimeField': <class 'mongoengine.fields.DateTimeField'>,
- 'DecimalField': <class 'mongoengine.fields.DecimalField'>,
- 'DictField': <class 'mongoengine.fields.DictField'>,
- 'Document': <class 'mongoengine.document.Document'>,
- 'DocumentMetaclass': <class 'mongoengine.base.DocumentMetaclass'>,
- 'DoesNotExist': <class 'mongoengine.queryset.DoesNotExist'>,
- 'DynamicDocument': <class 'mongoengine.document.DynamicDocument'>,
- 'DynamicEmbeddedDocument': <class 'mongoengine.document.DynamicEmbeddedDocument'>,
- 'DynamicField': <class 'mongoengine.fields.DynamicField'>,
- 'ESC1': '__',
- 'ESC2': '^^',
- 'EmailField': <class 'mongoengine.fields.EmailField'>,
- 'EmbeddedDocument': <class 'mongoengine.document.EmbeddedDocument'>,
- 'EmbeddedDocumentField': <class 'mongoengine.fields.EmbeddedDocumentField'>,
- 'FailedScriptLog': <class 'noc.sa.models.failedscriptlog.FailedScriptLog'>,
- 'FileField': <class 'mongoengine.fields.FileField'>,
- 'FloatField': <class 'mongoengine.fields.FloatField'>,
- 'ForeignKeyField': <class 'noc.lib.nosql.ForeignKeyField'>,
- 'ForwardingInstance': <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>,
- 'GenericEmbeddedDocumentField': <class 'mongoengine.fields.GenericEmbeddedDocumentField'>,
- 'GenericReferenceField': <class 'mongoengine.fields.GenericReferenceField'>,
- 'GeoPointField': <class 'mongoengine.fields.GeoPointField'>,
- 'GroupAccess': <class 'noc.sa.models.groupaccess.GroupAccess'>,
- 'IP': <class 'noc.lib.ip.IP'>,
- 'ImageField': <class 'mongoengine.fields.ImageField'>,
- 'IntField': <class 'mongoengine.fields.IntField'>,
- 'IntSequence': <class 'noc.lib.nosql.IntSequence'>,
- 'IntegrityError': <class 'django.db.utils.IntegrityError'>,
- 'Interface': <class 'noc.inv.models.interface.Interface'>,
- 'InterfaceClassificationMatch': <class 'noc.inv.models.interfaceclassificationrule.InterfaceClassificationMatch'>,
- 'InterfaceClassificationRule': <class 'noc.inv.models.interfaceclassificationrule.InterfaceClassificationRule'>,
- 'InterfaceProfile': <class 'noc.inv.models.interfaceprofile.InterfaceProfile'>,
- 'InvalidCollectionError': <class 'mongoengine.document.InvalidCollectionError'>,
- 'InvalidDocumentError': <class 'mongoengine.base.InvalidDocumentError'>,
- 'InvalidQueryError': <class 'mongoengine.queryset.InvalidQueryError'>,
- 'Link': <class 'noc.inv.models.link.Link'>,
- 'ListField': <class 'mongoengine.fields.ListField'>,
- 'MACDB': <class 'noc.inv.models.macdb.MACDB'>,
- 'MACLog': <class 'noc.inv.models.maclog.MACLog'>,
- 'MRTConfig': <class 'noc.sa.models.mrtconfig.MRTConfig'>,
- 'ManagedObject': <class 'noc.sa.models.managedobject.ManagedObject'>,
- 'ManagedObjectAttribute': <class 'noc.sa.models.managedobject.ManagedObjectAttribute'>,
- 'ManagedObjectProfile': <class 'noc.sa.models.managedobjectprofile.ManagedObjectProfile'>,
- 'ManagedObjectSelector': <class 'noc.sa.models.managedobjectselector.ManagedObjectSelector'>,
- 'ManagedObjectSelectorByAttribute': <class 'noc.sa.models.managedobjectselector.ManagedObjectSelectorByAttribute'>,
- 'MapField': <class 'mongoengine.fields.MapField'>,
- 'MapTask': <class 'noc.sa.models.maptask.MapTask'>,
- 'Model': <class 'noc.inv.models.Model'>,
- 'ModelCategory': <class 'noc.inv.models.ModelCategory'>,
- 'ModelSocket': <class 'noc.inv.models.ModelSocket'>,
- 'MultipleObjectsReturned': <class 'mongoengine.queryset.MultipleObjectsReturned'>,
- 'NULLIFY': 1,
- 'NetworkChart': <class 'noc.inv.models.networkchart.NetworkChart'>,
- 'NewAddressDiscoveryLog': <class 'noc.inv.models.NewAddressDiscoveryLog'>,
- 'NewPrefixDiscoveryLog': <class 'noc.inv.models.NewPrefixDiscoveryLog'>,
- 'NotRegistered': <class 'mongoengine.base.NotRegistered'>,
- 'ObjectId': <class 'bson.objectid.ObjectId'>,
- 'ObjectIdField': <class 'mongoengine.base.ObjectIdField'>,
- 'OperationError': <class 'mongoengine.queryset.OperationError'>,
- 'PULL': 4,
- 'PlainReferenceField': <class 'noc.lib.nosql.PlainReferenceField'>,
- 'PlainReferenceListField': <class 'noc.lib.nosql.PlainReferenceListField'>,
- 'Prefix': <class 'noc.ip.models.prefix.Prefix'>,
- 'PrefixAccess': <class 'noc.ip.models.prefixaccess.PrefixAccess'>,
- 'PrefixBookmark': <class 'noc.ip.models.prefixbookmark.PrefixBookmark'>,
- 'Q': <class 'mongoengine.queryset.Q'>,
- 'QuerySet': <class 'mongoengine.queryset.QuerySet'>,
- 'QuerySetManager': <class 'mongoengine.queryset.QuerySetManager'>,
- 'RECURSIVE_REFERENCE_CONSTANT': 'self',
- 'RawDictField': <class 'noc.lib.nosql.RawDictField'>,
- 'ReduceTask': <class 'noc.sa.models.reducetask.ReduceTask'>,
- 'ReferenceField': <class 'mongoengine.fields.ReferenceField'>,
- 'Sequence': <class 'noc.lib.nosql.Sequence'>,
- 'SequenceField': <class 'mongoengine.fields.SequenceField'>,
- 'Socket': <class 'noc.inv.models.Socket'>,
- 'SocketAttribute': <class 'noc.inv.models.SocketAttribute'>,
- 'SocketCategory': <class 'noc.inv.models.SocketCategory'>,
- 'SortedListField': <class 'mongoengine.fields.SortedListField'>,
- 'StringField': <class 'mongoengine.fields.StringField'>,
- 'SubInterface': <class 'noc.inv.models.subinterface.SubInterface'>,
- 'TopLevelDocumentMetaclass': <class 'mongoengine.base.TopLevelDocumentMetaclass'>,
- 'URLField': <class 'mongoengine.fields.URLField'>,
- 'UUIDField': <class 'mongoengine.fields.UUIDField'>,
- 'UserAccess': <class 'noc.sa.models.useraccess.UserAccess'>,
- 'VRF': <class 'noc.ip.models.vrf.VRF'>,
- 'VRFGroup': <class 'noc.ip.models.vrfgroup.VRFGroup'>,
- 'ValidationError': <class 'mongoengine.base.ValidationError'>,
- 'Vendor': <class 'noc.inv.models.Vendor'>,
- '__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 0x3bc1e60>,
- '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>},
- 'activator': <module 'noc.sa.models.activator' from '/opt/noc/sa/models/activator.pyc'>,
- 'activatorcapabilitiescache': <module 'noc.sa.models.activatorcapabilitiescache' from '/opt/noc/sa/models/activatorcapabilitiescache.pyc'>,
- 'address': <module 'noc.ip.models.address' from '/opt/noc/ip/models/address.pyc'>,
- 'addressrange': <module 'noc.ip.models.addressrange' from '/opt/noc/ip/models/addressrange.pyc'>,
- 'administrativedomain': <module 'noc.sa.models.administrativedomain' from '/opt/noc/sa/models/administrativedomain.pyc'>,
- 'afi': <module 'noc.ip.models.afi' from '/opt/noc/ip/models/afi.pyc'>,
- 'bson': <module 'bson' from '/opt/noc/lib/python2.7/site-packages/bson/__init__.pyc'>,
- 'commandsnippet': <module 'noc.sa.models.commandsnippet' from '/opt/noc/sa/models/commandsnippet.pyc'>,
- 'connect': <function connect at 0x325a050>,
- 'connection_args': {'db': 'noc', 'password': '12345', 'username': 'noc'},
- 'context': [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}],
- 'create_test_db': <function create_test_db at 0x3285140>,
- 'datetime': <module 'datetime' from '/opt/noc/lib64/python2.7/lib-dynload/datetime.so'>,
- 'db_name': 'noc',
- 'defaultdict': <type 'collections.defaultdict'>,
- 'destroy_test_db': <function destroy_test_db at 0x3285c08>,
- 'django': <module 'django' from '/opt/noc/lib/python2.7/site-packages/django/__init__.pyc'>,
- 'failedscriptlog': <module 'noc.sa.models.failedscriptlog' from '/opt/noc/sa/models/failedscriptlog.pyc'>,
- 'forwardinginstance': <module 'noc.inv.models.forwardinginstance' from '/opt/noc/inv/models/forwardinginstance.pyc'>,
- 'get_connection': <function get_connection at 0x3260a28>,
- 'get_db': <function get_db at 0x32850c8>,
- 'get_document': <function get_document at 0x32128c0>,
- 'groupaccess': <module 'noc.sa.models.groupaccess' from '/opt/noc/sa/models/groupaccess.pyc'>,
- 'interface': <module 'noc.inv.models.interface' from '/opt/noc/inv/models/interface.pyc'>,
- 'interfaceclassificationrule': <module 'noc.inv.models.interfaceclassificationrule' from '/opt/noc/inv/models/interfaceclassificationrule.pyc'>,
- 'interfaceprofile': <module 'noc.inv.models.interfaceprofile' from '/opt/noc/inv/models/interfaceprofile.pyc'>,
- 'link': <module 'noc.inv.models.link' from '/opt/noc/inv/models/link.pyc'>,
- 'logging': <module 'logging' from '/usr/lib/python2.7/logging/__init__.pyc'>,
- 'macdb': <module 'noc.inv.models.macdb' from '/opt/noc/inv/models/macdb.pyc'>,
- 'maclog': <module 'noc.inv.models.maclog' from '/opt/noc/inv/models/maclog.pyc'>,
- 'managedobject': <module 'noc.sa.models.managedobject' from '/opt/noc/sa/models/managedobject.pyc'>,
- 'managedobjectprofile': <module 'noc.sa.models.managedobjectprofile' from '/opt/noc/sa/models/managedobjectprofile.pyc'>,
- 'managedobjectselector': <module 'noc.sa.models.managedobjectselector' from '/opt/noc/sa/models/managedobjectselector.pyc'>,
- 'maptask': <module 'noc.sa.models.maptask' from '/opt/noc/sa/models/maptask.pyc'>,
- 'mongoengine': <module 'mongoengine' from '/opt/noc/lib/python2.7/site-packages/mongoengine/__init__.pyc'>,
- 'mrtconfig': <module 'noc.sa.models.mrtconfig' from '/opt/noc/sa/models/mrtconfig.pyc'>,
- 'networkchart': <module 'noc.inv.models.networkchart' from '/opt/noc/inv/models/networkchart.pyc'>,
- 'networkchartstate': <module 'noc.inv.models.networkchartstate' from '/opt/noc/inv/models/networkchartstate.pyc'>,
- 'objectstatus': <module 'noc.sa.models.objectstatus' from '/opt/noc/sa/models/objectstatus.pyc'>,
- 'operator': <module 'operator' from '/opt/noc/lib64/python2.7/lib-dynload/operator.so'>,
- 'partial': <type 'functools.partial'>,
- 'pendinglinkcheck': <module 'noc.inv.models.pendinglinkcheck' from '/opt/noc/inv/models/pendinglinkcheck.pyc'>,
- 'post_delete': <mongoengine.signals._FakeSignal object at 0x3205710>,
- 'post_init': <module 'noc.sa.models.post_init' from '/opt/noc/sa/models/post_init.pyc'>,
- 'post_save': <mongoengine.signals._FakeSignal object at 0x3205690>,
- 'pre_delete': <mongoengine.signals._FakeSignal object at 0x32056d0>,
- 'pre_init': <mongoengine.signals._FakeSignal object at 0x32055d0>,
- 'pre_save': <mongoengine.signals._FakeSignal object at 0x3205650>,
- 'prefix': <module 'noc.ip.models.prefix' from '/opt/noc/ip/models/prefix.pyc'>,
- 'prefixaccess': <module 'noc.ip.models.prefixaccess' from '/opt/noc/ip/models/prefixaccess.pyc'>,
- 'prefixbookmark': <module 'noc.ip.models.prefixbookmark' from '/opt/noc/ip/models/prefixbookmark.pyc'>,
- 'profile_registry': <noc.sa.profiles.ProfileRegistry object at 0x388d350>,
- 'pymongo': <module 'pymongo' from '/opt/noc/lib/python2.7/site-packages/pymongo/__init__.pyc'>,
- 'queryset_manager': <function queryset_manager at 0x3212938>,
- 're': <module 're' from '/opt/noc/lib64/python2.7/re.pyc'>,
- 'reducetask': <module 'noc.sa.models.reducetask' from '/opt/noc/sa/models/reducetask.pyc'>,
- 'register_connection': <function register_connection at 0x3259de8>,
- 'render': <bound method PythonNode.t_render of <noc.main.templatetags.python.PythonNode object at 0x5c53a10>>,
- 'rendernl': <bound method PythonNode.t_rendernl of <noc.main.templatetags.python.PythonNode object at 0x5c53a10>>,
- 'rx_range_check': <_sre.SRE_Pattern object at 0x43e65a0>,
- 'rx_range_exp': <_sre.SRE_Pattern object at 0x43e54b0>,
- 'script_registry': <noc.sa.script.script.ScriptRegistry object at 0x25c4fd0>,
- 'selectorcache': <module 'noc.sa.models.selectorcache' from '/opt/noc/sa/models/selectorcache.pyc'>,
- 'settings': <module 'noc.settings' from '/opt/noc/settings.pyc'>,
- 'signals': <module 'mongoengine.signals' from '/opt/noc/lib/python2.7/site-packages/mongoengine/signals.pyc'>,
- 'subclass_exception': <function subclass_exception at 0x3256848>,
- 'subinterface': <module 'noc.inv.models.subinterface' from '/opt/noc/inv/models/subinterface.pyc'>,
- 'sys': <module 'sys' (built-in)>,
- 'useraccess': <module 'noc.sa.models.useraccess' from '/opt/noc/sa/models/useraccess.pyc'>,
- 'vrf': <module 'noc.ip.models.vrf' from '/opt/noc/ip/models/vrf.pyc'>,
- 'vrfgroup': <module 'noc.ip.models.vrfgroup' from '/opt/noc/ip/models/vrfgroup.pyc'>,
- 'warnings': <module 'warnings' from '/opt/noc/lib64/python2.7/warnings.pyc'>}
- context =
- [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 837)
- Function: render_node
- 830 "Return a list of all nodes of the given type"
- 831 nodes = []
- 832 for node in self:
- 833 nodes.extend(node.get_nodes_by_type(nodetype))
- 834 return nodes
- 835
- 836 def render_node(self, node, context):
- 837 ==> return node.render(context)
- 838
- 839 class TextNode(Node):
- 840 def __init__(self, s):
- 841 self.s = s
- 842
- 843 def __repr__(self):
- Variables:
- node = <noc.main.templatetags.python.PythonNode object at 0x5c53a10>
- self =
- [<django.template.defaulttags.LoadNode object at 0x57d2310>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d28d0>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d2350>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d2b10>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d2950>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x5c534d0>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.PythonNode object at 0x5c53a10>,
- <Text Node: '
- '>,
- <Variable Node: cmd>]
- context =
- [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 823)
- Function: render
- 816 # extend_nodelist().
- 817 contains_nontext = False
- 818
- 819 def render(self, context):
- 820 bits = []
- 821 for node in self:
- 822 if isinstance(node, Node):
- 823 ==> bit = self.render_node(node, context)
- 824 else:
- 825 bit = node
- 826 bits.append(force_unicode(bit))
- 827 return mark_safe(u''.join(bits))
- 828
- 829 def get_nodes_by_type(self, nodetype):
- Variables:
- node = <noc.main.templatetags.python.PythonNode object at 0x5c53a10>
- bit = u'\n'
- bits = [u'', u'\n', u'', u'\n', u'', u'\n', u'', u'\n', u'', u'\n', u'', u'\n']
- self =
- [<django.template.defaulttags.LoadNode object at 0x57d2310>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d28d0>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d2350>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d2b10>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x57d2950>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.VarNode object at 0x5c534d0>,
- <Text Node: '
- '>,
- <noc.main.templatetags.python.PythonNode object at 0x5c53a10>,
- <Text Node: '
- '>,
- <Variable Node: cmd>]
- context =
- [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 134)
- Function: _render
- 127
- 128 def __iter__(self):
- 129 for node in self.nodelist:
- 130 for subnode in node:
- 131 yield subnode
- 132
- 133 def _render(self, context):
- 134 ==> return self.nodelist.render(context)
- 135
- 136 def render(self, context):
- 137 "Display stage -- can be called many times"
- 138 context.render_context.push()
- 139 try:
- 140 return self._render(context)
- Variables:
- self = <django.template.base.Template object at 0x65888d0>
- context =
- [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 140)
- Function: render
- 133 def _render(self, context):
- 134 return self.nodelist.render(context)
- 135
- 136 def render(self, context):
- 137 "Display stage -- can be called many times"
- 138 context.render_context.push()
- 139 try:
- 140 ==> return self._render(context)
- 141 finally:
- 142 context.render_context.pop()
- 143
- 144 def compile_string(template_string, origin):
- 145 "Compiles template_string into NodeList ready for rendering"
- 146 if settings.TEMPLATE_DEBUG:
- Variables:
- self = <django.template.base.Template object at 0x65888d0>
- context =
- [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
- ------------------------------------------------------------------------
- File: /opt/noc/sa/models/commandsnippet.py (Line: 102)
- Function: expand
- 95 vars[name][k] = v
- 96 return vars
- 97
- 98 def expand(self, data):
- 99 """
- 100 Expand snippet with variables
- 101 """
- 102 ==> return Template(self.snippet).render(Context(data))
- 103
- 104 @property
- 105 def effective_permission_name(self):
- 106 if self.permission_name:
- 107 return "sa:runsnippet:" + self.permission_name
- 108 else:
- Variables:
- self = <CommandSnippet: Config DES-3200-28>
- data =
- {u'Client': u'1',
- u'id': u'1',
- 'object': <ManagedObject: GUT_65>,
- u'po': u'1',
- u'speed': u'10000'}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/apps/runsnippet/views.py (Line: 173)
- Function: view_snippet
- 166 return self.response_redirect("sa:runsnippet:task",
- 167 snippet.id, task)
- 168 elif snippet.require_confirmation:
- 169 cd = []
- 170 for o in objects:
- 171 d = data.copy()
- 172 d.update({"object": o})
- 173 ==> cd += [(o, snippet.expand(d))]
- 174 return self.render(request, "confirm.html",
- 175 data=cd, snippet=snippet, vars = data.items())
- 176 else:
- 177 if (not has_vars and len(objects) == 1 and
- 178 not snippet.require_confirmation):
- 179 # Run immediately
- Variables:
- snippet_id = u'1'
- d =
- {u'Client': u'1',
- u'id': u'1',
- 'object': <ManagedObject: GUT_65>,
- u'po': u'1',
- u'speed': u'10000'}
- form = <noc.sa.apps.runsnippet.views.fc object at 0x65884d0>
- vars =
- {u'Client': {'label': u'Client', 'required': True, 'type': u'str'},
- u'cmd': {'label': u'cmd', 'required': True, 'type': u'internal'},
- u'id': {'label': u'id', 'required': True, 'type': u'str'},
- u'po': {'label': u'po', 'required': True, 'type': u'str'},
- u'speed': {'label': u'speed', 'required': True, 'type': u'str'}}
- request =
- <WSGIRequest
- path:/sa/runsnippet/1/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'OBJ:138': [u'on'], u'Client': [u'1'], u'speed': [u'10000'], u'po': [u'1'], u'id': [u'1']}>,
- COOKIES:{'csrftoken': 'MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr',
- 'sessionid': 'a82b0648e662c76cd1f0d3915037f9ad'},
- META:{'CONTENT_LENGTH': '43',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr; sessionid=a82b0648e662c76cd1f0d3915037f9ad',
- 'HTTP_HOST': '10.100.100.6:8000',
- 'HTTP_ORIGIN': 'http://10.100.100.6:8000',
- 'HTTP_REFERER': 'http://10.100.100.6:8000/sa/runsnippet/1/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.45 Safari/537.36',
- 'PATH_INFO': u'/sa/runsnippet/1/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '10.100.100.101',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '10.100.100.6',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2b09e40>,
- 'wsgi.input': <_io.BytesIO object at 0x65f9110>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- o = <ManagedObject: GUT_65>
- n = u'id'
- snippet = <CommandSnippet: Config DES-3200-28>
- objects = [<ManagedObject: GUT_65>]
- has_vars = True
- map_task = 'configure'
- v = u'id'
- cd = []
- data = {u'Client': u'1', u'speed': u'10000', u'po': u'1', u'id': u'1'}
- self = <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 232)
- Function: inner
- 225 for k, v in request.POST.lists())
- 226 elif request.method == "GET":
- 227 a = dict((k, v[0] if len(v) == 1 else v)
- 228 for k, v in request.GET.lists())
- 229 logging.debug("API %s %s %s" % (request.method,
- 230 request.path, a))
- 231 # Call handler
- 232 ==> r = v(request, *args, **kwargs)
- 233 # Dump SQL statements
- 234 if self.log_sql_statements:
- 235 from django.db import connections
- 236 tsc = 0
- 237 sc = defaultdict(int)
- 238 for conn in connections.all():
- Variables:
- args = ()
- view_map =
- {'DELETE': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>,
- 'GET': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>,
- 'POST': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>,
- 'PUT': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x3289c90>
- v =
- <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>
- request =
- <WSGIRequest
- path:/sa/runsnippet/1/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'OBJ:138': [u'on'], u'Client': [u'1'], u'speed': [u'10000'], u'po': [u'1'], u'id': [u'1']}>,
- COOKIES:{'csrftoken': 'MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr',
- 'sessionid': 'a82b0648e662c76cd1f0d3915037f9ad'},
- META:{'CONTENT_LENGTH': '43',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr; sessionid=a82b0648e662c76cd1f0d3915037f9ad',
- 'HTTP_HOST': '10.100.100.6:8000',
- 'HTTP_ORIGIN': 'http://10.100.100.6:8000',
- 'HTTP_REFERER': 'http://10.100.100.6:8000/sa/runsnippet/1/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.45 Safari/537.36',
- 'PATH_INFO': u'/sa/runsnippet/1/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '10.100.100.101',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '10.100.100.6',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2b09e40>,
- 'wsgi.input': <_io.BytesIO object at 0x65f9110>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- to_log_api_call = False
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- kwargs = {'snippet_id': u'1'}
- app = <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement