src/rgw/setup/rgw.py
def prepare(conf: MappedConf):
        """Prepare for operations required before RGW can be configured."""

        Log.info('Prepare phase started.')

        try:
            config_path = Rgw._get_rgw_config_path(conf)
            tmpl_idx = f'{const.COMPONENT_NAME}_conf_tmpl'  # e.g. rgw_conf_tmpl
            tmpl_url = const.CONFSTORE_FILE_HANDLER + const.CONF_TMPL
            Rgw._load_rgw_config(tmpl_idx, tmpl_url)
            confstore_url = const.CONFSTORE_FILE_HANDLER + config_path
            Rgw._load_rgw_config(Rgw._conf_idx, confstore_url)
            Conf.copy(tmpl_idx, Rgw._conf_idx)
            Conf.save(Rgw._conf_idx)
            Log.info(f'{const.CONF_TMPL} config copied to {config_path}')

        except Exception as e:
            raise SetupError(errno.EINVAL, f'Error ocurred while fetching node ip, {e}')

        Log.info('Prepare phase completed.')

        return 0
Prepare for operations required before RGW can be configured.
Prepare for operations required before RGW can be configured.
Prepare for operations required before RGW can be configured .
def prepare(conf: MappedConf):
        Log.info('Prepare phase started.')
        try:
            config_path = Rgw._get_rgw_config_path(conf)
            tmpl_idx = f'{const.COMPONENT_NAME}_conf_tmpl'  
            tmpl_url = const.CONFSTORE_FILE_HANDLER + const.CONF_TMPL
            Rgw._load_rgw_config(tmpl_idx, tmpl_url)
            confstore_url = const.CONFSTORE_FILE_HANDLER + config_path
            Rgw._load_rgw_config(Rgw._conf_idx, confstore_url)
            Conf.copy(tmpl_idx, Rgw._conf_idx)
            Conf.save(Rgw._conf_idx)
            Log.info(f'{const.CONF_TMPL} config copied to {config_path}')
        except Exception as e:
            raise SetupError(errno.EINVAL, f'Error ocurred while fetching node ip, {e}')
        Log.info('Prepare phase completed.')
        return 0
def prepare ( conf : MappedConf ) : Log . info ( 'Prepare phase started.' ) try : config_path = Rgw . _get_rgw_config_path ( conf ) tmpl_idx = f'{const.COMPONENT_NAME}_conf_tmpl' tmpl_url = const . CONFSTORE_FILE_HANDLER + const . CONF_TMPL Rgw . _load_rgw_config ( tmpl_idx , tmpl_url ) confstore_url = const . CONFSTORE_FILE_HANDLER + config_path Rgw . _load_rgw_config ( Rgw . _conf_idx , confstore_url ) Conf . copy ( tmpl_idx , Rgw . _conf_idx ) Conf . save ( Rgw . _conf_idx ) Log . info ( f'{const.CONF_TMPL} config copied to {config_path}' ) except Exception as e : raise SetupError ( errno . EINVAL , f'Error ocurred while fetching node ip, {e}' ) Log . info ( 'Prepare phase completed.' ) return 0
Prepare for operations required before RGW can be configured.
Prepare for operations required before RGW can be configured .
"""Prepare for operations required before RGW can be configured.""" # e.g. rgw_conf_tmpl
conf
MappedConf