summaryrefslogtreecommitdiff
path: root/nova/crypto.py
diff options
context:
space:
mode:
authorKevin_Zheng <zhengzhenyu@huawei.com>2016-01-29 15:01:50 +0800
committerStephen Finucane <stephen.finucane@intel.com>2016-04-05 12:00:55 +0100
commitac0fee5d6b8e88f22155fb59872cbe46e720078f (patch)
treeeecca258120e20369c9c15f3a84e90160883cadf /nova/crypto.py
parent607eb88b08ed22c265783f14ebbec4f26a8a9a5b (diff)
downloadnova-ac0fee5d6b8e88f22155fb59872cbe46e720078f.tar.gz
config options: centralize section: "crypto"
The config options of the "nova.conf" section "crypto" got moved to the new central location "nova/conf/crypto.py" Change-Id: Ia5e970694d384ef39a6050efb5db2f61e6f4205b Implements: blueprint centralize-config-options-newton
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py37
1 files changed, 2 insertions, 35 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 7e07fb4763..eb954d19a0 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -34,56 +34,23 @@ from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
from cryptography import x509
from oslo_concurrency import processutils
-from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import fileutils
import paramiko
import six
+import nova.conf
from nova import context
from nova import db
from nova import exception
from nova.i18n import _, _LE
-from nova import paths
from nova import utils
LOG = logging.getLogger(__name__)
-crypto_opts = [
- cfg.StrOpt('ca_file',
- default='cacert.pem',
- help=_('Filename of root CA')),
- cfg.StrOpt('key_file',
- default=os.path.join('private', 'cakey.pem'),
- help=_('Filename of private key')),
- cfg.StrOpt('crl_file',
- default='crl.pem',
- help=_('Filename of root Certificate Revocation List')),
- cfg.StrOpt('keys_path',
- default=paths.state_path_def('keys'),
- help=_('Where we keep our keys')),
- cfg.StrOpt('ca_path',
- default=paths.state_path_def('CA'),
- help=_('Where we keep our root CA')),
- cfg.BoolOpt('use_project_ca',
- default=False,
- help=_('Should we use a CA for each project?')),
- cfg.StrOpt('user_cert_subject',
- default='/C=US/ST=California/O=OpenStack/'
- 'OU=NovaDev/CN=%.16s-%.16s-%s',
- help=_('Subject for certificate for users, %s for '
- 'project, user, timestamp')),
- cfg.StrOpt('project_cert_subject',
- default='/C=US/ST=California/O=OpenStack/'
- 'OU=NovaDev/CN=project-ca-%.16s-%s',
- help=_('Subject for certificate for projects, %s for '
- 'project, timestamp')),
- ]
-
-CONF = cfg.CONF
-CONF.register_opts(crypto_opts)
+CONF = nova.conf.CONF
def ca_folder(project_id=None):