src/rgw/setup/rgw.py
def _update_svc_config(conf: MappedConf, client_section: str, config_key_mapping: dict):
        """Update config properties from confstore to rgw config file."""
        svc_config_file = Rgw._get_rgw_config_path(conf)
        confstore_url = const.CONFSTORE_FILE_HANDLER + svc_config_file
        Rgw._load_rgw_config(Rgw._conf_idx, confstore_url)
        Log.info(f'updating parameters to {client_section} in {svc_config_file}')

        for config_key, confstore_key in config_key_mapping.items():
            default_value = Conf.get(Rgw._conf_idx, f'{client_section}>{config_key}')
            if confstore_key is None:
                Log.info(f'config key:{config_key} not found in rgw key mapping.\
                    hence using default value as {default_value} specified in config file.')
                continue
            else:
                # fetch actual value of parameter from confstore.
                # if config key/value is missing in confstore then use default value mentioned in config file.
                config_value = conf.get(confstore_key)
                if config_value is not None:
                    Log.info(f'Setting config key :{config_key} with value:{config_value} at {client_section} section')
                    Conf.set(Rgw._conf_idx, f'{client_section}>{config_key}', str(config_value))
                else :
                    Log.info(f'GConfig entry is missing for config key :{config_key}.\
                        hence using default value as {default_value} specified in config file.')
                    continue

        Conf.save(Rgw._conf_idx)
        Log.info(f'added paramters to {client_section} successfully..')
Update config properties from confstore to rgw config file.
Update config properties from confstore to rgw config file.
Update config properties from confstore to rgw config file .
def _update_svc_config(conf: MappedConf, client_section: str, config_key_mapping: dict):
        svc_config_file = Rgw._get_rgw_config_path(conf)
        confstore_url = const.CONFSTORE_FILE_HANDLER + svc_config_file
        Rgw._load_rgw_config(Rgw._conf_idx, confstore_url)
        Log.info(f'updating parameters to {client_section} in {svc_config_file}')
        for config_key, confstore_key in config_key_mapping.items():
            default_value = Conf.get(Rgw._conf_idx, f'{client_section}>{config_key}')
            if confstore_key is None:
                Log.info(f'config key:{config_key} not found in rgw key mapping.\
                    hence using default value as {default_value} specified in config file.')
                continue
            else:
                config_value = conf.get(confstore_key)
                if config_value is not None:
                    Log.info(f'Setting config key :{config_key} with value:{config_value} at {client_section} section')
                    Conf.set(Rgw._conf_idx, f'{client_section}>{config_key}', str(config_value))
                else :
                    Log.info(f'GConfig entry is missing for config key :{config_key}.\
                        hence using default value as {default_value} specified in config file.')
                    continue
        Conf.save(Rgw._conf_idx)
        Log.info(f'added paramters to {client_section} successfully..')
def _update_svc_config ( conf : MappedConf , client_section : str , config_key_mapping : dict ) : svc_config_file = Rgw . _get_rgw_config_path ( conf ) confstore_url = const . CONFSTORE_FILE_HANDLER + svc_config_file Rgw . _load_rgw_config ( Rgw . _conf_idx , confstore_url ) Log . info ( f'updating parameters to {client_section} in {svc_config_file}' ) for config_key , confstore_key in config_key_mapping . items ( ) : default_value = Conf . get ( Rgw . _conf_idx , f'{client_section}>{config_key}' ) if confstore_key is None : Log . info ( f'config key:{config_key} not found in rgw key mapping.\
                    hence using default value as {default_value} specified in config file.' ) continue else : config_value = conf . get ( confstore_key ) if config_value is not None : Log . info ( f'Setting config key :{config_key} with value:{config_value} at {client_section} section' ) Conf . set ( Rgw . _conf_idx , f'{client_section}>{config_key}' , str ( config_value ) ) else : Log . info ( f'GConfig entry is missing for config key :{config_key}.\
                        hence using default value as {default_value} specified in config file.' ) continue Conf . save ( Rgw . _conf_idx ) Log . info ( f'added paramters to {client_section} successfully..' )
Update config properties from confstore to rgw config file.
Update config properties from confstore to rgw config file .
"""Update config properties from confstore to rgw config file.""" # fetch actual value of parameter from confstore. # if config key/value is missing in confstore then use default value mentioned in config file.
conf
MappedConf
client_section
str
config_key_mapping
dict