Esempio n. 1
0
    def test_list_kuryr_opts(self, list_neutron_opts):
        list_neutron_opts.return_value = self._fake_neutron_opts

        self.assertEqual(
            self._fake_kuryr_opts + self._fake_neutron_opts +
            [(self._fake_binding_group, self._fake_binding_opts)],
            kuryr_opts.list_kuryr_opts())
Esempio n. 2
0
    def test_list_kuryr_opts(self, list_neutron_opts):
        list_neutron_opts.return_value = self._fake_neutron_opts

        self.assertEqual(
            self._fake_kuryr_opts + self._fake_neutron_opts + [(self._fake_binding_group, self._fake_binding_opts)],
            kuryr_opts.list_kuryr_opts(),
        )
Esempio n. 3
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())
Esempio n. 4
0
def list_kuryr_libnetwork_opts():
    """Return a list of oslo_config options available in kuryr-libnetwork 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_libnetwork' 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-libnetwork.

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

    return ([(k, copy.deepcopy(o)) for k, o in _kuryr_libnetwork_opts] +
            lib_opts.list_kuryr_opts())
Esempio n. 5
0
    def test_list_kuryr_opts(self, list_neutron_opts):
        list_neutron_opts.return_value = self._fake_neutron_opts

        self.assertEqual(self._fake_kuryr_opts + self._fake_neutron_opts,
                         kuryr_opts.list_kuryr_opts())