Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2012-12-03 18:48:54.889310)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- rule() got an unexpected keyword argument 'instance'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/main/models/__init__.py (Line: 962)
- Function: __call__
- 955 with self.compiled_lock:
- 956 self.compiled_pyrules[self.name] = f
- 957 self.compiled_changed[self.name] = t
- 958 # Check interface
- 959 i = self.interface_class()
- 960 kwargs = i.clean(**kwargs)
- 961 # Evaluate pyRule
- 962 ==> result = f(**kwargs)
- 963 # Check and result
- 964 return i.clean_result(result)
- 965
- 966 @classmethod
- 967 def call(cls, py_rule_name, **kwargs):
- 968 """
- Variables:
- requires_recompile = True
- f = <function rule at 0x5dc67d0>
- i = <noc.sa.interfaces.idbpresave.IDBPreSave object at 0x62e7990>
- self = <PyRule: test_pyrule>
- t = datetime.datetime(2012, 12, 3, 18, 48, 54, 888840)
- kwargs = {'instance': <ManagedObject: 192.168.100.46>, 'model': <class 'noc.sa.models.managedobject.ManagedObject'>}
- ------------------------------------------------------------------------
- File: /opt/noc/main/models/__init__.py (Line: 1621)
- Function: pre_save_dispatch
- 1614 ## Dispatcher for pre-save
- 1615 ##
- 1616 @classmethod
- 1617 def pre_save_dispatch(cls, **kwargs):
- 1618 m = kwargs["sender"]._meta.db_table
- 1619 if m in cls._pre_save_triggers:
- 1620 for t in cls._pre_save_triggers[m]:
- 1621 ==> t(model=kwargs["sender"], instance=kwargs["instance"])
- 1622
- 1623 ##
- 1624 ## Dispatcher for post-save
- 1625 ##
- 1626 @classmethod
- 1627 def post_save_dispatch(cls, **kwargs):
- Variables:
- cls = <class 'noc.main.models.DBTrigger'>
- m = 'sa_managedobject'
- t = <PyRule: test_pyrule>
- kwargs = {'raw': False, 'signal': <django.dispatch.dispatcher.Signal object at 0x372e7d0>, 'sender': <class 'noc.sa.models.managedobject.ManagedObject'>, 'using': 'default', 'instance': <ManagedObject: 192.168.100.46>}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/dispatch/dispatcher.py (Line: 172)
- Function: send
- 165 Returns a list of tuple pairs [(receiver, response), ... ].
- 166 """
- 167 responses = []
- 168 if not self.receivers:
- 169 return responses
- 170
- 171 for receiver in self._live_receivers(_make_id(sender)):
- 172 ==> response = receiver(signal=self, sender=sender, **named)
- 173 responses.append((receiver, response))
- 174 return responses
- 175
- 176 def send_robust(self, sender, **named):
- 177 """
- 178 Send signal from sender to all connected receivers catching errors.
- Variables:
- named = {'instance': <ManagedObject: 192.168.100.46>, 'using': 'default', 'raw': False}
- responses = [(<function audit_trail_save at 0x3d4fc08>, None)]
- self = <django.dispatch.dispatcher.Signal object at 0x372e7d0>
- receiver = <bound method ?.pre_save_dispatch of <class 'noc.main.models.DBTrigger'>>
- response = None
- sender = <class 'noc.sa.models.managedobject.ManagedObject'>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 486)
- Function: save_base
- 479 meta = cls._meta
- 480 if not meta.proxy:
- 481 origin = cls
- 482 else:
- 483 meta = cls._meta
- 484
- 485 if origin and not meta.auto_created:
- 486 ==> signals.pre_save.send(sender=origin, instance=self, raw=raw, using=using)
- 487
- 488 # If we are in a raw save, save the object exactly as presented.
- 489 # That means that we don't try to be smart about saving attributes
- 490 # that might have come from the parent class - we just save the
- 491 # attributes we have been given to the class we have been given.
- 492 # We also go through this process to defer the save of proxy objects
- Variables:
- origin = <class 'noc.sa.models.managedobject.ManagedObject'>
- force_insert = False
- self = <ManagedObject: 192.168.100.46>
- force_update = False
- raw = False
- meta = <Options for ManagedObject>
- using = 'default'
- cls = <class 'noc.sa.models.managedobject.ManagedObject'>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 463)
- Function: save
- 456
- 457 The 'force_insert' and 'force_update' parameters can be used to insist
- 458 that the "save" must be an SQL insert or update (or equivalent for
- 459 non-SQL backends), respectively. Normally, they should not be set.
- 460 """
- 461 if force_insert and force_update:
- 462 raise ValueError("Cannot force both insert and updating in model saving.")
- 463 ==> self.save_base(using=using, force_insert=force_insert, force_update=force_update)
- 464
- 465 save.alters_data = True
- 466
- 467 def save_base(self, raw=False, cls=None, origin=None, force_insert=False,
- 468 force_update=False, using=None):
- 469 """
- Variables:
- using = None
- self = <ManagedObject: 192.168.100.46>
- force_update = False
- force_insert = False
- ------------------------------------------------------------------------
- File: /opt/noc/sa/models/managedobject.py (Line: 218)
- Function: save
- 211 """
- 212 # Get previous version
- 213 if self.id:
- 214 old = ManagedObject.objects.get(id=self.id)
- 215 else:
- 216 old = None
- 217 # Save
- 218 ==> super(ManagedObject, self).save()
- 219 # Notify changes
- 220 if ((old is None and self.trap_source_ip) or
- 221 (old and self.trap_source_ip != old.trap_source_ip) or
- 222 (old and self.activator.id != old.activator.id)):
- 223 self.sae_refresh_event_filter()
- 224 # Process config
- Variables:
- self = <ManagedObject: 192.168.100.46>
- old = <ManagedObject: 192.168.100.46>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 709)
- Function: save_model
- 702 """
- 703 return form.save(commit=False)
- 704
- 705 def save_model(self, request, obj, form, change):
- 706 """
- 707 Given a model instance save it to the database.
- 708 """
- 709 ==> obj.save()
- 710
- 711 def delete_model(self, request, obj):
- 712 """
- 713 Given a model instance delete it from the database.
- 714 """
- 715 obj.delete()
- Variables:
- request = <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x5448410>
- obj = <ManagedObject: 192.168.100.46>
- form = <django.forms.models.ManagedObjectForm object at 0x5cc1950>
- change = True
- ------------------------------------------------------------------------
- File: /opt/noc/sa/apps/managedobject/views.py (Line: 268)
- Function: save_model
- 261 if obj:
- 262 return obj.has_access(request.user)
- 263 else:
- 264 return admin.ModelAdmin.has_delete_permission(self, request)
- 265
- 266 def save_model(self, request, obj, form, change):
- 267 # Save before checking
- 268 ==> admin.ModelAdmin.save_model(self, request, obj, form, change)
- 269 # Then check
- 270 if not obj.has_access(request.user):
- 271 # Will be rolled back by exception handler
- 272 raise PermissionDenied("Permission denied")
- 273
- 274 def test_access(self, request, queryset):
- Variables:
- request = <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x5448410>
- obj = <ManagedObject: 192.168.100.46>
- form = <django.forms.models.ManagedObjectForm object at 0x5cc1950>
- change = True
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 1054)
- Function: change_view
- 1047 formset = FormSet(request.POST, request.FILES,
- 1048 instance=new_object, prefix=prefix,
- 1049 queryset=inline.queryset(request))
- 1050
- 1051 formsets.append(formset)
- 1052
- 1053 if all_valid(formsets) and form_validated:
- 1054 ==> self.save_model(request, new_object, form, True)
- 1055 self.save_related(request, form, formsets, True)
- 1056 change_message = self.construct_change_message(request, form, formsets)
- 1057 self.log_change(request, new_object, change_message)
- 1058 return self.response_change(request, new_object)
- 1059
- 1060 else:
- Variables:
- new_object = <ManagedObject: 192.168.100.46>
- extra_context = {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>}
- obj = <ManagedObject: 192.168.100.46>
- form = <django.forms.models.ManagedObjectForm object at 0x5cc1950>
- form_url = ''
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x5448410>
- request = <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- inline_instances = [<noc.sa.apps.managedobject.views.ManagedObjectAttributeInline object at 0x603ed90>]
- object_id = u'4'
- FormSet = <class 'django.forms.formsets.ManagedObjectAttributeFormFormSet'>
- prefixes = {'managedobjectattribute_set': 1}
- prefix = 'managedobjectattribute_set'
- formsets = [<django.forms.formsets.ManagedObjectAttributeFormFormSet object at 0x5e2f750>]
- inline = <noc.sa.apps.managedobject.views.ManagedObjectAttributeInline object at 0x603ed90>
- model = <class 'noc.sa.models.managedobject.ManagedObject'>
- form_validated = True
- ModelForm = <class 'django.forms.models.ManagedObjectForm'>
- formset = <django.forms.formsets.ManagedObjectAttributeFormFormSet object at 0x5e2f750>
- opts = <Options for ManagedObject>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/transaction.py (Line: 209)
- Function: inner
- 202 def __exit__(self, exc_type, exc_value, traceback):
- 203 self.exiting(exc_value, self.using)
- 204
- 205 def __call__(self, func):
- 206 @wraps(func)
- 207 def inner(*args, **kwargs):
- 208 with self:
- 209 ==> return func(*args, **kwargs)
- 210 return inner
- 211
- 212 def _transaction_func(entering, exiting, using):
- 213 """
- 214 Takes 3 things, an entering function (what to do to start this block of
- 215 transaction management), an exiting function (what to do to end it, on both
- Variables:
- self = <django.db.transaction.Transaction object at 0x3ad8150>
- args = (<noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x5448410>, <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, u'4')
- func = <function change_view at 0x3ad75f0>
- kwargs = {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>}}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 21)
- Function: bound_func
- 14 """
- 15 # 'func' is a function at the time it is passed to _dec, but will eventually
- 16 # be a method of the class it is defined it.
- 17 def _dec(func):
- 18 def _wrapper(self, *args, **kwargs):
- 19 @decorator
- 20 def bound_func(*args2, **kwargs2):
- 21 ==> return func(self, *args2, **kwargs2)
- 22 # bound_func has the signature that 'decorator' expects i.e. no
- 23 # 'self' argument, but it is a closure over self so it can call
- 24 # 'func' correctly.
- 25 return bound_func(*args, **kwargs)
- 26 # In case 'decorator' adds attributes to the function it decorates, we
- 27 # want to copy those. We don't have access to bound_func in this scope,
- Variables:
- args2 = (<WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, u'4')
- func = <function change_view at 0x3ad76e0>
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x5448410>
- kwargs2 = {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>}}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 91)
- Function: _wrapped_view
- 84 if result is not None:
- 85 return result
- 86 if hasattr(middleware, 'process_view'):
- 87 result = middleware.process_view(request, view_func, args, kwargs)
- 88 if result is not None:
- 89 return result
- 90 try:
- 91 ==> response = view_func(request, *args, **kwargs)
- 92 except Exception, e:
- 93 if hasattr(middleware, 'process_exception'):
- 94 result = middleware.process_exception(request, e)
- 95 if result is not None:
- 96 return result
- 97 raise
- Variables:
- e = TypeError("rule() got an unexpected keyword argument 'instance'",)
- middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x3aa02d0>
- args = (u'4',)
- request = <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- result = None
- kwargs = {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>}}
- view_func = <function bound_func at 0x602cc80>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 25)
- Function: _wrapper
- 18 def _wrapper(self, *args, **kwargs):
- 19 @decorator
- 20 def bound_func(*args2, **kwargs2):
- 21 return func(self, *args2, **kwargs2)
- 22 # bound_func has the signature that 'decorator' expects i.e. no
- 23 # 'self' argument, but it is a closure over self so it can call
- 24 # 'func' correctly.
- 25 ==> return bound_func(*args, **kwargs)
- 26 # In case 'decorator' adds attributes to the function it decorates, we
- 27 # want to copy those. We don't have access to bound_func in this scope,
- 28 # but we can cheat by using it on a dummy function.
- 29 @decorator
- 30 def dummy(*args, **kwargs):
- 31 pass
- Variables:
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x5448410>
- args = (<WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, u'4')
- bound_func = <function bound_func at 0x602c758>
- func = <function change_view at 0x3ad76e0>
- kwargs = {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>}}
- decorator = <function csrf_protect at 0x3a975f0>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/modelapplication.py (Line: 173)
- Function: view_change
- 166
- 167 @view(url=r"^(\d+)/$", url_name="change", access=HasPerm("change"))
- 168 def view_change(self, request, object_id, extra_context=None):
- 169 """Display change form"""
- 170 return self.admin.change_view(
- 171 request,
- 172 object_id,
- 173 ==> extra_context=self.get_context(extra_context))
- 174
- 175 ##
- 176 ## Backport from ExtApplication/ExtModelApplication for lookup support
- 177 ##
- 178 ignored_params = ["_dc"]
- 179 page_param = "__page"
- Variables:
- self = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>
- extra_context = None
- request = <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- object_id = u'4'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 232)
- Function: inner
- 225 for k, v in request.POST.lists())
- 226 elif request.method == "GET":
- 227 a = dict((k, v[0] if len(v) == 1 else v)
- 228 for k, v in request.GET.lists())
- 229 logging.debug("API %s %s %s" % (request.method,
- 230 request.path, a))
- 231 # Call handler
- 232 ==> r = v(request, *args, **kwargs)
- 233 # Dump SQL statements
- 234 if self.log_sql_statements:
- 235 from django.db import connections
- 236 tsc = 0
- 237 sc = defaultdict(int)
- 238 for conn in connections.all():
- Variables:
- args = (u'4',)
- view_map = {'PUT': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>>, 'POST': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>>, 'GET': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>>, 'DELETE': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x396d210>
- v = <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>>
- request = <WSGIRequest
- path:/sa/managedobject/4/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [u'11'], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [u'9'], u'trap_community': [u''], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Zyxel'], u'managedobjectattribute_set-5-managed_object': [u'4'], u'managedobjectattribute_set-6-id': [u''], u'managedobjectattribute_set-4-managed_object': [u'4'], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'1'], u'super_password': [u''], u'profile_name': [u'Zyxel.ZyNOS'], u'managedobjectattribute_set-3-managed_object': [u'4'], u'managedobjectattribute_set-3-value': [u'3.90(TX.3)'], u'managedobjectattribute_set-6-managed_object': [u'4'], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'_save': [u'Save'], u'managedobjectattribute_set-0-key': [u'Boot PROM'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ES-2024A'], u'managedobjectattribute_set-4-id': [u''], u'managedobjectattribute_set-2-managed_object': [u'4'], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [u''], u'csrfmiddlewaretoken': [u'3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2'], u'scheme': [u'0'], u'managedobjectattribute_set-__prefix__-managed_object': [u'4'], u'managedobjectattribute_set-0-managed_object': [u'4'], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'tags': [u''], u'config_validation_rule': [u''], u'managedobjectattribute_set-1-id': [u'8'], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'vlitvin'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.100.46'], u'password': [u'IrlsaQ3kPk'], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'vrf': [u''], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'192.168.100.46'], u'managedobjectattribute_set-0-value': [u'1.08'], u'object_profile': [u'1'], u'trap_source_ip': [u''], u'managedobjectattribute_set-2-id': [u'10'], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'managedobjectattribute_set-__prefix__-value': [u''], u'max_scripts': [u''], u'snmp_ro': [u''], u'managedobjectattribute_set-1-managed_object': [u'4'], u'repo_path': [u'sw46']}>,
- COOKIES:{'csrftoken': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'sessionid': 'faae0f00cf0d481fd6967aedf6a70ce6'},
- META:{'CONTENT_LENGTH': '7291',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundary0yS85BrongmWjRrV',
- 'CSRF_COOKIE': '3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
- 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
- 'HTTP_CONNECTION': 'Keep-Alive',
- 'HTTP_COOKIE': 'sessionid=faae0f00cf0d481fd6967aedf6a70ce6; csrftoken=3eFBlOxaEt3gcldLR8aU7Vr9yAx4HMX2',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_ORIGIN': 'http://nocproject.amsterdamtelecom.ru',
- 'HTTP_REFERER': 'http://nocproject.amsterdamtelecom.ru/sa/managedobject/4/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.91 Safari/537.11',
- 'HTTP_X_FORWARDED_FOR': '178.236.128.178',
- 'HTTP_X_FORWARDED_HOST': 'nocproject.amsterdamtelecom.ru',
- 'HTTP_X_FORWARDED_SERVER': 'nocproject.amsterdamtelecom.ru',
- 'PATH_INFO': u'/sa/managedobject/4/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x332b030>,
- 'wsgi.input': <io.BytesIO object at 0x5d12170>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- to_log_api_call = False
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- kwargs = {}
- app = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x54481d0>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement