from cinder.openstack.common import gettextutils
gettextutils.install('cinder', lazy=False)
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder.openstack.common import gettextutils
gettextutils.install('cinder', lazy=False)
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
"""
-import datetime
import os
import sys
-import time
from oslo.config import cfg
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
-from cinder.common import config # Need to register global_opts
-from cinder import context
-from cinder import exception
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder import version
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder import context
from cinder import db
from cinder.db import migration
else:
# We don't have to wrap the following import in a 'try',
# because we already know 'readline' was imported successfully.
- import rlcompleter
+ import rlcompleter # noqa
readline.parse_and_bind("tab:complete")
code.interact()
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder.openstack.common import gettextutils
gettextutils.install('cinder')
-from cinder.common import config # Need to register global_opts
+# Need to register global_opts
+from cinder.common import config # noqa
from cinder import context
from cinder import db
from cinder.openstack.common import log as logging
-from cinder.openstack.common import rpc
from cinder import utils
from cinder import version
import cinder.volume.utils
# License for the specific language governing permissions and limitations
# under the License.
-from oslo.config import cfg
import webob
from cinder.api import extensions
"""The volume encryption metadata extension."""
-import webob
-
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder import db
-from cinder import exception
-from cinder.openstack.common.notifier import api as notifier_api
from cinder.volume import volume_types
authorize = extensions.extension_authorizer('volume',
from cinder.api.openstack import wsgi
from cinder.openstack.common import log as logging
-from cinder import utils
from cinder import wsgi as base_wsgi
"""
-from novaclient import extension
from novaclient import service_catalog
from novaclient.v1_1 import client as nova_client
from novaclient.v1_1.contrib import assisted_volume_snapshots
gettextutils.install('cinder', lazy=False)
from cinder.db.sqlalchemy import migrate_repo
-import cinder.openstack.common.db.sqlalchemy.session
from cinder import version
from migrate.versioning.shell import main
from sqlalchemy import Boolean, DateTime, Integer, String
from cinder.openstack.common import log as logging
-from cinder.openstack.common import timeutils
-from cinder.openstack.common import uuidutils
LOG = logging.getLogger(__name__)
# under the License.
from sqlalchemy import Boolean, Column, DateTime
-from sqlalchemy import ForeignKey, MetaData, Integer, String, Table
+from sqlalchemy import ForeignKey, MetaData, String, Table
from cinder.openstack.common import log as logging
from cinder.openstack.common.gettextutils import _
from cinder.openstack.common import log as logging
-from cinder.openstack.common import processutils
LOG = logging.getLogger(__name__)
"""
-import functools
import os
import shutil
import tempfile
import testtools
from testtools import matchers
-from cinder.common import config # Need to register global_opts
+from cinder.common import config # noqa Need to register global_opts
from cinder.db import migration
from cinder.openstack.common.db.sqlalchemy import session
from cinder.openstack.common import log as logging
# License for the specific language governing permissions and limitations
# under the License.
-import datetime
-import uuid
import webob
from cinder import db
-from cinder import exception
from cinder.openstack.common import jsonutils
-from cinder.openstack.common.rpc import common as rpc_common
from cinder import test
from cinder.tests.api import fakes
from cinder.tests.api.v2 import stubs
-from cinder import volume
-from cinder.volume import api as volume_api
class SnapshotActionsTest(test.TestCase):
import json
import webob
-from xml.dom import minidom
-from cinder.api.contrib import volume_type_encryption
from cinder import context
from cinder import db
-from cinder import exception
from cinder.openstack.common.notifier import api as notifier_api
from cinder.openstack.common.notifier import test_notifier
from cinder import test
from cinder.tests.api import fakes
-from cinder.volume import volume_types
def return_volume_type_encryption_db(context, volume_type_id, session):
# under the License.
from cinder.backup.driver import BackupDriver
-from cinder.db import base
from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from cinder.brick import exception
from cinder.brick.initiator import connector
from cinder.brick.initiator import host_driver
-from cinder.brick.initiator import linuxfc
-from cinder.brick.initiator import linuxscsi
-from cinder.brick.remotefs import remotefs
from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.openstack.common import processutils as putils
from cinder.brick.initiator import linuxscsi
from cinder.openstack.common import log as logging
from cinder import test
-from cinder import utils
LOG = logging.getLogger(__name__)
from cinder.brick.remotefs import remotefs
from cinder.openstack.common import log as logging
-from cinder.openstack.common import processutils as putils
from cinder import test
LOG = logging.getLogger(__name__)
from cinder.compute import nova
from cinder import context
-from cinder import exception
from cinder import test
from cinder import context
from cinder import db
-from cinder import exception
from cinder import test
from cinder.tests import utils as testutils
from eventlet import greenthread
-from cinder import exception
from cinder.openstack.common import log as logging
from cinder.openstack.common import processutils
from cinder import utils
from cinder.tests import fake_driver
from cinder.tests.integrated.api import client
from cinder.tests.integrated import integrated_helpers
-from cinder.volume import driver
LOG = logging.getLogger(__name__)
Fakes For Scheduler tests.
"""
-import mock
-
-from cinder import db
from cinder.openstack.common import timeutils
from cinder.scheduler import filter_scheduler
from cinder.scheduler import host_manager
"""
import mock
-import random
from cinder.scheduler import host_manager
from cinder.scheduler.weights.chance import ChanceWeigher
import mock
from cinder import context
-from cinder import db
from cinder import exception
-from cinder.openstack.common import timeutils
from cinder.scheduler import driver
from cinder.scheduler import manager
from cinder import test
-from cinder import utils
class SchedulerManagerTestCase(test.TestCase):
def test_runtime_and_unknown_conf(self):
self.assertNotIn('runtime_answer', CONF)
- import cinder.tests.runtime_conf
+ import cinder.tests.runtime_conf # noqa
self.assertIn('runtime_answer', CONF)
self.assertEqual(CONF.runtime_answer, 54)
import time
-import mock
-
from cinder import context
from cinder import test
from cinder.volume.flows import create_volume
from cinder import exception
from cinder import test
-from cinder import utils
class FakeNotifier(object):
"""Unit tests for the GlusterFS driver module."""
import errno
-import json
import os
import tempfile
from mox import IsA
from mox import stubout
-from cinder import compute
from cinder import context
from cinder import db
from cinder import exception
from cinder.openstack.common import imageutils
from cinder.openstack.common import processutils as putils
from cinder import test
-from cinder.tests.compute import test_nova
from cinder import units
from cinder import utils
from cinder.volume import configuration as conf
from cinder.brick.iscsi import iscsi
from cinder import test
from cinder.volume import driver
-from cinder.volume import utils as volume_utils
class TargetAdminTestCase(object):
from cinder.volume.drivers.netapp.options import netapp_provisioning_opts
from cinder.volume.drivers.netapp.options import netapp_transport_opts
from cinder.volume.drivers.netapp import ssc_utils
-from cinder.volume.drivers.netapp import utils
LOG = logging.getLogger("cinder.volume.driver")
from cinder.volume import configuration as conf
from cinder.volume.drivers.netapp import api
from cinder.volume.drivers.netapp import nfs as netapp_nfs
-from cinder.volume.drivers.netapp import ssc_utils
from oslo.config import cfg
import copy
import httplib
from lxml import etree
-import mox
from mox import IgnoreArg
-from mox import IsA
-from mox import MockObject
import StringIO
-from cinder import context
from cinder import exception
from cinder import test
-from cinder.volume import configuration as conf
from cinder.volume.drivers.netapp import api
from cinder.volume.drivers.netapp import ssc_utils
# under the License.
"""Unit tests for the NFS driver module."""
-import __builtin__
import errno
import os
from cinder import context
from cinder import exception
from cinder.image import image_utils
-from cinder.openstack.common import processutils as putils
from cinder import test
from cinder import units
from cinder.volume import configuration as conf
import os
import tempfile
-from cinder import exception
from cinder.image import image_utils
from cinder.openstack.common import processutils
from cinder import test
import random
import re
-import socket
from cinder import context
from cinder import exception
import mock
import os.path
-import ssl
import tempfile
import urllib2
from cinder import exception
from cinder.openstack.common import gettextutils
from cinder import test
-from cinder import utils
import cinder.wsgi
CONF = cfg.CONF
import copy
import httplib
-import mox
from cinder import exception
from cinder.openstack.common import log as logging
#
-import os
-
from cinder import context
from cinder import db
import stat
import sys
import tempfile
-import time
from eventlet import event
from eventlet import greenthread
from cinder.brick.initiator import connector
from cinder import exception
-from cinder.openstack.common import excutils
-from cinder.openstack.common import gettextutils
from cinder.openstack.common import importutils
from cinder.openstack.common import lockutils
from cinder.openstack.common import log as logging
"""
-import os
import time
from oslo.config import cfg
from cinder import exception
from cinder.image import image_utils
-from cinder.openstack.common import fileutils
from cinder.openstack.common import log as logging
from cinder.openstack.common import processutils
from cinder import units
from cinder import exception
from cinder.openstack.common import log as logging
-from cinder.volume.configuration import Configuration
-from cinder.volume import driver
from cinder.volume.drivers.huawei import huawei_dorado
from cinder.volume.drivers.huawei import huawei_hvs
from cinder.volume.drivers.huawei import huawei_t
from xml.etree import ElementTree as ET
-from cinder import exception
from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
"""
# Adding imports for backwards compatibility in loading volume_driver.
-from hp_lefthand import HpSanISCSIDriver
-from san import SanISCSIDriver
-from solaris import SolarisISCSIDriver
+from hp_lefthand import HpSanISCSIDriver # noqa
+from san import SanISCSIDriver # noqa
+from solaris import SolarisISCSIDriver # noqa
import pprint
from random import randint
import re
-import time
import uuid
from eventlet import greenthread
from hp3parclient import client
from hp3parclient import exceptions as hpexceptions
from oslo.config import cfg
-import paramiko
from cinder import context
from cinder import exception
"""
from hp3parclient import exceptions as hpexceptions
-from oslo.config import cfg
-from cinder import exception
from cinder.openstack.common import log as logging
from cinder import utils
import cinder.volume.driver
import math
-import os
-import stat
from oslo.config import cfg
from cinder.brick.local_dev import lvm as brick_lvm
-from cinder import exception
from cinder.openstack.common import log as logging
from cinder.openstack.common.notifier import api as notifier_api
from cinder.openstack.common import processutils
commands = {posargs}
[flake8]
-ignore = E711,E712,F401,F403,F841,H302,H303,H304,H803
+ignore = E711,E712,F403,F841,H302,H303,H304,H803
builtins = _
-exclude = .git,.venv,.tox,dist,doc,common,*egg,build
+exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build