Guest User

Untitled

a guest
Oct 22nd, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.27 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2014-10-22 12:01:33.628713)
  2. Working directory: /opt/noc
  3. <type 'exceptions.AttributeError'>
  4. 'EffectiveSettings' object has no attribute 'storage_rule'
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/pm/apps/metricsettings/views.py (Line: 85)
  8. Function: api_trace_effective
  9. 78 def api_trace_effective(self, request, model_id, object_id):
  10. 79 o = MetricSettings(model_id=model_id, object_id=object_id).get_object()
  11. 80 if not o:
  12. 81 return self.response_not_found()
  13. 82 r = []
  14. 83 retentions = {}
  15. 84 for es in MetricSettings.get_effective_settings(o, trace=True):
  16. 85 ==> if es.storage_rule not in retentions:
  17. 86 retentions[es.storage_rule] = ", ".join(unicode(s) for s in es.storage_rule.retentions)
  18. 87 for m in es.metrics:
  19. 88 r += [{
  20. 89 "metric": m.metric or None,
  21. 90 "metric_type": m.metric_type.name,
  22. 91 "is_active": es.is_active,
  23. Variables:
  24. model_id = u'inv.Interface'
  25. self =
  26. <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>
  27. request =
  28. <WSGIRequest
  29. path:/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/,
  30. GET:<QueryDict: {u'_dc': [u'1413964868472']}>,
  31. POST:<QueryDict: {}>,
  32. COOKIES:{'csrftoken': 'Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc',
  33. 'sessionid': '5a88dc96950aa66e61462db9da5ba5d5'},
  34. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  35. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  36. 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
  37. 'HTTP_CONNECTION': 'close',
  38. 'HTTP_COOKIE': 'csrftoken=Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc; sessionid=5a88dc96950aa66e61462db9da5ba5d5',
  39. 'HTTP_HOST': 'noc',
  40. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0',
  41. 'HTTP_X_SCHEME': 'http',
  42. 'PATH_INFO': u'/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/',
  43. 'QUERY_STRING': '_dc=1413964868472',
  44. 'REMOTE_ADDR': '127.0.0.1',
  45. 'REQUEST_METHOD': 'GET',
  46. 'SCRIPT_NAME': u'',
  47. 'SERVER_NAME': 'noc',
  48. 'SERVER_PORT': '80',
  49. 'SERVER_PROTOCOL': 'HTTP/1.0',
  50. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x808f655d0>,
  51. 'wsgi.input': <_io.BytesIO object at 0x81324a530>,
  52. 'wsgi.multiprocess': True,
  53. 'wsgi.multithread': False,
  54. 'wsgi.run_once': False,
  55. 'wsgi.url_scheme': 'http',
  56. 'wsgi.version': (1, 0)}>
  57. o = <Interface: isam-mkazakova: 1>
  58. r = []
  59. object_id = u'5416e41cf3b6827586ee44d7'
  60. retentions = {}
  61. es =
  62. <noc.pm.models.effectivesettings.EffectiveSettings object at 0x813c00910>
  63. ------------------------------------------------------------------------
  64. File: /opt/noc/lib/app/site.py (Line: 246)
  65. Function: inner
  66. 239 for k, v in request.POST.lists())
  67. 240 elif request.method == "GET":
  68. 241 a = dict((k, v[0] if len(v) == 1 else v)
  69. 242 for k, v in request.GET.lists())
  70. 243 app_logger.debug("API %s %s %s",
  71. 244 request.method, request.path, a)
  72. 245 # Call handler
  73. 246 ==> r = v(request, *args, **kwargs)
  74. 247 # Dump SQL statements
  75. 248 if self.log_sql_statements:
  76. 249 from django.db import connections
  77. 250 tsc = 0
  78. 251 sc = defaultdict(int)
  79. 252 for conn in connections.all():
  80. Variables:
  81. args = ()
  82. view_map =
  83. {'GET': <bound method MetricSettingsApplication.api_trace_effective of <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>>}
  84. Form = <class 'django.forms.forms.Form'>
  85. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  86. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  87. self = <noc.lib.app.site.Site object at 0x80d5117d0>
  88. v =
  89. <bound method MetricSettingsApplication.api_trace_effective of <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>>
  90. request =
  91. <WSGIRequest
  92. path:/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/,
  93. GET:<QueryDict: {u'_dc': [u'1413964868472']}>,
  94. POST:<QueryDict: {}>,
  95. COOKIES:{'csrftoken': 'Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc',
  96. 'sessionid': '5a88dc96950aa66e61462db9da5ba5d5'},
  97. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  98. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  99. 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
  100. 'HTTP_CONNECTION': 'close',
  101. 'HTTP_COOKIE': 'csrftoken=Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc; sessionid=5a88dc96950aa66e61462db9da5ba5d5',
  102. 'HTTP_HOST': 'noc',
  103. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0',
  104. 'HTTP_X_SCHEME': 'http',
  105. 'PATH_INFO': u'/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/',
  106. 'QUERY_STRING': '_dc=1413964868472',
  107. 'REMOTE_ADDR': '127.0.0.1',
  108. 'REQUEST_METHOD': 'GET',
  109. 'SCRIPT_NAME': u'',
  110. 'SERVER_NAME': 'noc',
  111. 'SERVER_PORT': '80',
  112. 'SERVER_PROTOCOL': 'HTTP/1.0',
  113. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x808f655d0>,
  114. 'wsgi.input': <_io.BytesIO object at 0x81324a530>,
  115. 'wsgi.multiprocess': True,
  116. 'wsgi.multithread': False,
  117. 'wsgi.run_once': False,
  118. 'wsgi.url_scheme': 'http',
  119. 'wsgi.version': (1, 0)}>
  120. app_logger = <logging.Logger object at 0x810aec790>
  121. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  122. to_log_api_call = False
  123. kwargs = {'model_id': u'inv.Interface', 'object_id': u'5416e41cf3b6827586ee44d7'}
  124. nq = <function nq at 0x813e19398>
  125. app =
  126. <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>
  127. ------------------------------------------------------------------------
  128. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment