Advertisement
Guest User

Untitled

a guest
Oct 31st, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.33 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-10-31 16:28:22.215376)
  2. Working directory: /opt/noc
  3. <class 'mongoengine.base.ValidationError'>
  4. Unable to dereference <class 'noc.inv.models.forwardinginstance.ForwardingInstance'>:4f9399e1f3b682a680000268
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/lib/nosql.py (Line: 103)
  8. Function: __get__
  9. 96 # Dereference DBRefs
  10. 97 if isinstance(value, ObjectId):
  11. 98 v = self.document_type.objects(id=value).first()
  12. 99 if v is not None:
  13. 100 instance._data[self.name] = v
  14. 101 else:
  15. 102 raise ValidationError("Unable to dereference %s:%s" % (
  16. 103 ==> self.document_type, value))
  17. 104 return super(PlainReferenceField, self).__get__(instance, owner)
  18. 105
  19. 106 def to_mongo(self, document):
  20. 107 if isinstance(document, Document):
  21. 108 # We need the id from the saved object to create the DBRef
  22. 109 id_ = document.id
  23. Variables:
  24. owner = <class 'noc.inv.models.subinterface.SubInterface'>
  25. instance = repr() failed
  26. self = <noc.lib.nosql.PlainReferenceField object at 0x807cae1d0>
  27. value = ObjectId('4f9399e1f3b682a680000268')
  28. v = None
  29. ------------------------------------------------------------------------
  30. File: /opt/noc/inv/apps/interface/views.py (Line: 144)
  31. Function: api_get_interfaces
  32. 137 "ipv4_addresses": i.ipv4_addresses,
  33. 138 "ipv6_addresses": i.ipv6_addresses,
  34. 139 "enabled_protocols": i.enabled_protocols,
  35. 140 "vlan": i.vlan_ids,
  36. 141 "vrf": i.forwarding_instance.name if i.forwarding_instance else ""
  37. 142 } for i in
  38. 143 SubInterface.objects.filter(managed_object=o.id)\
  39. 144 ==> .filter(q)
  40. 145 ]
  41. 146 return {
  42. 147 "l1": sorted_iname(l1),
  43. 148 "lag": sorted_iname(lag),
  44. 149 "l2": sorted_iname(l2),
  45. 150 "l3": sorted_iname(l3)
  46. Variables:
  47. get_style = <function get_style at 0x80980fe60>
  48. j = <Interface: bb-nmts: Gi 1/3>
  49. get_link = <function get_link at 0x80980f938>
  50. i = repr() failed
  51. self = <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>
  52. lag = [{'name': u'...
  53. request = <WSGIRequest
  54. path:/inv/interface/474/,
  55. GET:<QueryDict: {u'_dc': [u'1351686484920']}>,
  56. POST:<QueryDict: {}>,
  57. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  58. 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
  59. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  60. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  61. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  62. 'HTTP_CONNECTION': 'close',
  63. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
  64. 'HTTP_DNT': '1',
  65. 'HTTP_HOST': '127.0.0.1:8000',
  66. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0',
  67. 'PATH_INFO': u'/inv/interface/474/',
  68. 'QUERY_STRING': '_dc=1351686484920',
  69. 'REMOTE_ADDR': '127.0.0.1',
  70. 'REQUEST_METHOD': 'GET',
  71. 'SCRIPT_NAME': u'',
  72. 'SERVER_NAME': '127.0.0.1',
  73. 'SERVER_PORT': '8000',
  74. 'SERVER_PROTOCOL': 'HTTP/1.0',
  75. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8044bc0c0>,
  76. 'wsgi.input': <_io.BytesIO object at 0x80991a3b0>,
  77. 'wsgi.multiprocess': True,
  78. 'wsgi.multithread': False,
  79. 'wsgi.run_once': False,
  80. 'wsgi.url_scheme': 'http',
  81. 'wsgi.version': (1, 0)}>
  82. managed_object = u'474'
  83. o = <ManagedObject: bb-nmts>
  84. style_cache = {ObjectId('5007f58ff3b6827566000000'): ''}
  85. q = <mongoengine.queryset.QCombination object at 0x80905db50>
  86. l2 = [{'tagged_vlans': [...'}]
  87. sorted_iname = <function sorted_iname at 0x80980ff50>
  88. l1 = [{'...}]
  89. ------------------------------------------------------------------------
  90. File: /opt/noc/lib/app/site.py (Line: 232)
  91. Function: inner
  92. 225 for k, v in request.POST.lists())
  93. 226 elif request.method == "GET":
  94. 227 a = dict((k, v[0] if len(v) == 1 else v)
  95. 228 for k, v in request.GET.lists())
  96. 229 logging.debug("API %s %s %s" % (request.method,
  97. 230 request.path, a))
  98. 231 # Call handler
  99. 232 ==> r = v(request, *args, **kwargs)
  100. 233 # Dump SQL statements
  101. 234 if self.log_sql_statements:
  102. 235 from django.db import connections
  103. 236 tsc = 0
  104. 237 sc = defaultdict(int)
  105. 238 for conn in connections.all():
  106. Variables:
  107. args = ()
  108. view_map = {'GET': <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>>}
  109. Form = <class 'django.forms.forms.Form'>
  110. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  111. self = <noc.lib.app.site.Site object at 0x8066e3510>
  112. v = <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>>
  113. request = <WSGIRequest
  114. path:/inv/interface/474/,
  115. GET:<QueryDict: {u'_dc': [u'1351686484920']}>,
  116. POST:<QueryDict: {}>,
  117. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  118. 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
  119. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  120. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  121. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  122. 'HTTP_CONNECTION': 'close',
  123. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
  124. 'HTTP_DNT': '1',
  125. 'HTTP_HOST': '127.0.0.1:8000',
  126. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0',
  127. 'PATH_INFO': u'/inv/interface/474/',
  128. 'QUERY_STRING': '_dc=1351686484920',
  129. 'REMOTE_ADDR': '127.0.0.1',
  130. 'REQUEST_METHOD': 'GET',
  131. 'SCRIPT_NAME': u'',
  132. 'SERVER_NAME': '127.0.0.1',
  133. 'SERVER_PORT': '8000',
  134. 'SERVER_PROTOCOL': 'HTTP/1.0',
  135. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8044bc0c0>,
  136. 'wsgi.input': <_io.BytesIO object at 0x80991a3b0>,
  137. 'wsgi.multiprocess': True,
  138. 'wsgi.multithread': False,
  139. 'wsgi.run_once': False,
  140. 'wsgi.url_scheme': 'http',
  141. 'wsgi.version': (1, 0)}>
  142. to_log_api_call = False
  143. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  144. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  145. kwargs = {'managed_object': u'474'}
  146. app = <noc.inv.apps.interface.views.InterfaceAppplication object at 0x80863b3d0>
  147. ------------------------------------------------------------------------
  148. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement