Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2014-10-22 12:01:33.628713)
- Working directory: /opt/noc
- <type 'exceptions.AttributeError'>
- 'EffectiveSettings' object has no attribute 'storage_rule'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/pm/apps/metricsettings/views.py (Line: 85)
- Function: api_trace_effective
- 78 def api_trace_effective(self, request, model_id, object_id):
- 79 o = MetricSettings(model_id=model_id, object_id=object_id).get_object()
- 80 if not o:
- 81 return self.response_not_found()
- 82 r = []
- 83 retentions = {}
- 84 for es in MetricSettings.get_effective_settings(o, trace=True):
- 85 ==> if es.storage_rule not in retentions:
- 86 retentions[es.storage_rule] = ", ".join(unicode(s) for s in es.storage_rule.retentions)
- 87 for m in es.metrics:
- 88 r += [{
- 89 "metric": m.metric or None,
- 90 "metric_type": m.metric_type.name,
- 91 "is_active": es.is_active,
- Variables:
- model_id = u'inv.Interface'
- self =
- <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>
- request =
- <WSGIRequest
- path:/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/,
- GET:<QueryDict: {u'_dc': [u'1413964868472']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': 'Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc',
- 'sessionid': '5a88dc96950aa66e61462db9da5ba5d5'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc; sessionid=5a88dc96950aa66e61462db9da5ba5d5',
- 'HTTP_HOST': 'noc',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0',
- 'HTTP_X_SCHEME': 'http',
- 'PATH_INFO': u'/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/',
- 'QUERY_STRING': '_dc=1413964868472',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': 'noc',
- 'SERVER_PORT': '80',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x808f655d0>,
- 'wsgi.input': <_io.BytesIO object at 0x81324a530>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- o = <Interface: isam-mkazakova: 1>
- r = []
- object_id = u'5416e41cf3b6827586ee44d7'
- retentions = {}
- es =
- <noc.pm.models.effectivesettings.EffectiveSettings object at 0x813c00910>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 246)
- Function: inner
- 239 for k, v in request.POST.lists())
- 240 elif request.method == "GET":
- 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 ==> r = v(request, *args, **kwargs)
- 247 # Dump SQL statements
- 248 if self.log_sql_statements:
- 249 from django.db import connections
- 250 tsc = 0
- 251 sc = defaultdict(int)
- 252 for conn in connections.all():
- Variables:
- args = ()
- view_map =
- {'GET': <bound method MetricSettingsApplication.api_trace_effective of <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>>}
- 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 0x80d5117d0>
- v =
- <bound method MetricSettingsApplication.api_trace_effective of <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>>
- request =
- <WSGIRequest
- path:/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/,
- GET:<QueryDict: {u'_dc': [u'1413964868472']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': 'Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc',
- 'sessionid': '5a88dc96950aa66e61462db9da5ba5d5'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=Heph8r5sa8IhdtXSyhWHNNuLqfZsGqOc; sessionid=5a88dc96950aa66e61462db9da5ba5d5',
- 'HTTP_HOST': 'noc',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0',
- 'HTTP_X_SCHEME': 'http',
- 'PATH_INFO': u'/pm/metricsettings/inv.Interface/5416e41cf3b6827586ee44d7/effective/trace/',
- 'QUERY_STRING': '_dc=1413964868472',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': 'noc',
- 'SERVER_PORT': '80',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x808f655d0>,
- 'wsgi.input': <_io.BytesIO object at 0x81324a530>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- app_logger = <logging.Logger object at 0x810aec790>
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- to_log_api_call = False
- kwargs = {'model_id': u'inv.Interface', 'object_id': u'5416e41cf3b6827586ee44d7'}
- nq = <function nq at 0x813e19398>
- app =
- <noc.pm.apps.metricsettings.views.MetricSettingsApplication object at 0x810aec110>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment