From 3142c70fb7530c444c891674fe55c6a9b236dfb3 Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 23 Aug 2019 07:45:27 -0700 Subject: Fix the log status Fix the way the code (camel) computes the global loop state + introduce level in component state for that Issue-ID: CLAMP-384 Change-Id: I83a9306eabacfc1f118df6b828e521ee59d19b5f Signed-off-by: sebdet --- .../resources/clds/camel/routes/loop-flows.xml | 157 ++++++++------------- .../resources/clds/camel/routes/policy-flows.xml | 31 ++++ 2 files changed, 91 insertions(+), 97 deletions(-) (limited to 'src/main/resources') diff --git a/src/main/resources/clds/camel/routes/loop-flows.xml b/src/main/resources/clds/camel/routes/loop-flows.xml index ede899e7..922d5f16 100644 --- a/src/main/resources/clds/camel/routes/loop-flows.xml +++ b/src/main/resources/clds/camel/routes/loop-flows.xml @@ -5,9 +5,7 @@ ${header.loopName} - + @@ -15,26 +13,24 @@ 404 - + + - - false - - - false - ${exchangeProperty[loopObject].getComponent('POLICY')} - + true + + + true + + ${exchangeProperty[loopObject].getMicroServicePolicies()} @@ -48,29 +44,11 @@ null - - - false - - - - ${header.CamelHttpResponseCode} != 200 - - true - - - - - ${header.CamelHttpResponseCode} != 200 - - true - - + - ${exchangeProperty[loopObject].getOperationalPolicies()} @@ -87,29 +65,10 @@ null - - - false - - - - ${header.CamelHttpResponseCode} != 200 - - true - - - - - ${header.CamelHttpResponseCode} != 200 - - true - - - - + ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} @@ -123,42 +82,23 @@ null - - - false - - - - ${header.CamelHttpResponseCode} != 200 - - true - - - - - ${header.CamelHttpResponseCode} != 200 - - true - - + - ${exchangeProperty[policyComponent].computeState(*)} + ${exchangeProperty[policyComponent].getState()} - - ${exchangeProperty[loopObject].getComponent('DCAE')} @@ -175,8 +115,7 @@ ${header.CamelHttpResponseCode} == 200 - @@ -186,8 +125,7 @@ ${exchangeProperty[dcaeComponent].computeState(*)} - @@ -195,53 +133,78 @@ - - ${exchangeProperty['dcaeState'].getStateName()} == 'BLUEPRINT_DEPLOYED' and ${exchangeProperty['policyState'].getStateName()} == 'NOT_SENT' + ${exchangeProperty['dcaeState'].getStateName()} == + 'BLUEPRINT_DEPLOYED' and ${exchangeProperty['policyState'].getStateName()} + == 'NOT_SENT' + - ${exchangeProperty['dcaeState'].getStateName()} == 'IN_ERROR' or ${exchangeProperty['dcaeState'].getStateName()} == 'MICROSERVICE_INSTALLATION_FAILED' + ${exchangeProperty['dcaeState'].getStateName()} == 'IN_ERROR' or + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLATION_FAILED' + - ${exchangeProperty['dcaeState'].getStateName()} == 'MICROSERVICE_UNINSTALLATION_FAILED' or ${exchangeProperty['policyState'].getStateName()} == 'IN_ERROR' + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_UNINSTALLATION_FAILED' or + ${exchangeProperty['policyState'].getStateName()} == 'IN_ERROR' + - ${exchangeProperty['dcaeState'].getStateName()} == 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + - ${exchangeProperty['dcaeState'].getStateName()} == 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and ${exchangeProperty['policyState'].getStateName()} == 'SENT' + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and + ${exchangeProperty['policyState'].getStateName()} == 'SENT' + - ${exchangeProperty['dcaeState'].getStateName()} == 'BLUEPRINT_DEPLOYED' or ${exchangeProperty['dcaeState'].getStateName()} == 'MICROSERVICE_UNINSTALLED_SUCCESSFULLY' and ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + ${exchangeProperty['dcaeState'].getStateName()} == + 'BLUEPRINT_DEPLOYED' or ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_UNINSTALLED_SUCCESSFULLY' and + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + - ${exchangeProperty['dcaeState'].getStateName()} == 'PROCESSING_MICROSERVICE_INSTALLATION' or ${exchangeProperty['dcaeState'].getStateName()} == 'PROCESSING_MICROSERVICE_UNINSTALLATION' and ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + ${exchangeProperty['dcaeState'].getStateName()} == + 'PROCESSING_MICROSERVICE_INSTALLATION' or + ${exchangeProperty['dcaeState'].getStateName()} == + 'PROCESSING_MICROSERVICE_UNINSTALLATION' and + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + - ${exchangeProperty['dcaeState'].getStateName()} == 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and ${exchangeProperty['policyState'].getStateName()} != 'NOT_SENT' + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and + ${exchangeProperty['policyState'].getStateName()} != 'NOT_SENT' + - diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index 5d586154..b6f30c37 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -1,5 +1,36 @@ + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + false + + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + false + + + + + ${exchangeProperty[policyComponent].computeState(*)} + + + -- cgit 1.2.3-korg