From f83411a86e2277adae69e780e8511913d61a0f17 Mon Sep 17 00:00:00 2001 From: Sirisha_Manchikanti Date: Fri, 7 May 2021 15:17:52 +0100 Subject: Modular structure of clamp including controlloop This commit is the first commit that puts in multi module structure while changing the existing CLAMP code as little as possible. It adds a structure where common, models, participant and runtime are direct children under clamp, and current clamp code is moved under runtime. This runtime directory will host controlloop runtime code in later commits. Issue-ID: POLICY-3215 Signed-off-by: Sirisha_Manchikanti Change-Id: I15bc8be92ed020343bff4024c4718fec462c40d7 Signed-off-by: liamfallon --- .../main/resources/clds/camel/routes/cds-flows.xml | 64 ++ .../resources/clds/camel/routes/dcae-flows.xml | 501 ++++++++++++++++ .../resources/clds/camel/routes/loop-flows.xml | 256 ++++++++ .../resources/clds/camel/routes/policy-flows.xml | 654 +++++++++++++++++++++ .../resources/clds/camel/routes/utils-flows.xml | 28 + 5 files changed, 1503 insertions(+) create mode 100644 runtime/src/main/resources/clds/camel/routes/cds-flows.xml create mode 100644 runtime/src/main/resources/clds/camel/routes/dcae-flows.xml create mode 100644 runtime/src/main/resources/clds/camel/routes/loop-flows.xml create mode 100644 runtime/src/main/resources/clds/camel/routes/policy-flows.xml create mode 100644 runtime/src/main/resources/clds/camel/routes/utils-flows.xml (limited to 'runtime/src/main/resources/clds/camel/routes') diff --git a/runtime/src/main/resources/clds/camel/routes/cds-flows.xml b/runtime/src/main/resources/clds/camel/routes/cds-flows.xml new file mode 100644 index 000000000..10fcb091e --- /dev/null +++ b/runtime/src/main/resources/clds/camel/routes/cds-flows.xml @@ -0,0 +1,64 @@ + + + + + + + + GET + + + application/json + + + + + + java.lang.Exception + + true + + + + + + + + + + + + + + + + + POST + + + application/json + + + + + + java.lang.Exception + + true + + + + + + + + + + + \ No newline at end of file diff --git a/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml b/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml new file mode 100644 index 000000000..d74bd91bf --- /dev/null +++ b/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml @@ -0,0 +1,501 @@ + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + true + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + true + + + + + + + + + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + + false + + + + + + + + + PUT + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + java.lang.Exception + + false + + + DEPLOY micro service failed + (MicroService name:${exchangeProperty[microServicePolicy].getName()}), + Dep-id:${exchangeProperty[dcaeDeploymentId]}, + StatusUrl:${exchangeProperty[dcaeStatusUrl]}) + + + + DCAE + + + + + + + + + + + + + + + + + + + + + + PUT + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + DEPLOY loop status + (Dep-id:${exchangeProperty[dcaeDeploymentId]}, + StatusUrl:${exchangeProperty[dcaeStatusUrl]}) + + + + DCAE + + + + + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + true + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + true + + + + + + + + + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentId()} != null + + + + + + DELETE + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + + + + java.lang.Exception + + false + + + UNDEPLOY micro service failed + (MicroService name:${exchangeProperty[microServicePolicy].getName()}) + + + + DCAE + + + + + + + + + + + + + + + + ${exchangeProperty[loopObject].getDcaeDeploymentId()} != null + + + + + + DELETE + + + application/json + + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + UNDEPLOY loop status + + + DCAE + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + ${exchangeProperty[getStatusUrl].contains("?")} == true + + + & + + + + + ? + + + + + + java.lang.Exception + + true + + + + + + + + + + DCAE deployment status + + + DCAE + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + ${exchangeProperty[dcaeResponseList]} + + + ${body} + + + + + + + + + + \ No newline at end of file diff --git a/runtime/src/main/resources/clds/camel/routes/loop-flows.xml b/runtime/src/main/resources/clds/camel/routes/loop-flows.xml new file mode 100644 index 000000000..4a3cc84b2 --- /dev/null +++ b/runtime/src/main/resources/clds/camel/routes/loop-flows.xml @@ -0,0 +1,256 @@ + + + + + ${header.loopName} + + + + + + + ${exchangeProperty[loopObject]} == null + + 404 + + + + + + + + + ${exchangeProperty[loopObject].getComponent('POLICY')} + + + + true + + + true + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body.getName()} + + + ${body.getPolicyModel().getPolicyModelType()} + + + ${body.getPolicyModel().getVersion()} + + + ${body.getPdpGroup()} + + + 1.0.0 + + + null + + + + + + + ${exchangeProperty[loopObject].getOperationalPolicies()} + + + ${body.getName()} + + + ${body.getPolicyModel().getPolicyModelType()} + + + ${body.getPolicyModel().getVersion()} + + + 1.0.0 + + + ${body.getPdpGroup()} + + + null + + + + + + ${exchangeProperty[policyComponent].getState()} + + + + + + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + ${exchangeProperty[loopObject].getComponent('DCAE')} + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} != null + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + ${exchangeProperty[loopObject].getComponent('DCAE_' + ${exchangeProperty[microServicePolicy].getName()})} + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} != null + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + + + > + + + + + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'BLUEPRINT_DEPLOYED' && ${exchangeProperty['policyState'].getStateName()} + == 'NOT_SENT' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == 'IN_ERROR' || + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLATION_FAILED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_UNINSTALLATION_FAILED' || + ${exchangeProperty['policyState'].getStateName()} == 'IN_ERROR' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'BLUEPRINT_DEPLOYED' || ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_UNINSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'PROCESSING_MICROSERVICE_INSTALLATION' || + ${exchangeProperty['dcaeState'].getStateName()} == + 'PROCESSING_MICROSERVICE_UNINSTALLATION' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} != 'NOT_SENT' + + + + + + + + + \ No newline at end of file diff --git a/runtime/src/main/resources/clds/camel/routes/policy-flows.xml b/runtime/src/main/resources/clds/camel/routes/policy-flows.xml new file mode 100644 index 000000000..01862692c --- /dev/null +++ b/runtime/src/main/resources/clds/camel/routes/policy-flows.xml @@ -0,0 +1,654 @@ + + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + false + + + + + false + + + + ${header.CamelHttpResponseCode} != 200 + + false + + + + + ${exchangeProperty[policyComponent].computeState(*)} + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + java.lang.Exception + + true + + + + + + + + + + ${exchangeProperty[policyName]} GET + Policy status + + + + POLICY + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + java.lang.Exception + + true + + + + + + + + + + ${exchangeProperty[policyName]} GET Policy deployment + status + + + + POLICY + + + + + + + + + + + + + ${exchangeProperty[policy].createPolicyPayload()} + + + + ${exchangeProperty[policy].getPolicyModel().getPolicyModelType()} + + + ${exchangeProperty[policy].getPolicyModel().getVersion()} + + + + + + ${exchangeProperty[policy].getName()} creation + status + + + + POLICY + + + + + + + + + + + + + ${exchangeProperty[policy].getPolicyModel().getPolicyModelType()} + + + ${exchangeProperty[policy].getPolicyModel().getVersion()} + + + ${exchangeProperty[policy].getName()} + + + 1.0.0 + + + + + + ${exchangeProperty[policy].getName()} removal + status + + + + POLICY + + + + + + + + + + + + + + ${exchangeProperty[loopObject].getComponent("POLICY").createPoliciesPayloadPdpGroup(exchangeProperty[loopObject],"POST")} + + + + true + + + + + + PDP Group push ALL status + + + POLICY + + + + + + + + + + + + + + ${exchangeProperty[loopObject].getComponent("POLICY").createPoliciesPayloadPdpGroup(exchangeProperty[loopObject],"DELETE")} + + + + POST + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + PDP Group remove ALL status + + + POLICY + + + + + + + + + + + + + 1.0.0 + + + + ${exchangeProperty[policyName]} PDP Group removal status + + + + POLICY + + + + java.lang.Exception + + false + + + PDP Group removal, Error reported: ${exception} + + + POLICY + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + POST + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + POST + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + POST + + + application/yaml + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + \ No newline at end of file diff --git a/runtime/src/main/resources/clds/camel/routes/utils-flows.xml b/runtime/src/main/resources/clds/camel/routes/utils-flows.xml new file mode 100644 index 000000000..90900f842 --- /dev/null +++ b/runtime/src/main/resources/clds/camel/routes/utils-flows.xml @@ -0,0 +1,28 @@ + + + + + true + + + + + + + + + ${exchangeProperty[logComponent]} == null + + + + + + null + + + + + \ No newline at end of file -- cgit 1.2.3-korg