Example #1
0
 def test_list_opts(self):
     all_options = _options.list_opts()
     (group, options) = all_options[0]
     self.assertIsNone(group)
     self.assertEqual(
         (_options.common_cli_opts + _options.logging_cli_opts +
          _options.generic_log_opts + _options.log_opts +
          _options.versionutils.deprecated_opts), options)
Example #2
0
def list_opts():
    """Return a list of oslo_config options available in Afloclient."""
    opts = [
        (None, copy.deepcopy(auth_opts)),
        (None, copy.deepcopy(base_opts)),
    ]
    opts.extend(log_options.list_opts())
    return opts
Example #3
0
 def test_list_opts(self):
     all_options = _options.list_opts()
     (group, options) = all_options[0]
     self.assertIsNone(group)
     self.assertEqual((_options.common_cli_opts +
                       _options.logging_cli_opts +
                       _options.generic_log_opts +
                       _options.log_opts +
                       _options.versionutils.deprecated_opts), options)
Example #4
0
def list_kuryr_opts():
    """Return a list of oslo_config options available in Kuryr service.

    Each element of the list is a tuple. The first element is the name of the
    group under which the list of elements in the second element will be
    registered. A group name of None corresponds to the [DEFAULT] group in
    config files.

    This function is also discoverable via the 'kuryr' entry point under
    the 'oslo_config.opts' namespace.

    The purpose of this is to allow tools like the Oslo sample config file
    generator to discover the options exposed to users by Kuryr.

    :returns: a list of (group_name, opts) tuples
    """

    return ([(k, copy.deepcopy(o)) for k, o in _kuryr_k8s_opts] +
            lib_opts.list_kuryr_opts() + _options.list_opts())