Openstack: Oslo_Config NoSuchOptError for an obsolete name - perhaps you need to define Deprecated_Opts?

I recently made a code fix to rename the configuration parameter name in vertica from 'cluster_member_count' to 'min_cluster_member_count'. Also, I am out of date with the value of the old parameter so that it can be backward compatible. Here is the group in which the configuration parameter should 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 must be made:

  • change the name of the cluster_member_count parameter to min_cluster_member_count
  • relevant help description
  • REDUCE the old parameter name "cluster_member_count" and specify it in the group (use DEPRECATED_GROUP) = 'vertical'. This is done for backward compatibility.

cfg.IntOpt :

    cfg.IntOpt('min_cluster_member_count', default=3,
           help='Minimum number of members in Vertica cluster.',
           deprecated_name='cluster_member_count',
           deprecated_group='vertica'),

, tox -e py27, :

oslo.config.cfg.NoSuchOptError: no such option in group vertica: cluster_member_count

? , , debrecated_group = 'vertica' . - .

: , , , "cluster_member_group" DEPRECATED_OPTS, googling , . , Openstack , .

+4
1

somethere in trove cfg.CONF.vertica.cluster_member_count, , cfg.CONF.vertica.min_cluster_member_count

, , Vertica, , , , DEFAULT, cfg.CONF.min_cluster_member_count

+3

All Articles