def METHOD_NAME(self):
    dbovirtutils = database.OvirtUtils(
        plugin=self,
        dbenvkeys=oenginecons.Const.ENGINE_DB_ENV_KEYS,
    )
    dbovirtutils.detectCommands()
    config = configfile.ConfigFile([
        oenginecons.FileLocations.OVIRT_ENGINE_SERVICE_CONFIG_DEFAULTS,
        oenginecons.FileLocations.OVIRT_ENGINE_SERVICE_CONFIG
    ])
    if config.get('ENGINE_DB_PASSWORD'):
        try:
            dbenv = {}
            for e, k in (
                (oenginecons.EngineDBEnv.HOST, 'ENGINE_DB_HOST'),
                (oenginecons.EngineDBEnv.PORT, 'ENGINE_DB_PORT'),
                (oenginecons.EngineDBEnv.USER, 'ENGINE_DB_USER'),
                (oenginecons.EngineDBEnv.PASSWORD, 'ENGINE_DB_PASSWORD'),
                (oenginecons.EngineDBEnv.DATABASE, 'ENGINE_DB_DATABASE'),
            ):
                dbenv[e] = config.get(k)
            for e, k in (
                (oenginecons.EngineDBEnv.SECURED, 'ENGINE_DB_SECURED'),
                (
                    oenginecons.EngineDBEnv.SECURED_HOST_VALIDATION,
                    'ENGINE_DB_SECURED_VALIDATION'
                )
            ):
                dbenv[e] = config.getboolean(k)
            dbovirtutils.tryDatabaseConnect(dbenv)
            self.environment.update(dbenv)
            self.environment[
                oenginecons.EngineDBEnv.NEW_DATABASE
            ] = dbovirtutils.isNewDatabase()
            self.environment[
                oenginecons.EngineDBEnv.NEED_DBMSUPGRADE
            ] = dbovirtutils.checkDBMSUpgrade()
        except RuntimeError:
            self.logger.debug(
                'Existing credential use failed',
                exc_info=True,
            )
            msg = _(
                'Cannot connect to Engine database using existing '
                'credentials: {user}@{host}:{port}'
            ).format(
                host=dbenv[oenginecons.EngineDBEnv.HOST],
                port=dbenv[oenginecons.EngineDBEnv.PORT],
                database=dbenv[oenginecons.EngineDBEnv.DATABASE],
                user=dbenv[oenginecons.EngineDBEnv.USER],
            )
            if self.environment[
                osetupcons.CoreEnv.ACTION
            ] == osetupcons.Const.ACTION_REMOVE:
                self.logger.warning(msg)
            else:
                raise RuntimeError(msg)
        if not self.environment[
            oenginecons.EngineDBEnv.NEW_DATABASE
        ]:
            statement = database.Statement(
                dbenvkeys=oenginecons.Const.ENGINE_DB_ENV_KEYS,
                environment=self.environment,
            )
            try:
                justRestored = vdcoption.VdcOption(
                    statement=statement,
                ).getVdcOption(
                    'DbJustRestored',
                    ownConnection=True,
                )
                self.environment[
                    oenginecons.EngineDBEnv.JUST_RESTORED
                ] = (justRestored == '1')
            except RuntimeError:
                pass
            if self.environment[
                oenginecons.EngineDBEnv.JUST_RESTORED
            ]:
                self.logger.info(_(
                    'The engine DB has been restored from a backup'
                ))