from cinder import context
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder import wsgi
import webob.dec
import webob.exc
-from cinder import utils
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
import webob
-from cinder import flags
from cinder.api.openstack import wsgi
from cinder.api.openstack import xmlutil
+from cinder import flags
from cinder.openstack.common import log as logging
from cinder.api.openstack import xmlutil
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import exception as common_exception
from cinder.openstack.common import importutils
+from cinder.openstack.common import log as logging
import cinder.policy
import re
import urllib2
-from cinder.openstack.common import log as logging
from cinder.api.openstack import wsgi
+from cinder.openstack.common import log as logging
_quoted_string_re = r'"[^"\\]*(?:\\.[^"\\]*)*"'
from cinder.api.openstack.volume import limits
from cinder.api.openstack.volume import snapshots
from cinder.api.openstack.volume import types
-from cinder.api.openstack.volume import volumes
from cinder.api.openstack.volume import versions
+from cinder.api.openstack.volume import volumes
from cinder.openstack.common import log as logging
"""
+from cinder.api.openstack import extensions
from cinder import flags
from cinder.openstack.common import log as logging
-from cinder.api.openstack import extensions
FLAGS = flags.FLAGS
from cinder.api.openstack import wsgi
from cinder import db
from cinder import exception
-from cinder import volume
from cinder.openstack.common import log as logging
+from cinder import volume
LOG = logging.getLogger(__name__)
from cinder.api.openstack import extensions
from cinder.api.openstack import wsgi
from cinder.api.openstack import xmlutil
-from cinder import volume
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
+from cinder import volume
FLAGS = flags.FLAGS
from cinder.api.openstack import extensions
from cinder.api.openstack import wsgi
from cinder.api.openstack import xmlutil
-from cinder import volume
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder.openstack.common.rpc import common as rpc_common
+from cinder import volume
FLAGS = flags.FLAGS
"""The volumes snapshots api."""
-from webob import exc
import webob
+from webob import exc
from cinder.api.openstack import common
+from cinder.api.openstack.volume import volumes
from cinder.api.openstack import wsgi
from cinder.api.openstack import xmlutil
-from cinder.api.openstack.volume import volumes
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from webob import exc
+from cinder.api.openstack.volume.views import types as views_types
from cinder.api.openstack import wsgi
from cinder.api.openstack import xmlutil
-from cinder.api.openstack.volume.views import types as views_types
from cinder import exception
from cinder.volume import volume_types
"""The volumes api."""
-from webob import exc
import webob
+from webob import exc
from xml.dom import minidom
from cinder.api.openstack import common
import webob
from cinder import exception
-from cinder import wsgi
-from cinder.openstack.common import log as logging
from cinder.openstack.common import jsonutils
+from cinder.openstack.common import log as logging
+from cinder import wsgi
from lxml import etree
from xml.dom import minidom
import copy
-from cinder.openstack.common import log as logging
from cinder.openstack.common import local
+from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder import policy
from cinder import utils
import functools
import warnings
-from cinder import db
-from cinder import exception
-from cinder import flags
-from cinder import utils
-from cinder.openstack.common import log as logging
-from cinder.db.sqlalchemy import models
-from cinder.db.sqlalchemy.session import get_session
-from cinder.openstack.common import timeutils
-from cinder.openstack.common import uuidutils
from sqlalchemy.exc import IntegrityError
from sqlalchemy import or_
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.expression import asc
from sqlalchemy.sql.expression import desc
from sqlalchemy.sql.expression import literal_column
-from sqlalchemy.sql import func
from sqlalchemy.sql.expression import literal_column
+from sqlalchemy.sql import func
+
+from cinder import db
+from cinder.db.sqlalchemy import models
+from cinder.db.sqlalchemy.session import get_session
+from cinder import exception
+from cinder import flags
+from cinder.openstack.common import log as logging
+from cinder.openstack.common import timeutils
+from cinder.openstack.common import uuidutils
+from cinder import utils
+
FLAGS = flags.FLAGS
SQLAlchemy models for cinder data.
"""
-from sqlalchemy.orm import relationship, backref, object_mapper
from sqlalchemy import Column, Integer, String, schema
-from sqlalchemy import ForeignKey, DateTime, Boolean
from sqlalchemy.exc import IntegrityError
from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy import ForeignKey, DateTime, Boolean
+from sqlalchemy.orm import relationship, backref, object_mapper
from cinder.db.sqlalchemy.session import get_session
import time
+from sqlalchemy.exc import DisconnectionError, OperationalError
import sqlalchemy.interfaces
import sqlalchemy.orm
-from sqlalchemy.exc import DisconnectionError, OperationalError
from sqlalchemy.pool import NullPool, StaticPool
import cinder.exception
from cinder.openstack.common import cfg
from cinder.openstack.common.gettextutils import _
+from cinder.openstack.common import network_utils
from cinder.openstack.common.rpc import amqp as rpc_amqp
from cinder.openstack.common.rpc import common as rpc_common
-from cinder.openstack.common import network_utils
kombu_opts = [
cfg.StrOpt('kombu_ssl_version',
from cinder import db
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
from cinder.openstack.common import importutils
+from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder.openstack.common import timeutils
from cinder import utils
from cinder import db
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
from cinder.openstack.common import importutils
+from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder import utils
from cinder import version
"""
import functools
-import uuid
import unittest
+import uuid
import mox
import nose.plugins.skip
import stubout
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder import service
from cinder import tests
import gettext
import heapq
import os
-import unittest
import sys
import time
+import unittest
import eventlet
from nose import config
from cinder.api import auth as api_auth
from cinder.api import openstack as openstack_api
from cinder.api.openstack import auth
-from cinder.api.openstack.volume import limits
from cinder.api.openstack import urlmap
from cinder.api.openstack import volume
+from cinder.api.openstack.volume import limits
from cinder.api.openstack.volume import versions
from cinder.api.openstack import wsgi as os_wsgi
from cinder import context
from cinder import exception as exc
+from cinder.openstack.common import timeutils
from cinder import utils
from cinder import wsgi
-from cinder.openstack.common import timeutils
FAKE_UUID = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
import webob
import webob.exc
-from cinder import test
from cinder.api.openstack import common
+from cinder import test
NS = "{http://docs.openstack.org/compute/api/v1.1}"
import webob.dec
import webob.exc
-from cinder import test
from cinder.api.openstack import common
from cinder.api.openstack import wsgi
from cinder.openstack.common import jsonutils
+from cinder import test
class TestFaults(test.TestCase):
import inspect
import webob
+from cinder.api.openstack import wsgi
from cinder import exception
from cinder import test
-from cinder.api.openstack import wsgi
from cinder.tests.api.openstack import fakes
from lxml import etree
-from cinder import test
from cinder.api.openstack import xmlutil
+from cinder import test
class SelectorTest(test.TestCase):
from cinder import context
from cinder import db
from cinder import exception
-from cinder import test
-from cinder.volume import api as volume_api
from cinder.openstack.common import jsonutils
+from cinder import test
from cinder.tests.api.openstack import fakes
+from cinder.volume import api as volume_api
def app():
from cinder.api.openstack.volume.contrib import types_manage
from cinder import exception
from cinder import test
-from cinder.volume import volume_types
from cinder.tests.api.openstack import fakes
+from cinder.volume import volume_types
def stub_volume_type(id):
import datetime
import webob
+from cinder.api.openstack.volume.contrib import volume_actions
from cinder import exception
from cinder import flags
-from cinder import test
-from cinder import utils
-from cinder import volume
-from cinder.api.openstack.volume.contrib import volume_actions
from cinder.openstack.common import jsonutils
from cinder.openstack.common.rpc import common as rpc_common
+from cinder import test
from cinder.tests.api.openstack import fakes
+from cinder import utils
+from cinder import volume
from cinder.volume import api as volume_api
# License for the specific language governing permissions and limitations
# under the License.
-import json
import datetime
+import json
from lxml import etree
import webob
from cinder import context
from cinder import test
+from cinder.tests.api.openstack import fakes
from cinder import utils
from cinder import volume
-from cinder.tests.api.openstack import fakes
def fake_volume_get(*args, **kwargs):
# License for the specific language governing permissions and limitations
# under the License.
-import json
import datetime
+import json
from lxml import etree
import webob
from cinder import context
from cinder import test
+from cinder.tests.api.openstack import fakes
from cinder import utils
from cinder import volume
-from cinder.tests.api.openstack import fakes
PROJECT_ID = '88fd1da4-f464-4a87-9ce5-26f2f40743b9'
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import test
-from cinder import volume
from cinder.tests.api.openstack import fakes
+from cinder import volume
FLAGS = flags.FLAGS
from lxml import etree
import webob
-from cinder.api.openstack.volume.views import types as views_types
from cinder.api.openstack.volume import types
+from cinder.api.openstack.volume.views import types as views_types
from cinder import exception
from cinder.openstack.common import timeutils
from cinder import test
-from cinder.volume import volume_types
from cinder.tests.api.openstack import fakes
+from cinder.volume import volume_types
def stub_volume_type(id):
from lxml import etree
import webob
+from cinder.api.openstack.volume import extensions
from cinder.api.openstack.volume import volumes
from cinder import context
from cinder import db
-from cinder.api.openstack.volume import extensions
from cinder import exception
from cinder import flags
from cinder import test
import httplib
import urlparse
-from cinder.openstack.common import log as logging
from cinder.openstack.common import jsonutils
+from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import time
import unittest
-from cinder import service
from cinder.openstack.common import log as logging
-from cinder.tests.integrated import integrated_helpers
-from cinder.tests.integrated.api import client
+from cinder import service
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
from lxml import etree
+from cinder.api.openstack import common
from cinder.openstack.common import log as logging
from cinder.tests.integrated import integrated_helpers
-from cinder.api.openstack import common
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
-from cinder import test
from cinder import exception
+from cinder import test
from cinder import utils
if possible.
"""
-import ConfigParser
import commands
+import ConfigParser
import os
import urlparse
from migrate.versioning import repository
import sqlalchemy
-import cinder.db.sqlalchemy.migrate_repo
import cinder.db.migration as migration
+import cinder.db.sqlalchemy.migrate_repo
from cinder.db.sqlalchemy.migration import versioning_api as migration_api
from cinder.openstack.common import log as logging
from cinder import test
"""Unit tests for the NetApp-specific NFS driver module (netapp_nfs)"""
from cinder import context
-from cinder import test
from cinder import exception
+from cinder import test
-from cinder.volume import netapp_nfs
from cinder.volume import netapp
+from cinder.volume import netapp_nfs
from cinder.volume import nfs
-from mox import IsA
from mox import IgnoreArg
+from mox import IsA
from mox import MockObject
import mox
import cinder.flags
import cinder.test
from cinder.volume import nexenta
-from cinder.volume.nexenta import volume
from cinder.volume.nexenta import jsonrpc
+from cinder.volume.nexenta import volume
FLAGS = cinder.flags.FLAGS
# under the License.
"""Unit tests for the NFS driver module"""
-import os
-import errno
import __builtin__
+import errno
+import os
import mox as mox_lib
-from mox import IsA
from mox import IgnoreArg
+from mox import IsA
from mox import stubout
from cinder import context
from cinder import exception
-from cinder import test
from cinder.exception import ProcessExecutionError
+from cinder import test
from cinder.volume import nfs
from cinder import db
from cinder import exception
from cinder import flags
+from cinder import manager
from cinder.openstack.common import cfg
-from cinder import test
from cinder import service
-from cinder import manager
+from cinder import test
from cinder import wsgi
"""
-import os
import datetime
+import os
import mox
import shutil
import tempfile
from cinder import context
-from cinder import exception
from cinder import db
+from cinder import exception
from cinder import flags
-from cinder.tests.image import fake as fake_image
from cinder.openstack.common import importutils
from cinder.openstack.common.notifier import api as notifier_api
from cinder.openstack.common.notifier import test_notifier
import cinder.policy
from cinder import quota
from cinder import test
-from cinder.volume import iscsi
from cinder.tests import fake_flags
+from cinder.tests.image import fake as fake_image
+from cinder.volume import iscsi
QUOTAS = quota.QUOTAS
FLAGS = flags.FLAGS
import time
from cinder import context
+from cinder.db.sqlalchemy import models
+from cinder.db.sqlalchemy import session as sql_session
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
from cinder import test
-from cinder.volume import volume_types
-from cinder.db.sqlalchemy import session as sql_session
-from cinder.db.sqlalchemy import models
from cinder.tests import fake_flags
+from cinder.volume import volume_types
FLAGS = flags.FLAGS
LOG = logging.getLogger(__name__)
"""Tests For miscellaneous util methods used with volume."""
+from cinder import context
from cinder import db
from cinder import flags
-from cinder import context
-from cinder import test
-from cinder.volume import utils as volume_utils
from cinder.openstack.common import importutils
from cinder.openstack.common import log as logging
from cinder.openstack.common.notifier import api as notifier_api
from cinder.openstack.common.notifier import test_notifier
+from cinder import test
+from cinder.volume import utils as volume_utils
LOG = logging.getLogger(__name__)
import sys
import cinder.flags
-from cinder.volume import windows
from cinder.tests.windows import basetestcase
from cinder.tests.windows import db_fakes
from cinder.tests.windows import windowsutils
+from cinder.volume import windows
FLAGS = cinder.flags.FLAGS
from cinder.api import openstack as openstack_api
from cinder import exception
-from cinder.volume import xiv
from cinder import test
+from cinder.volume import xiv
import cinder.wsgi
import httplib
from cinder import exception
-from cinder import test
from cinder.openstack.common import log as logging
+from cinder import test
from cinder.volume import zadara
from lxml import etree
TestCase for MockProxy based tests and related classes.
"""
+import cinder.test
import gzip
import os
import pickle
-import cinder.test
from cinder.tests.windows import mockproxy
from xml.sax import saxutils
from eventlet import event
+from eventlet.green import subprocess
from eventlet import greenthread
from eventlet import pools
-from eventlet.green import subprocess
from cinder.common import deprecated
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import excutils
from cinder.openstack.common import importutils
+from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder.db import base
from cinder import exception
from cinder import flags
+from cinder.image import glance
from cinder.openstack.common import cfg
from cinder.openstack.common import excutils
-from cinder.image import glance
from cinder.openstack.common import log as logging
from cinder.openstack.common import rpc
from cinder.openstack.common import timeutils
-from cinder.volume import volume_types
import cinder.policy
from cinder import quota
from cinder.scheduler import rpcapi as scheduler_rpcapi
from cinder.volume import volume_types
+from cinder.volume import volume_types
volume_host_opt = cfg.BoolOpt('snapshot_same_host',
default=True,
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import iscsi
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder import exception
from cinder import flags
from cinder.image import glance
-from cinder.openstack.common import log as logging
from cinder import manager
from cinder.openstack.common import cfg
from cinder.openstack.common import excutils
from cinder.openstack.common import importutils
+from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder.openstack.common import uuidutils
from cinder import quota
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume import volume_types
"""
import os
-import time
import suds
from suds.sax import text
+import time
from cinder import exception
from cinder import flags
from cinder.openstack.common import cfg
from cinder.openstack.common import log as logging
-from cinder.volume import nfs
from cinder.volume.netapp import netapp_opts
+from cinder.volume import nfs
LOG = logging.getLogger("cinder.volume.driver")
import urllib2
from cinder.openstack.common import jsonutils
-from cinder.volume import nexenta
from cinder.openstack.common import log as logging
+from cinder.volume import nexenta
LOG = logging.getLogger("cinder.volume.nexenta.jsonrpc")
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume import nexenta
from cinder.volume.nexenta import jsonrpc
# License for the specific language governing permissions and limitations
# under the License.
-import os
import errno
import hashlib
+import os
+from cinder import exception
from cinder import flags
from cinder.openstack.common import cfg
from cinder.openstack.common import log as logging
from cinder.volume import driver
-from cinder import exception
LOG = logging.getLogger("cinder.volume.driver")
"""
# 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
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.driver import ISCSIDriver
"""Volume-related Utilities and helpers."""
from cinder import flags
-from cinder import utils
-from cinder.openstack.common.notifier import api as notifier_api
from cinder.openstack.common import log as logging
+from cinder.openstack.common.notifier import api as notifier_api
from cinder.openstack.common import timeutils
+from cinder import utils
FLAGS = flags.FLAGS
from cinder import exception
from cinder import flags
-from cinder.openstack.common import log as logging
from cinder.openstack.common import cfg
+from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from cinder.volume import iscsi