Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.38 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2015-03-02 16:09:09.814323)
  2. BRANCH: develop TIP: a615e849a029
  3. PROCESS: ./scripts/noc-web.py
  4. ERROR FINGERPRINT: 876e760e-1db9-5a43-abff-0726579aa86d
  5. WORKING DIRECTORY: /opt/noc
  6. EXCEPTION: <class 'noc.sa.models.managedobject.DoesNotExist'> ManagedObject matching query does not exist.
  7. START OF TRACEBACK
  8. ------------------------------------------------------------------------
  9. File: local/lib/python2.7/site-packages/django/db/models/query.py (Line: 366)
  10. Function: get
  11. 359 if self.query.can_filter():
  12. 360 clone = clone.order_by()
  13. 361 num = len(clone)
  14. 362 if num == 1:
  15. 363 return clone._result_cache[0]
  16. 364 if not num:
  17. 365 raise self.model.DoesNotExist("%s matching query does not exist."
  18. 366 ==> % self.model._meta.object_name)
  19. 367 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
  20. 368 % (self.model._meta.object_name, num, kwargs))
  21. 369
  22. 370 def create(self, **kwargs):
  23. 371 """
  24. 372 Creates a new object with the given kwargs, saving it to the database
  25. Variables:
  26. clone = []
  27. num = 0
  28. self =
  29. [<ManagedObject: cisco_2811>, <ManagedObject: cisco3725>, <ManagedObject: cisco3725_2>, <ManagedObject: cisco3725_3>, <ManagedObject: cisco7200>, <ManagedObject: SAE>, <ManagedObject: vmm_1>, <ManagedObject: vmm_old>]
  30. args = ()
  31. kwargs = {'pk': 12}
  32. ------------------------------------------------------------------------
  33. File: local/lib/python2.7/site-packages/django/db/models/manager.py (Line: 131)
  34. Function: get
  35. 124 def distinct(self, *args, **kwargs):
  36. 125 return self.get_query_set().distinct(*args, **kwargs)
  37. 126
  38. 127 def extra(self, *args, **kwargs):
  39. 128 return self.get_query_set().extra(*args, **kwargs)
  40. 129
  41. 130 def get(self, *args, **kwargs):
  42. 131 ==> return self.get_query_set().get(*args, **kwargs)
  43. 132
  44. 133 def get_or_create(self, **kwargs):
  45. 134 return self.get_query_set().get_or_create(**kwargs)
  46. 135
  47. 136 def create(self, **kwargs):
  48. 137 return self.get_query_set().create(**kwargs)
  49. Variables:
  50. self = <django.db.models.manager.Manager object at 0x7f56e2e6bcd0>
  51. args = ()
  52. kwargs = {'pk': 12}
  53. ------------------------------------------------------------------------
  54. File: lib/nosql.py (Line: 263)
  55. Function: __get__
  56. 256 # Document class being used rather than a document object
  57. 257 return self
  58. 258
  59. 259 # Get value from document instance if available
  60. 260 value = instance._data.get(self.name)
  61. 261 # Dereference
  62. 262 if isinstance(value, int):
  63. 263 ==> value = self.document_type.objects.get(pk=value)
  64. 264 if value is not None:
  65. 265 instance._data[self.name] = value
  66. 266 return super(ForeignKeyField, self).__get__(instance, owner)
  67. 267
  68. 268 def __set__(self, instance, value):
  69. 269 if not value:
  70. Variables:
  71. owner = <class 'noc.inv.models.interface.Interface'>
  72. instance = repr() failed
  73. self = <noc.lib.nosql.ForeignKeyField object at 0x7f56e2c592d0>
  74. value = 12
  75. ------------------------------------------------------------------------
  76. File: inv/apps/interface/views.py (Line: 70)
  77. Function: get_link
  78. 63 def get_link(i):
  79. 64 link = i.link
  80. 65 if not link:
  81. 66 return None
  82. 67 if link.is_ptp:
  83. 68 # ptp
  84. 69 o = link.other_ptp(i)
  85. 70 ==> label = "%s:%s" % (o.managed_object.name, o.name)
  86. 71 elif link.is_lag:
  87. 72 # unresolved LAG
  88. 73 o = [ii for ii in link.other(i)
  89. 74 if ii.managed_object.id != i.managed_object.id]
  90. 75 label = "LAG %s: %s" % (o[0].managed_object.name,
  91. 76 ", ".join(ii.name for ii in o))
  92. Variables:
  93. i = <Interface: cisco3725: Fa 1/4>
  94. link = repr() failed
  95. o = repr() failed
  96. ------------------------------------------------------------------------
  97. File: inv/apps/interface/views.py (Line: 117)
  98. Function: api_get_interfaces
  99. 110 "state": i.state.id if i.state else default_state.id,
  100. 111 "state__label": unicode(i.state if i.state else default_state),
  101. 112 "vc_domain": i.vc_domain.id if i.vc_domain else None,
  102. 113 "vc_domain__label": unicode(i.vc_domain) if i.vc_domain else None,
  103. 114 "row_class": get_style(i)
  104. 115 } for i in
  105. 116 Interface.objects.filter(managed_object=o.id,
  106. 117 ==> type="physical")
  107. 118 ]
  108. 119 # LAG
  109. 120 lag = [
  110. 121 {
  111. 122 "id": str(i.id),
  112. 123 "name": i.name,
  113. Variables:
  114. default_state = <ResourceState: ALLOCATED>
  115. get_style = <function get_style at 0x7f56e16795f0>
  116. i = <Interface: cisco3725: Fa 1/4>
  117. self =
  118. <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>
  119. get_link = <function get_link at 0x7f56e1679578>
  120. request =
  121. <WSGIRequest
  122. path:/inv/interface/3/,
  123. GET:<QueryDict: {u'_dc': [u'1425301440424']}>,
  124. POST:<QueryDict: {}>,
  125. COOKIES:{'sessionid': '1328f42dac3f165548926fc5322580bb'},
  126. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  127. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  128. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  129. 'HTTP_CONNECTION': 'close',
  130. 'HTTP_COOKIE': 'sessionid=1328f42dac3f165548926fc5322580bb',
  131. 'HTTP_HOST': '127.0.0.1',
  132. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36',
  133. 'HTTP_X_SCHEME': 'http',
  134. 'PATH_INFO': u'/inv/interface/3/',
  135. 'QUERY_STRING': '_dc=1425301440424',
  136. 'REMOTE_ADDR': '127.0.0.1',
  137. 'REQUEST_METHOD': 'GET',
  138. 'SCRIPT_NAME': u'',
  139. 'SERVER_NAME': '127.0.0.1',
  140. 'SERVER_PORT': '80',
  141. 'SERVER_PROTOCOL': 'HTTP/1.0',
  142. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x7f56f315e300>,
  143. 'wsgi.input': <_io.BytesIO object at 0x7f56e17b7d10>,
  144. 'wsgi.multiprocess': True,
  145. 'wsgi.multithread': False,
  146. 'wsgi.run_once': False,
  147. 'wsgi.url_scheme': 'http',
  148. 'wsgi.version': (1, 0)}>
  149. managed_object = u'3'
  150. o = <ManagedObject: cisco3725>
  151. style_cache = {ObjectId('547ef21ef47636113ad8675f'): u'noc-color-1'}
  152. sorted_iname = <function sorted_iname at 0x7f56e1679140>
  153. ------------------------------------------------------------------------
  154. File: lib/app/site.py (Line: 248)
  155. Function: inner
  156. 241 a = dict((k, v[0] if len(v) == 1 else v)
  157. 242 for k, v in request.GET.lists())
  158. 243 app_logger.debug("API %s %s %s",
  159. 244 request.method, request.path, a)
  160. 245 # Call handler
  161. 246 v.__dict__["hits_metric"] += 1
  162. 247 with v.__dict__["time_metric"].timer():
  163. 248 ==> r = v(request, *args, **kwargs)
  164. 249 # Dump SQL statements
  165. 250 if self.log_sql_statements:
  166. 251 from django.db import connections
  167. 252 tsc = 0
  168. 253 sc = defaultdict(int)
  169. 254 for conn in connections.all():
  170. Variables:
  171. args = ()
  172. view_map =
  173. {'GET': <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>>}
  174. Form = <class 'django.forms.forms.Form'>
  175. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  176. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  177. self = <noc.lib.app.site.Site object at 0x7f56e491efd0>
  178. v =
  179. <bound method InterfaceAppplication.api_get_interfaces of <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>>
  180. request =
  181. <WSGIRequest
  182. path:/inv/interface/3/,
  183. GET:<QueryDict: {u'_dc': [u'1425301440424']}>,
  184. POST:<QueryDict: {}>,
  185. COOKIES:{'sessionid': '1328f42dac3f165548926fc5322580bb'},
  186. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  187. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  188. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  189. 'HTTP_CONNECTION': 'close',
  190. 'HTTP_COOKIE': 'sessionid=1328f42dac3f165548926fc5322580bb',
  191. 'HTTP_HOST': '127.0.0.1',
  192. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36',
  193. 'HTTP_X_SCHEME': 'http',
  194. 'PATH_INFO': u'/inv/interface/3/',
  195. 'QUERY_STRING': '_dc=1425301440424',
  196. 'REMOTE_ADDR': '127.0.0.1',
  197. 'REQUEST_METHOD': 'GET',
  198. 'SCRIPT_NAME': u'',
  199. 'SERVER_NAME': '127.0.0.1',
  200. 'SERVER_PORT': '80',
  201. 'SERVER_PROTOCOL': 'HTTP/1.0',
  202. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x7f56f315e300>,
  203. 'wsgi.input': <_io.BytesIO object at 0x7f56e17b7d10>,
  204. 'wsgi.multiprocess': True,
  205. 'wsgi.multithread': False,
  206. 'wsgi.run_once': False,
  207. 'wsgi.url_scheme': 'http',
  208. 'wsgi.version': (1, 0)}>
  209. app_logger = <logging.Logger object at 0x7f56e20b7410>
  210. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  211. to_log_api_call = False
  212. kwargs = {'managed_object': u'3'}
  213. nq = <function nq at 0x7f56e15e7b18>
  214. app =
  215. <noc.inv.apps.interface.views.InterfaceAppplication object at 0x7f56e20b7390>
  216. ------------------------------------------------------------------------
  217. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement