Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -17,12 +17,11 @@
//---------------------------------------------------------------------------------
namespace ProjectDataManagement
{
PdmTests::PdmTests(QObject *parent)
: QObject(parent)
PdmTests::PdmTests(QObject *parent) : QObject(parent)
, m_id(0)
, m_testId(0)
, m_bTestsSuccessful(true)
{
, m_bTestsSuccessful(true),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
}
@@ -33,22 +32,22 @@ PdmTests::~PdmTests()
//---------------------------------------------------------------------------------
bool PdmTests::init(int domainId, int testId)
{
DEBUG_LOG() << "init begin";
DEBUG_LOG(m_logger) << "init begin";
m_testId = testId;
// initialize DDS
m_ddsConnector.reset(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0));
if (!m_ddsConnector->init())
return false;
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
m_ddsConnector->initPublisherSubscriber();
DEBUG_LOG() << "create dtc";
DEBUG_LOG(m_logger) << "create dtc";
m_dtc = ProjectDataManagement::Interface::Dtc::create(m_ddsConnector);
DEBUG_LOG() << "create ftc";
DEBUG_LOG(m_logger) << "create ftc";
m_ftc = ProjectDataManagement::Interface::Ftc::create(m_ddsConnector);
bool bRet = m_dtc->enableAll() && m_ftc->enableAll();
DEBUG_LOG() << "init end - bRet = " << bRet;
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
return bRet;
}
@@ -56,7 +55,7 @@ bool PdmTests::init(int domainId, int testId)
//---------------------------------------------------------------------------------
void PdmTests::startTest()
{
INFO_LOG() << "startTest";
INFO_LOG(m_logger) << "startTest";
if (m_testId == 0)
{
QTimer::singleShot(1000, this, &PdmTests::tryGetAllVulnerabilityKinds);
@@ -72,7 +71,7 @@ void PdmTests::startTest()
}
else
{
ERROR_LOG() << "Unknown test case!";
ERROR_LOG(m_logger) << "Unknown test case!";
failExit();
}
QTimer::singleShot(5000, qApp, &QCoreApplication::quit);
@@ -82,21 +81,21 @@ void PdmTests::startTest()
//---------------------------------------------------------------------------------
void PdmTests::tryGetAllVulnerabilityKinds()
{
INFO_LOG() << "trying to get all ProjectDataManagements";
INFO_LOG(m_logger) << "trying to get all ProjectDataManagements";
const QMap<qint32, ProjectDataManagement::VulnerabilityKind> map = m_dtc->vulnerabilityKinds();
if (map.isEmpty())
{
ERROR_LOG() << "Error requesting vulnerability kinds data";
ERROR_LOG(m_logger) << "Error requesting vulnerability kinds data";
failExit();
}
else
{
INFO_LOG() << "Amount of vulnerability kinds = " << map.size();
INFO_LOG(m_logger) << "Amount of vulnerability kinds = " << map.size();
m_id = map.firstKey();
for(auto it = map.begin(); it != map.end(); ++it)
{
const ProjectDataManagement::VulnerabilityClass &vc = it.value().vulnerabilityClassId();
INFO_LOG() << "VulnerabilityKind(" << it.key() << ") : " << it.value().name()
INFO_LOG(m_logger) << "VulnerabilityKind(" << it.key() << ") : " << it.value().name()
<< ", translation " << m_dtc->trVulnerabilityKindName(it.key(), vc);
}
}
@@ -107,18 +106,18 @@ void PdmTests::tryGetAllVulnerabilityKinds()
//---------------------------------------------------------------------------------
void PdmTests::tryGetVulnerabilityKind()
{
INFO_LOG() << "trying get itemData for Vulnerability kind " << m_id;
INFO_LOG(m_logger) << "trying get itemData for Vulnerability kind " << m_id;
ProjectDataManagement::VulnerabilityKind data = m_dtc->vulnerabilityKind(m_id);
if (data.taVulnerabilityKind() <= 0)
{
ERROR_LOG() << "Error receiving data for id " << m_id;
ERROR_LOG(m_logger) << "Error receiving data for id " << m_id;
failExit();
}
else
{
const ProjectDataManagement::VulnerabilityClass &vc = data.vulnerabilityClassId();
INFO_LOG() << "## VulnerabilityKind: (" << data.taVulnerabilityKind() << "), name: " << data.name()
INFO_LOG(m_logger) << "## VulnerabilityKind: (" << data.taVulnerabilityKind() << "), name: " << data.name()
<< ", translation " << m_dtc->trVulnerabilityKindName(m_id, vc);
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -128,19 +127,19 @@ void PdmTests::tryGetVulnerabilityKind()
//---------------------------------------------------------------------------------
void PdmTests::tryGetAllBiteComponentTexts()
{
INFO_LOG() << "trying to get all Bite Component Texts";
INFO_LOG(m_logger) << "trying to get all Bite Component Texts";
const QMap<qint32, ProjectDataManagement::BiteComponentText> map = m_dtc->biteComponentTexts();
if (map.isEmpty())
{
ERROR_LOG() << "Error requesting bite components text data";
ERROR_LOG(m_logger) << "Error requesting bite components text data";
failExit();
}
else
{
INFO_LOG() << "Amount of bite component texts = " << map.size();
INFO_LOG(m_logger) << "Amount of bite component texts = " << map.size();
m_id = map.firstKey();
for(auto it = map.begin(); it != map.end(); ++it)
INFO_LOG() << "BiteComponent(" << it.key() << ") : " << it.value().name()
INFO_LOG(m_logger) << "BiteComponent(" << it.key() << ") : " << it.value().name()
<< ", translation " << m_dtc->trBiteComponentTextName(it.key());
}
}