Guest User

Untitled

a guest
Mar 7th, 2014
134
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UNHANDLED EXCEPTION (2014-03-07 14:33:55.710390)
  2. Working directory: /opt/noc
  3. <class 'django.db.utils.IntegrityError'>
  4. <ManagedObject: gw01.lgvk_2801> object is referenced from <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/lib/nosql.py (Line: 204)
  8. Function: on_ref_delete
  9. 197 :return:
  10. 198 """
  11. 199 if not self.name:
  12. 200 return
  13. 201 doc = self.owner_document
  14. 202 if doc.objects.filter(**{self.name: instance.id}).first() is not None:
  15. 203 raise IntegrityError("%r object is referenced from %r" % (instance,
  16. 204 ==> doc))
  17. 205
  18. 206 def __get__(self, instance, owner):
  19. 207 """Descriptor to allow lazy dereferencing."""
  20. 208 if instance is None:
  21. 209 # Document class being used rather than a document object
  22. 210 return self
  23. Variables:
  24. doc = <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>
  25. self = <noc.lib.nosql.ForeignKeyField object at 0x43ec610>
  26. instance = <ManagedObject: gw01.lgvk_2801>
  27. sender = <class 'noc.sa.models.managedobject.ManagedObject'>
  28. kwargs =
  29. {'signal': <django.dispatch.dispatcher.Signal object at 0x3050a10>,
  30. 'using': 'default'}
  31. ------------------------------------------------------------------------
  32. File: /opt/noc/lib/python2.7/site-packages/django/dispatch/dispatcher.py (Line: 172)
  33. Function: send
  34. 165 Returns a list of tuple pairs [(receiver, response), ... ].
  35. 166 """
  36. 167 responses = []
  37. 168 if not self.receivers:
  38. 169 return responses
  39. 170
  40. 171 for receiver in self._live_receivers(_make_id(sender)):
  41. 172 ==> response = receiver(signal=self, sender=sender, **named)
  42. 173 responses.append((receiver, response))
  43. 174 return responses
  44. 175
  45. 176 def send_robust(self, sender, **named):
  46. 177 """
  47. 178 Send signal from sender to all connected receivers catching errors.
  48. Variables:
  49. named = {'instance': <ManagedObject: gw01.lgvk_2801>, 'using': 'default'}
  50. responses =
  51. [(<function audit_trail_delete at 0x36b56e0>, None),
  52. (<function mo_delete_update_selector_cache at 0x4272cf8>, None)]
  53. self = <django.dispatch.dispatcher.Signal object at 0x3050a10>
  54. receiver =
  55. <bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x43ec610>>
  56. response = None
  57. sender = <class 'noc.sa.models.managedobject.ManagedObject'>
  58. ------------------------------------------------------------------------
  59. File: /opt/noc/lib/python2.7/site-packages/django/db/models/deletion.py (Line: 239)
  60. Function: delete
  61. 232 # end of a transaction.
  62. 233 self.sort()
  63. 234
  64. 235 # send pre_delete signals
  65. 236 for model, obj in self.instances_with_model():
  66. 237 if not model._meta.auto_created:
  67. 238 signals.pre_delete.send(
  68. 239 ==> sender=model, instance=obj, using=self.using
  69. 240 )
  70. 241
  71. 242 # update fields
  72. 243 for model, instances_for_fieldvalues in self.field_updates.iteritems():
  73. 244 query = sql.UpdateQuery(model)
  74. 245 for (field, value), instances in instances_for_fieldvalues.iteritems():
  75. Variables:
  76. instances = set([<Config: config/gw01.lgvk>])
  77. model = <class 'noc.sa.models.managedobject.ManagedObject'>
  78. obj = <ManagedObject: gw01.lgvk_2801>
  79. self = <django.db.models.deletion.Collector object at 0x5e10810>
  80. ------------------------------------------------------------------------
  81. File: /opt/noc/lib/python2.7/site-packages/django/db/models/deletion.py (Line: 61)
  82. Function: decorated
  83. 54 def decorated(self, *args, **kwargs):
  84. 55 if not transaction.is_managed(using=self.using):
  85. 56 transaction.enter_transaction_management(using=self.using)
  86. 57 forced_managed = True
  87. 58 else:
  88. 59 forced_managed = False
  89. 60 try:
  90. 61 ==> func(self, *args, **kwargs)
  91. 62 if forced_managed:
  92. 63 transaction.commit(using=self.using)
  93. 64 else:
  94. 65 transaction.commit_unless_managed(using=self.using)
  95. 66 finally:
  96. 67 if forced_managed:
  97. Variables:
  98. self = <django.db.models.deletion.Collector object at 0x5e10810>
  99. kwargs = {}
  100. func = <function delete at 0x3079ed8>
  101. args = ()
  102. forced_managed = False
  103. ------------------------------------------------------------------------
  104. File: /opt/noc/lib/python2.7/site-packages/django/db/models/query.py (Line: 511)
  105. Function: delete
  106. 504 # Disable non-supported fields.
  107. 505 del_query.query.select_for_update = False
  108. 506 del_query.query.select_related = False
  109. 507 del_query.query.clear_ordering()
  110. 508
  111. 509 collector = Collector(using=del_query.db)
  112. 510 collector.collect(del_query)
  113. 511 ==> collector.delete()
  114. 512
  115. 513 # Clear the result cache, in case this QuerySet gets reused.
  116. 514 self._result_cache = None
  117. 515 delete.alters_data = True
  118. 516
  119. 517 def update(self, **kwargs):
  120. Variables:
  121. self = [<ManagedObject: gw01.lgvk_2801>]
  122. collector = <django.db.models.deletion.Collector object at 0x5e10810>
  123. del_query = [<ManagedObject: gw01.lgvk_2801>]
  124. ------------------------------------------------------------------------
  125. File: /opt/noc/lib/python2.7/site-packages/django/contrib/admin/actions.py (Line: 47)
  126. Function: delete_selected
  127. 40 if perms_needed:
  128. 41 raise PermissionDenied
  129. 42 n = queryset.count()
  130. 43 if n:
  131. 44 for obj in queryset:
  132. 45 obj_display = force_unicode(obj)
  133. 46 modeladmin.log_deletion(request, obj, obj_display)
  134. 47 ==> queryset.delete()
  135. 48 modeladmin.message_user(request, _("Successfully deleted %(count)d %(items)s.") % {
  136. 49 "count": n, "items": model_ngettext(modeladmin.opts, n)
  137. 50 })
  138. 51 # Return None to display the change list page again.
  139. 52 return None
  140. 53
  141. Variables:
  142. obj_display = u'gw01.lgvk_2801'
  143. obj = <ManagedObject: gw01.lgvk_2801>
  144. queryset = [<ManagedObject: gw01.lgvk_2801>]
  145. deletable_objects =
  146. [u'\u041e\u0431\u044a\u0435\u043a\u0442: gw01.lgvk_2801',
  147. [u'Managed Object Attribute: gw01.lgvk_2801: image',
  148. u'Managed Object Attribute: gw01.lgvk_2801: platform',
  149. u'Managed Object Attribute: gw01.lgvk_2801: vendor',
  150. u'Managed Object Attribute: gw01.lgvk_2801: version',
  151. u'Config: config/gw01.lgvk']]
  152. request =
  153. <WSGIRequest
  154. path:/sa/managedobject/,
  155. GET:<QueryDict: {}>,
  156. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  157. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  158. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  159. META:{'CONTENT_LENGTH': '103',
  160. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  161. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  162. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  163. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  164. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  165. 'HTTP_CACHE_CONTROL': 'max-age=0',
  166. 'HTTP_CONNECTION': 'close',
  167. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  168. 'HTTP_HOST': '172.16.0.13:8000',
  169. 'HTTP_ORIGIN': 'http://noc.local.dt',
  170. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  171. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  172. 'PATH_INFO': u'/sa/managedobject/',
  173. 'QUERY_STRING': '',
  174. 'REMOTE_ADDR': '172.16.0.13',
  175. 'REQUEST_METHOD': 'POST',
  176. 'SCRIPT_NAME': u'',
  177. 'SERVER_NAME': '172.16.0.13',
  178. 'SERVER_PORT': '8000',
  179. 'SERVER_PROTOCOL': 'HTTP/1.0',
  180. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  181. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  182. 'wsgi.multiprocess': True,
  183. 'wsgi.multithread': False,
  184. 'wsgi.run_once': False,
  185. 'wsgi.url_scheme': 'http',
  186. 'wsgi.version': (1, 0)}>
  187. n = 1
  188. perms_needed = set([])
  189. modeladmin = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x50a2090>
  190. app_label = 'sa'
  191. using = 'default'
  192. protected = []
  193. opts = <Options for ManagedObject>
  194. ------------------------------------------------------------------------
  195. File: /opt/noc/lib/python2.7/site-packages/django/contrib/admin/options.py (Line: 908)
  196. Function: response_action
  197. 901 self.message_user(request, msg)
  198. 902 return None
  199. 903
  200. 904 if not select_across:
  201. 905 # Perform the action only on the selected objects
  202. 906 queryset = queryset.filter(pk__in=selected)
  203. 907
  204. 908 ==> response = func(self, request, queryset)
  205. 909
  206. 910 # Actions may return an HttpResponse, which will be used as the
  207. 911 # response from the POST. If not, we'll be a good little HTTP
  208. 912 # citizen and redirect back to the changelist page.
  209. 913 if isinstance(response, HttpResponse):
  210. 914 return response
  211. Variables:
  212. action_index = 0
  213. description = <django.utils.functional.__proxy__ object at 0x346c650>
  214. queryset = [<ManagedObject: gw01.lgvk_2801>]
  215. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x50a2090>
  216. selected = [u'3']
  217. action_form = <django.contrib.admin.helpers.ActionForm object at 0x5a2bd10>
  218. request =
  219. <WSGIRequest
  220. path:/sa/managedobject/,
  221. GET:<QueryDict: {}>,
  222. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  223. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  224. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  225. META:{'CONTENT_LENGTH': '103',
  226. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  227. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  228. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  229. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  230. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  231. 'HTTP_CACHE_CONTROL': 'max-age=0',
  232. 'HTTP_CONNECTION': 'close',
  233. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  234. 'HTTP_HOST': '172.16.0.13:8000',
  235. 'HTTP_ORIGIN': 'http://noc.local.dt',
  236. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  237. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  238. 'PATH_INFO': u'/sa/managedobject/',
  239. 'QUERY_STRING': '',
  240. 'REMOTE_ADDR': '172.16.0.13',
  241. 'REQUEST_METHOD': 'POST',
  242. 'SCRIPT_NAME': u'',
  243. 'SERVER_NAME': '172.16.0.13',
  244. 'SERVER_PORT': '8000',
  245. 'SERVER_PROTOCOL': 'HTTP/1.0',
  246. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  247. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  248. 'wsgi.multiprocess': True,
  249. 'wsgi.multithread': False,
  250. 'wsgi.run_once': False,
  251. 'wsgi.url_scheme': 'http',
  252. 'wsgi.version': (1, 0)}>
  253. select_across = False
  254. func = <function delete_selected at 0x3468f50>
  255. action = u'delete_selected'
  256. data =
  257. <QueryDict: {u'action': [u'delete_selected', u'delete_selected'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>
  258. name = 'delete_selected'
  259. ------------------------------------------------------------------------
  260. File: /opt/noc/lib/python2.7/site-packages/django/contrib/admin/options.py (Line: 1169)
  261. Function: changelist_view
  262. 1162 action_failed = True
  263. 1163
  264. 1164 # Actions with confirmation
  265. 1165 if (actions and request.method == 'POST' and
  266. 1166 helpers.ACTION_CHECKBOX_NAME in request.POST and
  267. 1167 'index' not in request.POST and '_save' not in request.POST):
  268. 1168 if selected:
  269. 1169 ==> response = self.response_action(request, queryset=cl.get_query_set(request))
  270. 1170 if response:
  271. 1171 return response
  272. 1172 else:
  273. 1173 action_failed = True
  274. 1174
  275. 1175 # If we're allowing changelist editing, we need to construct a formset
  276. Variables:
  277. action_failed = False
  278. cl = <django.contrib.admin.views.main.ChangeList object at 0x5a4f2d0>
  279. ChangeList = <class 'django.contrib.admin.views.main.ChangeList'>
  280. selected = [u'3']
  281. request =
  282. <WSGIRequest
  283. path:/sa/managedobject/,
  284. GET:<QueryDict: {}>,
  285. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  286. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  287. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  288. META:{'CONTENT_LENGTH': '103',
  289. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  290. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  291. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  292. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  293. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  294. 'HTTP_CACHE_CONTROL': 'max-age=0',
  295. 'HTTP_CONNECTION': 'close',
  296. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  297. 'HTTP_HOST': '172.16.0.13:8000',
  298. 'HTTP_ORIGIN': 'http://noc.local.dt',
  299. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  300. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  301. 'PATH_INFO': u'/sa/managedobject/',
  302. 'QUERY_STRING': '',
  303. 'REMOTE_ADDR': '172.16.0.13',
  304. 'REQUEST_METHOD': 'POST',
  305. 'SCRIPT_NAME': u'',
  306. 'SERVER_NAME': '172.16.0.13',
  307. 'SERVER_PORT': '8000',
  308. 'SERVER_PROTOCOL': 'HTTP/1.0',
  309. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  310. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  311. 'wsgi.multiprocess': True,
  312. 'wsgi.multithread': False,
  313. 'wsgi.run_once': False,
  314. 'wsgi.url_scheme': 'http',
  315. 'wsgi.version': (1, 0)}>
  316. actions =
  317. {'delete_selected': (<function delete_selected at 0x3468f50>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x346c650>), 'export_selected_csv': (<function admin_csv_export at 0x4c462a8>, 'export_selected_csv', 'Export selected %(verbose_name_plural)s to CSV'), 'test_access': (<unbound method ManagedObjectAdmin.test_access>, 'test_access', u'Test selected object access'), 'bulk_change_activator': (<unbound method ManagedObjectAdmin.bulk_change_activator>, 'bulk_change_activator', u'Change activator for selected objects'), 'reschedule_discovery': (<unbound method ManagedObjectAdmin.reschedule_discovery>, 'reschedule_discovery', u'Run discovery now'), 'apply_config_filters': (<unbound method ManagedObjectAdmin.apply_config_filters>, 'apply_config_filters', u'Apply Config Filters')}
  318. app_label = 'sa'
  319. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x50a2090>
  320. list_display =
  321. ['action_checkbox',
  322. 'name',
  323. <function object_status at 0x5093de8>,
  324. <function alarms at 0x5093e60>,
  325. <function profile at 0x5093cf8>,
  326. 'object_profile',
  327. 'vrf',
  328. 'address',
  329. 'vc_domain',
  330. <function domain_activator at 0x5093ed8>,
  331. 'description',
  332. 'repo_path',
  333. <function action_links at 0x50379b0>]
  334. list_display_links = ['name']
  335. extra_context =
  336. {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>}
  337. ERROR_FLAG = 'e'
  338. opts = <Options for ManagedObject>
  339. ------------------------------------------------------------------------
  340. File: /opt/noc/lib/python2.7/site-packages/django/utils/decorators.py (Line: 21)
  341. Function: bound_func
  342. 14 """
  343. 15 # 'func' is a function at the time it is passed to _dec, but will eventually
  344. 16 # be a method of the class it is defined it.
  345. 17 def _dec(func):
  346. 18 def _wrapper(self, *args, **kwargs):
  347. 19 @decorator
  348. 20 def bound_func(*args2, **kwargs2):
  349. 21 ==> return func(self, *args2, **kwargs2)
  350. 22 # bound_func has the signature that 'decorator' expects i.e. no
  351. 23 # 'self' argument, but it is a closure over self so it can call
  352. 24 # 'func' correctly.
  353. 25 return bound_func(*args, **kwargs)
  354. 26 # In case 'decorator' adds attributes to the function it decorates, we
  355. 27 # want to copy those. We don't have access to bound_func in this scope,
  356. Variables:
  357. args2 =
  358. (<WSGIRequest
  359. path:/sa/managedobject/,
  360. GET:<QueryDict: {}>,
  361. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  362. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  363. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  364. META:{'CONTENT_LENGTH': '103',
  365. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  366. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  367. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  368. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  369. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  370. 'HTTP_CACHE_CONTROL': 'max-age=0',
  371. 'HTTP_CONNECTION': 'close',
  372. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  373. 'HTTP_HOST': '172.16.0.13:8000',
  374. 'HTTP_ORIGIN': 'http://noc.local.dt',
  375. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  376. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  377. 'PATH_INFO': u'/sa/managedobject/',
  378. 'QUERY_STRING': '',
  379. 'REMOTE_ADDR': '172.16.0.13',
  380. 'REQUEST_METHOD': 'POST',
  381. 'SCRIPT_NAME': u'',
  382. 'SERVER_NAME': '172.16.0.13',
  383. 'SERVER_PORT': '8000',
  384. 'SERVER_PROTOCOL': 'HTTP/1.0',
  385. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  386. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  387. 'wsgi.multiprocess': True,
  388. 'wsgi.multithread': False,
  389. 'wsgi.run_once': False,
  390. 'wsgi.url_scheme': 'http',
  391. 'wsgi.version': (1, 0)}>,
  392. {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>})
  393. func = <function changelist_view at 0x3468488>
  394. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x50a2090>
  395. kwargs2 = {}
  396. ------------------------------------------------------------------------
  397. File: /opt/noc/lib/python2.7/site-packages/django/utils/decorators.py (Line: 91)
  398. Function: _wrapped_view
  399. 84 if result is not None:
  400. 85 return result
  401. 86 if hasattr(middleware, 'process_view'):
  402. 87 result = middleware.process_view(request, view_func, args, kwargs)
  403. 88 if result is not None:
  404. 89 return result
  405. 90 try:
  406. 91 ==> response = view_func(request, *args, **kwargs)
  407. 92 except Exception, e:
  408. 93 if hasattr(middleware, 'process_exception'):
  409. 94 result = middleware.process_exception(request, e)
  410. 95 if result is not None:
  411. 96 return result
  412. 97 raise
  413. Variables:
  414. e =
  415. IntegrityError("<ManagedObject: gw01.lgvk_2801> object is referenced from <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>",)
  416. middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x3410650>
  417. args =
  418. ({'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>},)
  419. request =
  420. <WSGIRequest
  421. path:/sa/managedobject/,
  422. GET:<QueryDict: {}>,
  423. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  424. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  425. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  426. META:{'CONTENT_LENGTH': '103',
  427. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  428. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  429. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  430. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  431. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  432. 'HTTP_CACHE_CONTROL': 'max-age=0',
  433. 'HTTP_CONNECTION': 'close',
  434. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  435. 'HTTP_HOST': '172.16.0.13:8000',
  436. 'HTTP_ORIGIN': 'http://noc.local.dt',
  437. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  438. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  439. 'PATH_INFO': u'/sa/managedobject/',
  440. 'QUERY_STRING': '',
  441. 'REMOTE_ADDR': '172.16.0.13',
  442. 'REQUEST_METHOD': 'POST',
  443. 'SCRIPT_NAME': u'',
  444. 'SERVER_NAME': '172.16.0.13',
  445. 'SERVER_PORT': '8000',
  446. 'SERVER_PROTOCOL': 'HTTP/1.0',
  447. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  448. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  449. 'wsgi.multiprocess': True,
  450. 'wsgi.multithread': False,
  451. 'wsgi.run_once': False,
  452. 'wsgi.url_scheme': 'http',
  453. 'wsgi.version': (1, 0)}>
  454. result = None
  455. kwargs = {}
  456. view_func = <function bound_func at 0x5b30398>
  457. ------------------------------------------------------------------------
  458. File: /opt/noc/lib/python2.7/site-packages/django/utils/decorators.py (Line: 25)
  459. Function: _wrapper
  460. 18 def _wrapper(self, *args, **kwargs):
  461. 19 @decorator
  462. 20 def bound_func(*args2, **kwargs2):
  463. 21 return func(self, *args2, **kwargs2)
  464. 22 # bound_func has the signature that 'decorator' expects i.e. no
  465. 23 # 'self' argument, but it is a closure over self so it can call
  466. 24 # 'func' correctly.
  467. 25 ==> return bound_func(*args, **kwargs)
  468. 26 # In case 'decorator' adds attributes to the function it decorates, we
  469. 27 # want to copy those. We don't have access to bound_func in this scope,
  470. 28 # but we can cheat by using it on a dummy function.
  471. 29 @decorator
  472. 30 def dummy(*args, **kwargs):
  473. 31 pass
  474. Variables:
  475. self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x50a2090>
  476. args =
  477. (<WSGIRequest
  478. path:/sa/managedobject/,
  479. GET:<QueryDict: {}>,
  480. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  481. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  482. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  483. META:{'CONTENT_LENGTH': '103',
  484. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  485. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  486. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  487. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  488. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  489. 'HTTP_CACHE_CONTROL': 'max-age=0',
  490. 'HTTP_CONNECTION': 'close',
  491. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  492. 'HTTP_HOST': '172.16.0.13:8000',
  493. 'HTTP_ORIGIN': 'http://noc.local.dt',
  494. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  495. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  496. 'PATH_INFO': u'/sa/managedobject/',
  497. 'QUERY_STRING': '',
  498. 'REMOTE_ADDR': '172.16.0.13',
  499. 'REQUEST_METHOD': 'POST',
  500. 'SCRIPT_NAME': u'',
  501. 'SERVER_NAME': '172.16.0.13',
  502. 'SERVER_PORT': '8000',
  503. 'SERVER_PROTOCOL': 'HTTP/1.0',
  504. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  505. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  506. 'wsgi.multiprocess': True,
  507. 'wsgi.multithread': False,
  508. 'wsgi.run_once': False,
  509. 'wsgi.url_scheme': 'http',
  510. 'wsgi.version': (1, 0)}>,
  511. {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>})
  512. bound_func = <function bound_func at 0x5b30410>
  513. func = <function changelist_view at 0x3468488>
  514. kwargs = {}
  515. decorator = <function csrf_protect at 0x3454848>
  516. ------------------------------------------------------------------------
  517. File: /opt/noc/lib/app/modelapplication.py (Line: 141)
  518. Function: view_changelist
  519. 134 self.model._meta.object_name.lower())
  520. 135
  521. 136 @view(url=r"^$", url_name="admin:%s_%s_changelist", access=HasPerm("change"),
  522. 137 menu=get_menu)
  523. 138 def view_changelist(self, request, extra_context=None):
  524. 139 """Display changelist"""
  525. 140 return self.admin.changelist_view(request,
  526. 141 ==> self.get_context(extra_context))
  527. 142
  528. 143 @view(url=r"^add/$", url_name="admin:%s_%s_add", access=HasPerm("add"))
  529. 144 def view_add(self, request, form_url="", extra_context=None):
  530. 145 """Display add form"""
  531. 146 return self.admin.add_view(
  532. 147 request,
  533. Variables:
  534. self =
  535. <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>
  536. extra_context = None
  537. request =
  538. <WSGIRequest
  539. path:/sa/managedobject/,
  540. GET:<QueryDict: {}>,
  541. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  542. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  543. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  544. META:{'CONTENT_LENGTH': '103',
  545. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  546. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  547. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  548. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  549. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  550. 'HTTP_CACHE_CONTROL': 'max-age=0',
  551. 'HTTP_CONNECTION': 'close',
  552. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  553. 'HTTP_HOST': '172.16.0.13:8000',
  554. 'HTTP_ORIGIN': 'http://noc.local.dt',
  555. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  556. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  557. 'PATH_INFO': u'/sa/managedobject/',
  558. 'QUERY_STRING': '',
  559. 'REMOTE_ADDR': '172.16.0.13',
  560. 'REQUEST_METHOD': 'POST',
  561. 'SCRIPT_NAME': u'',
  562. 'SERVER_NAME': '172.16.0.13',
  563. 'SERVER_PORT': '8000',
  564. 'SERVER_PROTOCOL': 'HTTP/1.0',
  565. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  566. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  567. 'wsgi.multiprocess': True,
  568. 'wsgi.multithread': False,
  569. 'wsgi.run_once': False,
  570. 'wsgi.url_scheme': 'http',
  571. 'wsgi.version': (1, 0)}>
  572. ------------------------------------------------------------------------
  573. File: /opt/noc/lib/app/site.py (Line: 232)
  574. Function: inner
  575. 225 for k, v in request.POST.lists())
  576. 226 elif request.method == "GET":
  577. 227 a = dict((k, v[0] if len(v) == 1 else v)
  578. 228 for k, v in request.GET.lists())
  579. 229 logging.debug("API %s %s %s" % (request.method,
  580. 230 request.path, a))
  581. 231 # Call handler
  582. 232 ==> r = v(request, *args, **kwargs)
  583. 233 # Dump SQL statements
  584. 234 if self.log_sql_statements:
  585. 235 from django.db import connections
  586. 236 tsc = 0
  587. 237 sc = defaultdict(int)
  588. 238 for conn in connections.all():
  589. Variables:
  590. args = ()
  591. view_map =
  592. {'DELETE': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>>,
  593. 'GET': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>>,
  594. 'POST': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>>,
  595. 'PUT': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>>}
  596. Form = <class 'django.forms.forms.Form'>
  597. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  598. self = <noc.lib.app.site.Site object at 0x32d3510>
  599. v =
  600. <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>>
  601. request =
  602. <WSGIRequest
  603. path:/sa/managedobject/,
  604. GET:<QueryDict: {}>,
  605. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'3'], u'csrfmiddlewaretoken': [u'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5'], u'post': [u'yes']}>,
  606. COOKIES:{'csrftoken': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  607. 'sessionid': 'b9bdca7962e1bc5466e780e6d839b3d7'},
  608. META:{'CONTENT_LENGTH': '103',
  609. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  610. 'CSRF_COOKIE': 'E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  611. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  612. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  613. 'HTTP_ACCEPT_LANGUAGE': 'ru,en-US;q=0.8,en;q=0.6',
  614. 'HTTP_CACHE_CONTROL': 'max-age=0',
  615. 'HTTP_CONNECTION': 'close',
  616. 'HTTP_COOKIE': 'sessionid=b9bdca7962e1bc5466e780e6d839b3d7; csrftoken=E7lAvk86EErHwz5Xtgv2jmQ49K5uv6x5',
  617. 'HTTP_HOST': '172.16.0.13:8000',
  618. 'HTTP_ORIGIN': 'http://noc.local.dt',
  619. 'HTTP_REFERER': 'http://noc.local.dt/sa/managedobject/',
  620. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',
  621. 'PATH_INFO': u'/sa/managedobject/',
  622. 'QUERY_STRING': '',
  623. 'REMOTE_ADDR': '172.16.0.13',
  624. 'REQUEST_METHOD': 'POST',
  625. 'SCRIPT_NAME': u'',
  626. 'SERVER_NAME': '172.16.0.13',
  627. 'SERVER_PORT': '8000',
  628. 'SERVER_PROTOCOL': 'HTTP/1.0',
  629. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2a98e40>,
  630. 'wsgi.input': <_io.BytesIO object at 0x552bf50>,
  631. 'wsgi.multiprocess': True,
  632. 'wsgi.multithread': False,
  633. 'wsgi.run_once': False,
  634. 'wsgi.url_scheme': 'http',
  635. 'wsgi.version': (1, 0)}>
  636. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  637. to_log_api_call = False
  638. kwargs = {}
  639. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  640. app =
  641. <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x50a2050>
  642. ------------------------------------------------------------------------
  643. END OF TRACEBACK
RAW Paste Data