Renames for consistent namespaces
Castellan was using both key_mgr and keymgr for module names, leading to inconsistent namespaces such as: castellan.keymgr.key_mgr.KeyManager This CR renames both instances to key_manager to be consistent with the program name. Change-Id: Ie07a70c14939b6c797e812c441d29218c2940ade
This commit is contained in:
parent
2750d14432
commit
d4fadcb521
@ -17,15 +17,15 @@ from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
|
||||
|
||||
keymgr_opts = [
|
||||
key_manager_opts = [
|
||||
cfg.StrOpt('api_class',
|
||||
help='The full class name of the key manager API class'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(keymgr_opts, group='keymgr')
|
||||
CONF.register_opts(key_manager_opts, group='key_manager')
|
||||
|
||||
|
||||
def API():
|
||||
cls = importutils.import_class(CONF.keymgr.api_class)
|
||||
cls = importutils.import_class(CONF.key_manager.api_class)
|
||||
return cls()
|
@ -17,10 +17,10 @@
|
||||
Key manager implementation that raises NotImplementedError
|
||||
"""
|
||||
|
||||
from castellan.keymgr import key_mgr
|
||||
from castellan.key_manager import key_manager
|
||||
|
||||
|
||||
class NotImplementedKeyManager(key_mgr.KeyManager):
|
||||
class NotImplementedKeyManager(key_manager.KeyManager):
|
||||
"""Key Manager Interface that raises NotImplementedError for all operations
|
||||
|
||||
"""
|
@ -19,7 +19,7 @@ Base SymmetricKey Class
|
||||
This module defines the SymmetricKey class.
|
||||
"""
|
||||
|
||||
from castellan.keymgr import key
|
||||
from castellan.key_manager import key
|
||||
|
||||
|
||||
class SymmetricKey(key.Key):
|
@ -17,8 +17,8 @@
|
||||
"""Implementation of a fake key manager."""
|
||||
|
||||
|
||||
from castellan.tests.keymgr import mock_key_mgr
|
||||
from castellan.tests.key_manager import mock_key_manager
|
||||
|
||||
|
||||
def fake_api():
|
||||
return mock_key_mgr.MockKeyManager()
|
||||
return mock_key_manager.MockKeyManager()
|
@ -32,11 +32,11 @@ import random
|
||||
import uuid
|
||||
|
||||
from castellan.common import exception
|
||||
from castellan.keymgr import key_mgr
|
||||
from castellan.keymgr import symmetric_key as sym_key
|
||||
from castellan.key_manager import key_manager
|
||||
from castellan.key_manager import symmetric_key as sym_key
|
||||
|
||||
|
||||
class MockKeyManager(key_mgr.KeyManager):
|
||||
class MockKeyManager(key_manager.KeyManager):
|
||||
|
||||
"""Mocking manager for integration tests.
|
||||
|
@ -20,7 +20,7 @@ Test cases for the key classes.
|
||||
import array
|
||||
import binascii
|
||||
|
||||
from castellan.keymgr import symmetric_key as sym_key
|
||||
from castellan.key_manager import symmetric_key as sym_key
|
||||
from castellan.tests import base
|
||||
|
||||
|
@ -22,9 +22,9 @@ import binascii
|
||||
|
||||
from castellan.common import exception
|
||||
from castellan import context
|
||||
from castellan.keymgr import symmetric_key as sym_key
|
||||
from castellan.tests.keymgr import mock_key_mgr
|
||||
from castellan.tests.keymgr import test_key_mgr
|
||||
from castellan.key_manager import symmetric_key as sym_key
|
||||
from castellan.tests.key_manager import mock_key_manager as mock_key_mgr
|
||||
from castellan.tests.key_manager import test_key_manager as test_key_mgr
|
||||
|
||||
|
||||
class MockKeyManagerTestCase(test_key_mgr.KeyManagerTestCase):
|
@ -17,14 +17,14 @@
|
||||
Test cases for the not implemented key manager.
|
||||
"""
|
||||
|
||||
from castellan.keymgr import not_implemented_key_mgr
|
||||
from castellan.tests.keymgr import test_key_mgr
|
||||
from castellan.key_manager import not_implemented_key_manager
|
||||
from castellan.tests.key_manager import test_key_manager
|
||||
|
||||
|
||||
class NotImplementedKeyManagerTestCase(test_key_mgr.KeyManagerTestCase):
|
||||
class NotImplementedKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
|
||||
|
||||
def _create_key_manager(self):
|
||||
return not_implemented_key_mgr.NotImplementedKeyManager()
|
||||
return not_implemented_key_manager.NotImplementedKeyManager()
|
||||
|
||||
def test_create_key(self):
|
||||
self.assertRaises(NotImplementedError,
|
Loading…
Reference in New Issue
Block a user