I recently made a code fix in trove to rename a config parameter name in vertica from 'cluster_member_count' to 'min_cluster_member_count'. Also, I deprecated the value of the old parameter so it can be backwards-compatible. Here is the group where the config option is to be deprecated:
# Vertica
vertica_group = cfg.OptGroup(
'vertica', title='Vertica options',
help="Oslo option group designed for Vertica datastore")
vertica_opts = [
cfg.ListOpt('tcp_ports',
default=["5433", "5434", "22", "5444", "5450", "4803"],
help='List of TCP ports and/or port ranges to open '
'in the security group (only applicable '
'if trove_security_groups_support is True).'),
(skip lines)
I am changing the following cfg.IntOpt:
cfg.IntOpt('cluster_member_count', default=3,
help='Number of members in Vertica cluster.'),
Changes to be made:
- change the parameter name 'cluster_member_count' to 'min_cluster_member_count'
- the help description is changed accordingly
- DEPRECATE the old parameter name 'cluster_member_count' and reference it under the group (use DEPRECATED_GROUP) = 'vertical'. This is done for backward compatibility.
The updated cfg.IntOpt is shown below:
cfg.IntOpt('min_cluster_member_count', default=3,
help='Minimum number of members in Vertica cluster.',
deprecated_name='cluster_member_count',
deprecated_group='vertica'),
however when I ran the tox -e py27 test I am getting the following error:
oslo.config.cfg.NoSuchOptError: no such option in group vertica: cluster_member_count
What am I missing here? I initially thought that this should have worked, as I assigned the correct deprecated_group = 'vertica' for the deprecated name. I appreciate any helpful input - thank you.
UPDATE: I believe I may have to define 'cluster_member_group' under DEPRECATED_OPTS, but googling does not show any sample on how to do it. Wish the Openstack doc provides a sample code, not just the syntax.