Organizes imports

Organizes imports to be pep8 compliant.
This commit is contained in:
Claudiu Belu 2015-03-06 14:07:17 +02:00
parent c4c42c3047
commit a9fd47e1bb
26 changed files with 55 additions and 54 deletions

View File

@ -28,10 +28,9 @@ if sys.platform == 'win32':
import _winreg import _winreg
import wmi import wmi
from oslo_log import log as logging
from nova import block_device from nova import block_device
from nova.virt import driver from nova.virt import driver
from oslo_log import log as logging
from hyperv.i18n import _LI from hyperv.i18n import _LI

View File

@ -19,9 +19,9 @@ A Hyper-V Nova Compute driver.
import platform import platform
from nova.virt import driver
from oslo_log import log as logging from oslo_log import log as logging
from nova.virt import driver
from hyperv.i18n import _ from hyperv.i18n import _
from hyperv.nova import hostops from hyperv.nova import hostops
from hyperv.nova import livemigrationops from hyperv.nova import livemigrationops

View File

@ -21,14 +21,15 @@ import os
import platform import platform
import time import time
from nova.compute import arch
from nova.compute import hv_type
from nova.compute import vm_mode
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from oslo_utils import units from oslo_utils import units
from nova.compute import arch
from nova.compute import hv_type
from nova.compute import vm_mode
from hyperv.i18n import _ from hyperv.i18n import _
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory

View File

@ -17,16 +17,17 @@ Image caching and management.
""" """
import os import os
from nova import utils
from nova.virt import images
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import units from oslo_utils import units
from hyperv.i18n import _ from hyperv.i18n import _
from nova import utils
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory
from hyperv.nova import vmutils from hyperv.nova import vmutils
from nova.virt import images
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -18,11 +18,11 @@ Management class for live migration VM operations.
""" """
import functools import functools
from nova.virt import configdrive
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_utils import excutils from oslo_utils import excutils
from nova.virt import configdrive
from hyperv.i18n import _ from hyperv.i18n import _
from hyperv.nova import imagecache from hyperv.nova import imagecache
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory

View File

@ -18,9 +18,8 @@ import sys
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from oslo_log import log as logging
from nova import exception from nova import exception
from oslo_log import log as logging
from hyperv.i18n import _, _LE from hyperv.i18n import _, _LE
from hyperv.nova import vmutils from hyperv.nova import vmutils

View File

@ -18,12 +18,12 @@ Management class for migration / resize operations.
""" """
import os import os
from nova import exception
from nova.virt import configdrive
from oslo_log import log as logging from oslo_log import log as logging
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import units from oslo_utils import units
from nova import exception
from nova.virt import configdrive
from hyperv.i18n import _, _LE from hyperv.i18n import _, _LE
from hyperv.nova import imagecache from hyperv.nova import imagecache
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory

View File

@ -20,10 +20,10 @@ import sys
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from nova import utils
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from nova import utils
from hyperv.i18n import _ from hyperv.i18n import _
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import vmutils from hyperv.nova import vmutils

View File

@ -13,9 +13,9 @@
# 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 nova.console import type as ctype
from oslo_log import log as logging from oslo_log import log as logging
from nova.console import type as ctype
from hyperv.nova import hostops from hyperv.nova import hostops
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory

View File

@ -18,11 +18,11 @@ Management class for VM snapshot operations.
""" """
import os import os
from nova.compute import task_states
from nova.image import glance
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from nova.compute import task_states
from nova.image import glance
from hyperv.i18n import _LW from hyperv.i18n import _LW
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory

View File

