Send messages to ISMAS for checking/repairing the customer repository

This commit is contained in:
Gerhard Hoffmann 2024-01-23 16:09:15 +01:00
parent 9a9480035b
commit aaa485e2fc

View File

@ -714,21 +714,73 @@ private:
case UPDATE_STEP::CHECK_REPOSITORY: case UPDATE_STEP::CHECK_REPOSITORY:
ismasClient.setProgressInPercent(_CHECK_REPOSITORY); ismasClient.setProgressInPercent(_CHECK_REPOSITORY);
break; break;
case UPDATE_STEP::CHECK_REPOSITORY_SUCCESS: case UPDATE_STEP::CHECK_REPOSITORY_SUCCESS: {
ismasClient.setProgressInPercent(_CHECK_REPOSITORY_SUCCESS); ismasClient.setProgressInPercent(_CHECK_REPOSITORY_SUCCESS);
break; QString const &ismasUpdateNews =
case UPDATE_STEP::CHECK_REPOSITORY_FAILURE: QString("#M=APISM#C=CMD_EVENT#J=") +
ismasClient.updateNewsToIsmas(
"U0010",
_CHECKOUT_REPOSITORY_SUCCESS,
IsmasClient::RESULT_CODE::SUCCESS,
smap[UPDATE_STEP::CHECK_REPOSITORY],
QString("REPOSITORY %1 AND BRANCH %2 OK")
.arg(instance->m_customerRepository)
.arg(instance->m_gc.branchName()).toStdString().c_str(),
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
ismasClient.sendRequestReceiveResponse(
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
} break;
case UPDATE_STEP::CHECK_REPOSITORY_FAILURE: {
ismasClient.setProgressInPercent(_CHECK_REPOSITORY_FAILURE); ismasClient.setProgressInPercent(_CHECK_REPOSITORY_FAILURE);
break; QString const &ismasUpdateNews =
case UPDATE_STEP::CHECK_SANITY: QString("#M=APISM#C=CMD_EVENT#J=") +
ismasClient.updateNewsToIsmas(
"U0010",
_CHECKOUT_REPOSITORY_FAILURE,
IsmasClient::RESULT_CODE::INSTALL_ERROR,
smap[UPDATE_STEP::CHECKOUT_REPOSITORY],
QString("REPOSITORY %1 and BRANCH %2 ***NOT OK***")
.arg(instance->m_customerRepository)
.arg(instance->m_gc.branchName()).toStdString().c_str(),
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
ismasClient.sendRequestReceiveResponse(
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
} break;
case UPDATE_STEP::CHECK_SANITY: {
ismasClient.setProgressInPercent(_CHECK_SANITY); ismasClient.setProgressInPercent(_CHECK_SANITY);
break; } break;
case UPDATE_STEP::CHECK_SANITY_SUCCESS: case UPDATE_STEP::CHECK_SANITY_SUCCESS: {
ismasClient.setProgressInPercent(_CHECK_SANITY_SUCCESS); ismasClient.setProgressInPercent(_CHECK_SANITY_SUCCESS);
break; QString const &ismasUpdateNews =
case UPDATE_STEP::CHECK_SANITY_FAILURE: QString("#M=APISM#C=CMD_EVENT#J=") +
ismasClient.updateNewsToIsmas(
"U0010",
_CHECK_SANITY_SUCCESS,
IsmasClient::RESULT_CODE::SUCCESS,
smap[UPDATE_STEP::CHECK_SANITY],
QString("SANITY OF %1 (BRANCH %2) OK")
.arg(instance->m_customerRepository)
.arg(instance->m_gc.branchName()).toStdString().c_str(),
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
ismasClient.sendRequestReceiveResponse(
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
} break;
case UPDATE_STEP::CHECK_SANITY_FAILURE: {
ismasClient.setProgressInPercent(_CHECK_SANITY_FAILURE); ismasClient.setProgressInPercent(_CHECK_SANITY_FAILURE);
break; QString const &ismasUpdateNews =
QString("#M=APISM#C=CMD_EVENT#J=") +
ismasClient.updateNewsToIsmas(
"U0010",
_CHECK_SANITY_FAILURE,
IsmasClient::RESULT_CODE::INSTALL_ERROR,
smap[UPDATE_STEP::CHECK_SANITY],
QString("SANITY OF %1 and BRANCH %2 ***NOT*** OK")
.arg(instance->m_customerRepository)
.arg(instance->m_gc.branchName()).toStdString().c_str(),
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
ismasClient.sendRequestReceiveResponse(
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
} break;
case UPDATE_STEP::REPOSITORY_RECOVERED_SUCCESS: case UPDATE_STEP::REPOSITORY_RECOVERED_SUCCESS:
ismasClient.setProgressInPercent(_REPOSITORY_RECOVERED_SUCCESS); ismasClient.setProgressInPercent(_REPOSITORY_RECOVERED_SUCCESS);
break; break;