On Wed, Dec 13, 2023 at 7:05 PM Ilya Maximets <i.maxim...@ovn.org> wrote:
> -/* Clears and replaces 'remotes' and 'dbnames' by a configuration read from > - * 'config_file', which must have been previously written by save_config(). > */ > -static void > +/* Clears and replaces 'remotes' and 'db_conf' by a configuration read from > + * 'config_file', which must have been previously written by save_config() > + * or provided by the user with --config-file. > + * Returns 'true', if parsing was successful, 'false' otherwise. */ > +static bool > load_config(FILE *config_file, struct shash *remotes, > struct shash *db_conf, char **sync_from, > char **sync_exclude, bool *is_backup) > @@ -2890,17 +3117,34 @@ load_config(FILE *config_file, struct shash *remotes, > struct json *json; I'm wondering if having an argument for everything we parse out of a config file might get a little unwieldy down the road. Say we add configuration of SSL stuff, etc. Maybe it's something we could modify as it becomes an issue, but it might be nice to have something for config options that is similar to what we have for registering unixctl commands or struct ctl_command_syntax. Documentation could be added as part of the registration/definition of the config option, there could be a .get() that parses the values out of the json, and a .run() that gets called after all of the parsing is shown to succeed. Terry _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev