You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Page for general findings around the investigation of the optimal path for CLAMP and Tosca Control Loop Integration.

CLAMP Code Walkthrough videos can be found here

Tosca handling in CLAMP vs Tosca Control Loop - Findings

  1. CSAR contains the DCAE blueprint to be used to deploy to DCAE but also contains a reference to a microservice policy type. CLAMP, on startup, pulls all the policy types and pulls them periodically after that. Clamp creates LOOP TEMPLATES from in its database from the blueprints. CLAMP uses the reference from the CSAR to associate the relevant microservice policy type with a loop template. Thus, CLAMP knows which monitoring policy type to use for creation of a Loop instance.
  2. As shown in "src/main/java/org/onap/policy/clamp/loop/deploy/DcaeDeployParameters.java", multiple microservices per blueprint may not be supported by CLAMP. How much work would be required to support multiple BPs?

REST in CLAMP vs REST in Control Loop PoC - Findings

  1. LoopService and MicroservicePolicyService classes resemble our PoC Provider classes, such as Commissioning and Instantiation Provider where java code in regards to CRUD resides
    1.  Examples:

      LoopService.getLoop()
      public Loop getLoop(String loopName) {
              return loopsRepository.findById(loopName).orElse(null);
      }
      ControlLoopInstantiationProvider.GetControlLoops()
      public ControlLoops getControlLoops(String name, String version) throws PfModelException {
          ControlLoops controlLoops = new ControlLoops();
          controlLoops.setControlLoopList(controlLoopProvider.getControlLoops(name, version));
      
          return controlLoops;
      }
    2.  The differences start here, as CLAMP uses the Spring Framework Repository Interfaces to handle database calls, where as PoC is using the code defined in policy-models in regards to Tosca and our own models and JPA classes for ControlLoop related objects. 
      i.e LoopsRepository extends JpaRepository (Spring Framework). Our providers are either created by us or use policy ones i.e. PolicyModelsProvider.
    3.  There seems to be a lot of specific methods for updating the templates, such as updateDcaeDeploymentFields() and addOperationalPolicy(). In our case that is handled within the TOSCA service template itself, by mending the template where these objects can be added as nodeTemplates(ControlLoopElements), without having to be specific to a DCAE control loop. Further info in TOSCA handling.
  • No labels