Merge "Config options consistency for consoleauth.py"

This commit is contained in:
Jenkins 2016-08-22 07:07:21 +00:00 committed by Gerrit Code Review
commit b292bf3441

View File

@ -1,10 +1,3 @@
# needs:fix_opt_description
# needs:check_deprecation_status
# needs:check_opt_group_and_type
# needs:fix_opt_description_indentation
# needs:fix_opt_registration_consistency
# Copyright (c) 2016 Intel, Inc. # Copyright (c) 2016 Intel, Inc.
# Copyright (c) 2013 OpenStack Foundation # Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved. # All Rights Reserved.
@ -24,7 +17,9 @@
from oslo_config import cfg from oslo_config import cfg
consoleauth_topic_opt = cfg.StrOpt('consoleauth_topic', consoleauth_opts = [
# TODO(aunnam): This option needs to be deprecated
cfg.StrOpt('consoleauth_topic',
default='consoleauth', default='consoleauth',
help=""" help="""
This option allows you to change the message topic used by nova-consoleauth This option allows you to change the message topic used by nova-consoleauth
@ -36,9 +31,8 @@ communicate with nova-consoleauth to get a VNC console.
Possible Values: Possible Values:
* 'consoleauth' (default) or Any string representing topic exchange name. * 'consoleauth' (default) or Any string representing topic exchange name.
""") """),
cfg.IntOpt('console_token_ttl',
console_token_ttl = cfg.IntOpt('console_token_ttl',
default=600, default=600,
min=0, min=0,
help=""" help="""
@ -47,13 +41,14 @@ token is used in authorizing console access for a user. Once the auth token
time to live count has elapsed, the token is considered expired. Expired time to live count has elapsed, the token is considered expired. Expired
tokens are then deleted. tokens are then deleted.
""") """)
]
CONSOLEAUTH_OPTS = [consoleauth_topic_opt, console_token_ttl]
def register_opts(conf): def register_opts(conf):
conf.register_opts(CONSOLEAUTH_OPTS) conf.register_opts(consoleauth_opts)
def list_opts(): def list_opts():
return {'DEFAULT': CONSOLEAUTH_OPTS} # TODO(aunnam): This should be moved into the consoleauth group and
# oslo_config.cfg.OptGroup used
return {'DEFAULT': consoleauth_opts}