Compute: remove get call for service

Bug #1697687 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Fix Released
Undecided
Bhagyashri Shewale

Bug Description

Nova has not implemented show service API (GET individual service details). So IMO it make no sense to have this support in openstacksdk. As of now "get_service" from openstacksdk raises ResourceNotFound exception [1].

Error log while getting the service with valid service id:

Traceback (most recent call last):
File "test_openstacksdk_compute.py", line 275, in <module> get_service = conn.compute.get_service(5)
File "/opt/stack/python-openstacksdk/openstack/compute/v2/_proxy.py", line 1078, in get_service return self._get(_service.Service, service)
File "/opt/stack/python-openstacksdk/openstack/proxy2.py", line 37, in check return method(self, expected, actual, *args, **kwargs)
File "/opt/stack/python-openstacksdk/openstack/proxy2.py", line 225, in _get http_status=e.http_status, cause=e.cause)
openstack.exceptions.ResourceNotFound: ResourceNotFound: No Service found for 5, The resource could not be found.

For reference:
https://github.com/openstack/python-openstacksdk/blob/master/openstack/compute/v2/_proxy.py#L1059

Changed in python-openstacksdk:
assignee: nobody → Bhagyashri Shewale (bhagyashri-shewale)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstacksdk (master)

Fix proposed to branch: master
Review: https://review.openstack.org/474124

Changed in python-openstacksdk:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/474124
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=bdd048e76c36e0a3ae787c5dedfa06868abc6229
Submitter: Jenkins
Branch: master

commit bdd048e76c36e0a3ae787c5dedfa06868abc6229
Author: bhagyashris <email address hidden>
Date: Tue Jun 13 18:15:25 2017 +0530

    Remove get_service method from compute

    If a get_service method is called with a valid service id,
    then it raises ResourceNotFound exception as this API is not
    implemented in nova.

    Removed this method and related test cases to cleanup the code.

    Closes-Bug: #1697687
    Change-Id: I4086f4731fc653d721fe879b718b117327460933

Changed in python-openstacksdk:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.