diff options
Diffstat (limited to 'src')
11 files changed, 369 insertions, 96 deletions
diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/DocumentBuilder.java b/src/main/java/org/onap/clamp/clds/util/drawing/DocumentBuilder.java index f34eaf2ee..7c624be0f 100644 --- a/src/main/java/org/onap/clamp/clds/util/drawing/DocumentBuilder.java +++ b/src/main/java/org/onap/clamp/clds/util/drawing/DocumentBuilder.java @@ -33,6 +33,8 @@ public class DocumentBuilder { private final Document documentFactory; static final String DATA_ELEMENT_ID_ATTRIBUTE = "data-element-id"; + static final String DATA_ELEMENT_GROUPING_ATTRIBUTE = "data-grouping-id"; + static final String DATA_FOR_UI_ATTRIBUTE = "data-for-ui"; DocumentBuilder(Document groupingDocument, Document documentFactory) { this.groupingDocument = groupingDocument; @@ -40,10 +42,20 @@ public class DocumentBuilder { } void pushChangestoDocument(SVGGraphics2D g2d, String dataElementId) { + pushChangestoDocument(g2d, dataElementId,null,null); + } + + void pushChangestoDocument(SVGGraphics2D g2d, String dataElementId, String dataGroupingId, String dataForUI) { Element element = this.documentFactory.createElementNS(SVGGraphics2D.SVG_NAMESPACE_URI, SVGGraphics2D.SVG_G_TAG); element.setAttribute(DATA_ELEMENT_ID_ATTRIBUTE, dataElementId); + if (dataGroupingId != null) { + element.setAttribute(DATA_ELEMENT_GROUPING_ATTRIBUTE, dataGroupingId); + } + if (dataForUI != null) { + element.setAttribute(DATA_FOR_UI_ATTRIBUTE, dataForUI); + } g2d.getRoot(element); Node node = this.groupingDocument.importNode(element, true); this.groupingDocument.getDocumentElement().appendChild(node); diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java b/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java index f63ead8e7..72df90f2b 100644 --- a/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java +++ b/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java @@ -49,7 +49,7 @@ public class ImageBuilder { private static final int CIRCLE_RADIUS = 17; ImageBuilder(SVGGraphics2D svgGraphics2D, DocumentBuilder documentBuilder, Point startingPoint, int baseLength, - int rectHeight) { + int rectHeight) { this.g2d = svgGraphics2D; this.documentBuilder = documentBuilder; this.currentPoint = new Point(startingPoint); @@ -57,13 +57,13 @@ public class ImageBuilder { this.rectHeight = rectHeight; } - ImageBuilder rectangle(String dataElementId, RectTypes rectType, String text) { + ImageBuilder rectangle(String dataElementId, RectTypes rectType, String boxText, String groupingId, String uiData) { Point next = new Point(currentPoint.x + baseLength, currentPoint.y); Point point = coordinatesForRectangle(currentPoint, next); - handleBasedOnRectType(rectType, text, point, baseLength, rectHeight); + handleBasedOnRectType(rectType, boxText, point, baseLength, rectHeight); - documentBuilder.pushChangestoDocument(g2d, dataElementId); + documentBuilder.pushChangestoDocument(g2d, dataElementId, groupingId, uiData); currentPoint = next; return this; } diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java b/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java index 509d4e41c..ff7d2c215 100755 --- a/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java +++ b/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java @@ -79,14 +79,18 @@ public class Painter { private void doTheActualDrawing(String collector, Set<MicroServicePolicy> microServices, Set<OperationalPolicy> policies, ImageBuilder ib) { - ib.circle("start-circle", SLIM_LINE).arrow().rectangle(collector, RectTypes.COLECTOR, collector); + ib.circle("start-circle", SLIM_LINE).arrow().rectangle(collector, RectTypes.COLECTOR, collector, null, null); for (MicroServicePolicy ms : microServices) { ib.arrow().rectangle(ms.getName(), - RectTypes.MICROSERVICE, ms.getPolicyModel().getPolicyAcronym()); + RectTypes.MICROSERVICE, ms.getPolicyModel().getPolicyAcronym(), + ms.getLoopElementModel() != null ? ms.getLoopElementModel().getName() : null, + ms.getLoopElementModel() != null ? ms.getLoopElementModel().getName() : null); } for (OperationalPolicy policy : policies) { - ib.arrow().rectangle(policy.getName(), RectTypes.POLICY, policy.getPolicyModel().getPolicyAcronym()); + ib.arrow().rectangle(policy.getName(), RectTypes.POLICY, policy.getPolicyModel().getPolicyAcronym(), + policy.getLoopElementModel() != null ? policy.getLoopElementModel().getName() : null, + policy.getLoopElementModel() != null ? policy.getLoopElementModel().getName() : null); } ib.arrow().circle("stop-circle", THICK_LINE); } diff --git a/src/main/java/org/onap/clamp/loop/LoopService.java b/src/main/java/org/onap/clamp/loop/LoopService.java index 3f568a331..5f0822816 100644 --- a/src/main/java/org/onap/clamp/loop/LoopService.java +++ b/src/main/java/org/onap/clamp/loop/LoopService.java @@ -120,9 +120,10 @@ public class LoopService { PolicyModel policyModel = policyModelsService.getPolicyModel(policyType, policyVersion); Set<OperationalPolicy> opPolicySet = loop.getOperationalPolicies(); for (OperationalPolicy opPolicy : opPolicySet) { - if (opPolicy.getPolicyModel().equals(policyModel)) { - throw new IllegalArgumentException("This type of Operational Policy is already added to the loop. Please choose another one."); - } + if (opPolicy.getPolicyModel().equals(policyModel)) { + throw new IllegalArgumentException( + "This type of Operational Policy is already added to the loop. Please choose another one."); + } } if (policyModel == null) { return null; diff --git a/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java b/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java index 35fdf43cd..70cdbe233 100644 --- a/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java +++ b/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java @@ -80,6 +80,7 @@ public class LoopElementModel extends AuditEntity implements Serializable { /** * The type of element. */ + @Expose @Column(nullable = false, name = "loop_element_type") private String loopElementType; diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 6bce83675..0c83b137e 100644 --- a/src/main/resources/META-INF/resources/swagger.html +++ b/src/main/resources/META-INF/resources/swagger.html @@ -444,31 +444,31 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </li> <li><a href="#_paths">2. Paths</a> <ul class="sectlevel2"> -<li><a href="#_route75">2.1. GET /v1/healthcheck</a> +<li><a href="#_route113">2.1. GET /v1/healthcheck</a> <ul class="sectlevel3"> <li><a href="#_responses">2.1.1. Responses</a></li> <li><a href="#_produces">2.1.2. Produces</a></li> </ul> </li> -<li><a href="#_route76">2.2. GET /v1/user/getUser</a> +<li><a href="#_route114">2.2. GET /v1/user/getUser</a> <ul class="sectlevel3"> <li><a href="#_responses_2">2.2.1. Responses</a></li> <li><a href="#_produces_2">2.2.2. Produces</a></li> </ul> </li> -<li><a href="#_route74">2.3. GET /v2/clampInformation</a> +<li><a href="#_route112">2.3. GET /v2/clampInformation</a> <ul class="sectlevel3"> <li><a href="#_responses_3">2.3.1. Responses</a></li> <li><a href="#_produces_3">2.3.2. Produces</a></li> </ul> </li> -<li><a href="#_route58">2.4. GET /v2/dictionary</a> +<li><a href="#_route96">2.4. GET /v2/dictionary</a> <ul class="sectlevel3"> <li><a href="#_responses_4">2.4.1. Responses</a></li> <li><a href="#_produces_4">2.4.2. Produces</a></li> </ul> </li> -<li><a href="#_route61">2.5. PUT /v2/dictionary</a> +<li><a href="#_route99">2.5. PUT /v2/dictionary</a> <ul class="sectlevel3"> <li><a href="#_parameters">2.5.1. Parameters</a></li> <li><a href="#_responses_5">2.5.2. Responses</a></li> @@ -476,20 +476,20 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_5">2.5.4. Produces</a></li> </ul> </li> -<li><a href="#_route59">2.6. GET /v2/dictionary/secondary/names</a> +<li><a href="#_route97">2.6. GET /v2/dictionary/secondary/names</a> <ul class="sectlevel3"> <li><a href="#_responses_6">2.6.1. Responses</a></li> <li><a href="#_produces_6">2.6.2. Produces</a></li> </ul> </li> -<li><a href="#_route60">2.7. GET /v2/dictionary/{dictionaryName}</a> +<li><a href="#_route98">2.7. GET /v2/dictionary/{dictionaryName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_2">2.7.1. Parameters</a></li> <li><a href="#_responses_7">2.7.2. Responses</a></li> <li><a href="#_produces_7">2.7.3. Produces</a></li> </ul> </li> -<li><a href="#_route62">2.8. PUT /v2/dictionary/{name}</a> +<li><a href="#_route100">2.8. PUT /v2/dictionary/{name}</a> <ul class="sectlevel3"> <li><a href="#_parameters_3">2.8.1. Parameters</a></li> <li><a href="#_responses_8">2.8.2. Responses</a></li> @@ -497,28 +497,28 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_8">2.8.4. Produces</a></li> </ul> </li> -<li><a href="#_route63">2.9. DELETE /v2/dictionary/{name}</a> +<li><a href="#_route101">2.9. DELETE /v2/dictionary/{name}</a> <ul class="sectlevel3"> <li><a href="#_parameters_4">2.9.1. Parameters</a></li> <li><a href="#_responses_9">2.9.2. Responses</a></li> <li><a href="#_produces_9">2.9.3. Produces</a></li> </ul> </li> -<li><a href="#_route64">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a> +<li><a href="#_route102">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_5">2.10.1. Parameters</a></li> <li><a href="#_responses_10">2.10.2. Responses</a></li> <li><a href="#_produces_10">2.10.3. Produces</a></li> </ul> </li> -<li><a href="#_route55">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a> +<li><a href="#_route93">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a> <ul class="sectlevel3"> <li><a href="#_parameters_6">2.11.1. Parameters</a></li> <li><a href="#_responses_11">2.11.2. Responses</a></li> <li><a href="#_produces_11">2.11.3. Produces</a></li> </ul> </li> -<li><a href="#_route57">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a> +<li><a href="#_route95">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_7">2.12.1. Parameters</a></li> <li><a href="#_responses_12">2.12.2. Responses</a></li> @@ -526,89 +526,89 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_12">2.12.4. Produces</a></li> </ul> </li> -<li><a href="#_route53">2.13. PUT /v2/loop/delete/{loopName}</a> +<li><a href="#_route91">2.13. PUT /v2/loop/delete/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_8">2.13.1. Parameters</a></li> <li><a href="#_responses_13">2.13.2. Responses</a></li> </ul> </li> -<li><a href="#_route46">2.14. PUT /v2/loop/deploy/{loopName}</a> +<li><a href="#_route84">2.14. PUT /v2/loop/deploy/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_9">2.14.1. Parameters</a></li> <li><a href="#_responses_14">2.14.2. Responses</a></li> <li><a href="#_produces_13">2.14.3. Produces</a></li> </ul> </li> -<li><a href="#_route40">2.15. GET /v2/loop/getAllNames</a> +<li><a href="#_route78">2.15. GET /v2/loop/getAllNames</a> <ul class="sectlevel3"> <li><a href="#_responses_15">2.15.1. Responses</a></li> <li><a href="#_produces_14">2.15.2. Produces</a></li> </ul> </li> -<li><a href="#_route54">2.16. GET /v2/loop/getstatus/{loopName}</a> +<li><a href="#_route92">2.16. GET /v2/loop/getstatus/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_10">2.16.1. Parameters</a></li> <li><a href="#_responses_16">2.16.2. Responses</a></li> <li><a href="#_produces_15">2.16.3. Produces</a></li> </ul> </li> -<li><a href="#_route47">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a> +<li><a href="#_route85">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_11">2.17.1. Parameters</a></li> <li><a href="#_responses_17">2.17.2. Responses</a></li> <li><a href="#_produces_16">2.17.3. Produces</a></li> </ul> </li> -<li><a href="#_route48">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a> +<li><a href="#_route86">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_12">2.18.1. Parameters</a></li> <li><a href="#_responses_18">2.18.2. Responses</a></li> <li><a href="#_produces_17">2.18.3. Produces</a></li> </ul> </li> -<li><a href="#_route56">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a> +<li><a href="#_route94">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_13">2.19.1. Parameters</a></li> <li><a href="#_responses_19">2.19.2. Responses</a></li> <li><a href="#_produces_18">2.19.3. Produces</a></li> </ul> </li> -<li><a href="#_route51">2.20. PUT /v2/loop/restart/{loopName}</a> +<li><a href="#_route89">2.20. PUT /v2/loop/restart/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_14">2.20.1. Parameters</a></li> <li><a href="#_responses_20">2.20.2. Responses</a></li> <li><a href="#_produces_19">2.20.3. Produces</a></li> </ul> </li> -<li><a href="#_route50">2.21. PUT /v2/loop/stop/{loopName}</a> +<li><a href="#_route88">2.21. PUT /v2/loop/stop/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_15">2.21.1. Parameters</a></li> <li><a href="#_responses_21">2.21.2. Responses</a></li> <li><a href="#_produces_20">2.21.3. Produces</a></li> </ul> </li> -<li><a href="#_route52">2.22. PUT /v2/loop/submit/{loopName}</a> +<li><a href="#_route90">2.22. PUT /v2/loop/submit/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_16">2.22.1. Parameters</a></li> <li><a href="#_responses_22">2.22.2. Responses</a></li> <li><a href="#_produces_21">2.22.3. Produces</a></li> </ul> </li> -<li><a href="#_route42">2.23. GET /v2/loop/svgRepresentation/{loopName}</a> +<li><a href="#_route80">2.23. GET /v2/loop/svgRepresentation/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_17">2.23.1. Parameters</a></li> <li><a href="#_responses_23">2.23.2. Responses</a></li> <li><a href="#_produces_22">2.23.3. Produces</a></li> </ul> </li> -<li><a href="#_route49">2.24. PUT /v2/loop/undeploy/{loopName}</a> +<li><a href="#_route87">2.24. PUT /v2/loop/undeploy/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_18">2.24.1. Parameters</a></li> <li><a href="#_responses_24">2.24.2. Responses</a></li> <li><a href="#_produces_23">2.24.3. Produces</a></li> </ul> </li> -<li><a href="#_route43">2.25. POST /v2/loop/updateGlobalProperties/{loopName}</a> +<li><a href="#_route81">2.25. POST /v2/loop/updateGlobalProperties/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_19">2.25.1. Parameters</a></li> <li><a href="#_responses_25">2.25.2. Responses</a></li> @@ -616,7 +616,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_24">2.25.4. Produces</a></li> </ul> </li> -<li><a href="#_route45">2.26. POST /v2/loop/updateMicroservicePolicy/{loopName}</a> +<li><a href="#_route83">2.26. POST /v2/loop/updateMicroservicePolicy/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_20">2.26.1. Parameters</a></li> <li><a href="#_responses_26">2.26.2. Responses</a></li> @@ -624,7 +624,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_25">2.26.4. Produces</a></li> </ul> </li> -<li><a href="#_route44">2.27. POST /v2/loop/updateOperationalPolicies/{loopName}</a> +<li><a href="#_route82">2.27. POST /v2/loop/updateOperationalPolicies/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_21">2.27.1. Parameters</a></li> <li><a href="#_responses_27">2.27.2. Responses</a></li> @@ -632,14 +632,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_26">2.27.4. Produces</a></li> </ul> </li> -<li><a href="#_route41">2.28. GET /v2/loop/{loopName}</a> +<li><a href="#_route79">2.28. GET /v2/loop/{loopName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_22">2.28.1. Parameters</a></li> <li><a href="#_responses_28">2.28.2. Responses</a></li> <li><a href="#_produces_27">2.28.3. Produces</a></li> </ul> </li> -<li><a href="#_route68">2.29. POST /v2/policyToscaModels</a> +<li><a href="#_route106">2.29. POST /v2/policyToscaModels</a> <ul class="sectlevel3"> <li><a href="#_parameters_23">2.29.1. Parameters</a></li> <li><a href="#_responses_29">2.29.2. Responses</a></li> @@ -647,27 +647,27 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_28">2.29.4. Produces</a></li> </ul> </li> -<li><a href="#_route65">2.30. GET /v2/policyToscaModels</a> +<li><a href="#_route103">2.30. GET /v2/policyToscaModels</a> <ul class="sectlevel3"> <li><a href="#_responses_30">2.30.1. Responses</a></li> <li><a href="#_produces_29">2.30.2. Produces</a></li> </ul> </li> -<li><a href="#_route67">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route105">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a> <ul class="sectlevel3"> <li><a href="#_parameters_24">2.31.1. Parameters</a></li> <li><a href="#_responses_31">2.31.2. Responses</a></li> <li><a href="#_produces_30">2.31.3. Produces</a></li> </ul> </li> -<li><a href="#_route66">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route104">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> <ul class="sectlevel3"> <li><a href="#_parameters_25">2.32.1. Parameters</a></li> <li><a href="#_responses_32">2.32.2. Responses</a></li> <li><a href="#_produces_31">2.32.3. Produces</a></li> </ul> </li> -<li><a href="#_route69">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route107">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> <ul class="sectlevel3"> <li><a href="#_parameters_26">2.33.1. Parameters</a></li> <li><a href="#_responses_33">2.33.2. Responses</a></li> @@ -675,26 +675,26 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_32">2.33.4. Produces</a></li> </ul> </li> -<li><a href="#_route70">2.34. GET /v2/templates</a> +<li><a href="#_route108">2.34. GET /v2/templates</a> <ul class="sectlevel3"> <li><a href="#_responses_34">2.34.1. Responses</a></li> <li><a href="#_produces_33">2.34.2. Produces</a></li> </ul> </li> -<li><a href="#_route72">2.35. GET /v2/templates/names</a> +<li><a href="#_route110">2.35. GET /v2/templates/names</a> <ul class="sectlevel3"> <li><a href="#_responses_35">2.35.1. Responses</a></li> <li><a href="#_produces_34">2.35.2. Produces</a></li> </ul> </li> -<li><a href="#_route71">2.36. GET /v2/templates/{templateName}</a> +<li><a href="#_route109">2.36. GET /v2/templates/{templateName}</a> <ul class="sectlevel3"> <li><a href="#_parameters_27">2.36.1. Parameters</a></li> <li><a href="#_responses_36">2.36.2. Responses</a></li> <li><a href="#_produces_35">2.36.3. Produces</a></li> </ul> </li> -<li><a href="#_route73">2.37. GET /v2/templates/{templateName}/svgRepresentation</a> +<li><a href="#_route111">2.37. GET /v2/templates/{templateName}/svgRepresentation</a> <ul class="sectlevel3"> <li><a href="#_parameters_28">2.37.1. Parameters</a></li> <li><a href="#_responses_37">2.37.2. Responses</a></li> @@ -737,13 +737,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <div class="sect2"> <h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3> <div class="paragraph"> -<p><em>Version</em> : 5.0.5-SNAPSHOT</p> +<p><em>Version</em> : 5.1.0-SNAPSHOT</p> </div> </div> <div class="sect2"> <h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3> <div class="paragraph"> -<p><em>Host</em> : localhost:40065<br> +<p><em>Host</em> : localhost:37033<br> <em>BasePath</em> : /restservices/clds/<br> <em>Schemes</em> : HTTP</p> </div> @@ -754,7 +754,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <h2 id="_paths"><a class="anchor" href="#_paths"></a><a class="link" href="#_paths">2. Paths</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_route75"><a class="anchor" href="#_route75"></a><a class="link" href="#_route75">2.1. GET /v1/healthcheck</a></h3> +<h3 id="_route113"><a class="anchor" href="#_route113"></a><a class="link" href="#_route113">2.1. GET /v1/healthcheck</a></h3> <div class="sect3"> <h4 id="_responses"><a class="anchor" href="#_responses"></a><a class="link" href="#_responses">2.1.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -791,7 +791,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route76"><a class="anchor" href="#_route76"></a><a class="link" href="#_route76">2.2. GET /v1/user/getUser</a></h3> +<h3 id="_route114"><a class="anchor" href="#_route114"></a><a class="link" href="#_route114">2.2. GET /v1/user/getUser</a></h3> <div class="sect3"> <h4 id="_responses_2"><a class="anchor" href="#_responses_2"></a><a class="link" href="#_responses_2">2.2.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -825,7 +825,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route74"><a class="anchor" href="#_route74"></a><a class="link" href="#_route74">2.3. GET /v2/clampInformation</a></h3> +<h3 id="_route112"><a class="anchor" href="#_route112"></a><a class="link" href="#_route112">2.3. GET /v2/clampInformation</a></h3> <div class="sect3"> <h4 id="_responses_3"><a class="anchor" href="#_responses_3"></a><a class="link" href="#_responses_3">2.3.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -862,7 +862,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route58"><a class="anchor" href="#_route58"></a><a class="link" href="#_route58">2.4. GET /v2/dictionary</a></h3> +<h3 id="_route96"><a class="anchor" href="#_route96"></a><a class="link" href="#_route96">2.4. GET /v2/dictionary</a></h3> <div class="sect3"> <h4 id="_responses_4"><a class="anchor" href="#_responses_4"></a><a class="link" href="#_responses_4">2.4.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -899,7 +899,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route61"><a class="anchor" href="#_route61"></a><a class="link" href="#_route61">2.5. PUT /v2/dictionary</a></h3> +<h3 id="_route99"><a class="anchor" href="#_route99"></a><a class="link" href="#_route99">2.5. PUT /v2/dictionary</a></h3> <div class="sect3"> <h4 id="_parameters"><a class="anchor" href="#_parameters"></a><a class="link" href="#_parameters">2.5.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -971,7 +971,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route59"><a class="anchor" href="#_route59"></a><a class="link" href="#_route59">2.6. GET /v2/dictionary/secondary/names</a></h3> +<h3 id="_route97"><a class="anchor" href="#_route97"></a><a class="link" href="#_route97">2.6. GET /v2/dictionary/secondary/names</a></h3> <div class="sect3"> <h4 id="_responses_6"><a class="anchor" href="#_responses_6"></a><a class="link" href="#_responses_6">2.6.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1008,7 +1008,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route60"><a class="anchor" href="#_route60"></a><a class="link" href="#_route60">2.7. GET /v2/dictionary/{dictionaryName}</a></h3> +<h3 id="_route98"><a class="anchor" href="#_route98"></a><a class="link" href="#_route98">2.7. GET /v2/dictionary/{dictionaryName}</a></h3> <div class="sect3"> <h4 id="_parameters_2"><a class="anchor" href="#_parameters_2"></a><a class="link" href="#_parameters_2">2.7.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1070,7 +1070,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route62"><a class="anchor" href="#_route62"></a><a class="link" href="#_route62">2.8. PUT /v2/dictionary/{name}</a></h3> +<h3 id="_route100"><a class="anchor" href="#_route100"></a><a class="link" href="#_route100">2.8. PUT /v2/dictionary/{name}</a></h3> <div class="sect3"> <h4 id="_parameters_3"><a class="anchor" href="#_parameters_3"></a><a class="link" href="#_parameters_3">2.8.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1148,7 +1148,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route63"><a class="anchor" href="#_route63"></a><a class="link" href="#_route63">2.9. DELETE /v2/dictionary/{name}</a></h3> +<h3 id="_route101"><a class="anchor" href="#_route101"></a><a class="link" href="#_route101">2.9. DELETE /v2/dictionary/{name}</a></h3> <div class="sect3"> <h4 id="_parameters_4"><a class="anchor" href="#_parameters_4"></a><a class="link" href="#_parameters_4">2.9.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1207,7 +1207,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route64"><a class="anchor" href="#_route64"></a><a class="link" href="#_route64">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3> +<h3 id="_route102"><a class="anchor" href="#_route102"></a><a class="link" href="#_route102">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3> <div class="sect3"> <h4 id="_parameters_5"><a class="anchor" href="#_parameters_5"></a><a class="link" href="#_parameters_5">2.10.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1272,7 +1272,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route55"><a class="anchor" href="#_route55"></a><a class="link" href="#_route55">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3> +<h3 id="_route93"><a class="anchor" href="#_route93"></a><a class="link" href="#_route93">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3> <div class="sect3"> <h4 id="_parameters_6"><a class="anchor" href="#_parameters_6"></a><a class="link" href="#_parameters_6">2.11.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1346,7 +1346,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route57"><a class="anchor" href="#_route57"></a><a class="link" href="#_route57">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3> +<h3 id="_route95"><a class="anchor" href="#_route95"></a><a class="link" href="#_route95">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3> <div class="sect3"> <h4 id="_parameters_7"><a class="anchor" href="#_parameters_7"></a><a class="link" href="#_parameters_7">2.12.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1418,7 +1418,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route53"><a class="anchor" href="#_route53"></a><a class="link" href="#_route53">2.13. PUT /v2/loop/delete/{loopName}</a></h3> +<h3 id="_route91"><a class="anchor" href="#_route91"></a><a class="link" href="#_route91">2.13. PUT /v2/loop/delete/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.13.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1467,7 +1467,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route46"><a class="anchor" href="#_route46"></a><a class="link" href="#_route46">2.14. PUT /v2/loop/deploy/{loopName}</a></h3> +<h3 id="_route84"><a class="anchor" href="#_route84"></a><a class="link" href="#_route84">2.14. PUT /v2/loop/deploy/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.14.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1529,7 +1529,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route40"><a class="anchor" href="#_route40"></a><a class="link" href="#_route40">2.15. GET /v2/loop/getAllNames</a></h3> +<h3 id="_route78"><a class="anchor" href="#_route78"></a><a class="link" href="#_route78">2.15. GET /v2/loop/getAllNames</a></h3> <div class="sect3"> <h4 id="_responses_15"><a class="anchor" href="#_responses_15"></a><a class="link" href="#_responses_15">2.15.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1566,7 +1566,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route54"><a class="anchor" href="#_route54"></a><a class="link" href="#_route54">2.16. GET /v2/loop/getstatus/{loopName}</a></h3> +<h3 id="_route92"><a class="anchor" href="#_route92"></a><a class="link" href="#_route92">2.16. GET /v2/loop/getstatus/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.16.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1628,7 +1628,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route47"><a class="anchor" href="#_route47"></a><a class="link" href="#_route47">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3> +<h3 id="_route85"><a class="anchor" href="#_route85"></a><a class="link" href="#_route85">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3> <div class="sect3"> <h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.17.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1696,7 +1696,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route48"><a class="anchor" href="#_route48"></a><a class="link" href="#_route48">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3> +<h3 id="_route86"><a class="anchor" href="#_route86"></a><a class="link" href="#_route86">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3> <div class="sect3"> <h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.18.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1764,7 +1764,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route56"><a class="anchor" href="#_route56"></a><a class="link" href="#_route56">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3> +<h3 id="_route94"><a class="anchor" href="#_route94"></a><a class="link" href="#_route94">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3> <div class="sect3"> <h4 id="_parameters_13"><a class="anchor" href="#_parameters_13"></a><a class="link" href="#_parameters_13">2.19.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1844,7 +1844,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route51"><a class="anchor" href="#_route51"></a><a class="link" href="#_route51">2.20. PUT /v2/loop/restart/{loopName}</a></h3> +<h3 id="_route89"><a class="anchor" href="#_route89"></a><a class="link" href="#_route89">2.20. PUT /v2/loop/restart/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_14"><a class="anchor" href="#_parameters_14"></a><a class="link" href="#_parameters_14">2.20.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1906,7 +1906,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route50"><a class="anchor" href="#_route50"></a><a class="link" href="#_route50">2.21. PUT /v2/loop/stop/{loopName}</a></h3> +<h3 id="_route88"><a class="anchor" href="#_route88"></a><a class="link" href="#_route88">2.21. PUT /v2/loop/stop/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_15"><a class="anchor" href="#_parameters_15"></a><a class="link" href="#_parameters_15">2.21.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -1968,7 +1968,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route52"><a class="anchor" href="#_route52"></a><a class="link" href="#_route52">2.22. PUT /v2/loop/submit/{loopName}</a></h3> +<h3 id="_route90"><a class="anchor" href="#_route90"></a><a class="link" href="#_route90">2.22. PUT /v2/loop/submit/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_16"><a class="anchor" href="#_parameters_16"></a><a class="link" href="#_parameters_16">2.22.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2030,7 +2030,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route42"><a class="anchor" href="#_route42"></a><a class="link" href="#_route42">2.23. GET /v2/loop/svgRepresentation/{loopName}</a></h3> +<h3 id="_route80"><a class="anchor" href="#_route80"></a><a class="link" href="#_route80">2.23. GET /v2/loop/svgRepresentation/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_17"><a class="anchor" href="#_parameters_17"></a><a class="link" href="#_parameters_17">2.23.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2092,7 +2092,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route49"><a class="anchor" href="#_route49"></a><a class="link" href="#_route49">2.24. PUT /v2/loop/undeploy/{loopName}</a></h3> +<h3 id="_route87"><a class="anchor" href="#_route87"></a><a class="link" href="#_route87">2.24. PUT /v2/loop/undeploy/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_18"><a class="anchor" href="#_parameters_18"></a><a class="link" href="#_parameters_18">2.24.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2154,7 +2154,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route43"><a class="anchor" href="#_route43"></a><a class="link" href="#_route43">2.25. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3> +<h3 id="_route81"><a class="anchor" href="#_route81"></a><a class="link" href="#_route81">2.25. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_19"><a class="anchor" href="#_parameters_19"></a><a class="link" href="#_parameters_19">2.25.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2232,7 +2232,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route45"><a class="anchor" href="#_route45"></a><a class="link" href="#_route45">2.26. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3> +<h3 id="_route83"><a class="anchor" href="#_route83"></a><a class="link" href="#_route83">2.26. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_20"><a class="anchor" href="#_parameters_20"></a><a class="link" href="#_parameters_20">2.26.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2310,7 +2310,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route44"><a class="anchor" href="#_route44"></a><a class="link" href="#_route44">2.27. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3> +<h3 id="_route82"><a class="anchor" href="#_route82"></a><a class="link" href="#_route82">2.27. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_21"><a class="anchor" href="#_parameters_21"></a><a class="link" href="#_parameters_21">2.27.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2388,7 +2388,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route41"><a class="anchor" href="#_route41"></a><a class="link" href="#_route41">2.28. GET /v2/loop/{loopName}</a></h3> +<h3 id="_route79"><a class="anchor" href="#_route79"></a><a class="link" href="#_route79">2.28. GET /v2/loop/{loopName}</a></h3> <div class="sect3"> <h4 id="_parameters_22"><a class="anchor" href="#_parameters_22"></a><a class="link" href="#_parameters_22">2.28.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2450,7 +2450,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route68"><a class="anchor" href="#_route68"></a><a class="link" href="#_route68">2.29. POST /v2/policyToscaModels</a></h3> +<h3 id="_route106"><a class="anchor" href="#_route106"></a><a class="link" href="#_route106">2.29. POST /v2/policyToscaModels</a></h3> <div class="sect3"> <h4 id="_parameters_23"><a class="anchor" href="#_parameters_23"></a><a class="link" href="#_parameters_23">2.29.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2522,7 +2522,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route65"><a class="anchor" href="#_route65"></a><a class="link" href="#_route65">2.30. GET /v2/policyToscaModels</a></h3> +<h3 id="_route103"><a class="anchor" href="#_route103"></a><a class="link" href="#_route103">2.30. GET /v2/policyToscaModels</a></h3> <div class="sect3"> <h4 id="_responses_30"><a class="anchor" href="#_responses_30"></a><a class="link" href="#_responses_30">2.30.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2559,7 +2559,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route67"><a class="anchor" href="#_route67"></a><a class="link" href="#_route67">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route105"><a class="anchor" href="#_route105"></a><a class="link" href="#_route105">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3> <div class="sect3"> <h4 id="_parameters_24"><a class="anchor" href="#_parameters_24"></a><a class="link" href="#_parameters_24">2.31.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2627,7 +2627,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route66"><a class="anchor" href="#_route66"></a><a class="link" href="#_route66">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route104"><a class="anchor" href="#_route104"></a><a class="link" href="#_route104">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> <div class="sect3"> <h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.32.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2695,7 +2695,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route69"><a class="anchor" href="#_route69"></a><a class="link" href="#_route69">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route107"><a class="anchor" href="#_route107"></a><a class="link" href="#_route107">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> <div class="sect3"> <h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.33.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2779,7 +2779,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route70"><a class="anchor" href="#_route70"></a><a class="link" href="#_route70">2.34. GET /v2/templates</a></h3> +<h3 id="_route108"><a class="anchor" href="#_route108"></a><a class="link" href="#_route108">2.34. GET /v2/templates</a></h3> <div class="sect3"> <h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2816,7 +2816,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route72"><a class="anchor" href="#_route72"></a><a class="link" href="#_route72">2.35. GET /v2/templates/names</a></h3> +<h3 id="_route110"><a class="anchor" href="#_route110"></a><a class="link" href="#_route110">2.35. GET /v2/templates/names</a></h3> <div class="sect3"> <h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2853,7 +2853,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route71"><a class="anchor" href="#_route71"></a><a class="link" href="#_route71">2.36. GET /v2/templates/{templateName}</a></h3> +<h3 id="_route109"><a class="anchor" href="#_route109"></a><a class="link" href="#_route109">2.36. GET /v2/templates/{templateName}</a></h3> <div class="sect3"> <h4 id="_parameters_27"><a class="anchor" href="#_parameters_27"></a><a class="link" href="#_parameters_27">2.36.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2915,7 +2915,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route73"><a class="anchor" href="#_route73"></a><a class="link" href="#_route73">2.37. GET /v2/templates/{templateName}/svgRepresentation</a></h3> +<h3 id="_route111"><a class="anchor" href="#_route111"></a><a class="link" href="#_route111">2.37. GET /v2/templates/{templateName}/svgRepresentation</a></h3> <div class="sect3"> <h4 id="_parameters_28"><a class="anchor" href="#_parameters_28"></a><a class="link" href="#_parameters_28">2.37.1. Parameters</a></h4> <table class="tableblock frame-all grid-all stretch"> diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateFieldTest.java b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateFieldTest.java new file mode 100644 index 000000000..29f5a1da8 --- /dev/null +++ b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateFieldTest.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP CLAMP + * ================================================================================ + * Copyright (C) 2020 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * =================================================================== + * + */ + +package org.onap.clamp.clds.tosca.update; + +import junit.framework.TestCase; +import org.onap.clamp.clds.tosca.update.templates.JsonTemplateField; + +public class JsonTemplateFieldTest extends TestCase { + + JsonTemplateField field1 = new JsonTemplateField("type", "testType", true, true); + JsonTemplateField field2 = new JsonTemplateField("type"); + JsonTemplateField field3 = new JsonTemplateField("type", "testType1", true, true); + JsonTemplateField field4 = new JsonTemplateField("type", "testType", false, true); + JsonTemplateField field5 = new JsonTemplateField("type", "testType", true, false); + JsonTemplateField field6 = new JsonTemplateField("type", "testType", true, true); + + /** + * Test fieldsEqual method. + */ + public void testFieldsEqualsMethod() { + assertFalse(JsonTemplateField.fieldsEquals(field1,field3)); + assertFalse(JsonTemplateField.fieldsEquals(field1,field4)); + assertFalse(JsonTemplateField.fieldsEquals(field1,field5)); + assertTrue(JsonTemplateField.fieldsEquals(field1,field6)); + } + + /** + * Test equals method. + */ + public void testEqualsMethod() { + assertTrue(field1.equals(field2)); + assertTrue(field1.equals(field3)); + assertTrue(field1.equals(field4)); + assertTrue(field1.equals(field5)); + assertTrue(field1.equals(field6)); + } + + /** + * Test compareWithField method. + */ + public void testCompareWithFieldMethod() { + assertFalse(field1.compareWithField(field2)); + assertFalse(field1.compareWithField(field3)); + assertFalse(field1.compareWithField(field4)); + assertFalse(field1.compareWithField(field5)); + assertTrue(field1.equals(field6)); + } +}
\ No newline at end of file diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java index fab3030ca..dc736a48b 100644 --- a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java +++ b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java @@ -32,20 +32,38 @@ import org.onap.clamp.clds.tosca.update.templates.JsonTemplateField; public class JsonTemplateTest extends TestCase { + JsonTemplate toTest = new JsonTemplate("toTest"); + List<JsonTemplateField> + jsonTemplateFields = new ArrayList<>( + Arrays.asList(new JsonTemplateField("type"), new JsonTemplateField("description"), + new JsonTemplateField( + "enum"))); + /** * Test check failed. */ public void testCheckFields() { - JsonTemplate toTest = new JsonTemplate("toTest"); - List<JsonTemplateField> - jsonTemplateFields = new ArrayList<>( - Arrays.asList(new JsonTemplateField("type"), new JsonTemplateField("description"), - new JsonTemplateField( - "enum"))); toTest.setJsonTemplateFields(jsonTemplateFields); JsonTemplate reference = new JsonTemplate("toTest"); reference.setJsonTemplateFields(jsonTemplateFields); assertTrue(toTest.checkFields(reference)); } + /** + * Test other methods. + */ + public void testOtherFields() { + toTest.setJsonTemplateFields(jsonTemplateFields); + toTest.addField(new JsonTemplateField("moreField")); + toTest.setVisibility("moreField", true); + toTest.setStatic("moreField", true); + toTest.updateValueField("moreField", "testValue"); + + assertTrue(toTest.isVisible("moreField")); + assertTrue(toTest.getSpecificField("moreField").getValue().equals("testValue")); + assertTrue(toTest.fieldStaticStatus("moreField")); + assertTrue(toTest.toString() + .equals(" templateFields : [type null null null, description null null null, " + + "enum null null null, moreField testValue true true]")); + } }
\ No newline at end of file diff --git a/src/test/java/org/onap/clamp/clds/util/drawing/SvgLoopGeneratorTest.java b/src/test/java/org/onap/clamp/clds/util/drawing/SvgLoopGeneratorTest.java index 9559fa17d..0150af025 100644 --- a/src/test/java/org/onap/clamp/clds/util/drawing/SvgLoopGeneratorTest.java +++ b/src/test/java/org/onap/clamp/clds/util/drawing/SvgLoopGeneratorTest.java @@ -24,12 +24,12 @@ package org.onap.clamp.clds.util.drawing; import static org.assertj.core.api.Assertions.assertThat; - import com.google.gson.JsonObject; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.junit.Test; import org.onap.clamp.loop.Loop; +import org.onap.clamp.loop.template.LoopElementModel; import org.onap.clamp.loop.template.PolicyModel; import org.onap.clamp.policy.microservice.MicroServicePolicy; import org.onap.clamp.policy.operational.OperationalPolicy; @@ -37,14 +37,17 @@ import org.xml.sax.SAXException; public class SvgLoopGeneratorTest { private Loop getLoop() { + + LoopElementModel msModel = new LoopElementModel("testMs", LoopElementModel.MICRO_SERVICE_TYPE, ""); MicroServicePolicy ms1 = new MicroServicePolicy("ms1", new PolicyModel("org.onap.ms1", "", "1.0.0", "short.ms1"), - false,null,null,null,null); + false,null,msModel,null,null); MicroServicePolicy ms2 = new MicroServicePolicy("ms2", new PolicyModel("org.onap.ms2", "", "1.0.0", "short.ms2"), - false, null,null,null,null); + false, null,msModel,null,null); + LoopElementModel opModel = new LoopElementModel("testOp", LoopElementModel.OPERATIONAL_POLICY_TYPE, ""); OperationalPolicy opPolicy = new OperationalPolicy("OperationalPolicy", new JsonObject(),new JsonObject(), - new PolicyModel("org.onap.opolicy", null, "1.0.0", "short.OperationalPolicy"), null, null, null); + new PolicyModel("org.onap.opolicy", null, "1.0.0", "short.OperationalPolicy"), opModel, null, null); Loop loop = new Loop(); loop.addMicroServicePolicy(ms1); loop.addMicroServicePolicy(ms2); @@ -66,6 +69,10 @@ public class SvgLoopGeneratorTest { assertThat(xml).contains(">VES<"); assertThat(xml).contains("data-element-id=\"ms1\""); assertThat(xml).contains("data-element-id=\"ms2\""); + assertThat(xml).contains("data-grouping-id=\"testMs\""); + assertThat(xml).contains("data-grouping-id=\"testOp\""); + assertThat(xml).contains("data-for-ui=\"testMs\""); + assertThat(xml).contains("data-for-ui=\"testOp\""); assertThat(xml).contains(">short.ms1<"); assertThat(xml).contains(">short.ms2<"); assertThat(xml).contains("data-element-id=\"OperationalPolicy\""); diff --git a/src/test/java/org/onap/clamp/loop/LoopTemplateLoopElementModelTest.java b/src/test/java/org/onap/clamp/loop/LoopTemplateLoopElementModelTest.java new file mode 100644 index 000000000..e5b64c99c --- /dev/null +++ b/src/test/java/org/onap/clamp/loop/LoopTemplateLoopElementModelTest.java @@ -0,0 +1,106 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP CLAMP + * ================================================================================ + * Copyright (C) 2020 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * =================================================================== + * + */ + +package org.onap.clamp.loop; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; +import org.onap.clamp.loop.template.LoopElementModel; +import org.onap.clamp.loop.template.LoopTemplate; +import org.onap.clamp.loop.template.LoopTemplateLoopElementModel; +import org.onap.clamp.loop.template.PolicyModel; + + +public class LoopTemplateLoopElementModelTest { + + private LoopElementModel loopElementModel = getLoopElementModel("yaml", "microService1", + getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools", "type1")); + private LoopTemplate loopTemplate = getLoopTemplate("templateName", "yaml", "svg", 1); + + private LoopElementModel getLoopElementModel(String yaml, String name, PolicyModel policyModel) { + LoopElementModel model = new LoopElementModel(); + model.setBlueprint(yaml); + model.setName(name); + model.addPolicyModel(policyModel); + model.setLoopElementType("OPERATIONAL_POLICY"); + return model; + } + + private PolicyModel getPolicyModel(String policyType, String policyModelTosca, String version, String policyAcronym, + String policyVariant) { + return new PolicyModel(policyType, policyModelTosca, version, policyAcronym); + } + + private LoopTemplate getLoopTemplate(String name, String blueprint, String svgRepresentation, + Integer maxInstancesAllowed) { + LoopTemplate template = new LoopTemplate(name, blueprint, svgRepresentation, maxInstancesAllowed, null); + template.addLoopElementModel(loopElementModel); + return template; + } + + /** + * This tests compareTo method. + */ + @Test + public void compareToTest() { + LoopTemplateLoopElementModel model1 = new LoopTemplateLoopElementModel(); + LoopTemplateLoopElementModel model2 = new LoopTemplateLoopElementModel(); + assertThat(model1.compareTo(model2)).isEqualTo(1); + + model1.setFlowOrder(2); + assertThat(model1.compareTo(model2)).isEqualTo(-1); + + model2.setFlowOrder(3); + assertThat(model1.compareTo(model2)).isEqualTo(1); + } + + /** + * This tests equals method. + */ + @Test + public void equalsTest() { + LoopTemplateLoopElementModel model1 = new LoopTemplateLoopElementModel(); + LoopTemplateLoopElementModel model2 = new LoopTemplateLoopElementModel(); + + assertThat(model1.equals(model2)).isTrue(); + + model1.setLoopTemplate(loopTemplate); + assertThat(model1.equals(model2)).isFalse(); + model2.setLoopTemplate(loopTemplate); + assertThat(model1.equals(model2)).isTrue(); + + model1.setLoopElementModel(loopElementModel); + assertThat(model1.equals(model2)).isFalse(); + model2.setLoopElementModel(loopElementModel); + assertThat(model1.equals(model2)).isTrue(); + + model1.setFlowOrder(1); + assertThat(model1.equals(model2)).isTrue(); + model2.setFlowOrder(2); + assertThat(model1.equals(model2)).isTrue(); + } + +} diff --git a/src/test/java/org/onap/clamp/policy/pdpgroup/PolicyModelKeyTest.java b/src/test/java/org/onap/clamp/policy/pdpgroup/PolicyModelKeyTest.java new file mode 100644 index 000000000..413ce60ab --- /dev/null +++ b/src/test/java/org/onap/clamp/policy/pdpgroup/PolicyModelKeyTest.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP CLAMP + * ================================================================================ + * Copyright (C) 2020 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * =================================================================== + * + */ + +package org.onap.clamp.policy.pdpgroup; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import org.junit.Test; + +public class PolicyModelKeyTest { + + @Test + public void testEqualsMethod() throws IOException { + PolicyModelKey key1 = new PolicyModelKey("name1","1.0.0"); + PolicyModelKey key2 = new PolicyModelKey(null,"1.0.0"); + PolicyModelKey key3 = new PolicyModelKey("name1",null); + + assertThat(key1.equals(null)).isFalse(); + assertThat(key1.equals("key2")).isFalse(); + + assertThat(key2.equals(key1)).isFalse(); + assertThat(key3.equals(key1)).isFalse(); + + PolicyModelKey key4 = new PolicyModelKey("name2","1.0.0"); + PolicyModelKey key5 = new PolicyModelKey("name1","2.0.0"); + assertThat(key1.equals(key4)).isFalse(); + assertThat(key1.equals(key5)).isFalse(); + + PolicyModelKey key6 = new PolicyModelKey("name(.*)","1.0.0"); + PolicyModelKey key7 = new PolicyModelKey("name1","1.0.0"); + assertThat(key1.equals(key6)).isTrue(); + assertThat(key1.equals(key7)).isTrue(); + } +} |