From 8e206ff73556aa7079980cd851f8440a45a60b90 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 24 Feb 2016 16:00:52 +0000 Subject: [PATCH] Add deprecated_for_removal config info in ironic.conf.sample Configuration options has a parameter called "deprecated_for_removal" to indicate that one option is planned to be removed in a future release. This patch is extending the config generator script to add this information to the output .sample file. Change-Id: I3d3a69ea9ca700edf96ede947ff7b074e7978484 Closes-Bug: #1549351 --- etc/ironic/ironic.conf.sample | 2 ++ ironic/common/config_generator/generator.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/etc/ironic/ironic.conf.sample b/etc/ironic/ironic.conf.sample index 18bdc37897..21d19cf6b9 100644 --- a/etc/ironic/ironic.conf.sample +++ b/etc/ironic/ironic.conf.sample @@ -119,6 +119,7 @@ # Default interval for running driver periodic tasks. (integer # value) +# This option is deprecated and planned for removal in a future release. #periodic_interval=60 # Name of this node. This can be an opaque identifier. It is @@ -171,6 +172,7 @@ # If set to false, the logging level will be set to WARNING # instead of the default INFO level. (boolean value) +# This option is deprecated and planned for removal in a future release. #verbose=true # The name of a logging configuration file. This file is diff --git a/ironic/common/config_generator/generator.py b/ironic/common/config_generator/generator.py index 16aa63cd4c..b58f1b6eea 100644 --- a/ironic/common/config_generator/generator.py +++ b/ironic/common/config_generator/generator.py @@ -285,6 +285,9 @@ def _print_opt(opt, group): print('# Deprecated group/name - [%s]/%s' % (deprecated_group, deprecated_name)) + if opt.deprecated_for_removal: + print('# This option is deprecated and planned for removal in a ' + 'future release.') try: if opt_default is None: print('#%s=' % opt_name)