def setup(service_manager, conf, reload_method="reload"):
    """Load services configuration from oslo config object.

    It reads ServiceManager and Service configuration options from an
    oslo_config.ConfigOpts() object. Also It registers a ServiceManager hook to
    reload the configuration file on reload in the master process and in all
    children. And then when each child start or reload, the configuration
    options are logged if the oslo config option 'log_options' is True.

    On children, the configuration file is reloaded before the running the
    application reload method.

    Options currently supported on ServiceManager and Service:
    * graceful_shutdown_timeout

    :param service_manager: ServiceManager instance
    :type service_manager: cotyledon.ServiceManager
    :param conf: Oslo Config object
    :type conf: oslo_config.ConfigOpts()
    :param reload_method: reload or mutate the config files
    :type reload_method: str "reload/mutate"
    """
    conf.register_opts(service_opts)

    # Set cotyledon options from oslo config options
    _load_service_manager_options(service_manager, conf)

    def _service_manager_reload():
        _configfile_reload(conf, reload_method)
        _load_service_manager_options(service_manager, conf)

    if os.name != "posix":
        # NOTE(sileht): reloading can't be supported oslo.config is not pickle
        # But we don't care SIGHUP is not support on window
        return

    service_manager.register_hooks(
        on_new_worker=functools.partial(
            _new_worker_hook, conf, reload_method),
        on_reload=_service_manager_reload)
Load services configuration from oslo config object.

    It reads ServiceManager and Service configuration options from an
    oslo_config.ConfigOpts() object. Also It registers a ServiceManager hook to
    reload the configuration file on reload in the master process and in all
    children. And then when each child start or reload, the configuration
    options are logged if the oslo config option 'log_options' is True.

    On children, the configuration file is reloaded before the running the
    application reload method.

    Options currently supported on ServiceManager and Service:
    * graceful_shutdown_timeout

    :param service_manager: ServiceManager instance
    :type service_manager: cotyledon.ServiceManager
    :param conf: Oslo Config object
    :type conf: oslo_config.ConfigOpts()
    :param reload_method: reload or mutate the config files
    :type reload_method: str "reload/mutate"