From 567e079848c13de2daced144b1a6ce0a141e32c3 Mon Sep 17 00:00:00 2001 From: Dantali0n Date: Thu, 9 May 2019 18:54:47 +0200 Subject: [PATCH] Remove unused exceptions Change-Id: Ibb7e3fa4052f04a4e3fc1de60afa6fbafd4a7f9b --- watcher/common/exception.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/watcher/common/exception.py b/watcher/common/exception.py index 912729f89..de78b36c3 100644 --- a/watcher/common/exception.py +++ b/watcher/common/exception.py @@ -236,11 +236,6 @@ class AuditTemplateAlreadyExists(Conflict): "already exists") -class AuditTemplateReferenced(Invalid): - msg_fmt = _("AuditTemplate %(audit_template)s is referenced by one or " - "multiple audits") - - class AuditTypeNotFound(Invalid): msg_fmt = _("Audit type %(audit_type)s could not be found") @@ -364,22 +359,10 @@ class NoSuchMetric(WatcherException): msg_fmt = _('No such metric') -class NoDataFound(WatcherException): - msg_fmt = _('No rows were returned') - - class AuthorizationFailure(WatcherException): msg_fmt = _('%(client)s connection failed. Reason: %(reason)s') -class KeystoneFailure(WatcherException): - msg_fmt = _("Keystone API endpoint is missing") - - -class MetricCollectorNotDefined(WatcherException): - msg_fmt = _("The metrics resource collector is not defined") - - class ClusterStateStale(WatcherException): msg_fmt = _("The cluster state is stale") @@ -392,10 +375,6 @@ class ClusterStateNotDefined(WatcherException): msg_fmt = _("The cluster state is not defined") -class CapacityNotDefined(WatcherException): - msg_fmt = _("The capacity %(capacity)s is not defined for '%(resource)s'") - - class NoAvailableStrategyForGoal(WatcherException): msg_fmt = _("No strategy could be found to achieve the '%(goal)s' goal.") @@ -410,10 +389,6 @@ class GlobalEfficacyComputationError(WatcherException): "goal using the '%(strategy)s' strategy.") -class NoMetricValuesForInstance(WatcherException): - msg_fmt = _("No values returned by %(resource_id)s for %(metric_name)s.") - - class UnsupportedDataSource(UnsupportedError): msg_fmt = _("Datasource %(datasource)s is not supported " "by strategy %(strategy)s") @@ -423,10 +398,6 @@ class DataSourceNotAvailable(WatcherException): msg_fmt = _("Datasource %(datasource)s is not available.") -class NoSuchMetricForHost(WatcherException): - msg_fmt = _("No %(metric)s metric for %(host)s found.") - - class ServiceAlreadyExists(Conflict): msg_fmt = _("A service with name %(name)s is already working on %(host)s.")