def _add_extra_config_data()

in backend/bms_app/services/ansible/restore.py [0:0]


    def _add_extra_config_data(self, source_db, bms, config_data):
        restore_config = self.db_mappings_object.db.restore_config

        splitted = [x for x in restore_config.backup_location.split('/') if x]

        config_data.update(
            {
                'backup_bucket': splitted[0],
                'pfile_file': 'pfile.ora',
                'fuse_direct': True,
                'restore_type': restore_config.backup_type.value.lower(),
                'control_file': restore_config.control_file,
            }
        )

        if len(splitted) > 1:
            config_data['gcs_backup_folder'] = '/'.join(splitted[1:])

        if restore_config.pwd_file:
            config_data['psw_file'] = restore_config.pwd_file

        return config_data