Move required keymgr classes out of nova/tests

Currently the Nova default keymgr implementation tries to
import classes from nova/tests. This could be a very bad
thing for production deployments which may not include
code from nova/tests.

This change moves two required modules (single_key_mgr and
mock_key_mgr) into the nova/keymgr tree.

Fixes bug: #1224526

Change-Id: I683b0245ab6b6acf8a4ba26f96d8c505f7c7cac8
This commit is contained in:
Dan Prince 2013-09-12 11:14:30 -04:00
parent 2f6022f6bf
commit a0d785868c
6 changed files with 5 additions and 5 deletions

View File

@ -34,8 +34,8 @@ encryption key so *any* volume can be decrypted once the fixed key is known.
from oslo.config import cfg
from nova.keymgr import single_key_mgr
from nova.openstack.common.gettextutils import _
from nova.tests.keymgr import single_key_mgr
key_mgr_opts = [
cfg.StrOpt('fixed_key',

View File

@ -21,9 +21,9 @@ all invocations of get_key.
from nova import exception
from nova.keymgr import mock_key_mgr
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.tests.keymgr import mock_key_mgr
LOG = logging.getLogger(__name__)

View File

@ -19,7 +19,7 @@
"""Implementation of a fake key manager."""
from nova.tests.keymgr import mock_key_mgr
from nova.keymgr import mock_key_mgr
def fake_api():

View File

@ -23,7 +23,7 @@ import array
from nova import context
from nova import exception
from nova.keymgr import key as keymgr_key
from nova.tests.keymgr import mock_key_mgr
from nova.keymgr import mock_key_mgr
from nova.tests.keymgr import test_key_mgr

View File

@ -22,7 +22,7 @@ import array
from nova import exception
from nova.keymgr import key
from nova.tests.keymgr import single_key_mgr
from nova.keymgr import single_key_mgr
from nova.tests.keymgr import test_mock_key_mgr