@ -22,6 +22,13 @@ import os
import time import time
from eventlet import timeout as etimeout from eventlet import timeout as etimeout
from nova.api.metadata import base as instance_metadata
from nova import exception
from nova.openstack.common import fileutils
from nova.openstack.common import loopingcall
from nova import utils
from nova.virt import configdrive
from nova.virt import hardware
from oslo_concurrency import processutils from oslo_concurrency import processutils
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
@ -30,13 +37,6 @@ from oslo_utils import importutils
from oslo_utils import units from oslo_utils import units
from oslo_utils import uuidutils from oslo_utils import uuidutils
from nova.api.metadata import base as instance_metadata
from nova import exception
from nova.openstack.common import fileutils
from nova.openstack.common import loopingcall
from nova import utils
from nova.virt import configdrive
from nova.virt import hardware
from hyperv.i18n import _, _LI, _LE, _LW from hyperv.i18n import _, _LI, _LE, _LW
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import imagecache from hyperv.nova import imagecache

View File

@ -25,10 +25,10 @@ import uuid
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from nova import exception
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from nova import exception
from hyperv.i18n import _, _LW from hyperv.i18n import _, _LW
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import hostutils from hyperv.nova import hostutils

View File

@ -22,12 +22,12 @@ import os
import re import re
import time import time
from nova import exception
from nova.virt import driver
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_utils import excutils from oslo_utils import excutils
from nova import exception
from nova.virt import driver
from hyperv.i18n import _, _LE, _LW from hyperv.i18n import _, _LE, _LW
from hyperv.nova import utilsfactory from hyperv.nova import utilsfactory
from hyperv.nova import vmutils from hyperv.nova import vmutils

View File

@ -26,10 +26,10 @@ http://www.microsoft.com/en-us/download/details.aspx?id=34750
import re import re
import time import time
from nova import utils
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from nova import utils
from hyperv.i18n import _ from hyperv.i18n import _
from hyperv.nova import basevolumeutils from hyperv.nova import basevolumeutils
from hyperv.nova import vmutils from hyperv.nova import vmutils

View File

@ -24,11 +24,11 @@ import time
if sys.platform == 'win32': if sys.platform == 'win32':
import wmi import wmi
from nova import utils
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from hyperv.i18n import _ from hyperv.i18n import _
from nova import utils
from hyperv.nova import basevolumeutils from hyperv.nova import basevolumeutils
from hyperv.nova import vmutils from hyperv.nova import vmutils

View File

@ -21,15 +21,22 @@ inline callbacks.
""" """
import os
import eventlet import eventlet
eventlet.monkey_patch(os=False) eventlet.monkey_patch(os=False)
import copy import copy
import inspect import inspect
import mock import mock
import os
import fixtures import fixtures
from nova import objects
from nova.objects import base as objects_base
from nova.tests import fixtures as nova_fixtures
from nova.tests.unit import conf_fixture
from nova.tests.unit import policy_fixture
from nova import utils
from oslo_concurrency import lockutils from oslo_concurrency import lockutils
from oslo_config import cfg from oslo_config import cfg
from oslo_config import fixture as config_fixture from oslo_config import fixture as config_fixture
@ -38,13 +45,6 @@ from oslo_log import log as logging
from oslotest import moxstubout from oslotest import moxstubout
import testtools import testtools
from nova import objects
from nova.objects import base as objects_base
from nova.tests import fixtures as nova_fixtures
from nova.tests.unit import conf_fixture
from nova.tests.unit import policy_fixture
from nova import utils
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('enabled', 'nova.api.openstack', group='osapi_v3') CONF.import_opt('enabled', 'nova.api.openstack', group='osapi_v3')

View File

@ -22,6 +22,7 @@ from nova.compute import task_states
from nova.compute import vm_states from nova.compute import vm_states
from nova import db from nova import db
from nova import utils from nova import utils
from hyperv.nova import constants from hyperv.nova import constants

View File

