Fix import order in cloud tests
Remove tox filter Change-Id: I298e3f0d5a2c53fbe31c56dfecf6ea54676c564e
This commit is contained in:
parent
e0d54c0ac4
commit
2d56b681fe
|
@ -10,10 +10,12 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
import copy
|
import copy
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
DEP_UUID = uuid.uuid4().hex
|
DEP_UUID = uuid.uuid4().hex
|
||||||
DEP_DICT = {
|
DEP_DICT = {
|
||||||
'uuid': DEP_UUID,
|
'uuid': DEP_UUID,
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestAggregate(base.TestCase):
|
class TestAggregate(base.TestCase):
|
||||||
|
|
|
@ -11,9 +11,8 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
_fake_zone_list = {
|
_fake_zone_list = {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import concurrent
|
import concurrent
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -16,14 +17,14 @@ import testtools
|
||||||
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
|
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
|
||||||
|
|
||||||
import openstack
|
import openstack
|
||||||
import openstack.cloud
|
|
||||||
from openstack.block_storage.v3 import volume as _volume
|
from openstack.block_storage.v3 import volume as _volume
|
||||||
|
import openstack.cloud
|
||||||
from openstack.cloud import meta
|
from openstack.cloud import meta
|
||||||
from openstack.compute.v2 import flavor as _flavor
|
from openstack.compute.v2 import flavor as _flavor
|
||||||
from openstack.network.v2 import port as _port
|
from openstack import exceptions
|
||||||
from openstack.identity.v3 import project as _project
|
from openstack.identity.v3 import project as _project
|
||||||
from openstack.identity.v3 import user as _user
|
from openstack.identity.v3 import user as _user
|
||||||
from openstack import exceptions
|
from openstack.network.v2 import port as _port
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
from openstack.tests.unit.cloud import test_port
|
from openstack.tests.unit.cloud import test_port
|
||||||
|
|
|
@ -10,11 +10,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
import munch
|
import munch
|
||||||
|
import testtools
|
||||||
|
|
||||||
import openstack.cloud
|
import openstack.cloud
|
||||||
import testtools
|
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,14 @@ test_create_server
|
||||||
|
|
||||||
Tests for the `create_server` command.
|
Tests for the `create_server` command.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from openstack import connection
|
|
||||||
from openstack.cloud import exc
|
from openstack.cloud import exc
|
||||||
from openstack.cloud import meta
|
from openstack.cloud import meta
|
||||||
|
from openstack import connection
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,10 @@ Tests Keystone endpoints commands.
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
|
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestCloudEndpoints(base.TestCase):
|
class TestCloudEndpoints(base.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ Tests floating IP resource methods for Neutron and Nova-network.
|
||||||
|
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from openstack import connection
|
|
||||||
from openstack.cloud import meta
|
from openstack.cloud import meta
|
||||||
|
from openstack import connection
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ Tests Floating IP resource methods for Neutron
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import munch
|
import munch
|
||||||
|
|
||||||
from openstack.cloud import exc
|
from openstack.cloud import exc
|
||||||
|
|
|
@ -20,8 +20,8 @@ Test floating IP pool resource (managed by nova)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from openstack.cloud.exc import OpenStackCloudException
|
from openstack.cloud.exc import OpenStackCloudException
|
||||||
from openstack.tests.unit import base
|
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestFloatingIPPool(base.TestCase):
|
class TestFloatingIPPool(base.TestCase):
|
||||||
|
|
|
@ -9,13 +9,14 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from openstack import exceptions
|
from openstack import exceptions
|
||||||
from openstack.network.v2.firewall_group import FirewallGroup
|
from openstack.network.v2.firewall_group import FirewallGroup
|
||||||
from openstack.network.v2.firewall_rule import FirewallRule
|
|
||||||
from openstack.network.v2.firewall_policy import FirewallPolicy
|
from openstack.network.v2.firewall_policy import FirewallPolicy
|
||||||
|
from openstack.network.v2.firewall_rule import FirewallRule
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import matchers
|
||||||
|
|
||||||
import openstack.cloud
|
import openstack.cloud
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
from testtools import matchers
|
|
||||||
|
|
||||||
|
|
||||||
RAW_ROLE_ASSIGNMENTS = [
|
RAW_ROLE_ASSIGNMENTS = [
|
||||||
|
|
|
@ -11,17 +11,19 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import operator
|
import operator
|
||||||
import tempfile
|
import tempfile
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from openstack import exceptions
|
|
||||||
from openstack.cloud import exc
|
from openstack.cloud import exc
|
||||||
from openstack.cloud import meta
|
from openstack.cloud import meta
|
||||||
|
from openstack import exceptions
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
IMPORT_METHODS = 'glance-direct,web-download'
|
IMPORT_METHODS = 'glance-direct,web-download'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,12 @@
|
||||||
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from openstack import connection
|
|
||||||
from openstack.cloud import meta
|
from openstack.cloud import meta
|
||||||
|
from openstack import connection
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
PRIVATE_V4 = '198.51.100.3'
|
PRIVATE_V4 = '198.51.100.3'
|
||||||
PUBLIC_V4 = '192.0.2.99'
|
PUBLIC_V4 = '192.0.2.99'
|
||||||
PUBLIC_V6 = '2001:0db8:face:0da0:face::0b00:1c' # rfc3849
|
PUBLIC_V6 = '2001:0db8:face:0da0:face::0b00:1c' # rfc3849
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
import openstack
|
import openstack
|
||||||
|
|
|
@ -18,8 +18,8 @@ from unittest import mock
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
import openstack.cloud
|
import openstack.cloud
|
||||||
import openstack.cloud.openstackcloud as oc_oc
|
|
||||||
from openstack.cloud import exc
|
from openstack.cloud import exc
|
||||||
|
import openstack.cloud.openstackcloud as oc_oc
|
||||||
from openstack import exceptions
|
from openstack import exceptions
|
||||||
from openstack.object_store.v1 import _proxy
|
from openstack.object_store.v1 import _proxy
|
||||||
from openstack.object_store.v1 import container
|
from openstack.object_store.v1 import container
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import uuid
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
import uuid
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import uuid
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
import uuid
|
|
||||||
|
|
||||||
import openstack.cloud
|
import openstack.cloud
|
||||||
import openstack.cloud._utils
|
import openstack.cloud._utils
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack import exceptions
|
from openstack import exceptions
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
from openstack.tests.unit.cloud import test_zone
|
from openstack.tests.unit.cloud import test_zone
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from openstack.cloud import exc
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
import testtools
|
import testtools
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
|
|
||||||
|
from openstack.cloud import exc
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestRoleAssignment(base.TestCase):
|
class TestRoleAssignment(base.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,12 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from openstack.cloud import exc
|
from openstack.cloud import exc
|
||||||
from openstack.network.v2 import router as _router
|
|
||||||
from openstack.network.v2 import port as _port
|
from openstack.network.v2 import port as _port
|
||||||
|
from openstack.network.v2 import router as _router
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import openstack.cloud
|
import openstack.cloud
|
||||||
from openstack.tests.unit import base
|
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
# TODO(mordred): Move id and name to using a getUniqueString() value
|
# TODO(mordred): Move id and name to using a getUniqueString() value
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestServerConsole(base.TestCase):
|
class TestServerConsole(base.TestCase):
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestServerGroup(base.TestCase):
|
class TestServerGroup(base.TestCase):
|
||||||
|
|
|
@ -19,9 +19,10 @@ test_cloud_services
|
||||||
Tests Keystone services commands.
|
Tests Keystone services commands.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from testtools import matchers
|
||||||
|
|
||||||
from openstack.cloud.exc import OpenStackCloudException
|
from openstack.cloud.exc import OpenStackCloudException
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
from testtools import matchers
|
|
||||||
|
|
||||||
|
|
||||||
class CloudServices(base.TestCase):
|
class CloudServices(base.TestCase):
|
||||||
|
|
|
@ -10,9 +10,11 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
IDENTIFIER = str(uuid.uuid4())
|
IDENTIFIER = str(uuid.uuid4())
|
||||||
MANILA_AZ_DICT = {
|
MANILA_AZ_DICT = {
|
||||||
"id": IDENTIFIER,
|
"id": IDENTIFIER,
|
||||||
|
|
|
@ -10,16 +10,15 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
import openstack.cloud
|
import openstack.cloud
|
||||||
|
from openstack.orchestration.v1 import stack
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
from openstack.tests.unit import base
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
from openstack.orchestration.v1 import stack
|
|
||||||
|
|
||||||
|
|
||||||
class TestStack(base.TestCase):
|
class TestStack(base.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from openstack.cloud import exc
|
from openstack.cloud import exc
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
import openstack.cloud
|
|
||||||
from openstack.block_storage.v3 import volume
|
from openstack.block_storage.v3 import volume
|
||||||
|
import openstack.cloud
|
||||||
from openstack.cloud import meta
|
from openstack.cloud import meta
|
||||||
from openstack.compute.v2 import volume_attachment
|
from openstack.compute.v2 import volume_attachment
|
||||||
from openstack.tests import fakes
|
from openstack.tests import fakes
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from openstack.tests.unit import base
|
|
||||||
|
|
||||||
from openstack import exceptions
|
from openstack import exceptions
|
||||||
|
from openstack.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
zone_dict = {
|
zone_dict = {
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -123,7 +123,6 @@ show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,openstack/_services_mixin.py
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,openstack/_services_mixin.py
|
||||||
per-file-ignores =
|
per-file-ignores =
|
||||||
openstack/tests/unit/block_storage/*:H306,I100,I201,I202
|
openstack/tests/unit/block_storage/*:H306,I100,I201,I202
|
||||||
openstack/tests/unit/cloud/*:H306,I100,I201,I202
|
|
||||||
|
|
||||||
[flake8:local-plugins]
|
[flake8:local-plugins]
|
||||||
extension =
|
extension =
|
||||||
|
|
Loading…
Reference in New Issue