Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2012-10-31 16:28:22.215376)
- Working directory: /opt/noc
- <class 'mongoengine.base.ValidationError'>
- Unable to dereference <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>:4f9399e1f3b682a680000268
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 103)
- Function: __get__
- 96 # Dereference DBRefs
- 97 if isinstance(value, ObjectId):
- 98 v = self.document_type.objects(id=value).first()
- 99 if v is not None:
- 100 instance._data[self.name] = v
- 101 else:
- 102 raise ValidationError("Unable to dereference %s:%s" % (
- 103 ==> self.document_type, value))
- 104 return super(PlainReferenceField, self).__get__(instance, owner)
- 105
- 106 def to_mongo(self, document):
- 107 if isinstance(document, Document):
- 108 # We need the id from the saved object to create the DBRef
- 109 id_ = document.id
- Variables:
- owner = <class 'noc.inv.models.subinterface.SubInterface'>
- instance = repr() failed
- self = <noc.lib.nosql.PlainReferenceField object at 0x807cae1d0>
- value = ObjectId('4f9399e1f3b682a680000268')
- v = None
- ------------------------------------------------------------------------
- File: /opt/noc/inv/apps/interface/views.py (Line: 144)
- Function: api_get_interfaces
- 137 "ipv4_addresses": i.ipv4_addresses,
- 138 "ipv6_addresses": i.ipv6_addresses,
- 139 "enabled_protocols": i.enabled_protocols,
- 140 "vlan": i.vlan_ids,
- 141 "vrf": i.forwarding_instance.name if i.forwarding_instance else ""
- 142 } for i in
- 143 SubInterface.objects.filter(managed_object=o.id)\
- 144 ==> .filter(q)
- 145 ]
- 146 return {
- 147 "l1": sorted_iname(l1),
- 148 "lag": sorted_iname(lag),
- 149 "l2": sorted_iname(l2),
- 150 "l3": sorted_iname(l3)
- Variables:
- get_style = <function get_style at 0x80980fe60>
- j = <Interface: bb-nmts: Gi 1/3>
- get_link = <function get_link at 0x80980f938>
- i = repr() failed
- self = <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>
- lag = [{'name': u'...
- request = <WSGIRequest
- path:/inv/interface/474/,
- GET:<QueryDict: {u'_dc': [u'1351686484920']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
- 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0',
- 'PATH_INFO': u'/inv/interface/474/',
- 'QUERY_STRING': '_dc=1351686484920',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- '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 0x8044bc0c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80991a3b0>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- managed_object = u'474'
- o = <ManagedObject: bb-nmts>
- style_cache = {ObjectId('5007f58ff3b6827566000000'): ''}
- q = <mongoengine.queryset.QCombination object at 0x80905db50>
- l2 = [{'tagged_vlans': [...'}]
- sorted_iname = <function sorted_iname at 0x80980ff50>
- l1 = [{'...}]
- ------------------------------------------------------------------------
- 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 = ()
- view_map = {'GET': <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x8066e3510>
- v = <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>>
- request = <WSGIRequest
- path:/inv/interface/474/,
- GET:<QueryDict: {u'_dc': [u'1351686484920']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
- 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0',
- 'PATH_INFO': u'/inv/interface/474/',
- 'QUERY_STRING': '_dc=1351686484920',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- '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 0x8044bc0c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80991a3b0>,
- '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 = {'managed_object': u'474'}
- app = <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement