Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2014-01-22 10:00:59.895657)
- Working directory: /opt/noc
- <type 'exceptions.KeyError'>
- 'position'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/mongoengine/base.py (Line: 1304)
- Function: __delitem__
- 1297
- 1298 def __delete__(self, *args, **kwargs):
- 1299 self._mark_as_changed()
- 1300 return super(BaseDict, self).__delete__(*args, **kwargs)
- 1301
- 1302 def __delitem__(self, *args, **kwargs):
- 1303 self._mark_as_changed()
- 1304 ==> return super(BaseDict, self).__delitem__(*args, **kwargs)
- 1305
- 1306 def __delattr__(self, *args, **kwargs):
- 1307 self._mark_as_changed()
- 1308 return super(BaseDict, self).__delattr__(*args, **kwargs)
- 1309
- 1310 def __getstate__(self):
- Variables:
- self = {u'shift': 0}
- args = ('position',)
- kwargs = {}
- ------------------------------------------------------------------------
- File: /opt/noc/inv/models/object.py (Line: 202)
- Function: put_into
- 195 self.disconnect_p2p(c.name)
- 196 # Connect to parent
- 197 self.container = container.id
- 198 # Reset previous rack position
- 199 if self.data.get("rackmount"):
- 200 for k in ("position", "side"):
- 201 if self.data.get("rackmount", k):
- 202 ==> del self.data["rackmount"][k]
- 203 self.save()
- 204 self.log(
- 205 "Insert into %s" % container,
- 206 system="CORE", op="INSERT")
- 207
- 208 def get_content(self):
- Variables:
- k = 'position'
- container = <Object: ..210>
- c = <ObjectModelConnection: fan1>
- self = <Object: bb-77-2>
- ------------------------------------------------------------------------
- File: /opt/noc/inv/apps/inv/views.py (Line: 164)
- Function: api_insert
- 157 def api_insert(self, request, container, objects, position):
- 158 c = self.get_object_or_404(Object, id=container)
- 159 o = []
- 160 for r in objects:
- 161 o += [self.get_object_or_404(Object, id=r)]
- 162 if position == "append":
- 163 for x in o:
- 164 ==> x.put_into(c)
- 165 elif position in ("before", "after"):
- 166 cc = self.get_object_or_404(Object, id=c.container)
- 167 for x in o:
- 168 x.put_into(cc)
- 169 return True
- Variables:
- c = <Object: ..210>
- container = '52b44e1bf3b682e67fcdc84d'
- objects = ['528d9f3df3b6822bb6bf03d7']
- self = <noc.inv.apps.inv.views.InvApplication object at 0x8109ba2d0>
- request =
- <WSGIRequest
- path:/inv/inv/insert/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'{"objects":["528d9f3df3b6822bb6bf03d7"],"container":"52b44e1bf3b682e67fcdc84d","position":"append"}': [u'']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '713987f4e20eb2cbc08a707bdf5de063'},
- META:{'CONTENT_LENGTH': '99',
- 'CONTENT_TYPE': 'application/json; charset=UTF-8',
- '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_CACHE_CONTROL': 'no-cache',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO; sessionid=713987f4e20eb2cbc08a707bdf5de063',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_PRAGMA': 'no-cache',
- 'HTTP_REFERER': 'http://noc/main/desktop/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0',
- 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
- 'PATH_INFO': u'/inv/inv/insert/',
- '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 0x80741ff60>,
- 'wsgi.input': <_io.BytesIO object at 0x811422050>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- o = [<Object: bb-77-2>]
- r = '528d9f3df3b6822bb6bf03d7'
- position = 'append'
- x = <Object: bb-77-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:
- errors = None
- view_map =
- {'POST': <bound method InvApplication.api_insert of <noc.inv.apps.inv.views.InvApplication object at 0x8109ba2d0>>}
- Form = <class 'django.forms.forms.Form'>
- g =
- {'container': '52b44e1bf3b682e67fcdc84d',
- 'objects': ['528d9f3df3b6822bb6bf03d7'],
- 'position': 'append'}
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- args = ()
- self = <noc.lib.app.site.Site object at 0x80ca72450>
- kwargs =
- {'container': '52b44e1bf3b682e67fcdc84d',
- 'objects': ['528d9f3df3b6822bb6bf03d7'],
- 'position': 'append'}
- request =
- <WSGIRequest
- path:/inv/inv/insert/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'{"objects":["528d9f3df3b6822bb6bf03d7"],"container":"52b44e1bf3b682e67fcdc84d","position":"append"}': [u'']}>,
- COOKIES:{'csrftoken': 'IDkEC2joQ0xqB16cYOt3sf02s349QrHO',
- 'sessionid': '713987f4e20eb2cbc08a707bdf5de063'},
- META:{'CONTENT_LENGTH': '99',
- 'CONTENT_TYPE': 'application/json; charset=UTF-8',
- '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_CACHE_CONTROL': 'no-cache',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=IDkEC2joQ0xqB16cYOt3sf02s349QrHO; sessionid=713987f4e20eb2cbc08a707bdf5de063',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_PRAGMA': 'no-cache',
- 'HTTP_REFERER': 'http://noc/main/desktop/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0',
- 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
- 'PATH_INFO': u'/inv/inv/insert/',
- '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 0x80741ff60>,
- 'wsgi.input': <_io.BytesIO object at 0x811422050>,
- '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
- v =
- <bound method InvApplication.api_insert of <noc.inv.apps.inv.views.InvApplication object at 0x8109ba2d0>>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- app = <noc.inv.apps.inv.views.InvApplication object at 0x8109ba2d0>
- ct = 'application/json; charset=UTF-8'
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement