Advertisement
Guest User

Untitled

a guest
Apr 16th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.58 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-04-16 14:07:12.815462)
  2. Working directory: /usr/local/noc
  3. <class 'django.db.utils.IntegrityError'>
  4. <ManagedObject: 2960-KIT-LC-Office> object is referenced from <class 'noc.inv.models.Interface'>
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /usr/local/noc/lib/nosql.py (Line: 145)
  8. Function: on_ref_delete
  9. 138 :return:
  10. 139 """
  11. 140 if not self.name:
  12. 141 return
  13. 142 doc = self.owner_document
  14. 143 if doc.objects.filter(**{self.name: instance.id}).first() is not None:
  15. 144 raise IntegrityError("%r object is referenced from %r" % (instance,
  16. 145 ==> doc))
  17. 146
  18. 147 def __get__(self, instance, owner):
  19. 148 """Descriptor to allow lazy dereferencing."""
  20. 149 if instance is None:
  21. 150 # Document class being used rather than a document object
  22. 151 return self
  23. Variables:
  24. doc = <class 'noc.inv.models.Interface'>
  25. self = <noc.lib.nosql.ForeignKeyField object at 0x2a4f92cc>
  26. instance = <ManagedObject: 2960-KIT-LC-Office>
  27. sender = <class 'noc.sa.models.ManagedObject'>
  28. kwargs = {'using': 'default', 'signal': <django.dispatch.dispatcher.Signal object at 0x298e790c>}
  29. ------------------------------------------------------------------------
  30. File: /usr/local/noc/contrib/lib/django/dispatch/dispatcher.py (Line: 172)
  31. Function: send
  32. 165 Returns a list of tuple pairs [(receiver, response), ... ].
  33. 166 """
  34. 167 responses = []
  35. 168 if not self.receivers:
  36. 169 return responses
  37. 170
  38. 171 for receiver in self._live_receivers(_make_id(sender)):
  39. 172 ==> response = receiver(signal=self, sender=sender, **named)
  40. 173 responses.append((receiver, response))
  41. 174 return responses
  42. 175
  43. 176 def send_robust(self, sender, **named):
  44. 177 """
  45. 178 Send signal from sender to all connected receivers catching errors.
  46. Variables:
  47. named = {'instance': <ManagedObject: 2960-KIT-LC-Office>, 'using': 'default'}
  48. responses = [(<function audit_trail_delete at 0x2a0b3e64>, None), (<bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x2a4f914c>>, None)]
  49. self = <django.dispatch.dispatcher.Signal object at 0x298e790c>
  50. receiver = <bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x2a4f92cc>>
  51. response = None
  52. sender = <class 'noc.sa.models.ManagedObject'>
  53. ------------------------------------------------------------------------
  54. File: /usr/local/noc/contrib/lib/django/db/models/deletion.py (Line: 230)
  55. Function: delete
  56. 223 # end of a transaction.
  57. 224 self.sort()
  58. 225
  59. 226 # send pre_delete signals
  60. 227 for model, obj in self.instances_with_model():
  61. 228 if not model._meta.auto_created:
  62. 229 signals.pre_delete.send(
  63. 230 ==> sender=model, instance=obj, using=self.using
  64. 231 )
  65. 232
  66. 233 # update fields
  67. 234 for model, instances_for_fieldvalues in self.field_updates.iteritems():
  68. 235 query = sql.UpdateQuery(model)
  69. 236 for (field, value), instances in instances_for_fieldvalues.iteritems():
  70. Variables:
  71. instances = set([<Config: config/2960-KIT-LC-Office-config>])
  72. model = <class 'noc.sa.models.ManagedObject'>
  73. obj = <ManagedObject: 2960-KIT-LC-Office>
  74. self = <django.db.models.deletion.Collector object at 0x2b0a2bcc>
  75. ------------------------------------------------------------------------
  76. File: /usr/local/noc/contrib/lib/django/db/models/deletion.py (Line: 63)
  77. Function: decorated
  78. 56 def decorated(self, *args, **kwargs):
  79. 57 if not transaction.is_managed(using=self.using):
  80. 58 transaction.enter_transaction_management(using=self.using)
  81. 59 forced_managed = True
  82. 60 else:
  83. 61 forced_managed = False
  84. 62 try:
  85. 63 ==> func(self, *args, **kwargs)
  86. 64 if forced_managed:
  87. 65 transaction.commit(using=self.using)
  88. 66 else:
  89. 67 transaction.commit_unless_managed(using=self.using)
  90. 68 finally:
  91. 69 if forced_managed:
  92. Variables:
  93. self = <django.db.models.deletion.Collector object at 0x2b0a2bcc>
  94. kwargs = {}
  95. func = <function delete at 0x29870aac>
  96. args = ()
  97. forced_managed = False
  98. ------------------------------------------------------------------------
  99. File: /usr/local/noc/contrib/lib/django/db/models/query.py (Line: 445)
  100. Function: delete
  101. 438
  102. 439 # Disable non-supported fields.
  103. 440 del_query.query.select_related = False
  104. 441 del_query.query.clear_ordering()
  105. 442
  106. 443 collector = Collector(using=del_query.db)
  107. 444 collector.collect(del_query)
  108. 445 ==> collector.delete()
  109. 446
  110. 447 # Clear the result cache, in case this QuerySet gets reused.
  111. 448 self._result_cache = None
  112. 449 delete.alters_data = True
  113. 450
  114. 451 def update(self, **kwargs):
  115. Variables:
  116. self = [<ManagedObject: 2960-KIT-LC-Office>]
  117. collector = <django.db.models.deletion.Collector object at 0x2b0a2bcc>
  118. del_query = [<ManagedObject: 2960-KIT-LC-Office>]
  119. ------------------------------------------------------------------------
  120. File: /usr/local/noc/contrib/lib/django/contrib/admin/actions.py (Line: 48)
  121. Function: delete_selected
  122. 41 if perms_needed:
  123. 42 raise PermissionDenied
  124. 43 n = queryset.count()
  125. 44 if n:
  126. 45 for obj in queryset:
  127. 46 obj_display = force_unicode(obj)
  128. 47 modeladmin.log_deletion(request, obj, obj_display)
  129. 48 ==> queryset.delete()
  130. 49 modeladmin.message_user(request, _("Successfully deleted %(count)d %(items)s.") % {
  131. 50 "count": n, "items": model_ngettext(modeladmin.opts, n)
  132. 51 })
  133. 52 # Return None to display the change list page again.
  134. 53 return None
  135. 54
  136. Variables:
  137. obj_display = u'2960-KIT-LC-Office'
  138. obj = <ManagedObject: 2960-KIT-LC-Office>
  139. queryset = [<ManagedObject: 2960-KIT-LC-Office>]
  140. deletable_objects = [u'\u041e\u0431\u044a\u0435\u043a\u0442: 2960-KIT-LC-Office', [u'Map/Reduce Task Data: 285: 2960-KIT-LC-Office Cisco.IOS.has_vlan', u'Map/Reduce Task Data: 256: 2960-KIT-LC-Office Cisco.IOS.has_vlan', u'Map/Reduce Task Data: 314: 2960-KIT-LC-Office Cisco.IOS.has_vlan', u'Config: config/2960-KIT-LC-Office-config']]
  141. request = <WSGIRequest
  142. GET:<QueryDict: {}>,
  143. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  144. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  145. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  146. META:{'CONTENT_LENGTH': '103',
  147. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  148. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  149. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  150. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  151. 'HTTP_CONNECTION': 'close',
  152. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  153. 'HTTP_HOST': '127.0.0.1:8000',
  154. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  155. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  156. 'PATH_INFO': u'/sa/managedobject/',
  157. 'QUERY_STRING': '',
  158. 'REMOTE_ADDR': '127.0.0.1',
  159. 'REQUEST_METHOD': 'POST',
  160. 'SCRIPT_NAME': u'',
  161. 'SERVER_NAME': '127.0.0.1',
  162. 'SERVER_PORT': '8000',
  163. 'SERVER_PROTOCOL': 'HTTP/1.0',
  164. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  165. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  166. 'wsgi.multiprocess': True,
  167. 'wsgi.multithread': False,
  168. 'wsgi.run_once': False,
  169. 'wsgi.url_scheme': 'http',
  170. 'wsgi.version': (1, 0)}>
  171. n = 1
  172. perms_needed = set([])
  173. modeladmin = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
  174. app_label = 'sa'
  175. using = 'default'
  176. protected = []
  177. opts = <Options for ManagedObject>
  178. ------------------------------------------------------------------------
  179. File: /usr/local/noc/contrib/lib/django/contrib/admin/options.py (Line: 836)
  180. Function: response_action
  181. 829 self.message_user(request, msg)
  182. 830 return None
  183. 831
  184. 832 if not select_across:
  185. 833 # Perform the action only on the selected objects
  186. 834 queryset = queryset.filter(pk__in=selected)
  187. 835
  188. 836 ==> response = func(self, request, queryset)
  189. 837
  190. 838 # Actions may return an HttpResponse, which will be used as the
  191. 839 # response from the POST. If not, we'll be a good little HTTP
  192. 840 # citizen and redirect back to the changelist page.
  193. 841 if isinstance(response, HttpResponse):
  194. 842 return response
  195. Variables:
  196. action_index = 0
  197. description = <django.utils.functional.__proxy__ object at 0x2a018dac>
  198. queryset = [<ManagedObject: 2960-KIT-LC-Office>]
  199. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
  200. selected = [u'2']
  201. action_form = <django.contrib.admin.helpers.ActionForm object at 0x2afe1f2c>
  202. request = <WSGIRequest
  203. GET:<QueryDict: {}>,
  204. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  205. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  206. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  207. META:{'CONTENT_LENGTH': '103',
  208. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  209. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  210. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  211. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  212. 'HTTP_CONNECTION': 'close',
  213. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  214. 'HTTP_HOST': '127.0.0.1:8000',
  215. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  216. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  217. 'PATH_INFO': u'/sa/managedobject/',
  218. 'QUERY_STRING': '',
  219. 'REMOTE_ADDR': '127.0.0.1',
  220. 'REQUEST_METHOD': 'POST',
  221. 'SCRIPT_NAME': u'',
  222. 'SERVER_NAME': '127.0.0.1',
  223. 'SERVER_PORT': '8000',
  224. 'SERVER_PROTOCOL': 'HTTP/1.0',
  225. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  226. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  227. 'wsgi.multiprocess': True,
  228. 'wsgi.multithread': False,
  229. 'wsgi.run_once': False,
  230. 'wsgi.url_scheme': 'http',
  231. 'wsgi.version': (1, 0)}>
  232. select_across = False
  233. func = <function delete_selected at 0x2a01a87c>
  234. action = u'delete_selected'
  235. data = <QueryDict: {u'action': [u'delete_selected', u'delete_selected'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>
  236. name = 'delete_selected'
  237. ------------------------------------------------------------------------
  238. File: /usr/local/noc/contrib/lib/django/contrib/admin/options.py (Line: 1095)
  239. Function: changelist_view
  240. 1088 action_failed = True
  241. 1089
  242. 1090 # Actions with confirmation
  243. 1091 if (actions and request.method == 'POST' and
  244. 1092 helpers.ACTION_CHECKBOX_NAME in request.POST and
  245. 1093 'index' not in request.POST and '_save' not in request.POST):
  246. 1094 if selected:
  247. 1095 ==> response = self.response_action(request, queryset=cl.get_query_set())
  248. 1096 if response:
  249. 1097 return response
  250. 1098 else:
  251. 1099 action_failed = True
  252. 1100
  253. 1101 # If we're allowing changelist editing, we need to construct a formset
  254. Variables:
  255. list_display = ['action_checkbox', 'name', <function object_status at 0x2a9da684>, <function alarms at 0x2a9da6bc>, <function profile at 0x2a9da614>, 'vrf', 'address', <function domain_activator at 0x2a9da6f4>, 'description', 'repo_path', <function action_links at 0x2a9d5b1c>, <bound method ManagedObjectApplication.display_tags of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>]
  256. cl = <django.contrib.admin.views.main.ChangeList object at 0x2afc8c6c>
  257. ChangeList = <class 'django.contrib.admin.views.main.ChangeList'>
  258. selected = [u'2']
  259. request = <WSGIRequest
  260. GET:<QueryDict: {}>,
  261. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  262. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  263. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  264. META:{'CONTENT_LENGTH': '103',
  265. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  266. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  267. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  268. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  269. 'HTTP_CONNECTION': 'close',
  270. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  271. 'HTTP_HOST': '127.0.0.1:8000',
  272. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  273. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  274. 'PATH_INFO': u'/sa/managedobject/',
  275. 'QUERY_STRING': '',
  276. 'REMOTE_ADDR': '127.0.0.1',
  277. 'REQUEST_METHOD': 'POST',
  278. 'SCRIPT_NAME': u'',
  279. 'SERVER_NAME': '127.0.0.1',
  280. 'SERVER_PORT': '8000',
  281. 'SERVER_PROTOCOL': 'HTTP/1.0',
  282. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  283. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  284. 'wsgi.multiprocess': True,
  285. 'wsgi.multithread': False,
  286. 'wsgi.run_once': False,
  287. 'wsgi.url_scheme': 'http',
  288. 'wsgi.version': (1, 0)}>
  289. actions = {'bulk_change_activator': (<unbound method ManagedObjectAdmin.bulk_change_activator>, 'bulk_change_activator', u'Change activator for selected objects'), 'export_selected_csv': (<function admin_csv_export at 0x2a7e41b4>, 'export_selected_csv', 'Export selected %(verbose_name_plural)s to CSV'), 'reschedule_discovery': (<unbound method ManagedObjectAdmin.reschedule_discovery>, 'reschedule_discovery', u'Run interface discovery now'), 'test_access': (<unbound method ManagedObjectAdmin.test_access>, 'test_access', u'Test selected object access'), 'delete_selected': (<function delete_selected at 0x2a01a87c>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x2a018dac>)}
  290. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
  291. action_failed = False
  292. app_label = 'sa'
  293. extra_context = {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>}
  294. ERROR_FLAG = 'e'
  295. opts = <Options for ManagedObject>
  296. ------------------------------------------------------------------------
  297. File: /usr/local/noc/contrib/lib/django/utils/decorators.py (Line: 24)
  298. Function: bound_func
  299. 17 """
  300. 18 # 'func' is a function at the time it is passed to _dec, but will eventually
  301. 19 # be a method of the class it is defined it.
  302. 20 def _dec(func):
  303. 21 def _wrapper(self, *args, **kwargs):
  304. 22 @decorator
  305. 23 def bound_func(*args2, **kwargs2):
  306. 24 ==> return func(self, *args2, **kwargs2)
  307. 25 # bound_func has the signature that 'decorator' expects i.e. no
  308. 26 # 'self' argument, but it is a closure over self so it can call
  309. 27 # 'func' correctly.
  310. 28 return bound_func(*args, **kwargs)
  311. 29 # In case 'decorator' adds attributes to the function it decorates, we
  312. 30 # want to copy those. We don't have access to bound_func in this scope,
  313. Variables:
  314. args2 = (<WSGIRequest
  315. GET:<QueryDict: {}>,
  316. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  317. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  318. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  319. META:{'CONTENT_LENGTH': '103',
  320. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  321. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  322. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  323. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  324. 'HTTP_CONNECTION': 'close',
  325. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  326. 'HTTP_HOST': '127.0.0.1:8000',
  327. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  328. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  329. 'PATH_INFO': u'/sa/managedobject/',
  330. 'QUERY_STRING': '',
  331. 'REMOTE_ADDR': '127.0.0.1',
  332. 'REQUEST_METHOD': 'POST',
  333. 'SCRIPT_NAME': u'',
  334. 'SERVER_NAME': '127.0.0.1',
  335. 'SERVER_PORT': '8000',
  336. 'SERVER_PROTOCOL': 'HTTP/1.0',
  337. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  338. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  339. 'wsgi.multiprocess': True,
  340. 'wsgi.multithread': False,
  341. 'wsgi.run_once': False,
  342. 'wsgi.url_scheme': 'http',
  343. 'wsgi.version': (1, 0)}>, {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>})
  344. func = <function changelist_view at 0x2a01a3ac>
  345. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
  346. kwargs2 = {}
  347. ------------------------------------------------------------------------
  348. File: /usr/local/noc/contrib/lib/django/utils/decorators.py (Line: 93)
  349. Function: _wrapped_view
  350. 86 if result is not None:
  351. 87 return result
  352. 88 if hasattr(middleware, 'process_view'):
  353. 89 result = middleware.process_view(request, view_func, args, kwargs)
  354. 90 if result is not None:
  355. 91 return result
  356. 92 try:
  357. 93 ==> response = view_func(request, *args, **kwargs)
  358. 94 except Exception, e:
  359. 95 if hasattr(middleware, 'process_exception'):
  360. 96 result = middleware.process_exception(request, e)
  361. 97 if result is not None:
  362. 98 return result
  363. 99 raise
  364. Variables:
  365. e = IntegrityError("<ManagedObject: 2960-KIT-LC-Office> object is referenced from <class 'noc.inv.models.Interface'>",)
  366. middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x2a00926c>
  367. args = ({'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>},)
  368. request = <WSGIRequest
  369. GET:<QueryDict: {}>,
  370. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  371. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  372. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  373. META:{'CONTENT_LENGTH': '103',
  374. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  375. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  376. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  377. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  378. 'HTTP_CONNECTION': 'close',
  379. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  380. 'HTTP_HOST': '127.0.0.1:8000',
  381. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  382. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  383. 'PATH_INFO': u'/sa/managedobject/',
  384. 'QUERY_STRING': '',
  385. 'REMOTE_ADDR': '127.0.0.1',
  386. 'REQUEST_METHOD': 'POST',
  387. 'SCRIPT_NAME': u'',
  388. 'SERVER_NAME': '127.0.0.1',
  389. 'SERVER_PORT': '8000',
  390. 'SERVER_PROTOCOL': 'HTTP/1.0',
  391. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  392. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  393. 'wsgi.multiprocess': True,
  394. 'wsgi.multithread': False,
  395. 'wsgi.run_once': False,
  396. 'wsgi.url_scheme': 'http',
  397. 'wsgi.version': (1, 0)}>
  398. result = None
  399. kwargs = {}
  400. view_func = <function bound_func at 0x2b12b41c>
  401. ------------------------------------------------------------------------
  402. File: /usr/local/noc/contrib/lib/django/utils/decorators.py (Line: 28)
  403. Function: _wrapper
  404. 21 def _wrapper(self, *args, **kwargs):
  405. 22 @decorator
  406. 23 def bound_func(*args2, **kwargs2):
  407. 24 return func(self, *args2, **kwargs2)
  408. 25 # bound_func has the signature that 'decorator' expects i.e. no
  409. 26 # 'self' argument, but it is a closure over self so it can call
  410. 27 # 'func' correctly.
  411. 28 ==> return bound_func(*args, **kwargs)
  412. 29 # In case 'decorator' adds attributes to the function it decorates, we
  413. 30 # want to copy those. We don't have access to bound_func in this scope,
  414. 31 # but we can cheat by using it on a dummy function.
  415. 32 @decorator
  416. 33 def dummy(*args, **kwargs):
  417. 34 pass
  418. Variables:
  419. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
  420. args = (<WSGIRequest
  421. GET:<QueryDict: {}>,
  422. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  423. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  424. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  425. META:{'CONTENT_LENGTH': '103',
  426. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  427. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  428. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  429. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  430. 'HTTP_CONNECTION': 'close',
  431. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  432. 'HTTP_HOST': '127.0.0.1:8000',
  433. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  434. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  435. 'PATH_INFO': u'/sa/managedobject/',
  436. 'QUERY_STRING': '',
  437. 'REMOTE_ADDR': '127.0.0.1',
  438. 'REQUEST_METHOD': 'POST',
  439. 'SCRIPT_NAME': u'',
  440. 'SERVER_NAME': '127.0.0.1',
  441. 'SERVER_PORT': '8000',
  442. 'SERVER_PROTOCOL': 'HTTP/1.0',
  443. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  444. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  445. 'wsgi.multiprocess': True,
  446. 'wsgi.multithread': False,
  447. 'wsgi.run_once': False,
  448. 'wsgi.url_scheme': 'http',
  449. 'wsgi.version': (1, 0)}>, {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>})
  450. bound_func = <function bound_func at 0x2b12b64c>
  451. func = <function changelist_view at 0x2a01a3ac>
  452. kwargs = {}
  453. decorator = <function csrf_protect at 0x2a0175dc>
  454. ------------------------------------------------------------------------
  455. File: /usr/local/noc/lib/app/modelapplication.py (Line: 141)
  456. Function: view_changelist
  457. 134 self.model._meta.object_name.lower())
  458. 135
  459. 136 @view(url=r"^$", url_name="changelist", access=HasPerm("change"),
  460. 137 menu=get_menu)
  461. 138 def view_changelist(self, request, extra_context=None):
  462. 139 """Display changelist"""
  463. 140 return self.admin.changelist_view(request,
  464. 141 ==> self.get_context(extra_context))
  465. 142
  466. 143 @view(url=r"^add/$", url_name="add", access=HasPerm("add"))
  467. 144 def view_add(self, request, form_url="", extra_context=None):
  468. 145 """Display add form"""
  469. 146 return self.admin.add_view(request,
  470. 147 extra_context=self.get_context(extra_context))
  471. Variables:
  472. self = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>
  473. extra_context = None
  474. request = <WSGIRequest
  475. GET:<QueryDict: {}>,
  476. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  477. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  478. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  479. META:{'CONTENT_LENGTH': '103',
  480. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  481. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  482. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  483. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  484. 'HTTP_CONNECTION': 'close',
  485. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  486. 'HTTP_HOST': '127.0.0.1:8000',
  487. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  488. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  489. 'PATH_INFO': u'/sa/managedobject/',
  490. 'QUERY_STRING': '',
  491. 'REMOTE_ADDR': '127.0.0.1',
  492. 'REQUEST_METHOD': 'POST',
  493. 'SCRIPT_NAME': u'',
  494. 'SERVER_NAME': '127.0.0.1',
  495. 'SERVER_PORT': '8000',
  496. 'SERVER_PROTOCOL': 'HTTP/1.0',
  497. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  498. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  499. 'wsgi.multiprocess': True,
  500. 'wsgi.multithread': False,
  501. 'wsgi.run_once': False,
  502. 'wsgi.url_scheme': 'http',
  503. 'wsgi.version': (1, 0)}>
  504. ------------------------------------------------------------------------
  505. File: /usr/local/noc/lib/app/site.py (Line: 225)
  506. Function: inner
  507. 218 for k, v in request.POST.lists())
  508. 219 elif request.method == "GET":
  509. 220 a = dict((k, v[0] if len(v) == 1 else v)
  510. 221 for k, v in request.GET.lists())
  511. 222 logging.debug("API %s %s %s" % (request.method,
  512. 223 request.path, a))
  513. 224 # Call handler
  514. 225 ==> r = v(request, *args, **kwargs)
  515. 226 # Dump SQL statements
  516. 227 if self.log_sql_statements:
  517. 228 from django.db import connections
  518. 229 tsc = 0
  519. 230 sc = defaultdict(int)
  520. 231 for conn in connections.all():
  521. Variables:
  522. args = ()
  523. view_map = {'PUT': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>, 'POST': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>, 'GET': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>, 'DELETE': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>}
  524. Form = <class 'django.forms.forms.Form'>
  525. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  526. self = <noc.lib.app.site.Site object at 0x29b62a0c>
  527. v = <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>
  528. request = <WSGIRequest
  529. GET:<QueryDict: {}>,
  530. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
  531. COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
  532. 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
  533. META:{'CONTENT_LENGTH': '103',
  534. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  535. 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
  536. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  537. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  538. 'HTTP_CONNECTION': 'close',
  539. 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
  540. 'HTTP_HOST': '127.0.0.1:8000',
  541. 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
  542. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
  543. 'PATH_INFO': u'/sa/managedobject/',
  544. 'QUERY_STRING': '',
  545. 'REMOTE_ADDR': '127.0.0.1',
  546. 'REQUEST_METHOD': 'POST',
  547. 'SCRIPT_NAME': u'',
  548. 'SERVER_NAME': '127.0.0.1',
  549. 'SERVER_PORT': '8000',
  550. 'SERVER_PROTOCOL': 'HTTP/1.0',
  551. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
  552. 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
  553. 'wsgi.multiprocess': True,
  554. 'wsgi.multithread': False,
  555. 'wsgi.run_once': False,
  556. 'wsgi.url_scheme': 'http',
  557. 'wsgi.version': (1, 0)}>
  558. to_log_api_call = False
  559. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  560. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  561. kwargs = {}
  562. app = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>
  563. ------------------------------------------------------------------------
  564. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement