summaryrefslogtreecommitdiff
path: root/ironic
diff options
context:
space:
mode:
authorVladyslav Drok <vdrok@mirantis.com>2017-10-25 12:59:07 +0300
committerVladyslav Drok <vdrok@mirantis.com>2017-10-25 14:32:52 +0300
commite0514cb85b6a82a665d918b419dc3495b0d4d9d1 (patch)
tree36114c397241695823b9c3c90ff95a5d9dbaa3e6 /ironic
parent50ed0b1f0fcf8c403fce025067713a3a744a6f98 (diff)
downloadironic-e0514cb85b6a82a665d918b419dc3495b0d4d9d1.tar.gz
Add I202 to flake ignore list
Pep8 job currently fails complaining about I202 in a bunch of modules. This change fixes the genuine errors in the module import order, and adds I202 to the skip list so that we don't have to add noqa comments everywhere we can not satisfy the check. After we split out the tempest plugin, we'll remove I202 from the ignore list and add noqa comments in the places where it will still be needed. Change-Id: Ia170a41d35dea8c9eda2b36c907dbc518169a824
Diffstat (limited to 'ironic')
-rw-r--r--ironic/drivers/cisco_ucs.py2
-rw-r--r--ironic/drivers/modules/irmc/common.py3
-rw-r--r--ironic/drivers/modules/oneview/inspect.py3
-rw-r--r--ironic/drivers/modules/storage/cinder.py3
-rw-r--r--ironic/tests/unit/api/test_ospmiddleware.py1
-rw-r--r--ironic/tests/unit/db/test_node_tags.py1
-rw-r--r--ironic/tests/unit/dhcp/test_neutron.py1
-rw-r--r--ironic/tests/unit/drivers/modules/cimc/test_common.py1
-rw-r--r--ironic/tests/unit/drivers/modules/cimc/test_management.py1
-rw-r--r--ironic/tests/unit/drivers/modules/cimc/test_power.py1
-rw-r--r--ironic/tests/unit/drivers/modules/irmc/test_boot.py1
-rw-r--r--ironic/tests/unit/drivers/modules/irmc/test_common.py1
-rw-r--r--ironic/tests/unit/drivers/modules/irmc/test_power.py1
-rw-r--r--ironic/tests/unit/drivers/modules/oneview/test_deploy_utils.py1
-rw-r--r--ironic/tests/unit/drivers/test_cisco.py10
-rw-r--r--ironic/tests/unit/drivers/test_drac.py1
16 files changed, 7 insertions, 25 deletions
diff --git a/ironic/drivers/cisco_ucs.py b/ironic/drivers/cisco_ucs.py
index 33a6cb02d..7de186ee9 100644
--- a/ironic/drivers/cisco_ucs.py
+++ b/ironic/drivers/cisco_ucs.py
@@ -15,10 +15,8 @@ Hardware types for Cisco UCS Servers
"""
from ironic.drivers import ipmi
-
from ironic.drivers.modules.cimc import management as cimc_mgmt
from ironic.drivers.modules.cimc import power as cimc_power
-
from ironic.drivers.modules.ucs import management as ucs_mgmt
from ironic.drivers.modules.ucs import power as ucs_power
diff --git a/ironic/drivers/modules/irmc/common.py b/ironic/drivers/modules/irmc/common.py
index 4bed20674..49c19f584 100644
--- a/ironic/drivers/modules/irmc/common.py
+++ b/ironic/drivers/modules/irmc/common.py
@@ -15,10 +15,9 @@
"""
Common functionalities shared between different iRMC modules.
"""
-import six
-
from oslo_log import log as logging
from oslo_utils import importutils
+import six
from ironic.common import exception
from ironic.common.i18n import _
diff --git a/ironic/drivers/modules/oneview/inspect.py b/ironic/drivers/modules/oneview/inspect.py
index 8ea77d77e..5aa87e9bb 100644
--- a/ironic/drivers/modules/oneview/inspect.py
+++ b/ironic/drivers/modules/oneview/inspect.py
@@ -20,12 +20,11 @@ from oslo_utils import importutils
from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
+from ironic.conf import CONF
from ironic.drivers.modules import inspector
from ironic.drivers.modules.oneview import common
from ironic.drivers.modules.oneview import deploy_utils
-from ironic.conf import CONF
-
METRICS = metrics_utils.get_metrics_logger(__name__)
oneview_exception = importutils.try_import('oneview_client.exceptions')
diff --git a/ironic/drivers/modules/storage/cinder.py b/ironic/drivers/modules/storage/cinder.py
index 12e35b28c..96e08d589 100644
--- a/ironic/drivers/modules/storage/cinder.py
+++ b/ironic/drivers/modules/storage/cinder.py
@@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import retrying
-
from oslo_config import cfg
from oslo_log import log
from oslo_utils import excutils
from oslo_utils import strutils
+import retrying
from ironic.common import cinder
from ironic.common import exception
diff --git a/ironic/tests/unit/api/test_ospmiddleware.py b/ironic/tests/unit/api/test_ospmiddleware.py
index c90ab3473..48638aff7 100644
--- a/ironic/tests/unit/api/test_ospmiddleware.py
+++ b/ironic/tests/unit/api/test_ospmiddleware.py
@@ -11,7 +11,6 @@
# under the License.
import mock
-
from oslo_config import cfg
from osprofiler import web
diff --git a/ironic/tests/unit/db/test_node_tags.py b/ironic/tests/unit/db/test_node_tags.py
index c4388cd2f..38c22e4a1 100644
--- a/ironic/tests/unit/db/test_node_tags.py
+++ b/ironic/tests/unit/db/test_node_tags.py
@@ -13,7 +13,6 @@
"""Tests for manipulating NodeTags via the DB API"""
from ironic.common import exception
-
from ironic.tests.unit.db import base
from ironic.tests.unit.db import utils as db_utils
diff --git a/ironic/tests/unit/dhcp/test_neutron.py b/ironic/tests/unit/dhcp/test_neutron.py
index 1afab9e75..0f10d66be 100644
--- a/ironic/tests/unit/dhcp/test_neutron.py
+++ b/ironic/tests/unit/dhcp/test_neutron.py
@@ -15,7 +15,6 @@
# under the License.
import mock
-
from neutronclient.common import exceptions as neutron_client_exc
from oslo_utils import uuidutils
diff --git a/ironic/tests/unit/drivers/modules/cimc/test_common.py b/ironic/tests/unit/drivers/modules/cimc/test_common.py
index 1fadd8354..0d405e740 100644
--- a/ironic/tests/unit/drivers/modules/cimc/test_common.py
+++ b/ironic/tests/unit/drivers/modules/cimc/test_common.py
@@ -13,7 +13,6 @@
# limitations under the License.
import mock
-
from oslo_config import cfg
from oslo_utils import importutils
from oslo_utils import uuidutils
diff --git a/ironic/tests/unit/drivers/modules/cimc/test_management.py b/ironic/tests/unit/drivers/modules/cimc/test_management.py
index 2e086ce6f..6bdaf8d89 100644
--- a/ironic/tests/unit/drivers/modules/cimc/test_management.py
+++ b/ironic/tests/unit/drivers/modules/cimc/test_management.py
@@ -13,7 +13,6 @@
# limitations under the License.
import mock
-
from oslo_utils import importutils
from six.moves import http_client
diff --git a/ironic/tests/unit/drivers/modules/cimc/test_power.py b/ironic/tests/unit/drivers/modules/cimc/test_power.py
index f6a05bb8d..4617c7d5c 100644
--- a/ironic/tests/unit/drivers/modules/cimc/test_power.py
+++ b/ironic/tests/unit/drivers/modules/cimc/test_power.py
@@ -13,7 +13,6 @@
# limitations under the License.
import mock
-
from oslo_config import cfg
from oslo_utils import importutils
diff --git a/ironic/tests/unit/drivers/modules/irmc/test_boot.py b/ironic/tests/unit/drivers/modules/irmc/test_boot.py
index d911a2789..a496c4658 100644
--- a/ironic/tests/unit/drivers/modules/irmc/test_boot.py
+++ b/ironic/tests/unit/drivers/modules/irmc/test_boot.py
@@ -45,7 +45,6 @@ from ironic.tests.unit.db import utils as db_utils
from ironic.tests.unit.drivers import third_party_driver_mock_specs \
as mock_specs
from ironic.tests.unit.objects import utils as obj_utils
-
if six.PY3:
import io
file = io.BytesIO
diff --git a/ironic/tests/unit/drivers/modules/irmc/test_common.py b/ironic/tests/unit/drivers/modules/irmc/test_common.py
index f42d5b059..2d1f51d64 100644
--- a/ironic/tests/unit/drivers/modules/irmc/test_common.py
+++ b/ironic/tests/unit/drivers/modules/irmc/test_common.py
@@ -17,7 +17,6 @@ Test class for common methods used by iRMC modules.
"""
import mock
-
from oslo_config import cfg
from ironic.common import exception
diff --git a/ironic/tests/unit/drivers/modules/irmc/test_power.py b/ironic/tests/unit/drivers/modules/irmc/test_power.py
index e0451c091..fea12dc7d 100644
--- a/ironic/tests/unit/drivers/modules/irmc/test_power.py
+++ b/ironic/tests/unit/drivers/modules/irmc/test_power.py
@@ -17,7 +17,6 @@ Test class for iRMC Power Driver
"""
import mock
-
from oslo_utils import uuidutils
from ironic.common import exception
diff --git a/ironic/tests/unit/drivers/modules/oneview/test_deploy_utils.py b/ironic/tests/unit/drivers/modules/oneview/test_deploy_utils.py
index 008475d9f..44929456a 100644
--- a/ironic/tests/unit/drivers/modules/oneview/test_deploy_utils.py
+++ b/ironic/tests/unit/drivers/modules/oneview/test_deploy_utils.py
@@ -14,7 +14,6 @@
# under the License.
import mock
-
from oslo_utils import importutils
from ironic.common import driver_factory
diff --git a/ironic/tests/unit/drivers/test_cisco.py b/ironic/tests/unit/drivers/test_cisco.py
index 50630d901..a4299d927 100644
--- a/ironic/tests/unit/drivers/test_cisco.py
+++ b/ironic/tests/unit/drivers/test_cisco.py
@@ -12,19 +12,17 @@
from ironic.conductor import task_manager
from ironic.drivers.modules import agent
+from ironic.drivers.modules.cimc import management as cimc_mgmt
+from ironic.drivers.modules.cimc import power as cimc_power
from ironic.drivers.modules import ipmitool
from ironic.drivers.modules import iscsi_deploy
from ironic.drivers.modules import noop
from ironic.drivers.modules import pxe
from ironic.drivers.modules.storage import noop as noop_storage
-from ironic.tests.unit.db import base as db_base
-from ironic.tests.unit.objects import utils as obj_utils
-
-from ironic.drivers.modules.cimc import management as cimc_mgmt
-from ironic.drivers.modules.cimc import power as cimc_power
-
from ironic.drivers.modules.ucs import management as ucs_mgmt
from ironic.drivers.modules.ucs import power as ucs_power
+from ironic.tests.unit.db import base as db_base
+from ironic.tests.unit.objects import utils as obj_utils
class CiscoUCSStandaloneHardwareTestCase(db_base.DbTestCase):
diff --git a/ironic/tests/unit/drivers/test_drac.py b/ironic/tests/unit/drivers/test_drac.py
index d5e610a74..53ed69c7d 100644
--- a/ironic/tests/unit/drivers/test_drac.py
+++ b/ironic/tests/unit/drivers/test_drac.py
@@ -15,7 +15,6 @@
import inspect
import mock
-
from oslo_utils import importutils
from ironic.common import exception