diff --git a/mistralclient/api/base.py b/mistralclient/api/base.py index 522927a9..a2c5325b 100644 --- a/mistralclient/api/base.py +++ b/mistralclient/api/base.py @@ -16,7 +16,7 @@ import json -from mistralclient.openstack.common import log as logging +import logging LOG = logging.getLogger(__name__) diff --git a/mistralclient/api/httpclient.py b/mistralclient/api/httpclient.py index 55c21252..ddc57b31 100644 --- a/mistralclient/api/httpclient.py +++ b/mistralclient/api/httpclient.py @@ -16,7 +16,7 @@ import requests -from mistralclient.openstack.common import log as logging +import logging LOG = logging.getLogger(__name__) diff --git a/mistralclient/commands/executions.py b/mistralclient/commands/executions.py index 9c4f59f3..dc29f676 100644 --- a/mistralclient/commands/executions.py +++ b/mistralclient/commands/executions.py @@ -15,12 +15,12 @@ # import json +import logging from cliff.command import Command as BaseCommand from cliff.lister import Lister as ListCommand from cliff.show import ShowOne as ShowCommand -from mistralclient.openstack.common import log as logging from mistralclient.api.executions import ExecutionManager LOG = logging.getLogger(__name__) diff --git a/mistralclient/commands/tasks.py b/mistralclient/commands/tasks.py index f4da96ad..0306dc2a 100644 --- a/mistralclient/commands/tasks.py +++ b/mistralclient/commands/tasks.py @@ -14,10 +14,11 @@ # under the License. # +import logging + from cliff.lister import Lister as ListCommand from cliff.show import ShowOne as ShowCommand -from mistralclient.openstack.common import log as logging from mistralclient.api.tasks import TaskManager LOG = logging.getLogger(__name__) diff --git a/mistralclient/commands/workbooks.py b/mistralclient/commands/workbooks.py index 435eec1a..33493b1a 100644 --- a/mistralclient/commands/workbooks.py +++ b/mistralclient/commands/workbooks.py @@ -15,12 +15,12 @@ # import argparse +import logging from cliff.command import Command as BaseCommand from cliff.lister import Lister as ListCommand from cliff.show import ShowOne as ShowCommand -from mistralclient.openstack.common import log as logging from mistralclient.api.workbooks import WorkbookManager LOG = logging.getLogger(__name__) diff --git a/mistralclient/shell.py b/mistralclient/shell.py index f5fdff01..8db99c77 100644 --- a/mistralclient/shell.py +++ b/mistralclient/shell.py @@ -18,10 +18,10 @@ Command-line interface to the Mistral APIs """ +import logging import sys from mistralclient.openstack.common.cliutils import env -from mistralclient.openstack.common import log as logging from mistralclient.api.client import Client diff --git a/mistralclient/tests/test_mistralclient.py b/mistralclient/tests/test_mistralclient.py new file mode 100644 index 00000000..2c53145e --- /dev/null +++ b/mistralclient/tests/test_mistralclient.py @@ -0,0 +1,26 @@ +# Copyright 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 mistralclient.openstack.common import log as logging +from mistralclient.tests import base + + +LOG = logging.getLogger(__name__) + + +class TestSolumclient(base.BaseCommandTest): + + def test_can_use_oslo_logging(self): + # Just showing that we can import and use logging + LOG.info('Nothing to see here.')