Merge "resource: Remove unused 'Resource.service' attribute"

This commit is contained in:
Zuul 2023-08-25 12:08:07 +00:00 committed by Gerrit Code Review
commit 3a989e1bd5
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)