From d409496dd622a43cd0285acc3edfea2fcf7224f8 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 18 May 2022 20:13:20 +0900 Subject: [PATCH] Remove unused designateclient designateclient was used by API v1 dashboard, but it was already removed. API v2 dashaobard does not depend on designateclient but it uses passthough APIs Change-Id: Ie1e3e7579cff979535a40585d8c11ed94557e6e1 --- .../enabled/_1721_dns_zones_panel.py | 8 ----- .../enabled/_1722_dns_reversedns_panel.py | 8 ----- designatedashboard/exceptions.py | 29 ------------------- .../local_settings.d/_1799_dns_settings.py | 9 ------ ...move-designateclient-e98963b8baa4aa4f.yaml | 4 +++ requirements.txt | 1 - 6 files changed, 4 insertions(+), 55 deletions(-) delete mode 100644 designatedashboard/exceptions.py create mode 100644 releasenotes/notes/remove-designateclient-e98963b8baa4aa4f.yaml diff --git a/designatedashboard/enabled/_1721_dns_zones_panel.py b/designatedashboard/enabled/_1721_dns_zones_panel.py index da72368..9099f09 100644 --- a/designatedashboard/enabled/_1721_dns_zones_panel.py +++ b/designatedashboard/enabled/_1721_dns_zones_panel.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from designatedashboard import exceptions - # The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'dnszones' # The name of the dashboard the PANEL associated with. Required. @@ -21,12 +19,6 @@ PANEL_DASHBOARD = 'project' # The name of the panel group the PANEL is associated with. PANEL_GROUP = 'dns' -ADD_EXCEPTIONS = { - 'recoverable': exceptions.RECOVERABLE, - 'not_found': exceptions.NOT_FOUND, - 'unauthorized': exceptions.UNAUTHORIZED, -} - ADD_INSTALLED_APPS = ['designatedashboard'] # Python panel class of the PANEL to be added. diff --git a/designatedashboard/enabled/_1722_dns_reversedns_panel.py b/designatedashboard/enabled/_1722_dns_reversedns_panel.py index 1728715..8fc2f0c 100644 --- a/designatedashboard/enabled/_1722_dns_reversedns_panel.py +++ b/designatedashboard/enabled/_1722_dns_reversedns_panel.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from designatedashboard import exceptions - # The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'reverse_dns' # The name of the dashboard the PANEL associated with. Required. @@ -21,12 +19,6 @@ PANEL_DASHBOARD = 'project' # The name of the panel group the PANEL is associated with. PANEL_GROUP = 'dns' -ADD_EXCEPTIONS = { - 'recoverable': exceptions.RECOVERABLE, - 'not_found': exceptions.NOT_FOUND, - 'unauthorized': exceptions.UNAUTHORIZED, -} - # Python panel class of the PANEL to be added. ADD_PANEL = ( 'designatedashboard.dashboards.project.ngdns.reverse_dns.panel.ReverseDns') diff --git a/designatedashboard/exceptions.py b/designatedashboard/exceptions.py deleted file mode 100644 index 677fba6..0000000 --- a/designatedashboard/exceptions.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014 Rackspace Hosting. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from designateclient import exceptions as designateclient - -from openstack_dashboard import exceptions - -NOT_FOUND = exceptions.NOT_FOUND + ( - designateclient.ResourceNotFound, - designateclient.NotFound, - ) -RECOVERABLE = exceptions.RECOVERABLE + ( - designateclient.BadRequest, - designateclient.Conflict, - ) -UNAUTHORIZED = exceptions.UNAUTHORIZED + ( - designateclient.Forbidden, - ) diff --git a/designatedashboard/local_settings.d/_1799_dns_settings.py b/designatedashboard/local_settings.d/_1799_dns_settings.py index 1e01805..930554f 100644 --- a/designatedashboard/local_settings.d/_1799_dns_settings.py +++ b/designatedashboard/local_settings.d/_1799_dns_settings.py @@ -21,12 +21,3 @@ settings.POLICY_FILES.update({ settings.DEFAULT_POLICY_FILES.update({ 'dns': 'default_policies/designate.yaml' }) - -# Sample -# settings.LOGGING['loggers'].update({ -# 'designateclient': { -# 'handlers': ['console'], -# 'level': 'DEBUG', -# 'propagate': False, -# } -# }) diff --git a/releasenotes/notes/remove-designateclient-e98963b8baa4aa4f.yaml b/releasenotes/notes/remove-designateclient-e98963b8baa4aa4f.yaml new file mode 100644 index 0000000..8d15bce --- /dev/null +++ b/releasenotes/notes/remove-designateclient-e98963b8baa4aa4f.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The ``python-designateclient`` library is no longer required. diff --git a/requirements.txt b/requirements.txt index 92186d9..b0d1c59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,5 @@ # process, which may cause wedges in the gate later. oslo.log>=3.36.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 -python-designateclient>=2.7.0 # Apache-2.0 horizon>=17.1.0 # Apache-2.0