From 09bc8450b2b0c4f60eb4a241efc548d13c5c9912 Mon Sep 17 00:00:00 2001 From: sebdet Date: Thu, 23 May 2019 17:34:07 +0200 Subject: Rework the loop state Rework the state loop so there is no bug in the loop state anymore, now the components are scanned + upgrade to 4.0.4 Issue-ID: CLAMP-384 Change-Id: If7649238ee52864c84bfb9b6b8471d1738752e29 Signed-off-by: sebdet --- .../resources/clds/camel/routes/loop-flows.xml | 250 +++++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 src/main/resources/clds/camel/routes/loop-flows.xml (limited to 'src/main/resources/clds/camel/routes/loop-flows.xml') diff --git a/src/main/resources/clds/camel/routes/loop-flows.xml b/src/main/resources/clds/camel/routes/loop-flows.xml new file mode 100644 index 000000000..ede899e71 --- /dev/null +++ b/src/main/resources/clds/camel/routes/loop-flows.xml @@ -0,0 +1,250 @@ + + + + + ${header.loopName} + + + + + + + ${exchangeProperty[loopObject]} == null + + 404 + + + + + + + + + false + + + false + + + ${exchangeProperty[loopObject].getComponent('POLICY')} + + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body.getName()} + + + ${body.getModelType()} + + + null + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + true + + + + + ${header.CamelHttpResponseCode} != 200 + + true + + + + + + ${exchangeProperty[loopObject].getOperationalPolicies()} + + + ${body.getName()} + + + onap.policies.controlloop.Operational + + + ${body} + + + null + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + true + + + + + ${header.CamelHttpResponseCode} != 200 + + true + + + + + + ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} + + + ${body.getKey()} + + + onap.policies.controlloop.Guard + + + null + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + true + + + + + ${header.CamelHttpResponseCode} != 200 + + true + + + + + + ${exchangeProperty[policyComponent].computeState(*)} + + + + + + + + + + ${exchangeProperty[loopObject].getComponent('DCAE')} + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} + != null + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + + + + + + + + + + ${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()} == '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' + + + + ${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()} == 'MICROSERVICE_INSTALLED_SUCCESSFULLY' and ${exchangeProperty['policyState'].getStateName()} != 'NOT_SENT' + + + + + + + + \ No newline at end of file -- cgit 1.2.3-korg