resource: Remove unused 'Resource.service' attribute

This has been unused since we switched to discovery way back in change
I11c16d37d3ab3d77bed3a0bcbd98f1fa33b9555f.

Change-Id: I3a60ab7b5a9fcdee9765e3c53497d1c1c49c511f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-07-25 13:12:35 +01:00
parent 41d19a5591
commit f9bea72ac5
2 changed files with 0 additions and 7 deletions

View File

@ -471,9 +471,6 @@ class Resource(dict):
#: The base part of the URI for this resource.
base_path = ""
#: The service associated with this resource to find the service URL.
service = None
#: Allow create operation for this resource.
allow_create = False
#: Allow get operation for this resource.
@ -1339,9 +1336,6 @@ class Resource(dict):
# Resource class that is calling session.$something to be complete.
if isinstance(session, adapter.Adapter):
return session
if hasattr(session, '_sdk_connection'):
service_type = cls.service['service_type']
return getattr(session._sdk_connection, service_type)
raise ValueError(
"The session argument to Resource methods requires either an"
" instance of an openstack.proxy.Proxy object or at the very least"

View File

@ -113,7 +113,6 @@ class TestRateLimit(base.TestCase):
self.assertIsNone(sot.resource_key)
self.assertIsNone(sot.resources_key)
self.assertEqual("", sot.base_path)
self.assertIsNone(sot.service)
self.assertFalse(sot.allow_create)
self.assertFalse(sot.allow_fetch)
self.assertFalse(sot.allow_commit)