Advertisement
Guest User

Untitled

a guest
Apr 17th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 30.76 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-04-17 11:21:24.267752)
  2. Working directory: /opt/noc
  3. <class 'django.db.utils.IntegrityError'>
  4. <ManagedObject: 7fon-2950> object is referenced from <class 'noc.inv.models.Interface'>
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/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 0x25d0690>
  26.            instance = <ManagedObject: 7fon-2950>
  27.              sender = <class 'noc.sa.models.ManagedObject'>
  28.              kwargs = {'using': 'default', 'signal': <django.dispatch.dispatcher.Signal object at 0x160ca50>}
  29. ------------------------------------------------------------------------
  30. File: /opt/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: 7fon-2950>, 'using': 'default'}
  48.           responses = [(<function audit_trail_delete at 0x1a96140>, None), (<bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x25d03d0>>, None)]
  49.                self = <django.dispatch.dispatcher.Signal object at 0x160ca50>
  50.            receiver = <bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x25d0690>>
  51.            response = None
  52.              sender = <class 'noc.sa.models.ManagedObject'>
  53. ------------------------------------------------------------------------
  54. File: /opt/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([<ManagedObject: 7fon-2950>])
  72.               model = <class 'noc.sa.models.ManagedObject'>
  73.                 obj = <ManagedObject: 7fon-2950>
  74.                self = <django.db.models.deletion.Collector object at 0x3ae4610>
  75. ------------------------------------------------------------------------
  76. File: /opt/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 0x3ae4610>
  94.              kwargs = {}
  95.                func = <function delete at 0x1524cf8>
  96.                args = ()
  97.      forced_managed = False
  98. ------------------------------------------------------------------------
  99. File: /opt/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: 7fon-2950>]
  117.           collector = <django.db.models.deletion.Collector object at 0x3ae4610>
  118.           del_query = [<ManagedObject: 7fon-2950>]
  119. ------------------------------------------------------------------------
  120. File: /opt/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'7fon-2950'
  138.                 obj = <ManagedObject: 7fon-2950>
  139.            queryset = [<ManagedObject: 7fon-2950>]
  140.   deletable_objects = [u'\u041e\u0431\u044a\u0435\u043a\u0442: 7fon-2950', [u'Managed Object Attribute: 7fon-2950: cdp', u'Managed Object Attribute: 7fon-2950: image', u'Managed Object Attribute: 7fon-2950: platform', u'Managed Object Attribute: 7fon-2950: vendor', u'Managed Object Attribute: 7fon-2950: version', u'Config: config/7fon-2950.conf']]
  141.             request = <WSGIRequest
  142. GET:<QueryDict: {}>,
  143. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  144. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  145. 'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  146. META:{'CONTENT_LENGTH': '104',
  147. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  148. 'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  149. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  150. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  151. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  152. 'HTTP_CONNECTION': 'close',
  153. 'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  154. 'HTTP_HOST': '127.0.0.1:8000',
  155. 'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  156. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  157. 'PATH_INFO': u'/sa/managedobject/',
  158. 'QUERY_STRING': '',
  159. 'REMOTE_ADDR': '127.0.0.1',
  160. 'REQUEST_METHOD': 'POST',
  161. 'SCRIPT_NAME': u'',
  162. 'SERVER_NAME': '127.0.0.1',
  163. 'SERVER_PORT': '8000',
  164. 'SERVER_PROTOCOL': 'HTTP/1.0',
  165. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  166. 'wsgi.input': <_io.BytesIO object at 0x3651950>,
  167. 'wsgi.multiprocess': True,
  168. 'wsgi.multithread': False,
  169. 'wsgi.run_once': False,
  170. 'wsgi.url_scheme': 'http',
  171. 'wsgi.version': (1, 0)}>
  172.                   n = 1
  173.        perms_needed = set([])
  174.          modeladmin = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2ff1610>
  175.           app_label = 'sa'
  176.               using = 'default'
  177.           protected = []
  178.                opts = <Options for ManagedObject>
  179. ------------------------------------------------------------------------
  180. File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 836)
  181. Function: response_action
  182.  829                     self.message_user(request, msg)
  183.  830                     return None
  184.  831    
  185.  832                 if not select_across:
  186.  833                     # Perform the action only on the selected objects
  187.  834                     queryset = queryset.filter(pk__in=selected)
  188.  835    
  189.  836 ==>             response = func(self, request, queryset)
  190.  837    
  191.  838                 # Actions may return an HttpResponse, which will be used as the
  192.  839                 # response from the POST. If not, we'll be a good little HTTP
  193.  840                 # citizen and redirect back to the changelist page.
  194.  841                 if isinstance(response, HttpResponse):
  195.  842                     return response
  196. Variables:
  197.        action_index = 0
  198.         description = <django.utils.functional.__proxy__ object at 0x172f910>
  199.            queryset = [<ManagedObject: 7fon-2950>]
  200.                self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2ff1610>
  201.            selected = [u'16']
  202.         action_form = <django.contrib.admin.helpers.ActionForm object at 0x3dda250>
  203.             request = <WSGIRequest
  204. GET:<QueryDict: {}>,
  205. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  206. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  207. 'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  208. META:{'CONTENT_LENGTH': '104',
  209. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  210. 'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  211. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  212. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  213. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  214. 'HTTP_CONNECTION': 'close',
  215. 'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  216. 'HTTP_HOST': '127.0.0.1:8000',
  217. 'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  218. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  219. 'PATH_INFO': u'/sa/managedobject/',
  220. 'QUERY_STRING': '',
  221. 'REMOTE_ADDR': '127.0.0.1',
  222. 'REQUEST_METHOD': 'POST',
  223. 'SCRIPT_NAME': u'',
  224. 'SERVER_NAME': '127.0.0.1',
  225. 'SERVER_PORT': '8000',
  226. 'SERVER_PROTOCOL': 'HTTP/1.0',
  227. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  228. 'wsgi.input': <_io.BytesIO object at 0x3651950>,
  229. 'wsgi.multiprocess': True,
  230. 'wsgi.multithread': False,
  231. 'wsgi.run_once': False,
  232. 'wsgi.url_scheme': 'http',
  233. 'wsgi.version': (1, 0)}>
  234.       select_across = False
  235.                func = <function delete_selected at 0x1730230>
  236.              action = u'delete_selected'
  237.                data = <QueryDict: {u'action': [u'delete_selected', u'delete_selected'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>
  238.                name = 'delete_selected'
  239. ------------------------------------------------------------------------
  240. File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 1095)
  241. Function: changelist_view
  242. 1088                     action_failed = True
  243. 1089    
  244. 1090             # Actions with confirmation
  245. 1091             if (actions and request.method == 'POST' and
  246. 1092                     helpers.ACTION_CHECKBOX_NAME in request.POST and
  247. 1093                     'index' not in request.POST and '_save' not in request.POST):
  248. 1094                 if selected:
  249. 1095 ==>                 response = self.response_action(request, queryset=cl.get_query_set())
  250. 1096                     if response:
  251. 1097                         return response
  252. 1098                     else:
  253. 1099                         action_failed = True
  254. 1100    
  255. 1101             # If we're allowing changelist editing, we need to construct a formset
  256. Variables:
  257.        list_display = ['action_checkbox', 'name', <function object_status at 0x2fe1c08>, <function alarms at 0x2fe1c80>, <function profile at 0x2fe1b18>, 'vrf', 'address', <function domain_activator at 0x2fe1cf8>, 'description', 'repo_path', <function action_links at 0x3052500>, <bound method ManagedObjectApplication.display_tags of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>>]
  258.                  cl = <django.contrib.admin.views.main.ChangeList object at 0x3e05fd0>
  259.          ChangeList = <class 'django.contrib.admin.views.main.ChangeList'>
  260.            selected = [u'16']
  261.             request = <WSGIRequest
  262. GET:<QueryDict: {}>,
  263. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  264. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  265. 'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  266. META:{'CONTENT_LENGTH': '104',
  267. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  268. 'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  269. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  270. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  271. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  272. 'HTTP_CONNECTION': 'close',
  273. 'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  274. 'HTTP_HOST': '127.0.0.1:8000',
  275. 'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  276. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  277. 'PATH_INFO': u'/sa/managedobject/',
  278. 'QUERY_STRING': '',
  279. 'REMOTE_ADDR': '127.0.0.1',
  280. 'REQUEST_METHOD': 'POST',
  281. 'SCRIPT_NAME': u'',
  282. 'SERVER_NAME': '127.0.0.1',
  283. 'SERVER_PORT': '8000',
  284. 'SERVER_PROTOCOL': 'HTTP/1.0',
  285. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  286. 'wsgi.input': <_io.BytesIO object at 0x3651950>,
  287. 'wsgi.multiprocess': True,
  288. 'wsgi.multithread': False,
  289. 'wsgi.run_once': False,
  290. 'wsgi.url_scheme': 'http',
  291. 'wsgi.version': (1, 0)}>
  292.             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 0x2c90668>, '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 0x1730230>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x172f910>)}
  293.                self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2ff1610>
  294.       action_failed = False
  295.           app_label = 'sa'
  296.       extra_context = {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>}
  297.          ERROR_FLAG = 'e'
  298.                opts = <Options for ManagedObject>
  299. ------------------------------------------------------------------------
  300. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 24)
  301. Function: bound_func
  302.   17         """
  303.    18         # 'func' is a function at the time it is passed to _dec, but will eventually
  304.    19         # be a method of the class it is defined it.
  305.    20         def _dec(func):
  306.    21             def _wrapper(self, *args, **kwargs):
  307.    22                 @decorator
  308.    23                 def bound_func(*args2, **kwargs2):
  309.    24 ==>                 return func(self, *args2, **kwargs2)
  310.    25                 # bound_func has the signature that 'decorator' expects i.e.  no
  311.    26                 # 'self' argument, but it is a closure over self so it can call
  312.    27                 # 'func' correctly.
  313.    28                 return bound_func(*args, **kwargs)
  314.    29             # In case 'decorator' adds attributes to the function it decorates, we
  315.    30             # want to copy those. We don't have access to bound_func in this scope,
  316. Variables:
  317.                args2 = (<WSGIRequest
  318. GET:<QueryDict: {}>,
  319. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  320. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  321.  'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  322. META:{'CONTENT_LENGTH': '104',
  323.  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  324.  'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  325.  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  326.  'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  327.  'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  328.  'HTTP_CONNECTION': 'close',
  329.  'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  330.  'HTTP_HOST': '127.0.0.1:8000',
  331.  'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  332.  'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  333.  'PATH_INFO': u'/sa/managedobject/',
  334.  'QUERY_STRING': '',
  335.  'REMOTE_ADDR': '127.0.0.1',
  336.  'REQUEST_METHOD': 'POST',
  337.  'SCRIPT_NAME': u'',
  338.  'SERVER_NAME': '127.0.0.1',
  339.  'SERVER_PORT': '8000',
  340.  'SERVER_PROTOCOL': 'HTTP/1.0',
  341.  'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  342.  'wsgi.input': <_io.BytesIO object at 0x3651950>,
  343.  'wsgi.multiprocess': True,
  344.  'wsgi.multithread': False,
  345.  'wsgi.run_once': False,
  346.  'wsgi.url_scheme': 'http',
  347.  'wsgi.version': (1, 0)}>, {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>})
  348.                 func = <function changelist_view at 0x172cb18>
  349.                 self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2ff1610>
  350.              kwargs2 = {}
  351. ------------------------------------------------------------------------
  352. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 93)
  353. Function: _wrapped_view
  354.    86                         if result is not None:
  355.    87                             return result
  356.    88                     if hasattr(middleware, 'process_view'):
  357.    89                         result = middleware.process_view(request, view_func, args, kwargs)
  358.    90                         if result is not None:
  359.    91                             return result
  360.    92                     try:
  361.    93 ==>                     response = view_func(request, *args, **kwargs)
  362.    94                     except Exception, e:
  363.    95                         if hasattr(middleware, 'process_exception'):
  364.    96                             result = middleware.process_exception(request, e)
  365.    97                             if result is not None:
  366.    98                                 return result
  367.    99                         raise
  368. Variables:
  369.                    e = IntegrityError("<ManagedObject: 7fon-2950> object is referenced from <class 'noc.inv.models.Interface'>",)
  370.           middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x17148d0>
  371.                 args = ({'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>},)
  372.              request = <WSGIRequest
  373. GET:<QueryDict: {}>,
  374. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  375. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  376.  'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  377. META:{'CONTENT_LENGTH': '104',
  378.  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  379.  'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  380.  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  381.  'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  382.  'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  383.  'HTTP_CONNECTION': 'close',
  384.  'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  385.  'HTTP_HOST': '127.0.0.1:8000',
  386.  'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  387.  'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  388.  'PATH_INFO': u'/sa/managedobject/',
  389.  'QUERY_STRING': '',
  390.  'REMOTE_ADDR': '127.0.0.1',
  391.  'REQUEST_METHOD': 'POST',
  392.  'SCRIPT_NAME': u'',
  393.  'SERVER_NAME': '127.0.0.1',
  394.  'SERVER_PORT': '8000',
  395.  'SERVER_PROTOCOL': 'HTTP/1.0',
  396.  'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  397.  'wsgi.input': <_io.BytesIO object at 0x3651950>,
  398.  'wsgi.multiprocess': True,
  399.  'wsgi.multithread': False,
  400.  'wsgi.run_once': False,
  401.  'wsgi.url_scheme': 'http',
  402.  'wsgi.version': (1, 0)}>
  403.               result = None
  404.               kwargs = {}
  405.            view_func = <function bound_func at 0x3abc140>
  406. ------------------------------------------------------------------------
  407. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 28)
  408. Function: _wrapper
  409.    21             def _wrapper(self, *args, **kwargs):
  410.    22                 @decorator
  411.    23                 def bound_func(*args2, **kwargs2):
  412.    24                     return func(self, *args2, **kwargs2)
  413.    25                 # bound_func has the signature that 'decorator' expects i.e.  no
  414.    26                 # 'self' argument, but it is a closure over self so it can call
  415.    27                 # 'func' correctly.
  416.    28 ==>             return bound_func(*args, **kwargs)
  417.    29             # In case 'decorator' adds attributes to the function it decorates, we
  418.    30             # want to copy those. We don't have access to bound_func in this scope,
  419.    31             # but we can cheat by using it on a dummy function.
  420.    32             @decorator
  421.    33             def dummy(*args, **kwargs):
  422.    34                 pass
  423. Variables:
  424.                 self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2ff1610>
  425.                 args = (<WSGIRequest
  426. GET:<QueryDict: {}>,
  427. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  428. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  429.  'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  430. META:{'CONTENT_LENGTH': '104',
  431.  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  432.  'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  433.  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  434.  'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  435.  'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  436.  'HTTP_CONNECTION': 'close',
  437.  'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  438.  'HTTP_HOST': '127.0.0.1:8000',
  439.  'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  440.  'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  441.  'PATH_INFO': u'/sa/managedobject/',
  442.  'QUERY_STRING': '',
  443.  'REMOTE_ADDR': '127.0.0.1',
  444.  'REQUEST_METHOD': 'POST',
  445.  'SCRIPT_NAME': u'',
  446.  'SERVER_NAME': '127.0.0.1',
  447.  'SERVER_PORT': '8000',
  448.  'SERVER_PROTOCOL': 'HTTP/1.0',
  449.  'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  450.  'wsgi.input': <_io.BytesIO object at 0x3651950>,
  451.  'wsgi.multiprocess': True,
  452.  'wsgi.multithread': False,
  453.  'wsgi.run_once': False,
  454.  'wsgi.url_scheme': 'http',
  455.  'wsgi.version': (1, 0)}>, {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>})
  456.           bound_func = <function bound_func at 0x3abc8c0>
  457.                 func = <function changelist_view at 0x172cb18>
  458.               kwargs = {}
  459.            decorator = <function csrf_protect at 0x1728cf8>
  460. ------------------------------------------------------------------------
  461. File: /opt/noc/lib/app/modelapplication.py (Line: 141)
  462. Function: view_changelist
  463.   134                               self.model._meta.object_name.lower())
  464.   135        
  465.   136         @view(url=r"^$", url_name="changelist", access=HasPerm("change"),
  466.   137               menu=get_menu)
  467.   138         def view_changelist(self, request, extra_context=None):
  468.   139             """Display changelist"""
  469.   140             return self.admin.changelist_view(request,
  470.   141 ==>                                           self.get_context(extra_context))
  471.   142        
  472.   143         @view(url=r"^add/$", url_name="add", access=HasPerm("add"))
  473.   144         def view_add(self, request, form_url="", extra_context=None):
  474.   145             """Display add form"""
  475.   146             return self.admin.add_view(request,
  476.   147                                    extra_context=self.get_context(extra_context))
  477. Variables:
  478.                 self = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>
  479.        extra_context = None
  480.              request = <WSGIRequest
  481. GET:<QueryDict: {}>,
  482. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  483. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  484.  'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  485. META:{'CONTENT_LENGTH': '104',
  486.  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  487.  'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  488.  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  489.  'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  490.  'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  491.  'HTTP_CONNECTION': 'close',
  492.  'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  493.  'HTTP_HOST': '127.0.0.1:8000',
  494.  'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  495.  'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  496.  'PATH_INFO': u'/sa/managedobject/',
  497.  'QUERY_STRING': '',
  498.  'REMOTE_ADDR': '127.0.0.1',
  499.  'REQUEST_METHOD': 'POST',
  500.  'SCRIPT_NAME': u'',
  501.  'SERVER_NAME': '127.0.0.1',
  502.  'SERVER_PORT': '8000',
  503.  'SERVER_PROTOCOL': 'HTTP/1.0',
  504.  'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  505.  'wsgi.input': <_io.BytesIO object at 0x3651950>,
  506.  'wsgi.multiprocess': True,
  507.  'wsgi.multithread': False,
  508.  'wsgi.run_once': False,
  509.  'wsgi.url_scheme': 'http',
  510.  'wsgi.version': (1, 0)}>
  511. ------------------------------------------------------------------------
  512. File: /opt/noc/lib/app/site.py (Line: 224)
  513. Function: inner
  514.   217                                            for k, v in request.POST.lists())
  515.   218                         elif request.method == "GET":
  516.   219                             a = dict((k, v[0] if len(v) == 1 else v)
  517.   220                                      for k, v in request.GET.lists())
  518.   221                         logging.debug("API %s %s %s" % (request.method,
  519.   222                                                         request.path, a))
  520.   223                     # Call handler
  521.   224 ==>                 r = v(request, *args, **kwargs)
  522.   225                     # Dump SQL statements
  523.   226                     if self.log_sql_statements:
  524.   227                         from django.db import connections
  525.   228                         for conn in connections.all():
  526.   229                             for q in conn.queries:
  527.   230                                 logging.debug("SQL %(sql)s %(time)ss" % q)
  528. Variables:
  529.                 args = ()
  530.             view_map = {'PUT': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>>, 'POST': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>>, 'GET': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>>, 'DELETE': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>>}
  531.                 Form = <class 'django.forms.forms.Form'>
  532.        DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  533.                 self = <noc.lib.app.site.Site object at 0x18fb9d0>
  534.                    v = <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>>
  535.              request = <WSGIRequest
  536. GET:<QueryDict: {}>,
  537. POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'16'], u'csrfmiddlewaretoken': [u'5154c2bc5231a34e0744af0f1739a3cc'], u'post': [u'yes']}>,
  538. COOKIES:{'csrftoken': '5154c2bc5231a34e0744af0f1739a3cc',
  539.  'sessionid': 'e8ccfed5df543c6d718383029b7220b3'},
  540. META:{'CONTENT_LENGTH': '104',
  541.  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  542.  'CSRF_COOKIE': '5154c2bc5231a34e0744af0f1739a3cc',
  543.  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  544.  'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  545.  'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  546.  'HTTP_CONNECTION': 'close',
  547.  'HTTP_COOKIE': 'sessionid=e8ccfed5df543c6d718383029b7220b3; csrftoken=5154c2bc5231a34e0744af0f1739a3cc',
  548.  'HTTP_HOST': '127.0.0.1:8000',
  549.  'HTTP_REFERER': 'https://setka-noc/sa/managedobject/',
  550.  'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3',
  551.  'PATH_INFO': u'/sa/managedobject/',
  552.  'QUERY_STRING': '',
  553.  'REMOTE_ADDR': '127.0.0.1',
  554.  'REQUEST_METHOD': 'POST',
  555.  'SCRIPT_NAME': u'',
  556.  'SERVER_NAME': '127.0.0.1',
  557.  'SERVER_PORT': '8000',
  558.  'SERVER_PROTOCOL': 'HTTP/1.0',
  559.  'wsgi.errors': <open file '/dev/null', mode 'a+' at 0xff09c0>,
  560.  'wsgi.input': <_io.BytesIO object at 0x3651950>,
  561.  'wsgi.multiprocess': True,
  562.  'wsgi.multithread': False,
  563.  'wsgi.run_once': False,
  564.  'wsgi.url_scheme': 'http',
  565.  'wsgi.version': (1, 0)}>
  566.      to_log_api_call = False
  567.   InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  568.     PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  569.               kwargs = {}
  570.                  app = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2ff12d0>
  571. ------------------------------------------------------------------------
  572. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement