Skip to content

Commit

Permalink
remove unused code (#19701)
Browse files Browse the repository at this point in the history
* remove unused code

* add changelog
  • Loading branch information
sarah-witt authored Feb 24, 2025
1 parent c3239b4 commit 85b3267
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions openstack_controller/changelog.d/19701.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused code.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ class Api(ABC):
def auth_url(self):
pass # pragma: no cover

@abstractmethod
def has_admin_role(self):
pass # pragma: no cover

@abstractmethod
def authorize_user(self):
pass # pragma: no cover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ def __init__(self, config, logger, http):
self._region_id = self.config.endpoint_region_id
self._catalog = None
self._current_project_id = None
self._role_names = None

def auth_url(self):
return self.config.keystone_server_url

def has_admin_role(self):
return 'admin' in self._role_names

def component_in_catalog(self, component_types):
return self._catalog.has_component(component_types)

Expand Down Expand Up @@ -123,7 +119,6 @@ def _authorize_data(self, data):
self._interface,
self._region_id,
)
self._role_names = [role.get('name') for role in response_json.get('token', {}).get('roles', [])]
self.http.options['headers']['X-Auth-Token'] = response.headers['X-Subject-Token']

def _add_microversion_headers(self):
Expand Down

0 comments on commit 85b3267

Please sign in to comment.