From 12cf56711abc1527efd9c1f5c685e8286bb53562 Mon Sep 17 00:00:00 2001 From: Anusha Unnam Date: Wed, 27 Jul 2016 21:23:24 +0000 Subject: [PATCH] Config options consistency for consoleauth.py Checked config options consistency in consoleauth.py and removed all tags according to wiki. https://wiki.openstack.org/wiki/ConfigOptionsConsistency Blueprint centralize-config-options-newton Change-Id: I5e4c08df7ef93e07190bd0c99b24970bc2f7fd8b --- nova/conf/consoleauth.py | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/nova/conf/consoleauth.py b/nova/conf/consoleauth.py index 8ecfe52af8..2915f742b9 100644 --- a/nova/conf/consoleauth.py +++ b/nova/conf/consoleauth.py @@ -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) 2013 OpenStack Foundation # All Rights Reserved. @@ -24,9 +17,11 @@ from oslo_config import cfg -consoleauth_topic_opt = cfg.StrOpt('consoleauth_topic', - default='consoleauth', - help=""" +consoleauth_opts = [ + # TODO(aunnam): This option needs to be deprecated + cfg.StrOpt('consoleauth_topic', + default='consoleauth', + help=""" This option allows you to change the message topic used by nova-consoleauth service when communicating via the AMQP server. Nova Console Authentication server authenticates nova consoles. Users can then access their instances @@ -36,24 +31,24 @@ communicate with nova-consoleauth to get a VNC console. Possible Values: * 'consoleauth' (default) or Any string representing topic exchange name. -""") - -console_token_ttl = cfg.IntOpt('console_token_ttl', - default=600, - min=0, - help=""" +"""), + cfg.IntOpt('console_token_ttl', + default=600, + min=0, + help=""" This option indicates the lifetime of a console auth token. A console auth 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 tokens are then deleted. """) - -CONSOLEAUTH_OPTS = [consoleauth_topic_opt, console_token_ttl] +] def register_opts(conf): - conf.register_opts(CONSOLEAUTH_OPTS) + conf.register_opts(consoleauth_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}