Fix invalid import order
Updated import order as per the OpenStack import standards [1]. Modules under magnum/common/pythonk8sclient are not covered in this patch because this code is generated via a third party tool "swagger-codegen" which does not follows openstack standards yet. [1] http://docs.openstack.org/developer/hacking/#import-order-template Change-Id: Ia87f3e797ee627bf3c04d2bae9639fd305b41b0d
This commit is contained in:
parent
4a537979e2
commit
e7be462a24
@ -17,7 +17,6 @@ import sys
|
||||
from cliff import app
|
||||
from cliff import commandmanager
|
||||
from cliff import lister
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from magnum.conductor import template_definition as tdef
|
||||
|
@ -16,6 +16,7 @@
|
||||
Certificate manager API
|
||||
"""
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from magnum.common.x509 import operations
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
import uuid
|
||||
|
||||
from heatclient.common import template_utils
|
||||
@ -20,6 +19,7 @@ from heatclient import exc
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import loopingcall
|
||||
import six
|
||||
|
||||
from magnum.common import clients
|
||||
from magnum.common import exception
|
||||
|
@ -11,8 +11,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
"""Magnum Docker RPC handler."""
|
||||
from docker import errors
|
||||
|
||||
import functools
|
||||
|
||||
from docker import errors
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
|
||||
|
@ -14,7 +14,6 @@ from oslo_versionedobjects import fields
|
||||
|
||||
from magnum.db import api as dbapi
|
||||
from magnum.objects import base
|
||||
|
||||
from magnum.objects import fields as m_fields
|
||||
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import ast
|
||||
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from magnum.common import exception
|
||||
@ -17,8 +19,6 @@ from magnum.common.pythonk8sclient.swagger_client import rest
|
||||
from magnum.db import api as dbapi
|
||||
from magnum.objects import base
|
||||
|
||||
import ast
|
||||
|
||||
|
||||
@base.MagnumObjectRegistry.register
|
||||
class Pod(base.MagnumPersistentObject, base.MagnumObject,
|
||||
|
@ -12,6 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import ast
|
||||
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from magnum.common import exception
|
||||
@ -19,8 +21,6 @@ from magnum.common.pythonk8sclient.swagger_client import rest
|
||||
from magnum.db import api as dbapi
|
||||
from magnum.objects import base
|
||||
|
||||
import ast
|
||||
|
||||
|
||||
@base.MagnumObjectRegistry.register
|
||||
class ReplicationController(base.MagnumPersistentObject, base.MagnumObject,
|
||||
|
@ -10,6 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import ast
|
||||
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from magnum.common import exception
|
||||
@ -18,8 +20,6 @@ from magnum.db import api as dbapi
|
||||
from magnum.objects import base
|
||||
from magnum.objects import fields as magnum_fields
|
||||
|
||||
import ast
|
||||
|
||||
|
||||
@base.MagnumObjectRegistry.register
|
||||
class Service(base.MagnumPersistentObject, base.MagnumObject,
|
||||
|
@ -14,10 +14,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
import functools
|
||||
import six
|
||||
|
||||
from oslo_log import log
|
||||
from oslo_service import periodic_task
|
||||
import six
|
||||
|
||||
from magnum.common import clients
|
||||
from magnum.common import context
|
||||
|
@ -10,9 +10,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import time
|
||||
|
||||
from oslo_config import cfg
|
||||
from requests import exceptions as req_exceptions
|
||||
import time
|
||||
|
||||
from magnum.common import docker_utils
|
||||
from magnum.tests.functional.python_client_base import BayAPITLSTest
|
||||
|
@ -13,9 +13,9 @@
|
||||
from __future__ import print_function
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from tempest import config # noqa
|
||||
|
||||
|
||||
service_available_group = cfg.OptGroup(name="service_available",
|
||||
title="Available OpenStack Services")
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
import jsonpatch
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import wsme
|
||||
|
||||
from magnum.api import utils
|
||||
@ -22,7 +23,6 @@ from magnum.common import exception
|
||||
from magnum.common import utils as common_utils
|
||||
from magnum.tests.unit.api import base
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -11,10 +11,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
import datetime
|
||||
import mock
|
||||
import pytz
|
||||
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
import pytz
|
||||
|
||||
from magnum.api import servicegroup as svc_grp
|
||||
from magnum.tests.unit.api import base as api_base
|
||||
|
@ -13,6 +13,7 @@
|
||||
Utils for testing the API service.
|
||||
"""
|
||||
import datetime
|
||||
|
||||
import pytz
|
||||
|
||||
from magnum.api.controllers.v1 import bay as bay_controller
|
||||
|
@ -11,8 +11,8 @@
|
||||
# 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 mock
|
||||
from oslo_config import fixture
|
||||
|
||||
from magnum.common import cert_manager
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import inspect
|
||||
|
||||
import mock
|
||||
|
||||
from magnum.common import exception
|
||||
|
@ -12,9 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
import mock
|
||||
|
||||
from magnum.common.x509 import operations
|
||||
from magnum.tests import base
|
||||
|
@ -12,15 +12,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import six
|
||||
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
from cryptography import x509 as c_x509
|
||||
from cryptography.x509.oid import NameOID
|
||||
import mock
|
||||
import six
|
||||
|
||||
from magnum.common.x509 import operations
|
||||
from magnum.tests import base
|
||||
|
@ -18,6 +18,9 @@ import six
|
||||
import uuid
|
||||
|
||||
from heatclient import exc
|
||||
import mock
|
||||
from mock import patch
|
||||
from oslo_config import cfg
|
||||
from oslo_service import loopingcall
|
||||
|
||||
from magnum.common import exception
|
||||
@ -28,10 +31,6 @@ from magnum.tests import base
|
||||
from magnum.tests.unit.db import base as db_base
|
||||
from magnum.tests.unit.db import utils
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
class TestHandler(db_base.DbTestCase):
|
||||
|
||||
|
@ -12,11 +12,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from magnum.conductor.handlers import ca_conductor
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
|
||||
|
||||
class TestSignConductor(base.TestCase):
|
||||
def setUp(self):
|
||||
|
@ -11,14 +11,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.
|
||||
from magnum.conductor.handlers import bay_conductor
|
||||
from magnum import objects
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
from oslo_config import cfg
|
||||
|
||||
from magnum.conductor.handlers import bay_conductor
|
||||
from magnum import objects
|
||||
from magnum.tests import base
|
||||
|
||||
|
||||
class TestBayConductorWithK8s(base.TestCase):
|
||||
def setUp(self):
|
||||
|
@ -12,15 +12,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
|
||||
from magnum.common import exception
|
||||
from magnum.common.pythonk8sclient.swagger_client import rest
|
||||
from magnum.conductor.handlers import k8s_conductor
|
||||
from magnum import objects
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
|
||||
|
||||
class TestK8sConductor(base.TestCase):
|
||||
def setUp(self):
|
||||
|
@ -11,6 +11,9 @@
|
||||
# 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 mock import patch
|
||||
from oslo_service import loopingcall
|
||||
|
||||
from magnum.conductor.handlers import bay_conductor
|
||||
@ -18,9 +21,6 @@ from magnum import objects
|
||||
from magnum.objects.fields import BayStatus as bay_status
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
|
||||
|
||||
class TestBayConductorWithMesos(base.TestCase):
|
||||
def setUp(self):
|
||||
|
@ -11,6 +11,9 @@
|
||||
# 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 mock import patch
|
||||
from oslo_service import loopingcall
|
||||
|
||||
from magnum.conductor.handlers import bay_conductor
|
||||
@ -18,9 +21,6 @@ from magnum import objects
|
||||
from magnum.objects.fields import BayStatus as bay_status
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
|
||||
|
||||
class TestBayConductorWithSwarm(base.TestCase):
|
||||
def setUp(self):
|
||||
|
@ -12,13 +12,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
|
||||
from magnum.conductor.handlers import x509keypair_conductor
|
||||
from magnum import objects
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
from mock import patch
|
||||
|
||||
|
||||
class TestX509KeyPairConductor(base.TestCase):
|
||||
def setUp(self):
|
||||
|
@ -12,13 +12,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from magnum.conductor.tasks import heat_tasks
|
||||
from magnum.tests import base
|
||||
|
||||
import mock
|
||||
from taskflow import engines
|
||||
from taskflow.patterns import linear_flow
|
||||
|
||||
from magnum.conductor.tasks import heat_tasks
|
||||
from magnum.tests import base
|
||||
|
||||
|
||||
class HeatTasksTests(base.TestCase):
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from magnum.conductor import k8s_monitor
|
||||
|
@ -13,12 +13,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from magnum import objects
|
||||
from magnum.tests.unit.db import base
|
||||
from magnum.tests.unit.db import utils
|
||||
|
||||
import mock
|
||||
|
||||
|
||||
class TestPodObject(base.DbTestCase):
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from magnum import objects
|
||||
from magnum.tests.unit.db import base
|
||||
from magnum.tests.unit.db import utils
|
||||
|
||||
import mock
|
||||
|
||||
|
||||
class TestReplicationControllerObject(base.DbTestCase):
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
|
||||
from magnum import objects
|
||||
from magnum.tests.unit.db import base
|
||||
from magnum.tests.unit.db import utils
|
||||
|
||||
import mock
|
||||
|
||||
|
||||
class TestServiceObject(base.DbTestCase):
|
||||
|
||||
|
@ -12,9 +12,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import textwrap
|
||||
|
||||
import mock
|
||||
import pep8
|
||||
import textwrap
|
||||
|
||||
from magnum.hacking import checks
|
||||
from magnum.tests import base
|
||||
|
Loading…
x
Reference in New Issue
Block a user