src/rgw/setup/rgw.py
def _update_svc_data_path_value(conf: MappedConf, client_section: str):
        "Update svc config file with data path key which needs pre-processing values incase of default values."
        # Fetch cluster-id
        cluster_id = Rgw._get_cortx_conf(conf, const.CLUSTER_ID_KEY)
        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 data_path paramter to {client_section} in {svc_config_file}')

        # Create data path's default value e.g. /var/lib/ceph/radosgw/<cluster-id>
        data_path_default_value = const.SVC_DATA_PATH_DEFAULT_VALUE + cluster_id
        confstore_data_path_value = conf.get(const.SVC_DATA_PATH_CONFSTORE_KEY)
        if confstore_data_path_value is not None:
           Log.info(f'Setting config key :{const.SVC_DATA_PATH_KEY} with value:{confstore_data_path_value}\
               at {client_section} section')
           Conf.set(Rgw._conf_idx, f'{client_section}>{const.SVC_DATA_PATH_KEY}', str(confstore_data_path_value))
        else:
           Log.info(f'GConfig entry is missing for config key :{const.SVC_DATA_PATH_KEY}.\
                        hence using default value as {data_path_default_value} specified in config file.')
           Conf.set(Rgw._conf_idx, f'{client_section}>{const.SVC_DATA_PATH_KEY}', str(data_path_default_value))

        Conf.save(Rgw._conf_idx)
        Log.info(f'added config parameters to {client_section} successfully..')
Update svc config file with data path key which needs pre-processing values incase of default values.
Update svc config file with data path key which needs pre-processing values incase of default values.
Update svc config file with data path key which needs pre - processing values incase of default values .
def _update_svc_data_path_value(conf: MappedConf, client_section: str):
        cluster_id = Rgw._get_cortx_conf(conf, const.CLUSTER_ID_KEY)
        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 data_path paramter to {client_section} in {svc_config_file}')
        data_path_default_value = const.SVC_DATA_PATH_DEFAULT_VALUE + cluster_id
        confstore_data_path_value = conf.get(const.SVC_DATA_PATH_CONFSTORE_KEY)
        if confstore_data_path_value is not None:
           Log.info(f'Setting config key :{const.SVC_DATA_PATH_KEY} with value:{confstore_data_path_value}\
               at {client_section} section')
           Conf.set(Rgw._conf_idx, f'{client_section}>{const.SVC_DATA_PATH_KEY}', str(confstore_data_path_value))
        else:
           Log.info(f'GConfig entry is missing for config key :{const.SVC_DATA_PATH_KEY}.\
                        hence using default value as {data_path_default_value} specified in config file.')
           Conf.set(Rgw._conf_idx, f'{client_section}>{const.SVC_DATA_PATH_KEY}', str(data_path_default_value))
        Conf.save(Rgw._conf_idx)
        Log.info(f'added config parameters to {client_section} successfully..')
def _update_svc_data_path_value ( conf : MappedConf , client_section : str ) : cluster_id = Rgw . _get_cortx_conf ( conf , const . CLUSTER_ID_KEY ) 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 data_path paramter to {client_section} in {svc_config_file}' ) data_path_default_value = const . SVC_DATA_PATH_DEFAULT_VALUE + cluster_id confstore_data_path_value = conf . get ( const . SVC_DATA_PATH_CONFSTORE_KEY ) if confstore_data_path_value is not None : Log . info ( f'Setting config key :{const.SVC_DATA_PATH_KEY} with value:{confstore_data_path_value}\
               at {client_section} section' ) Conf . set ( Rgw . _conf_idx , f'{client_section}>{const.SVC_DATA_PATH_KEY}' , str ( confstore_data_path_value ) ) else : Log . info ( f'GConfig entry is missing for config key :{const.SVC_DATA_PATH_KEY}.\
                        hence using default value as {data_path_default_value} specified in config file.' ) Conf . set ( Rgw . _conf_idx , f'{client_section}>{const.SVC_DATA_PATH_KEY}' , str ( data_path_default_value ) ) Conf . save ( Rgw . _conf_idx ) Log . info ( f'added config parameters to {client_section} successfully..' )
Update svc config file with data path key which needs pre-processing values incase of default values.
Update svc config file with data path key which needs pre - processing values incase of default values .
"Update svc config file with data path key which needs pre-processing values incase of default values." # Fetch cluster-id # Create data path's default value e.g. /var/lib/ceph/radosgw/<cluster-id>
conf
MappedConf
client_section
str