diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-08-04 04:08:17 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-08-04 04:08:17 +0000 |
commit | 2f2549ad99f62370e6becc5ea56bae1a8722ec4d (patch) | |
tree | 9d65b3690c677e9c410208fe6f98f0d07e75f064 | |
parent | 37d24733995752dd785c70d511bd8bc462e0c020 (diff) | |
parent | 5dbbc102ebbeb4f6a007ac7dfc119cd7c4d436b8 (diff) | |
download | python-heatclient-2f2549ad99f62370e6becc5ea56bae1a8722ec4d.tar.gz |
Merge "Standardize import format"
38 files changed, 71 insertions, 72 deletions
diff --git a/heatclient/common/deployment_utils.py b/heatclient/common/deployment_utils.py index e6d68f8..adb1769 100644 --- a/heatclient/common/deployment_utils.py +++ b/heatclient/common/deployment_utils.py @@ -11,11 +11,12 @@ # under the License. import copy +import uuid + import six from six.moves.urllib import parse as urlparse from swiftclient import client as sc from swiftclient import utils as swiftclient_utils -import uuid from heatclient import exc from heatclient.openstack.common._i18n import _ diff --git a/heatclient/common/environment_format.py b/heatclient/common/environment_format.py index 179a205..6870b79 100644 --- a/heatclient/common/environment_format.py +++ b/heatclient/common/environment_format.py @@ -10,11 +10,11 @@ # License for the specific language governing permissions and limitations # under the License. +import yaml + from heatclient.common import template_format from heatclient.openstack.common._i18n import _ -import yaml - SECTIONS = ( PARAMETER_DEFAULTS, PARAMETERS, RESOURCE_REGISTRY, EVENT_SINKS diff --git a/heatclient/common/event_utils.py b/heatclient/common/event_utils.py index d490ecf..18a0b98 100644 --- a/heatclient/common/event_utils.py +++ b/heatclient/common/event_utils.py @@ -17,7 +17,6 @@ import time from heatclient.common import utils import heatclient.exc as exc - from heatclient.openstack.common._i18n import _ diff --git a/heatclient/common/format_utils.py b/heatclient/common/format_utils.py index 0202b6c..d1a9206 100644 --- a/heatclient/common/format_utils.py +++ b/heatclient/common/format_utils.py @@ -12,9 +12,10 @@ # # Copyright 2015 IBM Corp. +import sys + from osc_lib.command import command import six -import sys class RawFormat(command.ShowOne): diff --git a/heatclient/common/hook_utils.py b/heatclient/common/hook_utils.py index e8d4850..39fedb5 100644 --- a/heatclient/common/hook_utils.py +++ b/heatclient/common/hook_utils.py @@ -15,7 +15,6 @@ import logging from oslo_utils import fnmatch import heatclient.exc as exc - from heatclient.openstack.common._i18n import _ from heatclient.openstack.common._i18n import _LE diff --git a/heatclient/osc/v1/build_info.py b/heatclient/osc/v1/build_info.py index 1bedd87..9f90dd5 100644 --- a/heatclient/osc/v1/build_info.py +++ b/heatclient/osc/v1/build_info.py @@ -14,10 +14,10 @@ """Orchestration v1 build info action implementations""" import logging -import six from osc_lib.command import command from osc_lib import utils +import six from heatclient.common import utils as heat_utils diff --git a/heatclient/osc/v1/resource.py b/heatclient/osc/v1/resource.py index a3d998d..b7feb84 100644 --- a/heatclient/osc/v1/resource.py +++ b/heatclient/osc/v1/resource.py @@ -14,14 +14,14 @@ """Orchestration v1 Stack action implementations""" import logging -import six -from six.moves.urllib import request from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib.i18n import _ from osc_lib import utils from oslo_serialization import jsonutils +import six +from six.moves.urllib import request from heatclient.common import format_utils from heatclient.common import utils as heat_utils diff --git a/heatclient/osc/v1/resource_type.py b/heatclient/osc/v1/resource_type.py index 525a6ff..6d55ab5 100644 --- a/heatclient/osc/v1/resource_type.py +++ b/heatclient/osc/v1/resource_type.py @@ -14,14 +14,15 @@ """Orchestration v1 resource type implementations""" import logging + +from osc_lib.command import command +from osc_lib import exceptions as exc +from osc_lib.i18n import _ import six from heatclient.common import format_utils from heatclient.common import utils as heat_utils from heatclient import exc as heat_exc -from osc_lib.command import command -from osc_lib import exceptions as exc -from osc_lib.i18n import _ class ResourceTypeShow(format_utils.YamlFormat): diff --git a/heatclient/osc/v1/snapshot.py b/heatclient/osc/v1/snapshot.py index 82c8854..b5cc781 100644 --- a/heatclient/osc/v1/snapshot.py +++ b/heatclient/osc/v1/snapshot.py @@ -14,12 +14,12 @@ """Orchestration v1 Stack Snapshot implementations.""" import logging -import six from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib.i18n import _ from osc_lib import utils +import six from heatclient.common import format_utils from heatclient import exc as heat_exc diff --git a/heatclient/osc/v1/software_config.py b/heatclient/osc/v1/software_config.py index 555da23..7adccc8 100644 --- a/heatclient/osc/v1/software_config.py +++ b/heatclient/osc/v1/software_config.py @@ -14,14 +14,13 @@ """Orchestration v1 software config action implementations""" import logging -import six - -from six.moves.urllib import request -import yaml from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib import utils +import six +from six.moves.urllib import request +import yaml from heatclient.common import format_utils from heatclient.common import template_format diff --git a/heatclient/osc/v1/software_deployment.py b/heatclient/osc/v1/software_deployment.py index b9e6796..90c0ceb 100644 --- a/heatclient/osc/v1/software_deployment.py +++ b/heatclient/osc/v1/software_deployment.py @@ -14,11 +14,11 @@ """Orchestration v1 Software Deployment action implementations""" import logging -from oslo_serialization import jsonutils from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib import utils +from oslo_serialization import jsonutils from heatclient.common import deployment_utils from heatclient.common import format_utils diff --git a/heatclient/osc/v1/template.py b/heatclient/osc/v1/template.py index 0889a38..1b089dd 100644 --- a/heatclient/osc/v1/template.py +++ b/heatclient/osc/v1/template.py @@ -13,11 +13,10 @@ # Copyright 2015 IBM Corp. import logging -import six - from osc_lib.command import command from osc_lib import utils +import six from heatclient.common import format_utils from heatclient.common import http diff --git a/heatclient/tests/functional/osc/v1/base.py b/heatclient/tests/functional/osc/v1/base.py index aadf419..31a9cd7 100644 --- a/heatclient/tests/functional/osc/v1/base.py +++ b/heatclient/tests/functional/osc/v1/base.py @@ -11,8 +11,8 @@ # under the License. import os -import six +import six from tempest.lib.cli import base from tempest.lib.cli import output_parser diff --git a/heatclient/tests/functional/osc/v1/test_stack.py b/heatclient/tests/functional/osc/v1/test_stack.py index a502e83..8f7ecc8 100644 --- a/heatclient/tests/functional/osc/v1/test_stack.py +++ b/heatclient/tests/functional/osc/v1/test_stack.py @@ -10,9 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils as utils from heatclient.tests.functional.osc.v1 import base -from tempest.lib.common.utils import data_utils as utils class OpenStackClientStackTest(base.OpenStackClientTestBase): diff --git a/heatclient/tests/unit/osc/v1/test_event.py b/heatclient/tests/unit/osc/v1/test_event.py index 746c5c7..6c7b4ed 100644 --- a/heatclient/tests/unit/osc/v1/test_event.py +++ b/heatclient/tests/unit/osc/v1/test_event.py @@ -13,6 +13,7 @@ # Copyright 2015 IBM Corp. import copy + import mock import testscenarios diff --git a/heatclient/tests/unit/osc/v1/test_resource.py b/heatclient/tests/unit/osc/v1/test_resource.py index 4fc29ab..817638c 100644 --- a/heatclient/tests/unit/osc/v1/test_resource.py +++ b/heatclient/tests/unit/osc/v1/test_resource.py @@ -12,8 +12,8 @@ # import copy -import mock +import mock from osc_lib import exceptions as exc from heatclient import exc as heat_exc diff --git a/heatclient/tests/unit/osc/v1/test_software_config.py b/heatclient/tests/unit/osc/v1/test_software_config.py index 4bdf0bd..685a0a9 100644 --- a/heatclient/tests/unit/osc/v1/test_software_config.py +++ b/heatclient/tests/unit/osc/v1/test_software_config.py @@ -12,9 +12,8 @@ # import mock -import yaml - from osc_lib import exceptions as exc +import yaml from heatclient import exc as heat_exc from heatclient.osc.v1 import software_config diff --git a/heatclient/tests/unit/osc/v1/test_software_deployment.py b/heatclient/tests/unit/osc/v1/test_software_deployment.py index 76bc3cf..96ec84c 100644 --- a/heatclient/tests/unit/osc/v1/test_software_deployment.py +++ b/heatclient/tests/unit/osc/v1/test_software_deployment.py @@ -12,8 +12,8 @@ # import copy -import mock +import mock from osc_lib import exceptions as exc from heatclient import exc as heat_exc diff --git a/heatclient/tests/unit/osc/v1/test_stack.py b/heatclient/tests/unit/osc/v1/test_stack.py index c357d58..d2ee28c 100644 --- a/heatclient/tests/unit/osc/v1/test_stack.py +++ b/heatclient/tests/unit/osc/v1/test_stack.py @@ -13,14 +13,14 @@ import copy import io + import mock +from osc_lib import exceptions as exc +from osc_lib import utils import six import testscenarios import yaml -from osc_lib import exceptions as exc -from osc_lib import utils - from heatclient.common import template_format from heatclient import exc as heat_exc from heatclient.osc.v1 import stack diff --git a/heatclient/tests/unit/test_actions.py b/heatclient/tests/unit/test_actions.py index 1fcfe8a..93b6e49 100644 --- a/heatclient/tests/unit/test_actions.py +++ b/heatclient/tests/unit/test_actions.py @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import testtools + from heatclient.tests.unit import fakes from heatclient.v1 import actions -import testtools - class ActionManagerTest(testtools.TestCase): diff --git a/heatclient/tests/unit/test_build_info.py b/heatclient/tests/unit/test_build_info.py index 9ee93da..bc08f3b 100644 --- a/heatclient/tests/unit/test_build_info.py +++ b/heatclient/tests/unit/test_build_info.py @@ -12,6 +12,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + import mock from oslo_serialization import jsonutils import testtools diff --git a/heatclient/tests/unit/test_common_http.py b/heatclient/tests/unit/test_common_http.py index 49a918d..3636585 100644 --- a/heatclient/tests/unit/test_common_http.py +++ b/heatclient/tests/unit/test_common_http.py @@ -13,11 +13,11 @@ # limitations under the License. import logging -import mock import os import socket from keystoneauth1 import adapter +import mock from mox3 import mox from oslo_serialization import jsonutils import requests diff --git a/heatclient/tests/unit/test_deployment_utils.py b/heatclient/tests/unit/test_deployment_utils.py index 5754b17..2f9c637 100644 --- a/heatclient/tests/unit/test_deployment_utils.py +++ b/heatclient/tests/unit/test_deployment_utils.py @@ -16,11 +16,11 @@ import six import swiftclient.client import testscenarios import testtools +from testtools import matchers from heatclient.common import deployment_utils from heatclient import exc from heatclient.v1 import software_configs -from testtools import matchers load_tests = testscenarios.load_tests_apply_scenarios diff --git a/heatclient/tests/unit/test_environment_format.py b/heatclient/tests/unit/test_environment_format.py index e4145b9..d0614b2 100644 --- a/heatclient/tests/unit/test_environment_format.py +++ b/heatclient/tests/unit/test_environment_format.py @@ -10,14 +10,13 @@ # License for the specific language governing permissions and limitations # under the License. -from heatclient.common import environment_format - import mock import six import testscenarios import testtools import yaml +from heatclient.common import environment_format load_tests = testscenarios.load_tests_apply_scenarios diff --git a/heatclient/tests/unit/test_events.py b/heatclient/tests/unit/test_events.py index 82e0bb8..584f713 100644 --- a/heatclient/tests/unit/test_events.py +++ b/heatclient/tests/unit/test_events.py @@ -12,13 +12,13 @@ # License for the specific language governing permissions and limitations # under the License. -from heatclient.common import utils -from heatclient.v1 import events - import mock from mox3 import mox import testtools +from heatclient.common import utils +from heatclient.v1 import events + class EventManagerTest(testtools.TestCase): diff --git a/heatclient/tests/unit/test_resource_formatter.py b/heatclient/tests/unit/test_resource_formatter.py index e3a053d..073e12f 100644 --- a/heatclient/tests/unit/test_resource_formatter.py +++ b/heatclient/tests/unit/test_resource_formatter.py @@ -13,6 +13,7 @@ import json import os + import six from heatclient.common import resource_formatter diff --git a/heatclient/tests/unit/test_resource_types.py b/heatclient/tests/unit/test_resource_types.py index 7bbb591..e31af8e 100644 --- a/heatclient/tests/unit/test_resource_types.py +++ b/heatclient/tests/unit/test_resource_types.py @@ -10,6 +10,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + import mock import testtools diff --git a/heatclient/tests/unit/test_resources.py b/heatclient/tests/unit/test_resources.py index 7b9b320..d5200e3 100644 --- a/heatclient/tests/unit/test_resources.py +++ b/heatclient/tests/unit/test_resources.py @@ -11,14 +11,14 @@ # 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 heatclient.common import utils - -from heatclient.v1 import resources -from six.moves.urllib import parse from mox3 import mox +from six.moves.urllib import parse import testtools +from heatclient.common import utils +from heatclient.v1 import resources + class ResourceManagerTest(testtools.TestCase): diff --git a/heatclient/tests/unit/test_service.py b/heatclient/tests/unit/test_service.py index 4213cab..18c59c8 100644 --- a/heatclient/tests/unit/test_service.py +++ b/heatclient/tests/unit/test_service.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from heatclient import exc import testtools - +from heatclient import exc from heatclient.v1 import services diff --git a/heatclient/tests/unit/test_shell.py b/heatclient/tests/unit/test_shell.py index 7587a12..7071363 100644 --- a/heatclient/tests/unit/test_shell.py +++ b/heatclient/tests/unit/test_shell.py @@ -11,28 +11,27 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os +import sys +import tempfile +import uuid + import fixtures +from keystoneauth1 import fixture as keystone_fixture import mock -import os +from mox3 import mox +from oslo_serialization import jsonutils +from oslo_utils import encodeutils from oslotest import mockpatch import requests +from requests_mock.contrib import fixture as rm_fixture import six from six.moves.urllib import parse from six.moves.urllib import request -import sys -import tempfile import testscenarios import testtools -import uuid import yaml -from keystoneauth1 import fixture as keystone_fixture -from oslo_serialization import jsonutils -from oslo_utils import encodeutils -from requests_mock.contrib import fixture as rm_fixture - -from mox3 import mox - from heatclient.common import http from heatclient.common import utils from heatclient import exc diff --git a/heatclient/tests/unit/test_stacks.py b/heatclient/tests/unit/test_stacks.py index 34c7e71..443015a 100644 --- a/heatclient/tests/unit/test_stacks.py +++ b/heatclient/tests/unit/test_stacks.py @@ -9,13 +9,14 @@ # 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 heatclient.v1 import stacks import mock import testscenarios from testscenarios import scenarios as scnrs import testtools +from heatclient.v1 import stacks + load_tests = testscenarios.load_tests_apply_scenarios diff --git a/heatclient/tests/unit/test_template_utils.py b/heatclient/tests/unit/test_template_utils.py index 2fc6cd2..6440af2 100644 --- a/heatclient/tests/unit/test_template_utils.py +++ b/heatclient/tests/unit/test_template_utils.py @@ -13,11 +13,12 @@ import base64 import json +import tempfile + from mox3 import mox import six from six.moves.urllib import error from six.moves.urllib import request -import tempfile import testtools from testtools import matchers import yaml diff --git a/heatclient/tests/unit/test_utils.py b/heatclient/tests/unit/test_utils.py index 8237b4f..a58dc22 100644 --- a/heatclient/tests/unit/test_utils.py +++ b/heatclient/tests/unit/test_utils.py @@ -12,12 +12,15 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + +import os + +import mock +import testtools + from heatclient.common import utils from heatclient import exc from heatclient.v1 import resources as hc_res -import mock -import os -import testtools class ShellTest(testtools.TestCase): diff --git a/heatclient/tests/unit/v1/test_hooks.py b/heatclient/tests/unit/v1/test_hooks.py index 70a190b..65abc03 100644 --- a/heatclient/tests/unit/v1/test_hooks.py +++ b/heatclient/tests/unit/v1/test_hooks.py @@ -14,9 +14,8 @@ import mock import testtools -import heatclient.v1.shell as shell - from heatclient.common import hook_utils +import heatclient.v1.shell as shell class TestHooks(testtools.TestCase): diff --git a/heatclient/v1/resource_types.py b/heatclient/v1/resource_types.py index b4039d1..ef29cdc 100644 --- a/heatclient/v1/resource_types.py +++ b/heatclient/v1/resource_types.py @@ -11,13 +11,11 @@ # License for the specific language governing permissions and limitations # under the License. -import six - -from heatclient.common import utils - from oslo_utils import encodeutils +import six from six.moves.urllib import parse +from heatclient.common import utils from heatclient.openstack.common.apiclient import base diff --git a/heatclient/v1/resources.py b/heatclient/v1/resources.py index b55017d..0d80596 100644 --- a/heatclient/v1/resources.py +++ b/heatclient/v1/resources.py @@ -12,12 +12,12 @@ # 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 heatclient.common import utils from oslo_utils import encodeutils import six from six.moves.urllib import parse +from heatclient.common import utils from heatclient.openstack.common.apiclient import base from heatclient.v1 import stacks diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index cfc942a..76d40a4 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -14,12 +14,12 @@ # under the License. import logging +import sys from oslo_serialization import jsonutils from oslo_utils import strutils import six from six.moves.urllib import request -import sys import yaml from heatclient.common import deployment_utils @@ -29,13 +29,11 @@ from heatclient.common import http from heatclient.common import template_format from heatclient.common import template_utils from heatclient.common import utils - +import heatclient.exc as exc from heatclient.openstack.common._i18n import _ from heatclient.openstack.common._i18n import _LI from heatclient.openstack.common._i18n import _LW -import heatclient.exc as exc - logger = logging.getLogger(__name__) diff --git a/heatclient/v1/stacks.py b/heatclient/v1/stacks.py index 40ac180..864772f 100644 --- a/heatclient/v1/stacks.py +++ b/heatclient/v1/stacks.py @@ -12,11 +12,11 @@ # 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 heatclient.common import utils import six from six.moves.urllib import parse +from heatclient.common import utils from heatclient import exc from heatclient.openstack.common._i18n import _ from heatclient.openstack.common.apiclient import base |