Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2015-03-02 16:09:09.814323)
- BRANCH: develop TIP: a615e849a029
- PROCESS: ./scripts/noc-web.py
- ERROR FINGERPRINT: 876e760e-1db9-5a43-abff-0726579aa86d
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <class 'noc.sa.models.managedobject.DoesNotExist'> ManagedObject matching query does not exist.
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: local/lib/python2.7/site-packages/django/db/models/query.py (Line: 366)
- Function: get
- 359 if self.query.can_filter():
- 360 clone = clone.order_by()
- 361 num = len(clone)
- 362 if num == 1:
- 363 return clone._result_cache[0]
- 364 if not num:
- 365 raise self.model.DoesNotExist("%s matching query does not exist."
- 366 ==> % self.model._meta.object_name)
- 367 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
- 368 % (self.model._meta.object_name, num, kwargs))
- 369
- 370 def create(self, **kwargs):
- 371 """
- 372 Creates a new object with the given kwargs, saving it to the database
- Variables:
- clone = []
- num = 0
- self =
- [<ManagedObject: cisco_2811>, <ManagedObject: cisco3725>, <ManagedObject: cisco3725_2>, <ManagedObject: cisco3725_3>, <ManagedObject: cisco7200>, <ManagedObject: SAE>, <ManagedObject: vmm_1>, <ManagedObject: vmm_old>]
- args = ()
- kwargs = {'pk': 12}
- ------------------------------------------------------------------------
- File: local/lib/python2.7/site-packages/django/db/models/manager.py (Line: 131)
- Function: get
- 124 def distinct(self, *args, **kwargs):
- 125 return self.get_query_set().distinct(*args, **kwargs)
- 126
- 127 def extra(self, *args, **kwargs):
- 128 return self.get_query_set().extra(*args, **kwargs)
- 129
- 130 def get(self, *args, **kwargs):
- 131 ==> return self.get_query_set().get(*args, **kwargs)
- 132
- 133 def get_or_create(self, **kwargs):
- 134 return self.get_query_set().get_or_create(**kwargs)
- 135
- 136 def create(self, **kwargs):
- 137 return self.get_query_set().create(**kwargs)
- Variables:
- self = <django.db.models.manager.Manager object at 0x7f56e2e6bcd0>
- args = ()
- kwargs = {'pk': 12}
- ------------------------------------------------------------------------
- File: lib/nosql.py (Line: 263)
- Function: __get__
- 256 # Document class being used rather than a document object
- 257 return self
- 258
- 259 # Get value from document instance if available
- 260 value = instance._data.get(self.name)
- 261 # Dereference
- 262 if isinstance(value, int):
- 263 ==> value = self.document_type.objects.get(pk=value)
- 264 if value is not None:
- 265 instance._data[self.name] = value
- 266 return super(ForeignKeyField, self).__get__(instance, owner)
- 267
- 268 def __set__(self, instance, value):
- 269 if not value:
- Variables:
- owner = <class 'noc.inv.models.interface.Interface'>
- instance = repr() failed
- self = <noc.lib.nosql.ForeignKeyField object at 0x7f56e2c592d0>
- value = 12
- ------------------------------------------------------------------------
- File: inv/apps/interface/views.py (Line: 70)
- Function: get_link
- 63 def get_link(i):
- 64 link = i.link
- 65 if not link:
- 66 return None
- 67 if link.is_ptp:
- 68 # ptp
- 69 o = link.other_ptp(i)
- 70 ==> label = "%s:%s" % (o.managed_object.name, o.name)
- 71 elif link.is_lag:
- 72 # unresolved LAG
- 73 o = [ii for ii in link.other(i)
- 74 if ii.managed_object.id != i.managed_object.id]
- 75 label = "LAG %s: %s" % (o[0].managed_object.name,
- 76 ", ".join(ii.name for ii in o))
- Variables:
- i = <Interface: cisco3725: Fa 1/4>
- link = repr() failed
- o = repr() failed
- ------------------------------------------------------------------------
- File: inv/apps/interface/views.py (Line: 117)
- Function: api_get_interfaces
- 110 "state": i.state.id if i.state else default_state.id,
- 111 "state__label": unicode(i.state if i.state else default_state),
- 112 "vc_domain": i.vc_domain.id if i.vc_domain else None,
- 113 "vc_domain__label": unicode(i.vc_domain) if i.vc_domain else None,
- 114 "row_class": get_style(i)
- 115 } for i in
- 116 Interface.objects.filter(managed_object=o.id,
- 117 ==> type="physical")
- 118 ]
- 119 # LAG
- 120 lag = [
- 121 {
- 122 "id": str(i.id),
- 123 "name": i.name,
- Variables:
- default_state = <ResourceState: ALLOCATED>
- get_style = <function get_style at 0x7f56e16795f0>
- i = <Interface: cisco3725: Fa 1/4>
- self =
- <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>
- get_link = <function get_link at 0x7f56e1679578>
- request =
- <WSGIRequest
- path:/inv/interface/3/,
- GET:<QueryDict: {u'_dc': [u'1425301440424']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'sessionid': '1328f42dac3f165548926fc5322580bb'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- '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': 'close',
- 'HTTP_COOKIE': 'sessionid=1328f42dac3f165548926fc5322580bb',
- 'HTTP_HOST': '127.0.0.1',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36',
- 'HTTP_X_SCHEME': 'http',
- 'PATH_INFO': u'/inv/interface/3/',
- 'QUERY_STRING': '_dc=1425301440424',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '80',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x7f56f315e300>,
- 'wsgi.input': <_io.BytesIO object at 0x7f56e17b7d10>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- managed_object = u'3'
- o = <ManagedObject: cisco3725>
- style_cache = {ObjectId('547ef21ef47636113ad8675f'): u'noc-color-1'}
- sorted_iname = <function sorted_iname at 0x7f56e1679140>
- ------------------------------------------------------------------------
- File: lib/app/site.py (Line: 248)
- Function: inner
- 241 a = dict((k, v[0] if len(v) == 1 else v)
- 242 for k, v in request.GET.lists())
- 243 app_logger.debug("API %s %s %s",
- 244 request.method, request.path, a)
- 245 # Call handler
- 246 v.__dict__["hits_metric"] += 1
- 247 with v.__dict__["time_metric"].timer():
- 248 ==> r = v(request, *args, **kwargs)
- 249 # Dump SQL statements
- 250 if self.log_sql_statements:
- 251 from django.db import connections
- 252 tsc = 0
- 253 sc = defaultdict(int)
- 254 for conn in connections.all():
- Variables:
- args = ()
- view_map =
- {'GET': <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>>}
- Form = <class 'django.forms.forms.Form'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x7f56e491efd0>
- v =
- <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>>
- request =
- <WSGIRequest
- path:/inv/interface/3/,
- GET:<QueryDict: {u'_dc': [u'1425301440424']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'sessionid': '1328f42dac3f165548926fc5322580bb'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- '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': 'close',
- 'HTTP_COOKIE': 'sessionid=1328f42dac3f165548926fc5322580bb',
- 'HTTP_HOST': '127.0.0.1',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36',
- 'HTTP_X_SCHEME': 'http',
- 'PATH_INFO': u'/inv/interface/3/',
- 'QUERY_STRING': '_dc=1425301440424',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '80',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x7f56f315e300>,
- 'wsgi.input': <_io.BytesIO object at 0x7f56e17b7d10>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- app_logger = <logging.Logger object at 0x7f56e20b7410>
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- to_log_api_call = False
- kwargs = {'managed_object': u'3'}
- nq = <function nq at 0x7f56e15e7b18>
- app =
- <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement