...
- The code is entirely monitored in term of coverage (used by Sonar), the single maven module facilitates that Sonar report unification. The frontend uses JEST (with snapshots) to do the unit testing of the javascript. The backend is tested with 2 phases, the maven test phase (Junit) and the maven Integration test phase (Junit with SpringBootTest). The integration test phase is crucial as it tests Clamp against a real mariadb, the emulator, and more recently, the Robotframework tests have been introduced during that phase. There are therefore a good tooling chain to validate Clamp code and improves the coverage. VIDEO TO BE DONE
- The backend code has an SDC controller that is used to deploy the service/resources/blueprints created and distributed in SDC. It uses the SDC Client that uses the DMaap notification. The CsarInstaller class is responsible of deploying those artifacts to the clamp database, it creates some "loop templates" that can be used to create a "loop instance". The policy controller is also present to get periodically all the Tosca files defined in the Policy Engine. Those are available to the user for configuring the control loop instance. VIDEO TO BE DONE
- The Frontend does not require any code for the policy UI presented to the user, instead the frontend uses a library that convert a Json Schema to a nice UI. Therefore the backend has a ToscaToJson Converter that is used to convert all tosca based policies. This converter is built to be modular in a sense that plugins can be added to fetch info in third party systems (like CDS), this mechanism is called Json enrichment. The user is therefore able to see in the UI the data coming from others onap/non onap components. The backend supports also a tosca dictionary mechanism that can do simple enrichment for specific tosca keywords defined in that dictionary. VIDEO TO BE DONE
- The backend has an authentication mechanism that is used for each Rest query, there currently 2 Springboot profiles "modules" that be exclusively enabled, either the "cldsDeaultUser" or the AAF one, that uses CADI filter. When using AAF, the user permission are retrieved from the AAF instance, the user can choose a X509 or "basic authentication" login. The front end obviously forward those info to the backend. The frontend is just a renderer without any logic. VIDEO TO BE DONE
- Clamp auto generates the Swagger JSON from the Camel Rest routes automatically. To export that json created only when the backend is up, we use one of the Integration test to export that json into the docs folder. The clamp pom then defines some plugins to convert that JSon to HTML or PDF. There is currently no documentation around those swagger info, it's just a raw Swagger json.
...