Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2013-08-30 11:24:54.442013)
- Working directory: /opt/noc
- <class 'pymongo.errors.InvalidOperation'>
- cannot do an empty bulk insert
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/collection.py (Line: 362)
- Function: insert
- 355 if manipulate:
- 356 docs = [self.__database._fix_incoming(doc, self) for doc in docs]
- 357
- 358 safe, options = self._get_write_mode(safe, **kwargs)
- 359 message._do_batched_insert(self.__full_name, docs,
- 360 check_keys, safe, options,
- 361 continue_on_error, self.__uuid_subtype,
- 362 ==> self.database.connection)
- 363
- 364 ids = [doc.get("_id", None) for doc in docs]
- 365 if return_one:
- 366 return ids[0]
- 367 else:
- 368 return ids
- Variables:
- safe = False
- check_keys = True
- docs = []
- return_one = False
- self =
- Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.selector')
- kwargs = {}
- continue_on_error = False
- doc_or_docs = []
- options = {}
- manipulate = True
- ------------------------------------------------------------------------
- File: /opt/noc/sa/models/selectorcache.py (Line: 55)
- Function: rebuild_for_object
- 48 r += [
- 49 {
- 50 "object": o.id,
- 51 "selector": s.id,
- 52 "vc_domain": d
- 53 }
- 54 ]
- 55 ==> cls._get_collection().insert(r)
- 56
- 57 ##
- 58 from managedobjectselector import ManagedObjectSelector
- Variables:
- r = []
- object = <ManagedObject: cat->
- cls = <class 'noc.sa.models.selectorcache.SelectorCache'>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/models/managedobject.py (Line: 250)
- Function: save
- 243 # Notify changes
- 244 if ((old is None and self.trap_source_ip) or
- 245 (old and self.trap_source_ip != old.trap_source_ip) or
- 246 (old and self.activator.id != old.activator.id)):
- 247 self.sae_refresh_event_filter()
- 248 # Notify new object
- 249 if old is None:
- 250 ==> SelectorCache.rebuild_for_object(self)
- 251 self.event(self.EV_NEW, {"object": self})
- 252 # @todo: will be removed with GridVCS
- 253 # Process config
- 254 try:
- 255 # self.config is OneToOne field created by Config
- 256 config = self.config
- Variables:
- self = <ManagedObject: cat->
- old = None
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'123'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- '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 0x80d8c1e50>
- obj = <ManagedObject: cat->
- form = <django.forms.models.ManagedObjectForm object at 0x80dfe4e50>
- change = False
- ------------------------------------------------------------------------
- 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/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'123'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- '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 0x80d8c1e50>
- obj = <ManagedObject: cat->
- form = <django.forms.models.ManagedObjectForm object at 0x80dfe4e50>
- change = False
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/django/contrib/admin/options.py (Line: 955)
- Function: add_view
- 948 prefix = "%s-%s" % (prefix, prefixes[prefix])
- 949 formset = FormSet(data=request.POST, files=request.FILES,
- 950 instance=new_object,
- 951 save_as_new="_saveasnew" in request.POST,
- 952 prefix=prefix, queryset=inline.queryset(request))
- 953 formsets.append(formset)
- 954 if all_valid(formsets) and form_validated:
- 955 ==> self.save_model(request, new_object, form, False)
- 956 self.save_related(request, form, formsets, False)
- 957 self.log_addition(request, new_object)
- 958 return self.response_add(request, new_object)
- 959 else:
- 960 # Prepare the dict of initial data from the request.
- 961 # We have to special-case M2Ms as a list of comma-separated PKs.
- Variables:
- new_object = <ManagedObject: cat->
- form = <django.forms.models.ManagedObjectForm object at 0x80dfe4e50>
- form_url = '/admin/../sa/managedobject/add/'
- FormSet = <class 'django.forms.formsets.ManagedObjectAttributeFormFormSet'>
- request =
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'123'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- '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 0x80dfcc350>]
- form_validated = True
- prefixes = {'managedobjectattribute_set': 1}
- prefix = 'managedobjectattribute_set'
- formsets =
- [<django.forms.formsets.ManagedObjectAttributeFormFormSet object at 0x80e096310>]
- self =
- <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x80d8c1e50>
- inline =
- <noc.sa.apps.managedobject.views.ManagedObjectAttributeInline object at 0x80dfcc350>
- model = <class 'noc.sa.models.managedobject.ManagedObject'>
- extra_context = None
- ModelForm = <class 'django.forms.models.ManagedObjectForm'>
- formset =
- <django.forms.formsets.ManagedObjectAttributeFormFormSet object at 0x80e096310>
- opts = <Options for ManagedObject>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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 0x809224b10>
- args =
- (<noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x80d8c1e50>,
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>)
- func = <function add_view at 0x80922b140>
- kwargs = {'form_url': '/admin/../sa/managedobject/add/'}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>,)
- func = <function add_view at 0x80922b2a8>
- self =
- <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x80d8c1e50>
- kwargs2 = {'form_url': '/admin/../sa/managedobject/add/'}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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 = InvalidOperation('cannot do an empty bulk insert',)
- middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x809204bd0>
- args = ()
- request =
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- result = None
- kwargs = {'form_url': '/admin/../sa/managedobject/add/'}
- view_func = <function bound_func at 0x80dfa9320>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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 0x80d8c1e50>
- args =
- (<WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>,)
- bound_func = <function bound_func at 0x80dfa9398>
- func = <function add_view at 0x80922b2a8>
- kwargs = {'form_url': '/admin/../sa/managedobject/add/'}
- decorator = <function csrf_protect at 0x809217cf8>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/django/contrib/admin/options.py (Line: 1028)
- Function: change_view
- 1021
- 1022 if obj is None:
- 1023 raise Http404(_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_unicode(opts.verbose_name), 'key': escape(object_id)})
- 1024
- 1025 if request.method == 'POST' and "_saveasnew" in request.POST:
- 1026 return self.add_view(request, form_url=reverse('admin:%s_%s_add' %
- 1027 (opts.app_label, opts.module_name),
- 1028 ==> current_app=self.admin_site.name))
- 1029
- 1030 ModelForm = self.get_form(request, obj)
- 1031 formsets = []
- 1032 inline_instances = self.get_inline_instances(request)
- 1033 if request.method == 'POST':
- 1034 form = ModelForm(request.POST, request.FILES, instance=obj)
- Variables:
- obj = <ManagedObject: cat77-11>
- self =
- <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x80d8c1e50>
- request =
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- object_id = u'2'
- model = <class 'noc.sa.models.managedobject.ManagedObject'>
- extra_context =
- {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>}
- form_url = ''
- opts = <Options for ManagedObject>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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 0x809224bd0>
- args =
- (<noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x80d8c1e50>,
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>,
- u'2')
- func = <function change_view at 0x80922b410>
- kwargs =
- {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>}}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>,
- u'2')
- func = <function change_view at 0x80922b500>
- self =
- <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x80d8c1e50>
- kwargs2 =
- {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>}}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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 = InvalidOperation('cannot do an empty bulk insert',)
- middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x809204bd0>
- args = (u'2',)
- request =
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- '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 0x80d8c1e10>}}
- view_func = <function bound_func at 0x80df93cf8>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/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 0x80d8c1e50>
- args =
- (<WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>,
- u'2')
- bound_func = <function bound_func at 0x80df93d70>
- func = <function change_view at 0x80922b500>
- kwargs =
- {'extra_context': {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>}}
- decorator = <function csrf_protect at 0x809217cf8>
- ------------------------------------------------------------------------
- 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 0x80d8c1e10>
- extra_context = None
- request =
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'321'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- object_id = u'2'
- ------------------------------------------------------------------------
- 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'2',)
- view_map =
- {'DELETE': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>>,
- 'GET': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>>,
- 'POST': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>>,
- 'PUT': <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x80904fa90>
- v =
- <bound method ManagedObjectApplication.view_change of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>>
- request =
- <WSGIRequest
- path:/sa/managedobject/2/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'managedobjectattribute_set-INITIAL_FORMS': [u'4'], u'managedobjectattribute_set-0-id': [None], u'config_filter_rule': [u''], u'managedobjectattribute_set-3-id': [None], u'trap_community': [u'123'], u'managedobjectattribute_set-MAX_NUM_FORMS': [u''], u'managedobjectattribute_set-2-value': [u'Cisco'], u'managedobjectattribute_set-5-managed_object': [None], u'managedobjectattribute_set-6-id': [None], u'managedobjectattribute_set-4-managed_object': [None], u'managedobjectattribute_set-5-key': [u''], u'administrative_domain': [u'2'], u'super_password': [u'xxx'], u'shape': [u''], u'profile_name': [u'Cisco.IOS'], u'managedobjectattribute_set-3-managed_object': [None], u'managedobjectattribute_set-3-value': [u'12.2(60)EZ1'], u'managedobjectattribute_set-6-managed_object': [None], u'managedobjectattribute_set-6-key': [u''], u'port': [u''], u'managedobjectattribute_set-4-key': [u''], u'vc_domain': [u''], u'managedobjectattribute_set-0-key': [u'image'], u'config_diff_filter_rule': [u''], u'managedobjectattribute_set-1-value': [u'ME340x'], u'managedobjectattribute_set-4-id': [None], u'managedobjectattribute_set-2-managed_object': [None], u'activator': [u'1'], u'managedobjectattribute_set-5-id': [None], u'csrfmiddlewaretoken': [u'IDkEC2joQ0xqB16cYOt3sf02s349QrHO'], u'scheme': [u'1'], u'managedobjectattribute_set-__prefix__-managed_object': [u'2'], u'managedobjectattribute_set-0-managed_object': [None], u'managedobjectattribute_set-__prefix__-key': [u''], u'managedobjectattribute_set-5-value': [u''], u'description': [u''], u'_saveasnew': [u'Save as new'], u'tags': [u''], u'config_validation_rule': [u''], u'remote_path': [u''], u'managedobjectattribute_set-2-key': [u'vendor'], u'managedobjectattribute_set-4-value': [u''], u'user': [u'xxx'], u'managedobjectattribute_set-__prefix__-id': [u''], u'address': [u'192.168.80.1'], u'password': [u'xxx'], u'managedobjectattribute_set-__prefix__-value': [u''], u'is_configuration_managed': [u'on'], u'snmp_rw': [u''], u'managedobjectattribute_set-TOTAL_FORMS': [u'7'], u'managedobjectattribute_set-1-id': [None], u'managedobjectattribute_set-1-key': [u'platform'], u'managedobjectattribute_set-6-value': [u''], u'name': [u'cat-'], u'managedobjectattribute_set-0-value': [u'ME340x-METROIPACCESSK9-M'], u'object_profile': [u'1'], u'trap_source_ip': [u'192.168.80.1'], u'managedobjectattribute_set-2-id': [None], u'is_managed': [u'on'], u'managedobjectattribute_set-3-key': [u'version'], u'repo_path': [u'cisco/cat-'], u'max_scripts': [u''], u'snmp_ro': [u'123'], u'managedobjectattribute_set-1-managed_object': [None], u'vrf': [u'3']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '7290360ac4fa56534270bf5e097382a6'},
- META:{'CONTENT_LENGTH': '8606',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------747502730778137393224886678',
- 'CSRF_COOKIE': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru,en-us;q=0.7,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=7290360ac4fa56534270bf5e097382a6; csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://1.1.1.1/sa/managedobject/2/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0',
- 'PATH_INFO': u'/sa/managedobject/2/',
- '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.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x805fd20c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80dfe8710>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- to_log_api_call = False
- kwargs = {}
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- app =
- <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x80d8c1e10>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement