Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] api decorators will not resolve list.guids #2221

Open
simonOpenV opened this issue Nov 26, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@simonOpenV
Copy link
Contributor

commented Nov 26, 2018

---------------------------------------------------------------------------
HttpException                             Traceback (most recent call last)
<ipython-input-98-1f0cb987df3a> in <module>()
----> 1 vp1_api_client.get('backends')

/usr/lib/python2.7/dist-packages/ovs_extensions/api/client/baseclient.pyc in get(self, api, params)
    258         :type params: dict
    259         """
--> 260         return self._call(api=api, params=params, fct=requests.get)
    261 
    262     def post(self, api, data=None, params=None):

/usr/lib/python2.7/dist-packages/ovs_extensions/api/client/baseclient.pyc in _call(self, api, params, fct, timeout, **kwargs)
    212         headers, url = self._prepare(params=params)
    213         try:
--> 214             return self._process(fct(url=url.format(api), headers=headers, verify=self._verify, timeout=timeout, **kwargs))
    215         except HttpForbiddenException:
    216             if self._volatile_client is not None:

/usr/lib/python2.7/dist-packages/ovs_extensions/api/client/baseclient.pyc in _process(self, response, overrule_raw)
    200                 raise HttpNotFoundException(message, '')
    201             else:
--> 202                 raise HttpException(status_code, message)
    203 
    204     def _call(self, api, params, fct, timeout=None, **kwargs):

HttpException: Status code: 500 - Error: 'list' object has no attribute 'guids' (internal_server)'.

logging:

Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/usr/lib/python2.7/dist-packages/rest_framework/viewsets.py", line 78, in view
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     return self.dispatch(request, *args, **kwargs)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/usr/lib/python2.7/dist-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     return view_func(*args, **kwargs)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/usr/lib/python2.7/dist-packages/rest_framework/views.py", line 399, in dispatch
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     response = self.handle_exception(exc)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/usr/lib/python2.7/dist-packages/rest_framework/views.py", line 396, in dispatch
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     response = handler(request, *args, **kwargs)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/opt/OpenvStorage/webapps/api/backend/decorators.py", line 629, in new_function
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     return_value = f(*args, **kwargs)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/opt/OpenvStorage/webapps/api/backend/decorators.py", line 89, in new_function
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     result = f(*args, **kw)
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:   File "/opt/OpenvStorage/webapps/api/backend/decorators.py", line 374, in new_function
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]:     data_list = data_list.guids  # 'data_list' is a ovs.dal.datalist.DataList which has the guids stored
Nov 26 14:18:10 DEV-4N-199-191 ovs-webapp-api[2561]: AttributeError: 'list' object has no attribute 'guids'
@simonOpenV

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2019

This one should be fixed by #2222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.