Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.69 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2013-08-02 11:43:58.995234)
  2. Working directory: /opt/noc
  3. <type 'exceptions.TypeError'>
  4. cannot concatenate 'str' and 'ManagedObject' objects
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/main/templatetags/python.py (Line: 89)
  8. Function: render
  9. 82 # Prepare block context
  10. 83 ctx = {
  11. 84 "render": self.t_render,
  12. 85 "rendernl": self.t_rendernl,
  13. 86 "context": context
  14. 87 }
  15. 88 # Execute block
  16. 89 ==> exec self.code in ctx
  17. 90 # Render output
  18. 91 return "".join(self.output)
  19. 92
  20. 93
  21. 94 register = template.Library()
  22. 95 register.tag("var", do_var)
  23. Variables:
  24. self = <noc.main.templatetags.python.PythonNode object at 0x5c53a10>
  25. ctx =
  26. {'Activator': <class 'noc.sa.models.activator.Activator'>,
  27. 'ActivatorCapabilitiesCache': <class 'noc.sa.models.activatorcapabilitiescache.ActivatorCapabilitiesCache'>,
  28. 'Address': <class 'noc.ip.models.address.Address'>,
  29. 'AddressRange': <class 'noc.ip.models.addressrange.AddressRange'>,
  30. 'AdministrativeDomain': <class 'noc.sa.models.administrativedomain.AdministrativeDomain'>,
  31. 'BaseDict': <class 'mongoengine.base.BaseDict'>,
  32. 'BaseDocument': <class 'mongoengine.base.BaseDocument'>,
  33. 'BaseField': <class 'mongoengine.base.BaseField'>,
  34. 'BaseList': <class 'mongoengine.base.BaseList'>,
  35. 'BinaryField': <class 'mongoengine.fields.BinaryField'>,
  36. 'BooleanField': <class 'mongoengine.fields.BooleanField'>,
  37. 'CASCADE': 2,
  38. 'CommandSnippet': <class 'noc.sa.models.commandsnippet.CommandSnippet'>,
  39. 'ComplexBaseField': <class 'mongoengine.base.ComplexBaseField'>,
  40. 'ComplexDateTimeField': <class 'mongoengine.fields.ComplexDateTimeField'>,
  41. 'ConnectionError': <class 'mongoengine.connection.ConnectionError'>,
  42. 'DBRef': <class 'bson.dbref.DBRef'>,
  43. 'DEFAULT_CONNECTION_NAME': 'default',
  44. 'DENY': 3,
  45. 'DO_NOTHING': 0,
  46. 'DateTimeField': <class 'mongoengine.fields.DateTimeField'>,
  47. 'DecimalField': <class 'mongoengine.fields.DecimalField'>,
  48. 'DictField': <class 'mongoengine.fields.DictField'>,
  49. 'Document': <class 'mongoengine.document.Document'>,
  50. 'DocumentMetaclass': <class 'mongoengine.base.DocumentMetaclass'>,
  51. 'DoesNotExist': <class 'mongoengine.queryset.DoesNotExist'>,
  52. 'DynamicDocument': <class 'mongoengine.document.DynamicDocument'>,
  53. 'DynamicEmbeddedDocument': <class 'mongoengine.document.DynamicEmbeddedDocument'>,
  54. 'DynamicField': <class 'mongoengine.fields.DynamicField'>,
  55. 'ESC1': '__',
  56. 'ESC2': '^^',
  57. 'EmailField': <class 'mongoengine.fields.EmailField'>,
  58. 'EmbeddedDocument': <class 'mongoengine.document.EmbeddedDocument'>,
  59. 'EmbeddedDocumentField': <class 'mongoengine.fields.EmbeddedDocumentField'>,
  60. 'FailedScriptLog': <class 'noc.sa.models.failedscriptlog.FailedScriptLog'>,
  61. 'FileField': <class 'mongoengine.fields.FileField'>,
  62. 'FloatField': <class 'mongoengine.fields.FloatField'>,
  63. 'ForeignKeyField': <class 'noc.lib.nosql.ForeignKeyField'>,
  64. 'ForwardingInstance': <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>,
  65. 'GenericEmbeddedDocumentField': <class 'mongoengine.fields.GenericEmbeddedDocumentField'>,
  66. 'GenericReferenceField': <class 'mongoengine.fields.GenericReferenceField'>,
  67. 'GeoPointField': <class 'mongoengine.fields.GeoPointField'>,
  68. 'GroupAccess': <class 'noc.sa.models.groupaccess.GroupAccess'>,
  69. 'IP': <class 'noc.lib.ip.IP'>,
  70. 'ImageField': <class 'mongoengine.fields.ImageField'>,
  71. 'IntField': <class 'mongoengine.fields.IntField'>,
  72. 'IntSequence': <class 'noc.lib.nosql.IntSequence'>,
  73. 'IntegrityError': <class 'django.db.utils.IntegrityError'>,
  74. 'Interface': <class 'noc.inv.models.interface.Interface'>,
  75. 'InterfaceClassificationMatch': <class 'noc.inv.models.interfaceclassificationrule.InterfaceClassificationMatch'>,
  76. 'InterfaceClassificationRule': <class 'noc.inv.models.interfaceclassificationrule.InterfaceClassificationRule'>,
  77. 'InterfaceProfile': <class 'noc.inv.models.interfaceprofile.InterfaceProfile'>,
  78. 'InvalidCollectionError': <class 'mongoengine.document.InvalidCollectionError'>,
  79. 'InvalidDocumentError': <class 'mongoengine.base.InvalidDocumentError'>,
  80. 'InvalidQueryError': <class 'mongoengine.queryset.InvalidQueryError'>,
  81. 'Link': <class 'noc.inv.models.link.Link'>,
  82. 'ListField': <class 'mongoengine.fields.ListField'>,
  83. 'MACDB': <class 'noc.inv.models.macdb.MACDB'>,
  84. 'MACLog': <class 'noc.inv.models.maclog.MACLog'>,
  85. 'MRTConfig': <class 'noc.sa.models.mrtconfig.MRTConfig'>,
  86. 'ManagedObject': <class 'noc.sa.models.managedobject.ManagedObject'>,
  87. 'ManagedObjectAttribute': <class 'noc.sa.models.managedobject.ManagedObjectAttribute'>,
  88. 'ManagedObjectProfile': <class 'noc.sa.models.managedobjectprofile.ManagedObjectProfile'>,
  89. 'ManagedObjectSelector': <class 'noc.sa.models.managedobjectselector.ManagedObjectSelector'>,
  90. 'ManagedObjectSelectorByAttribute': <class 'noc.sa.models.managedobjectselector.ManagedObjectSelectorByAttribute'>,
  91. 'MapField': <class 'mongoengine.fields.MapField'>,
  92. 'MapTask': <class 'noc.sa.models.maptask.MapTask'>,
  93. 'Model': <class 'noc.inv.models.Model'>,
  94. 'ModelCategory': <class 'noc.inv.models.ModelCategory'>,
  95. 'ModelSocket': <class 'noc.inv.models.ModelSocket'>,
  96. 'MultipleObjectsReturned': <class 'mongoengine.queryset.MultipleObjectsReturned'>,
  97. 'NULLIFY': 1,
  98. 'NetworkChart': <class 'noc.inv.models.networkchart.NetworkChart'>,
  99. 'NewAddressDiscoveryLog': <class 'noc.inv.models.NewAddressDiscoveryLog'>,
  100. 'NewPrefixDiscoveryLog': <class 'noc.inv.models.NewPrefixDiscoveryLog'>,
  101. 'NotRegistered': <class 'mongoengine.base.NotRegistered'>,
  102. 'ObjectId': <class 'bson.objectid.ObjectId'>,
  103. 'ObjectIdField': <class 'mongoengine.base.ObjectIdField'>,
  104. 'OperationError': <class 'mongoengine.queryset.OperationError'>,
  105. 'PULL': 4,
  106. 'PlainReferenceField': <class 'noc.lib.nosql.PlainReferenceField'>,
  107. 'PlainReferenceListField': <class 'noc.lib.nosql.PlainReferenceListField'>,
  108. 'Prefix': <class 'noc.ip.models.prefix.Prefix'>,
  109. 'PrefixAccess': <class 'noc.ip.models.prefixaccess.PrefixAccess'>,
  110. 'PrefixBookmark': <class 'noc.ip.models.prefixbookmark.PrefixBookmark'>,
  111. 'Q': <class 'mongoengine.queryset.Q'>,
  112. 'QuerySet': <class 'mongoengine.queryset.QuerySet'>,
  113. 'QuerySetManager': <class 'mongoengine.queryset.QuerySetManager'>,
  114. 'RECURSIVE_REFERENCE_CONSTANT': 'self',
  115. 'RawDictField': <class 'noc.lib.nosql.RawDictField'>,
  116. 'ReduceTask': <class 'noc.sa.models.reducetask.ReduceTask'>,
  117. 'ReferenceField': <class 'mongoengine.fields.ReferenceField'>,
  118. 'Sequence': <class 'noc.lib.nosql.Sequence'>,
  119. 'SequenceField': <class 'mongoengine.fields.SequenceField'>,
  120. 'Socket': <class 'noc.inv.models.Socket'>,
  121. 'SocketAttribute': <class 'noc.inv.models.SocketAttribute'>,
  122. 'SocketCategory': <class 'noc.inv.models.SocketCategory'>,
  123. 'SortedListField': <class 'mongoengine.fields.SortedListField'>,
  124. 'StringField': <class 'mongoengine.fields.StringField'>,
  125. 'SubInterface': <class 'noc.inv.models.subinterface.SubInterface'>,
  126. 'TopLevelDocumentMetaclass': <class 'mongoengine.base.TopLevelDocumentMetaclass'>,
  127. 'URLField': <class 'mongoengine.fields.URLField'>,
  128. 'UUIDField': <class 'mongoengine.fields.UUIDField'>,
  129. 'UserAccess': <class 'noc.sa.models.useraccess.UserAccess'>,
  130. 'VRF': <class 'noc.ip.models.vrf.VRF'>,
  131. 'VRFGroup': <class 'noc.ip.models.vrfgroup.VRFGroup'>,
  132. 'ValidationError': <class 'mongoengine.base.ValidationError'>,
  133. 'Vendor': <class 'noc.inv.models.Vendor'>,
  134. '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
  135. 'AssertionError': <type 'exceptions.AssertionError'>,
  136. 'AttributeError': <type 'exceptions.AttributeError'>,
  137. 'BaseException': <type 'exceptions.BaseException'>,
  138. 'BufferError': <type 'exceptions.BufferError'>,
  139. 'BytesWarning': <type 'exceptions.BytesWarning'>,
  140. 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
  141. 'EOFError': <type 'exceptions.EOFError'>,
  142. 'Ellipsis': Ellipsis,
  143. 'EnvironmentError': <type 'exceptions.EnvironmentError'>,
  144. 'Exception': <type 'exceptions.Exception'>,
  145. 'False': False,
  146. 'FloatingPointError': <type 'exceptions.FloatingPointError'>,
  147. 'FutureWarning': <type 'exceptions.FutureWarning'>,
  148. 'GeneratorExit': <type 'exceptions.GeneratorExit'>,
  149. 'IOError': <type 'exceptions.IOError'>,
  150. 'ImportError': <type 'exceptions.ImportError'>,
  151. 'ImportWarning': <type 'exceptions.ImportWarning'>,
  152. 'IndentationError': <type 'exceptions.IndentationError'>,
  153. 'IndexError': <type 'exceptions.IndexError'>,
  154. 'KeyError': <type 'exceptions.KeyError'>,
  155. 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
  156. 'LookupError': <type 'exceptions.LookupError'>,
  157. 'MemoryError': <type 'exceptions.MemoryError'>,
  158. 'NameError': <type 'exceptions.NameError'>,
  159. 'None': None,
  160. 'NotImplemented': NotImplemented,
  161. 'NotImplementedError': <type 'exceptions.NotImplementedError'>,
  162. 'OSError': <type 'exceptions.OSError'>,
  163. 'OverflowError': <type 'exceptions.OverflowError'>,
  164. 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
  165. 'ReferenceError': <type 'exceptions.ReferenceError'>,
  166. 'RuntimeError': <type 'exceptions.RuntimeError'>,
  167. 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
  168. 'StandardError': <type 'exceptions.StandardError'>,
  169. 'StopIteration': <type 'exceptions.StopIteration'>,
  170. 'SyntaxError': <type 'exceptions.SyntaxError'>,
  171. 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
  172. 'SystemError': <type 'exceptions.SystemError'>,
  173. 'SystemExit': <type 'exceptions.SystemExit'>,
  174. 'TabError': <type 'exceptions.TabError'>,
  175. 'True': True,
  176. 'TypeError': <type 'exceptions.TypeError'>,
  177. 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
  178. 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
  179. 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
  180. 'UnicodeError': <type 'exceptions.UnicodeError'>,
  181. 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
  182. 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
  183. 'UserWarning': <type 'exceptions.UserWarning'>,
  184. 'ValueError': <type 'exceptions.ValueError'>,
  185. 'Warning': <type 'exceptions.Warning'>,
  186. 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
  187. '__debug__': True,
  188. '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
  189. '__import__': <built-in function __import__>,
  190. '__name__': '__builtin__',
  191. '__package__': None,
  192. 'abs': <built-in function abs>,
  193. 'all': <built-in function all>,
  194. 'any': <built-in function any>,
  195. 'apply': <built-in function apply>,
  196. 'basestring': <type 'basestring'>,
  197. 'bin': <built-in function bin>,
  198. 'bool': <type 'bool'>,
  199. 'buffer': <type 'buffer'>,
  200. 'bytearray': <type 'bytearray'>,
  201. 'bytes': <type 'str'>,
  202. 'callable': <built-in function callable>,
  203. 'chr': <built-in function chr>,
  204. 'classmethod': <type 'classmethod'>,
  205. 'cmp': <built-in function cmp>,
  206. 'coerce': <built-in function coerce>,
  207. 'compile': <built-in function compile>,
  208. 'complex': <type 'complex'>,
  209. 'copyright': Copyright (c) 2001-2012 Python Software Foundation.
  210. All Rights Reserved.
  211.  
  212. Copyright (c) 2000 BeOpen.com.
  213. All Rights Reserved.
  214.  
  215. Copyright (c) 1995-2001 Corporation for National Research Initiatives.
  216. All Rights Reserved.
  217.  
  218. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
  219. All Rights Reserved.,
  220. 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
  221. for supporting Python development. See www.python.org for more information.,
  222. 'delattr': <built-in function delattr>,
  223. 'dict': <type 'dict'>,
  224. 'dir': <built-in function dir>,
  225. 'divmod': <built-in function divmod>,
  226. 'enumerate': <type 'enumerate'>,
  227. 'eval': <built-in function eval>,
  228. 'execfile': <built-in function execfile>,
  229. 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
  230. 'file': <type 'file'>,
  231. 'filter': <built-in function filter>,
  232. 'float': <type 'float'>,
  233. 'format': <built-in function format>,
  234. 'frozenset': <type 'frozenset'>,
  235. 'getattr': <built-in function getattr>,
  236. 'globals': <built-in function globals>,
  237. 'hasattr': <built-in function hasattr>,
  238. 'hash': <built-in function hash>,
  239. 'help': Type help() for interactive help, or help(object) for help about object.,
  240. 'hex': <built-in function hex>,
  241. 'id': <built-in function id>,
  242. 'input': <built-in function input>,
  243. 'int': <type 'int'>,
  244. 'intern': <built-in function intern>,
  245. 'isinstance': <built-in function isinstance>,
  246. 'issubclass': <built-in function issubclass>,
  247. 'iter': <built-in function iter>,
  248. 'len': <built-in function len>,
  249. 'license': Type license() to see the full license text,
  250. 'list': <type 'list'>,
  251. 'locals': <built-in function locals>,
  252. 'long': <type 'long'>,
  253. 'map': <built-in function map>,
  254. 'max': <built-in function max>,
  255. 'memoryview': <type 'memoryview'>,
  256. 'min': <built-in function min>,
  257. 'next': <built-in function next>,
  258. 'object': <type 'object'>,
  259. 'oct': <built-in function oct>,
  260. 'open': <built-in function open>,
  261. 'ord': <built-in function ord>,
  262. 'pow': <function _gmpy_pow at 0x3bc1e60>,
  263. 'print': <built-in function print>,
  264. 'property': <type 'property'>,
  265. 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
  266. 'range': <built-in function range>,
  267. 'raw_input': <built-in function raw_input>,
  268. 'reduce': <built-in function reduce>,
  269. 'reload': <built-in function reload>,
  270. 'repr': <built-in function repr>,
  271. 'reversed': <type 'reversed'>,
  272. 'round': <built-in function round>,
  273. 'set': <type 'set'>,
  274. 'setattr': <built-in function setattr>,
  275. 'slice': <type 'slice'>,
  276. 'sorted': <built-in function sorted>,
  277. 'staticmethod': <type 'staticmethod'>,
  278. 'str': <type 'str'>,
  279. 'sum': <built-in function sum>,
  280. 'super': <type 'super'>,
  281. 'tuple': <type 'tuple'>,
  282. 'type': <type 'type'>,
  283. 'unichr': <built-in function unichr>,
  284. 'unicode': <type 'unicode'>,
  285. 'vars': <built-in function vars>,
  286. 'xrange': <type 'xrange'>,
  287. 'zip': <built-in function zip>},
  288. 'activator': <module 'noc.sa.models.activator' from '/opt/noc/sa/models/activator.pyc'>,
  289. 'activatorcapabilitiescache': <module 'noc.sa.models.activatorcapabilitiescache' from '/opt/noc/sa/models/activatorcapabilitiescache.pyc'>,
  290. 'address': <module 'noc.ip.models.address' from '/opt/noc/ip/models/address.pyc'>,
  291. 'addressrange': <module 'noc.ip.models.addressrange' from '/opt/noc/ip/models/addressrange.pyc'>,
  292. 'administrativedomain': <module 'noc.sa.models.administrativedomain' from '/opt/noc/sa/models/administrativedomain.pyc'>,
  293. 'afi': <module 'noc.ip.models.afi' from '/opt/noc/ip/models/afi.pyc'>,
  294. 'bson': <module 'bson' from '/opt/noc/lib/python2.7/site-packages/bson/__init__.pyc'>,
  295. 'commandsnippet': <module 'noc.sa.models.commandsnippet' from '/opt/noc/sa/models/commandsnippet.pyc'>,
  296. 'connect': <function connect at 0x325a050>,
  297. 'connection_args': {'db': 'noc', 'password': '12345', 'username': 'noc'},
  298. 'context': [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}],
  299. 'create_test_db': <function create_test_db at 0x3285140>,
  300. 'datetime': <module 'datetime' from '/opt/noc/lib64/python2.7/lib-dynload/datetime.so'>,
  301. 'db_name': 'noc',
  302. 'defaultdict': <type 'collections.defaultdict'>,
  303. 'destroy_test_db': <function destroy_test_db at 0x3285c08>,
  304. 'django': <module 'django' from '/opt/noc/lib/python2.7/site-packages/django/__init__.pyc'>,
  305. 'failedscriptlog': <module 'noc.sa.models.failedscriptlog' from '/opt/noc/sa/models/failedscriptlog.pyc'>,
  306. 'forwardinginstance': <module 'noc.inv.models.forwardinginstance' from '/opt/noc/inv/models/forwardinginstance.pyc'>,
  307. 'get_connection': <function get_connection at 0x3260a28>,
  308. 'get_db': <function get_db at 0x32850c8>,
  309. 'get_document': <function get_document at 0x32128c0>,
  310. 'groupaccess': <module 'noc.sa.models.groupaccess' from '/opt/noc/sa/models/groupaccess.pyc'>,
  311. 'interface': <module 'noc.inv.models.interface' from '/opt/noc/inv/models/interface.pyc'>,
  312. 'interfaceclassificationrule': <module 'noc.inv.models.interfaceclassificationrule' from '/opt/noc/inv/models/interfaceclassificationrule.pyc'>,
  313. 'interfaceprofile': <module 'noc.inv.models.interfaceprofile' from '/opt/noc/inv/models/interfaceprofile.pyc'>,
  314. 'link': <module 'noc.inv.models.link' from '/opt/noc/inv/models/link.pyc'>,
  315. 'logging': <module 'logging' from '/usr/lib/python2.7/logging/__init__.pyc'>,
  316. 'macdb': <module 'noc.inv.models.macdb' from '/opt/noc/inv/models/macdb.pyc'>,
  317. 'maclog': <module 'noc.inv.models.maclog' from '/opt/noc/inv/models/maclog.pyc'>,
  318. 'managedobject': <module 'noc.sa.models.managedobject' from '/opt/noc/sa/models/managedobject.pyc'>,
  319. 'managedobjectprofile': <module 'noc.sa.models.managedobjectprofile' from '/opt/noc/sa/models/managedobjectprofile.pyc'>,
  320. 'managedobjectselector': <module 'noc.sa.models.managedobjectselector' from '/opt/noc/sa/models/managedobjectselector.pyc'>,
  321. 'maptask': <module 'noc.sa.models.maptask' from '/opt/noc/sa/models/maptask.pyc'>,
  322. 'mongoengine': <module 'mongoengine' from '/opt/noc/lib/python2.7/site-packages/mongoengine/__init__.pyc'>,
  323. 'mrtconfig': <module 'noc.sa.models.mrtconfig' from '/opt/noc/sa/models/mrtconfig.pyc'>,
  324. 'networkchart': <module 'noc.inv.models.networkchart' from '/opt/noc/inv/models/networkchart.pyc'>,
  325. 'networkchartstate': <module 'noc.inv.models.networkchartstate' from '/opt/noc/inv/models/networkchartstate.pyc'>,
  326. 'objectstatus': <module 'noc.sa.models.objectstatus' from '/opt/noc/sa/models/objectstatus.pyc'>,
  327. 'operator': <module 'operator' from '/opt/noc/lib64/python2.7/lib-dynload/operator.so'>,
  328. 'partial': <type 'functools.partial'>,
  329. 'pendinglinkcheck': <module 'noc.inv.models.pendinglinkcheck' from '/opt/noc/inv/models/pendinglinkcheck.pyc'>,
  330. 'post_delete': <mongoengine.signals._FakeSignal object at 0x3205710>,
  331. 'post_init': <module 'noc.sa.models.post_init' from '/opt/noc/sa/models/post_init.pyc'>,
  332. 'post_save': <mongoengine.signals._FakeSignal object at 0x3205690>,
  333. 'pre_delete': <mongoengine.signals._FakeSignal object at 0x32056d0>,
  334. 'pre_init': <mongoengine.signals._FakeSignal object at 0x32055d0>,
  335. 'pre_save': <mongoengine.signals._FakeSignal object at 0x3205650>,
  336. 'prefix': <module 'noc.ip.models.prefix' from '/opt/noc/ip/models/prefix.pyc'>,
  337. 'prefixaccess': <module 'noc.ip.models.prefixaccess' from '/opt/noc/ip/models/prefixaccess.pyc'>,
  338. 'prefixbookmark': <module 'noc.ip.models.prefixbookmark' from '/opt/noc/ip/models/prefixbookmark.pyc'>,
  339. 'profile_registry': <noc.sa.profiles.ProfileRegistry object at 0x388d350>,
  340. 'pymongo': <module 'pymongo' from '/opt/noc/lib/python2.7/site-packages/pymongo/__init__.pyc'>,
  341. 'queryset_manager': <function queryset_manager at 0x3212938>,
  342. 're': <module 're' from '/opt/noc/lib64/python2.7/re.pyc'>,
  343. 'reducetask': <module 'noc.sa.models.reducetask' from '/opt/noc/sa/models/reducetask.pyc'>,
  344. 'register_connection': <function register_connection at 0x3259de8>,
  345. 'render': <bound method PythonNode.t_render of <noc.main.templatetags.python.PythonNode object at 0x5c53a10>>,
  346. 'rendernl': <bound method PythonNode.t_rendernl of <noc.main.templatetags.python.PythonNode object at 0x5c53a10>>,
  347. 'rx_range_check': <_sre.SRE_Pattern object at 0x43e65a0>,
  348. 'rx_range_exp': <_sre.SRE_Pattern object at 0x43e54b0>,
  349. 'script_registry': <noc.sa.script.script.ScriptRegistry object at 0x25c4fd0>,
  350. 'selectorcache': <module 'noc.sa.models.selectorcache' from '/opt/noc/sa/models/selectorcache.pyc'>,
  351. 'settings': <module 'noc.settings' from '/opt/noc/settings.pyc'>,
  352. 'signals': <module 'mongoengine.signals' from '/opt/noc/lib/python2.7/site-packages/mongoengine/signals.pyc'>,
  353. 'subclass_exception': <function subclass_exception at 0x3256848>,
  354. 'subinterface': <module 'noc.inv.models.subinterface' from '/opt/noc/inv/models/subinterface.pyc'>,
  355. 'sys': <module 'sys' (built-in)>,
  356. 'useraccess': <module 'noc.sa.models.useraccess' from '/opt/noc/sa/models/useraccess.pyc'>,
  357. 'vrf': <module 'noc.ip.models.vrf' from '/opt/noc/ip/models/vrf.pyc'>,
  358. 'vrfgroup': <module 'noc.ip.models.vrfgroup' from '/opt/noc/ip/models/vrfgroup.pyc'>,
  359. 'warnings': <module 'warnings' from '/opt/noc/lib64/python2.7/warnings.pyc'>}
  360. context =
  361. [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
  362. ------------------------------------------------------------------------
  363. File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 837)
  364. Function: render_node
  365. 830 "Return a list of all nodes of the given type"
  366. 831 nodes = []
  367. 832 for node in self:
  368. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  369. 834 return nodes
  370. 835
  371. 836 def render_node(self, node, context):
  372. 837 ==> return node.render(context)
  373. 838
  374. 839 class TextNode(Node):
  375. 840 def __init__(self, s):
  376. 841 self.s = s
  377. 842
  378. 843 def __repr__(self):
  379. Variables:
  380. node = <noc.main.templatetags.python.PythonNode object at 0x5c53a10>
  381. self =
  382. [<django.template.defaulttags.LoadNode object at 0x57d2310>,
  383. <Text Node: '
  384. '>,
  385. <noc.main.templatetags.python.VarNode object at 0x57d28d0>,
  386. <Text Node: '
  387. '>,
  388. <noc.main.templatetags.python.VarNode object at 0x57d2350>,
  389. <Text Node: '
  390. '>,
  391. <noc.main.templatetags.python.VarNode object at 0x57d2b10>,
  392. <Text Node: '
  393. '>,
  394. <noc.main.templatetags.python.VarNode object at 0x57d2950>,
  395. <Text Node: '
  396. '>,
  397. <noc.main.templatetags.python.VarNode object at 0x5c534d0>,
  398. <Text Node: '
  399. '>,
  400. <noc.main.templatetags.python.PythonNode object at 0x5c53a10>,
  401. <Text Node: '
  402. '>,
  403. <Variable Node: cmd>]
  404. context =
  405. [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
  406. ------------------------------------------------------------------------
  407. File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 823)
  408. Function: render
  409. 816 # extend_nodelist().
  410. 817 contains_nontext = False
  411. 818
  412. 819 def render(self, context):
  413. 820 bits = []
  414. 821 for node in self:
  415. 822 if isinstance(node, Node):
  416. 823 ==> bit = self.render_node(node, context)
  417. 824 else:
  418. 825 bit = node
  419. 826 bits.append(force_unicode(bit))
  420. 827 return mark_safe(u''.join(bits))
  421. 828
  422. 829 def get_nodes_by_type(self, nodetype):
  423. Variables:
  424. node = <noc.main.templatetags.python.PythonNode object at 0x5c53a10>
  425. bit = u'\n'
  426. bits = [u'', u'\n', u'', u'\n', u'', u'\n', u'', u'\n', u'', u'\n', u'', u'\n']
  427. self =
  428. [<django.template.defaulttags.LoadNode object at 0x57d2310>,
  429. <Text Node: '
  430. '>,
  431. <noc.main.templatetags.python.VarNode object at 0x57d28d0>,
  432. <Text Node: '
  433. '>,
  434. <noc.main.templatetags.python.VarNode object at 0x57d2350>,
  435. <Text Node: '
  436. '>,
  437. <noc.main.templatetags.python.VarNode object at 0x57d2b10>,
  438. <Text Node: '
  439. '>,
  440. <noc.main.templatetags.python.VarNode object at 0x57d2950>,
  441. <Text Node: '
  442. '>,
  443. <noc.main.templatetags.python.VarNode object at 0x5c534d0>,
  444. <Text Node: '
  445. '>,
  446. <noc.main.templatetags.python.PythonNode object at 0x5c53a10>,
  447. <Text Node: '
  448. '>,
  449. <Variable Node: cmd>]
  450. context =
  451. [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
  452. ------------------------------------------------------------------------
  453. File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 134)
  454. Function: _render
  455. 127
  456. 128 def __iter__(self):
  457. 129 for node in self.nodelist:
  458. 130 for subnode in node:
  459. 131 yield subnode
  460. 132
  461. 133 def _render(self, context):
  462. 134 ==> return self.nodelist.render(context)
  463. 135
  464. 136 def render(self, context):
  465. 137 "Display stage -- can be called many times"
  466. 138 context.render_context.push()
  467. 139 try:
  468. 140 return self._render(context)
  469. Variables:
  470. self = <django.template.base.Template object at 0x65888d0>
  471. context =
  472. [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
  473. ------------------------------------------------------------------------
  474. File: /opt/noc/lib/python2.7/site-packages/django/template/base.py (Line: 140)
  475. Function: render
  476. 133 def _render(self, context):
  477. 134 return self.nodelist.render(context)
  478. 135
  479. 136 def render(self, context):
  480. 137 "Display stage -- can be called many times"
  481. 138 context.render_context.push()
  482. 139 try:
  483. 140 ==> return self._render(context)
  484. 141 finally:
  485. 142 context.render_context.pop()
  486. 143
  487. 144 def compile_string(template_string, origin):
  488. 145 "Compiles template_string into NodeList ready for rendering"
  489. 146 if settings.TEMPLATE_DEBUG:
  490. Variables:
  491. self = <django.template.base.Template object at 0x65888d0>
  492. context =
  493. [{u'Client': u'1', u'speed': u'10000', u'po': u'1', 'object': <ManagedObject: GUT_65>, u'id': u'1'}]
  494. ------------------------------------------------------------------------
  495. File: /opt/noc/sa/models/commandsnippet.py (Line: 102)
  496. Function: expand
  497. 95 vars[name][k] = v
  498. 96 return vars
  499. 97
  500. 98 def expand(self, data):
  501. 99 """
  502. 100 Expand snippet with variables
  503. 101 """
  504. 102 ==> return Template(self.snippet).render(Context(data))
  505. 103
  506. 104 @property
  507. 105 def effective_permission_name(self):
  508. 106 if self.permission_name:
  509. 107 return "sa:runsnippet:" + self.permission_name
  510. 108 else:
  511. Variables:
  512. self = <CommandSnippet: Config DES-3200-28>
  513. data =
  514. {u'Client': u'1',
  515. u'id': u'1',
  516. 'object': <ManagedObject: GUT_65>,
  517. u'po': u'1',
  518. u'speed': u'10000'}
  519. ------------------------------------------------------------------------
  520. File: /opt/noc/sa/apps/runsnippet/views.py (Line: 173)
  521. Function: view_snippet
  522. 166 return self.response_redirect("sa:runsnippet:task",
  523. 167 snippet.id, task)
  524. 168 elif snippet.require_confirmation:
  525. 169 cd = []
  526. 170 for o in objects:
  527. 171 d = data.copy()
  528. 172 d.update({"object": o})
  529. 173 ==> cd += [(o, snippet.expand(d))]
  530. 174 return self.render(request, "confirm.html",
  531. 175 data=cd, snippet=snippet, vars = data.items())
  532. 176 else:
  533. 177 if (not has_vars and len(objects) == 1 and
  534. 178 not snippet.require_confirmation):
  535. 179 # Run immediately
  536. Variables:
  537. snippet_id = u'1'
  538. d =
  539. {u'Client': u'1',
  540. u'id': u'1',
  541. 'object': <ManagedObject: GUT_65>,
  542. u'po': u'1',
  543. u'speed': u'10000'}
  544. form = <noc.sa.apps.runsnippet.views.fc object at 0x65884d0>
  545. vars =
  546. {u'Client': {'label': u'Client', 'required': True, 'type': u'str'},
  547. u'cmd': {'label': u'cmd', 'required': True, 'type': u'internal'},
  548. u'id': {'label': u'id', 'required': True, 'type': u'str'},
  549. u'po': {'label': u'po', 'required': True, 'type': u'str'},
  550. u'speed': {'label': u'speed', 'required': True, 'type': u'str'}}
  551. request =
  552. <WSGIRequest
  553. path:/sa/runsnippet/1/,
  554. GET:<QueryDict: {}>,
  555. POST:<QueryDict: {u'OBJ:138': [u'on'], u'Client': [u'1'], u'speed': [u'10000'], u'po': [u'1'], u'id': [u'1']}>,
  556. COOKIES:{'csrftoken': 'MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr',
  557. 'sessionid': 'a82b0648e662c76cd1f0d3915037f9ad'},
  558. META:{'CONTENT_LENGTH': '43',
  559. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  560. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  561. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  562. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  563. 'HTTP_CACHE_CONTROL': 'max-age=0',
  564. 'HTTP_CONNECTION': 'keep-alive',
  565. 'HTTP_COOKIE': 'csrftoken=MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr; sessionid=a82b0648e662c76cd1f0d3915037f9ad',
  566. 'HTTP_HOST': '10.100.100.6:8000',
  567. 'HTTP_ORIGIN': 'http://10.100.100.6:8000',
  568. 'HTTP_REFERER': 'http://10.100.100.6:8000/sa/runsnippet/1/',
  569. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.45 Safari/537.36',
  570. 'PATH_INFO': u'/sa/runsnippet/1/',
  571. 'QUERY_STRING': '',
  572. 'REMOTE_ADDR': '10.100.100.101',
  573. 'REQUEST_METHOD': 'POST',
  574. 'SCRIPT_NAME': u'',
  575. 'SERVER_NAME': '10.100.100.6',
  576. 'SERVER_PORT': '8000',
  577. 'SERVER_PROTOCOL': 'HTTP/1.1',
  578. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2b09e40>,
  579. 'wsgi.input': <_io.BytesIO object at 0x65f9110>,
  580. 'wsgi.multiprocess': True,
  581. 'wsgi.multithread': False,
  582. 'wsgi.run_once': False,
  583. 'wsgi.url_scheme': 'http',
  584. 'wsgi.version': (1, 0)}>
  585. o = <ManagedObject: GUT_65>
  586. n = u'id'
  587. snippet = <CommandSnippet: Config DES-3200-28>
  588. objects = [<ManagedObject: GUT_65>]
  589. has_vars = True
  590. map_task = 'configure'
  591. v = u'id'
  592. cd = []
  593. data = {u'Client': u'1', u'speed': u'10000', u'po': u'1', u'id': u'1'}
  594. self = <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>
  595. ------------------------------------------------------------------------
  596. File: /opt/noc/lib/app/site.py (Line: 232)
  597. Function: inner
  598. 225 for k, v in request.POST.lists())
  599. 226 elif request.method == "GET":
  600. 227 a = dict((k, v[0] if len(v) == 1 else v)
  601. 228 for k, v in request.GET.lists())
  602. 229 logging.debug("API %s %s %s" % (request.method,
  603. 230 request.path, a))
  604. 231 # Call handler
  605. 232 ==> r = v(request, *args, **kwargs)
  606. 233 # Dump SQL statements
  607. 234 if self.log_sql_statements:
  608. 235 from django.db import connections
  609. 236 tsc = 0
  610. 237 sc = defaultdict(int)
  611. 238 for conn in connections.all():
  612. Variables:
  613. args = ()
  614. view_map =
  615. {'DELETE': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>,
  616. 'GET': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>,
  617. 'POST': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>,
  618. 'PUT': <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>}
  619. Form = <class 'django.forms.forms.Form'>
  620. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  621. self = <noc.lib.app.site.Site object at 0x3289c90>
  622. v =
  623. <bound method RunSnippetApplication.view_snippet of <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>>
  624. request =
  625. <WSGIRequest
  626. path:/sa/runsnippet/1/,
  627. GET:<QueryDict: {}>,
  628. POST:<QueryDict: {u'OBJ:138': [u'on'], u'Client': [u'1'], u'speed': [u'10000'], u'po': [u'1'], u'id': [u'1']}>,
  629. COOKIES:{'csrftoken': 'MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr',
  630. 'sessionid': 'a82b0648e662c76cd1f0d3915037f9ad'},
  631. META:{'CONTENT_LENGTH': '43',
  632. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  633. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  634. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  635. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  636. 'HTTP_CACHE_CONTROL': 'max-age=0',
  637. 'HTTP_CONNECTION': 'keep-alive',
  638. 'HTTP_COOKIE': 'csrftoken=MlqYBfD9wzLU97XKFIEtTGXMRm16MQyr; sessionid=a82b0648e662c76cd1f0d3915037f9ad',
  639. 'HTTP_HOST': '10.100.100.6:8000',
  640. 'HTTP_ORIGIN': 'http://10.100.100.6:8000',
  641. 'HTTP_REFERER': 'http://10.100.100.6:8000/sa/runsnippet/1/',
  642. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.45 Safari/537.36',
  643. 'PATH_INFO': u'/sa/runsnippet/1/',
  644. 'QUERY_STRING': '',
  645. 'REMOTE_ADDR': '10.100.100.101',
  646. 'REQUEST_METHOD': 'POST',
  647. 'SCRIPT_NAME': u'',
  648. 'SERVER_NAME': '10.100.100.6',
  649. 'SERVER_PORT': '8000',
  650. 'SERVER_PROTOCOL': 'HTTP/1.1',
  651. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2b09e40>,
  652. 'wsgi.input': <_io.BytesIO object at 0x65f9110>,
  653. 'wsgi.multiprocess': True,
  654. 'wsgi.multithread': False,
  655. 'wsgi.run_once': False,
  656. 'wsgi.url_scheme': 'http',
  657. 'wsgi.version': (1, 0)}>
  658. to_log_api_call = False
  659. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  660. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  661. kwargs = {'snippet_id': u'1'}
  662. app = <noc.sa.apps.runsnippet.views.RunSnippetApplication object at 0x50a2650>
  663. ------------------------------------------------------------------------
  664. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement