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 --- .../resources/clds/camel/rest/clamp-api-v2.xml | 1472 -------------------- .../resources/clds/camel/rest/clds-services.xml | 24 - src/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 - 7 files changed, 2999 deletions(-) delete mode 100644 src/main/resources/clds/camel/rest/clamp-api-v2.xml delete mode 100644 src/main/resources/clds/camel/rest/clds-services.xml delete mode 100644 src/main/resources/clds/camel/routes/cds-flows.xml delete mode 100644 src/main/resources/clds/camel/routes/dcae-flows.xml delete mode 100644 src/main/resources/clds/camel/routes/loop-flows.xml delete mode 100644 src/main/resources/clds/camel/routes/policy-flows.xml delete mode 100644 src/main/resources/clds/camel/routes/utils-flows.xml (limited to 'src/main/resources/clds/camel') diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml deleted file mode 100644 index 4659a90bf..000000000 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ /dev/null @@ -1,1472 +0,0 @@ - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - GET All Loop names FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - GET Loop FAILED - - - - - - - - - - - - - - ${body} - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - UPDATE Global properties FAILED - - - - - - - - - - - - - ${body} - - - - - - - java.lang.Exception - - true - - - - - - - 500 - - - UPDATE Operational policies FAILED - - - - - - - - - - - - - ${body} - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - UPDATE MicroService policy FAILED - - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - DEPLOY request FAILED - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - REFRESH json schema request FAILED - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - REFRESH json schema request FAILED - - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - UNDEPLOY request FAILED - - - - - - - - - - - - true - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - STOP request FAILED - - - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - RESTART request FAILED - - - - - - - - - - - - true - - - - - - - false - - - - - ${exchangeProperty[loopObject].getMicroServicePolicies()} - - - ${body} - - - - false - - - - - - - ${exchangeProperty[loopObject].getOperationalPolicies()} - - - ${body} - - - - false - - - - - - - - 3000 - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - SUBMIT request FAILED - - - - - - - - - - - - true - - - - - - - - - - ${exchangeProperty[loopObject].getMicroServicePolicies()} - - - ${body} - - - - false - - - - - - ${exchangeProperty[loopObject].getOperationalPolicies()} - - - ${body} - - - - false - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - DELETE request FAILED - - - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - - - ${exchangeProperty[loopObject]} - - - 200 - - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - ADD Operational policy request FAILED for loop: ${header.loopName}, - ${exception.message}" - - - - - - - - - - - - - - - - ${header.policyName} - - - ${exchangeProperty[loopObject].getOperationalPolicy(header.policyName)} - - - false - - - - false - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - REMOVE Operational policy request FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - - 500 - - - CREATE Loop from template FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET ALL templates FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Template FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET All Template names FAILED - - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Dictionary FAILED - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Dictionary FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Dictionary FAILED - - - - - - - - - - - - ${body} - - - - - java.lang.Exception - - true - - - - - 500 - - - PUT Dictionary FAILED - - - - - - - - - - - - - - ${body} - - - - - java.lang.Exception - - true - - - - - 500 - - - PUT Dictionary FAILED - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - DELETE Dictionary FAILED - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - DELETE Dictionary element FAILED - - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Policy models FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Policy model FAILED - - - - - - - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Policy model YAML FAILED - - - - - - - - - - - - - - - true - - - - ${body} - - - - ${body} - - - - - - - java.lang.Exception - - true - - - - - 500 - - - GET Policies list JSON FAILED - - - - - - - - - - - - - - - true - - - ${header.policyModelType} - - - ${header.policyModelVersion} - - - ${body} - - - - - - - - - java.lang.Exception - - true - - - - - 500 - - - CREATE Policy FAILED - - - - - - - - - - - - - - true - - - ${header.policyModelType} - - - ${header.policyModelVersion} - - - ${header.policyName} - - - ${header.policyVersion} - - - false - - - - - - java.lang.Exception - - true - - - - - 500 - - - DELETE Policy FAILED - - - - - - - - - - - - - - - - - - true - - - - - java.lang.Exception - - true - - - - - 500 - - - PDP Group deployment request FAILED - - - - - - - - - - - - - - true - - - - - - java.lang.Exception - - true - - - - - 500 - - - Create policy type request FAILED - - - - - - - - - - - - - diff --git a/src/main/resources/clds/camel/rest/clds-services.xml b/src/main/resources/clds/camel/rest/clds-services.xml deleted file mode 100644 index aa4c3cbee..000000000 --- a/src/main/resources/clds/camel/rest/clds-services.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - ${body} == 'NOT-OK' - - 404 - - - - - - - - - - - diff --git a/src/main/resources/clds/camel/routes/cds-flows.xml b/src/main/resources/clds/camel/routes/cds-flows.xml deleted file mode 100644 index 10fcb091e..000000000 --- a/src/main/resources/clds/camel/routes/cds-flows.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - GET - - - application/json - - - - - - java.lang.Exception - - true - - - - - - - - - - - - - - - - - POST - - - application/json - - - - - - java.lang.Exception - - true - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/clds/camel/routes/dcae-flows.xml b/src/main/resources/clds/camel/routes/dcae-flows.xml deleted file mode 100644 index d74bd91bf..000000000 --- a/src/main/resources/clds/camel/routes/dcae-flows.xml +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - ${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/src/main/resources/clds/camel/routes/loop-flows.xml b/src/main/resources/clds/camel/routes/loop-flows.xml deleted file mode 100644 index 4a3cc84b2..000000000 --- a/src/main/resources/clds/camel/routes/loop-flows.xml +++ /dev/null @@ -1,256 +0,0 @@ - - - - - ${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/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml deleted file mode 100644 index 01862692c..000000000 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ /dev/null @@ -1,654 +0,0 @@ - - - - - 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/src/main/resources/clds/camel/routes/utils-flows.xml b/src/main/resources/clds/camel/routes/utils-flows.xml deleted file mode 100644 index 90900f842..000000000 --- a/src/main/resources/clds/camel/routes/utils-flows.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - true - - - - - - - - - ${exchangeProperty[logComponent]} == null - - - - - - null - - - - - \ No newline at end of file -- cgit 1.2.3-korg