diff --git a/vitrageclient/v1/cli/template.py b/vitrageclient/v1/cli/template.py index 00d3c75..a3ef406 100644 --- a/vitrageclient/v1/cli/template.py +++ b/vitrageclient/v1/cli/template.py @@ -16,7 +16,7 @@ from cliff import lister from cliff import show from oslo_log import log -from vitrageclient.common.exc import CommandException +from vitrageclient.common import exc from vitrageclient.common import utils LOG = log.getLogger(__name__) @@ -37,7 +37,7 @@ class TemplateValidate(show.ShowOne): def take_action(self, parsed_args): if not parsed_args.path: - raise CommandException(message='No path requested, add --path') + raise exc.CommandException(message='No path requested, add --path') if parsed_args.path: result = self.app.client.template.validate(path=parsed_args.path) diff --git a/vitrageclient/v1/cli/topology.py b/vitrageclient/v1/cli/topology.py index c2742d7..9c8aa76 100644 --- a/vitrageclient/v1/cli/topology.py +++ b/vitrageclient/v1/cli/topology.py @@ -11,7 +11,7 @@ # under the License. from cliff import show -from vitrageclient.common.exc import CommandException +from vitrageclient.common import exc # noinspection PyAbstractClass @@ -47,7 +47,7 @@ class TopologyShow(show.ShowOne): root = parsed_args.root if graph_type == 'graph' and limit is not None and root is None: - raise CommandException( + raise exc.CommandException( message="Graph-type 'graph' requires a 'root' with 'limit'.") topology = self.app.client.topology.get(limit=limit, diff --git a/vitrageclient/v1/template.py b/vitrageclient/v1/template.py index 339ab29..1daa49d 100644 --- a/vitrageclient/v1/template.py +++ b/vitrageclient/v1/template.py @@ -13,7 +13,7 @@ # under the License. import os from oslo_log import log -from vitrageclient.common.exc import CommandException +from vitrageclient.common import exc from vitrageclient.common import yaml_utils @@ -74,4 +74,4 @@ class Template(object): except ValueError as e: message = 'Could not load template file: %s. Reason: %s' \ % (path, e.message) - raise CommandException(message=message) + raise exc.CommandException(message=message)