@ -23,9 +23,6 @@ import uuid
import mock import mock
from mox3 import mox from mox3 import mox
from oslo_config import cfg
from oslo_utils import units
from nova.api.metadata import base as instance_metadata from nova.api.metadata import base as instance_metadata
from nova.compute import power_state from nova.compute import power_state
from nova import context from nova import context
@ -40,6 +37,10 @@ from nova.tests.unit.image import fake as fake_image
from nova import utils from nova import utils
from nova.virt import configdrive from nova.virt import configdrive
from nova.virt import driver from nova.virt import driver
from nova.virt import images
from oslo_config import cfg
from oslo_utils import units
from hyperv.nova import basevolumeutils from hyperv.nova import basevolumeutils
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import driver as driver_hyperv from hyperv.nova import driver as driver_hyperv
@ -57,7 +58,6 @@ from hyperv.nova import volumeutilsv2
from hyperv.tests import test from hyperv.tests import test
from hyperv.tests.unit import db_fakes from hyperv.tests.unit import db_fakes
from hyperv.tests.unit import fake from hyperv.tests.unit import fake
from nova.virt import images
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('vswitch_name', 'hyperv.nova.vif', 'hyperv') CONF.import_opt('vswitch_name', 'hyperv.nova.vif', 'hyperv')

View File

@ -16,14 +16,14 @@
import os import os
import mock import mock
from oslo_config import cfg
from nova import exception from nova import exception
from nova import objects from nova import objects
from hyperv.tests import fake_instance
from nova.tests.unit.objects import test_flavor from nova.tests.unit.objects import test_flavor
from oslo_config import cfg
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import imagecache from hyperv.nova import imagecache
from hyperv.tests import fake_instance
from hyperv.tests import test from hyperv.tests import test
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License.import mock # under the License.import mock
import mock
import os import os
import mock
from hyperv.nova import ioutils from hyperv.nova import ioutils
from hyperv.tests import test from hyperv.tests import test

View File

@ -16,9 +16,9 @@
import mock import mock
from oslo_config import cfg from oslo_config import cfg
from hyperv.tests import fake_instance
from hyperv.nova import livemigrationops from hyperv.nova import livemigrationops
from hyperv.nova import vmutils from hyperv.nova import vmutils
from hyperv.tests import fake_instance
from hyperv.tests.unit import test_base from hyperv.tests.unit import test_base
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -14,9 +14,9 @@
import mock import mock
from hyperv.tests import fake_instance
from hyperv.nova import migrationops from hyperv.nova import migrationops
from hyperv.nova import vmutils from hyperv.nova import vmutils
from hyperv.tests import fake_instance
from hyperv.tests.unit import test_base from hyperv.tests.unit import test_base

View File

@ -16,10 +16,10 @@
import os import os
import mock import mock
from nova.compute import task_states from nova.compute import task_states
from hyperv.tests import fake_instance
from hyperv.nova import snapshotops from hyperv.nova import snapshotops
from hyperv.tests import fake_instance
from hyperv.tests.unit import test_base from hyperv.tests.unit import test_base

View File

@ -16,15 +16,15 @@ import os
from eventlet import timeout as etimeout from eventlet import timeout as etimeout
import mock import mock
from nova import exception
from oslo_concurrency import processutils from oslo_concurrency import processutils
from oslo_config import cfg from oslo_config import cfg
from oslo_utils import units from oslo_utils import units
from nova import exception
from hyperv.tests import fake_instance
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import vmops from hyperv.nova import vmops
from hyperv.nova import vmutils from hyperv.nova import vmutils
from hyperv.tests import fake_instance
from hyperv.tests.unit import test_base from hyperv.tests.unit import test_base
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -14,8 +14,8 @@
# under the License. # under the License.
import mock import mock
from nova import exception from nova import exception
from hyperv.nova import constants from hyperv.nova import constants
from hyperv.nova import vmutils from hyperv.nova import vmutils
from hyperv.tests import test from hyperv.tests import test

View File

@ -18,8 +18,8 @@ import contextlib
import os import os
import mock import mock
from nova import exception from nova import exception
from hyperv.nova import pathutils from hyperv.nova import pathutils
from hyperv.nova import vmutils from hyperv.nova import vmutils
from hyperv.nova import volumeops from hyperv.nova import volumeops