diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-03-13 15:27:41 -0700 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-03-16 06:30:33 -0700 |
commit | 49ab84a916e96fde4fc39258fa10f8b5ce775f48 (patch) | |
tree | 4a82e5adccade8fc1d660172662efb7f043bfbee /src | |
parent | 723de7f63f0951d0cfe7a23956cf9d00128809b1 (diff) |
Fix the legacy policies
Fix the legacy policies not displayed in the UI properly due to the new PolicyModal dialog.
Issue-ID: CLAMP-779
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I8070d8c57e43c9a386e09475f0d377f91104aef1
Diffstat (limited to 'src')
7 files changed, 1254 insertions, 1292 deletions
diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java index 355a889e0..528d695c3 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java @@ -152,6 +152,7 @@ public class OperationalPolicy extends Policy implements Serializable { /** * This method can generate a Json representation (json schema) for an operational policy. * This is mainly to support a legacy case and a generic case. + * For the legacy case the operational policy given is modified (configurationJson). * * @param operationalPolicy The operational policy * @param toscaConverter The tosca converter @@ -166,7 +167,7 @@ public class OperationalPolicy extends Policy implements Serializable { } if (operationalPolicy.isLegacy()) { // Op policy Legacy case - LegacyOperationalPolicy.preloadConfiguration(jsonReturned, operationalPolicy.loop); + LegacyOperationalPolicy.preloadConfiguration(operationalPolicy.getConfigurationsJson(), operationalPolicy.loop); jsonReturned = OperationalPolicyRepresentationBuilder .generateOperationalPolicySchema(operationalPolicy.loop.getModelService()); } diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java index 0298cfde7..c88c1b984 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java @@ -52,15 +52,13 @@ public class OperationalPolicyRepresentationBuilder { JsonObject jsonSchema = JsonUtils.GSON.fromJson( ResourceFileUtil.getResourceAsString("clds/json-schema/operational_policies/operational_policy.json"), JsonObject.class); - jsonSchema.get("schema").getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject() - .get("configurationsJson").getAsJsonObject().get("properties").getAsJsonObject() + jsonSchema.get("properties").getAsJsonObject() .get("operational_policy").getAsJsonObject().get("properties").getAsJsonObject().get("policies") .getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject().get("target") .getAsJsonObject().get("anyOf").getAsJsonArray().addAll(createAnyOfArray(modelJson)); // update CDS recipe and payload information to schema - JsonArray actors = jsonSchema.get("schema").getAsJsonObject().get("items").getAsJsonObject().get("properties") - .getAsJsonObject().get("configurationsJson").getAsJsonObject().get("properties").getAsJsonObject() + JsonArray actors = jsonSchema.get("properties").getAsJsonObject() .get("operational_policy").getAsJsonObject().get("properties").getAsJsonObject().get("policies") .getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject().get("actor") .getAsJsonObject().get("anyOf").getAsJsonArray(); diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 0451f1e0d..61b9d26c0 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="#_route36">2.1. GET /v1/healthcheck</a> +<li><a href="#_route110">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="#_route37">2.2. GET /v1/user/getUser</a> +<li><a href="#_route111">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="#_route35">2.3. GET /v2/clampInformation</a> +<li><a href="#_route109">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="#_route21">2.4. GET /v2/dictionary</a> +<li><a href="#_route95">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="#_route23">2.5. PUT /v2/dictionary</a> +<li><a href="#_route97">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> @@ -497,7 +497,7 @@ 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="#_route25">2.9. DELETE /v2/dictionary/{name}</a> +<li><a href="#_route99">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> @@ -511,14 +511,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_10">2.10.3. Produces</a></li> </ul> </li> -<li><a href="#_route16">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a> +<li><a href="#_route90">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="#_route18">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a> +<li><a href="#_route92">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,82 +526,82 @@ 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="#_route14">2.13. PUT /v2/loop/delete/{loopName}</a> +<li><a href="#_route88">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="#_route8">2.14. PUT /v2/loop/deploy/{loopName}</a> +<li><a href="#_route82">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="#_route2">2.15. GET /v2/loop/getAllNames</a> +<li><a href="#_route76">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="#_route15">2.16. GET /v2/loop/getstatus/{loopName}</a> +<li><a href="#_route89">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="#_route9">2.17. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a> +<li><a href="#_route83">2.17. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</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="#_route17">2.18. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a> +<li><a href="#_route91">2.18. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</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="#_route12">2.19. PUT /v2/loop/restart/{loopName}</a> +<li><a href="#_route86">2.19. PUT /v2/loop/restart/{loopName}</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="#_route11">2.20. PUT /v2/loop/stop/{loopName}</a> +<li><a href="#_route85">2.20. PUT /v2/loop/stop/{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="#_route13">2.21. PUT /v2/loop/submit/{loopName}</a> +<li><a href="#_route87">2.21. PUT /v2/loop/submit/{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="#_route4">2.22. GET /v2/loop/svgRepresentation/{loopName}</a> +<li><a href="#_route78">2.22. GET /v2/loop/svgRepresentation/{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="#_route10">2.23. PUT /v2/loop/undeploy/{loopName}</a> +<li><a href="#_route84">2.23. PUT /v2/loop/undeploy/{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="#_route5">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a> +<li><a href="#_route79">2.24. POST /v2/loop/updateGlobalProperties/{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> @@ -609,7 +609,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_23">2.24.4. Produces</a></li> </ul> </li> -<li><a href="#_route7">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a> +<li><a href="#_route81">2.25. POST /v2/loop/updateMicroservicePolicy/{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> @@ -617,7 +617,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="#_route6">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a> +<li><a href="#_route80">2.26. POST /v2/loop/updateOperationalPolicies/{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> @@ -625,14 +625,14 @@ 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="#_route3">2.27. GET /v2/loop/{loopName}</a> +<li><a href="#_route77">2.27. GET /v2/loop/{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> <li><a href="#_produces_26">2.27.3. Produces</a></li> </ul> </li> -<li><a href="#_route29">2.28. POST /v2/policyToscaModels</a> +<li><a href="#_route103">2.28. POST /v2/policyToscaModels</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> @@ -640,7 +640,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_27">2.28.4. Produces</a></li> </ul> </li> -<li><a href="#_route28">2.29. GET /v2/policyToscaModels</a> +<li><a href="#_route102">2.29. GET /v2/policyToscaModels</a> <ul class="sectlevel3"> <li><a href="#_responses_29">2.29.1. Responses</a></li> <li><a href="#_produces_28">2.29.2. Produces</a></li> @@ -660,7 +660,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_30">2.31.3. Produces</a></li> </ul> </li> -<li><a href="#_route30">2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a> +<li><a href="#_route104">2.32. PUT /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> @@ -668,7 +668,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <li><a href="#_produces_31">2.32.4. Produces</a></li> </ul> </li> -<li><a href="#_route34">2.33. GET /v2/templates</a> +<li><a href="#_route108">2.33. GET /v2/templates</a> <ul class="sectlevel3"> <li><a href="#_responses_33">2.33.1. Responses</a></li> <li><a href="#_produces_32">2.33.2. Produces</a></li> @@ -736,7 +736,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <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:41607<br> +<p><em>Host</em> : localhost:46291<br> <em>BasePath</em> : /restservices/clds/<br> <em>Schemes</em> : HTTP</p> </div> @@ -747,7 +747,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="_route36"><a class="anchor" href="#_route36"></a><a class="link" href="#_route36">2.1. GET /v1/healthcheck</a></h3> +<h3 id="_route110"><a class="anchor" href="#_route110"></a><a class="link" href="#_route110">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"> @@ -784,7 +784,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route37"><a class="anchor" href="#_route37"></a><a class="link" href="#_route37">2.2. GET /v1/user/getUser</a></h3> +<h3 id="_route111"><a class="anchor" href="#_route111"></a><a class="link" href="#_route111">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"> @@ -818,7 +818,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route35"><a class="anchor" href="#_route35"></a><a class="link" href="#_route35">2.3. GET /v2/clampInformation</a></h3> +<h3 id="_route109"><a class="anchor" href="#_route109"></a><a class="link" href="#_route109">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"> @@ -855,7 +855,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route21"><a class="anchor" href="#_route21"></a><a class="link" href="#_route21">2.4. GET /v2/dictionary</a></h3> +<h3 id="_route95"><a class="anchor" href="#_route95"></a><a class="link" href="#_route95">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"> @@ -892,7 +892,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route23"><a class="anchor" href="#_route23"></a><a class="link" href="#_route23">2.5. PUT /v2/dictionary</a></h3> +<h3 id="_route97"><a class="anchor" href="#_route97"></a><a class="link" href="#_route97">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"> @@ -1141,7 +1141,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route25"><a class="anchor" href="#_route25"></a><a class="link" href="#_route25">2.9. DELETE /v2/dictionary/{name}</a></h3> +<h3 id="_route99"><a class="anchor" href="#_route99"></a><a class="link" href="#_route99">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"> @@ -1265,7 +1265,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route16"><a class="anchor" href="#_route16"></a><a class="link" href="#_route16">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3> +<h3 id="_route90"><a class="anchor" href="#_route90"></a><a class="link" href="#_route90">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"> @@ -1339,7 +1339,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route18"><a class="anchor" href="#_route18"></a><a class="link" href="#_route18">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3> +<h3 id="_route92"><a class="anchor" href="#_route92"></a><a class="link" href="#_route92">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"> @@ -1411,7 +1411,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route14"><a class="anchor" href="#_route14"></a><a class="link" href="#_route14">2.13. PUT /v2/loop/delete/{loopName}</a></h3> +<h3 id="_route88"><a class="anchor" href="#_route88"></a><a class="link" href="#_route88">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"> @@ -1460,7 +1460,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route8"><a class="anchor" href="#_route8"></a><a class="link" href="#_route8">2.14. PUT /v2/loop/deploy/{loopName}</a></h3> +<h3 id="_route82"><a class="anchor" href="#_route82"></a><a class="link" href="#_route82">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"> @@ -1522,7 +1522,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route2"><a class="anchor" href="#_route2"></a><a class="link" href="#_route2">2.15. GET /v2/loop/getAllNames</a></h3> +<h3 id="_route76"><a class="anchor" href="#_route76"></a><a class="link" href="#_route76">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"> @@ -1559,7 +1559,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route15"><a class="anchor" href="#_route15"></a><a class="link" href="#_route15">2.16. GET /v2/loop/getstatus/{loopName}</a></h3> +<h3 id="_route89"><a class="anchor" href="#_route89"></a><a class="link" href="#_route89">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"> @@ -1621,7 +1621,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route9"><a class="anchor" href="#_route9"></a><a class="link" href="#_route9">2.17. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a></h3> +<h3 id="_route83"><a class="anchor" href="#_route83"></a><a class="link" href="#_route83">2.17. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</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"> @@ -1683,7 +1683,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route17"><a class="anchor" href="#_route17"></a><a class="link" href="#_route17">2.18. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3> +<h3 id="_route91"><a class="anchor" href="#_route91"></a><a class="link" href="#_route91">2.18. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</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"> @@ -1757,7 +1757,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route12"><a class="anchor" href="#_route12"></a><a class="link" href="#_route12">2.19. PUT /v2/loop/restart/{loopName}</a></h3> +<h3 id="_route86"><a class="anchor" href="#_route86"></a><a class="link" href="#_route86">2.19. PUT /v2/loop/restart/{loopName}</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"> @@ -1819,7 +1819,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route11"><a class="anchor" href="#_route11"></a><a class="link" href="#_route11">2.20. PUT /v2/loop/stop/{loopName}</a></h3> +<h3 id="_route85"><a class="anchor" href="#_route85"></a><a class="link" href="#_route85">2.20. PUT /v2/loop/stop/{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"> @@ -1881,7 +1881,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route13"><a class="anchor" href="#_route13"></a><a class="link" href="#_route13">2.21. PUT /v2/loop/submit/{loopName}</a></h3> +<h3 id="_route87"><a class="anchor" href="#_route87"></a><a class="link" href="#_route87">2.21. PUT /v2/loop/submit/{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"> @@ -1943,7 +1943,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route4"><a class="anchor" href="#_route4"></a><a class="link" href="#_route4">2.22. GET /v2/loop/svgRepresentation/{loopName}</a></h3> +<h3 id="_route78"><a class="anchor" href="#_route78"></a><a class="link" href="#_route78">2.22. GET /v2/loop/svgRepresentation/{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"> @@ -2005,7 +2005,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route10"><a class="anchor" href="#_route10"></a><a class="link" href="#_route10">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3> +<h3 id="_route84"><a class="anchor" href="#_route84"></a><a class="link" href="#_route84">2.23. PUT /v2/loop/undeploy/{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"> @@ -2067,7 +2067,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route5"><a class="anchor" href="#_route5"></a><a class="link" href="#_route5">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3> +<h3 id="_route79"><a class="anchor" href="#_route79"></a><a class="link" href="#_route79">2.24. POST /v2/loop/updateGlobalProperties/{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"> @@ -2145,7 +2145,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route7"><a class="anchor" href="#_route7"></a><a class="link" href="#_route7">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3> +<h3 id="_route81"><a class="anchor" href="#_route81"></a><a class="link" href="#_route81">2.25. POST /v2/loop/updateMicroservicePolicy/{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"> @@ -2223,7 +2223,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route6"><a class="anchor" href="#_route6"></a><a class="link" href="#_route6">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3> +<h3 id="_route80"><a class="anchor" href="#_route80"></a><a class="link" href="#_route80">2.26. POST /v2/loop/updateOperationalPolicies/{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"> @@ -2301,7 +2301,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route3"><a class="anchor" href="#_route3"></a><a class="link" href="#_route3">2.27. GET /v2/loop/{loopName}</a></h3> +<h3 id="_route77"><a class="anchor" href="#_route77"></a><a class="link" href="#_route77">2.27. GET /v2/loop/{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"> @@ -2363,7 +2363,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route29"><a class="anchor" href="#_route29"></a><a class="link" href="#_route29">2.28. POST /v2/policyToscaModels</a></h3> +<h3 id="_route103"><a class="anchor" href="#_route103"></a><a class="link" href="#_route103">2.28. POST /v2/policyToscaModels</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"> @@ -2435,7 +2435,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route28"><a class="anchor" href="#_route28"></a><a class="link" href="#_route28">2.29. GET /v2/policyToscaModels</a></h3> +<h3 id="_route102"><a class="anchor" href="#_route102"></a><a class="link" href="#_route102">2.29. GET /v2/policyToscaModels</a></h3> <div class="sect3"> <h4 id="_responses_29"><a class="anchor" href="#_responses_29"></a><a class="link" href="#_responses_29">2.29.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> @@ -2608,7 +2608,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route30"><a class="anchor" href="#_route30"></a><a class="link" href="#_route30">2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3> +<h3 id="_route104"><a class="anchor" href="#_route104"></a><a class="link" href="#_route104">2.32. PUT /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"> @@ -2692,7 +2692,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> </div> <div class="sect2"> -<h3 id="_route34"><a class="anchor" href="#_route34"></a><a class="link" href="#_route34">2.33. GET /v2/templates</a></h3> +<h3 id="_route108"><a class="anchor" href="#_route108"></a><a class="link" href="#_route108">2.33. GET /v2/templates</a></h3> <div class="sect3"> <h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.1. Responses</a></h4> <table class="tableblock frame-all grid-all stretch"> diff --git a/src/main/resources/clds/json-schema/operational_policies/operational_policy.json b/src/main/resources/clds/json-schema/operational_policies/operational_policy.json index ef22e815d..49d7878a8 100644 --- a/src/main/resources/clds/json-schema/operational_policies/operational_policy.json +++ b/src/main/resources/clds/json-schema/operational_policies/operational_policy.json @@ -1,483 +1,464 @@ { - "schema": { - "uniqueItems": "true", - "format": "tabs", - "type": "array", - "minItems": 1, - "maxItems": 1, - "title": "Operational policies", - "items": { + "type": "object", + "title": "Configuration", + "required": [ + "operational_policy", + "guard_policies" + ], + "properties": { + "operational_policy": { + "type": "object", + "title": "Related Parameters", + "required": [ + "controlLoop", + "policies" + ], + "properties": { + "controlLoop": { + "type": "object", + "title": "Control Loop details", + "required": [ + "timeout", + "abatement", + "trigger_policy", + "controlLoopName" + ], + "properties": { + "timeout": { + "type": "string", + "title": "Overall Time Limit", + "default": "0", + "format": "number" + }, + "abatement": { + "type": "string", + "title": "Abatement", + "enum": [ + "True", + "False" + ] + }, + "trigger_policy": { + "type": "string", + "title": "Policy Decision Entry" + }, + "controlLoopName": { + "type": "string", + "title": "Control loop name", + "readOnly": "True" + } + } + }, + "policies": { + "uniqueItems": "true", + "id": "policies_array", + "type": "array", + "title": "Policy Decision Tree", + "format": "tabs-top", + "items": { + "title": "Policy Decision", "type": "object", - "title": "Operational Policy Item", - "id": "operational_policy_item", - "headerTemplate": "{{self.name}}", + "id": "policy_item", + "headerTemplate": "{{self.id}} - {{self.recipe}}", + "format": "categories", + "basicCategoryTitle": "recipe", "required": [ - "name", - "configurationsJson" + "id", + "retry", + "timeout", + "actor", + "success", + "failure", + "failure_timeout", + "failure_retries", + "failure_exception", + "failure_guard", + "target" ], "properties": { - "name": { - "type": "string", - "title": "Operational policy name", - "readOnly": "True" - }, - "configurationsJson": { - "type": "object", - "title": "Configuration", - "required": [ - "operational_policy", - "guard_policies" - ], + "id": { + "default": "Policy 1", + "title": "Policy ID", + "type": "string" + }, + "retry": { + "default": "0", + "title": "Number of Retry", + "type": "string", + "format": "number" + }, + "timeout": { + "default": "0", + "title": "Timeout", + "type": "string", + "format": "number" + }, + "actor": { + "type": "object", + "title": "Actor", + "anyOf": [ + { + "title": "APPC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "APPC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SO", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SO", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "VF Module Create", + "VF Module Delete" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SDNC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SDNC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Reroute", + "BandwidthOnDemand" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "VFC", "properties": { - "operational_policy": { - "type": "object", - "title": "Related Parameters", - "required": [ - "controlLoop", - "policies" - ], + "actor": { + "title": "actor", + "type": "string", + "default": "VFC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "required": [ + "payload" + ], + "default": "", + "enum": [ + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "CDS", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "CDS", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "object", + "required": [ + "payload" + ], + "anyOf": [ + { + "title": "user-defined", "properties": { - "controlLoop": { - "type": "object", - "title": "Control Loop details", - "required": [ - "timeout", - "abatement", - "trigger_policy", - "controlLoopName" - ], - "properties": { - "timeout": { - "type": "string", - "title": "Overall Time Limit", - "default": "0", - "format": "number" - }, - "abatement": { - "type": "string", - "title": "Abatement", - "enum": [ - "True", - "False" - ] - }, - "trigger_policy": { - "type": "string", - "title": "Policy Decision Entry" - }, - "controlLoopName": { - "type": "string", - "title": "Control loop name", - "readOnly": "True" - } - } - }, - "policies": { - "uniqueItems": "true", - "id": "policies_array", - "type": "array", - "title": "Policy Decision Tree", - "format": "tabs-top", - "items": { - "title": "Policy Decision", - "type": "object", - "id": "policy_item", - "headerTemplate": "{{self.id}} - {{self.recipe}}", - "format": "categories", - "basicCategoryTitle": "recipe", - "required": [ - "id", - "retry", - "timeout", - "actor", - "success", - "failure", - "failure_timeout", - "failure_retries", - "failure_exception", - "failure_guard", - "target" - ], - "properties": { - "id": { - "default": "Policy 1", - "title": "Policy ID", - "type": "string" - }, - "retry": { - "default": "0", - "title": "Number of Retry", - "type": "string", - "format": "number" - }, - "timeout": { - "default": "0", - "title": "Timeout", - "type": "string", - "format": "number" - }, - "actor": { - "type": "object", - "title": "Actor", - "anyOf": [ - { - "title": "APPC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "APPC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SO", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SO", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "VF Module Create", - "VF Module Delete" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SDNC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SDNC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Reroute", - "BandwidthOnDemand" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "VFC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "VFC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "required": [ - "payload" - ], - "default": "", - "enum": [ - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "CDS", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "CDS", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "object", - "required": [ - "payload" - ], - "anyOf": [ - { - "title": "user-defined", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default" : "", - "format" : "textarea" - } - } - } - ] - } - } - } - ] - }, - "success": { - "default": "final_success", - "title": "When Success", - "type": "string" - }, - "failure": { - "default": "final_failure", - "title": "When Failure", - "type": "string" - }, - "failure_timeout": { - "default": "final_failure_timeout", - "title": "When Failure Timeout", - "type": "string" - }, - "failure_retries": { - "default": "final_failure_retries", - "title": "When Failure Retries", - "type": "string" - }, - "failure_exception": { - "default": "final_failure_exception", - "title": "When Failure Exception", - "type": "string" - }, - "failure_guard": { - "default": "final_failure_guard", - "title": "When Failure Guard", - "type": "string" - }, - "target": { - "type": "object", - "required": [ - "type", - "resourceID" - ], - "anyOf": [ - { - "title": "User Defined", - "additionalProperties": "True", - "properties": { - "type": { - "title": "Target type", - "type": "string", - "default": "", - "enum": [ - "VNF", - "VFMODULE", - "VM" - ] - }, - "resourceID": { - "title": "Target type", - "type": "string", - "default": "" - } - } - } - ] - } - } - } - } + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "", + "format": "textarea" + } } - }, - "guard_policies": { - "type": "array", - "format": "tabs-top", - "title": "Associated Guard policies", - "items": { - "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", - "anyOf": [ - { - "title": "Guard MinMax", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.minmax.new", - "pattern": "^(guard.minmax\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "min": { - "type": "string", - "default": "0" - }, - "max": { - "type": "string", - "default": "1" - } - } - } - } - }, - { - "title": "Guard Frequency", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.frequency.new", - "pattern": "^(guard.frequency\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "limit": { - "type": "string" - }, - "timeWindow": { - "type": "string" - }, - "timeUnits": { - "type": "string", - "enum":["minute","hour","day","week","month","year"] - } - } - } - } - } - ] - } - } + } + ] + } } - } + } + ] + }, + "success": { + "default": "final_success", + "title": "When Success", + "type": "string" + }, + "failure": { + "default": "final_failure", + "title": "When Failure", + "type": "string" + }, + "failure_timeout": { + "default": "final_failure_timeout", + "title": "When Failure Timeout", + "type": "string" + }, + "failure_retries": { + "default": "final_failure_retries", + "title": "When Failure Retries", + "type": "string" + }, + "failure_exception": { + "default": "final_failure_exception", + "title": "When Failure Exception", + "type": "string" + }, + "failure_guard": { + "default": "final_failure_guard", + "title": "When Failure Guard", + "type": "string" + }, + "target": { + "type": "object", + "required": [ + "type", + "resourceID" + ], + "anyOf": [ + { + "title": "User Defined", + "additionalProperties": "True", + "properties": { + "type": { + "title": "Target type", + "type": "string", + "default": "", + "enum": [ + "VNF", + "VFMODULE", + "VM" + ] + }, + "resourceID": { + "title": "Target type", + "type": "string", + "default": "" + } + } + } + ] + } } + } } + } + }, + "guard_policies": { + "type": "array", + "format": "tabs-top", + "title": "Associated Guard policies", + "items": { + "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", + "anyOf": [ + { + "title": "Guard MinMax", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.minmax.new", + "pattern": "^(guard.minmax\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "min": { + "type": "string", + "default": "0" + }, + "max": { + "type": "string", + "default": "1" + } + } + } + } + }, + { + "title": "Guard Frequency", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.frequency.new", + "pattern": "^(guard.frequency\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "limit": { + "type": "string" + }, + "timeWindow": { + "type": "string" + }, + "timeUnits": { + "type": "string", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "year" + ] + } + } + } + } + } + ] + } } + } } + diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file index 64ba559c1..7d694eb8b 100644 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file @@ -71,6 +71,8 @@ data_types: Map of values that identify the resource. If none are provided, it is assumed that the entity that generated the ONSET event will be the target. required: false + metadata: + clamp_possible_values: test entry_schema: type: string @@ -82,10 +84,14 @@ data_types: type: string description: The actor performing the operation. required: true + metadata: + clamp_possible_values: test operation: type: string description: The operation the actor is performing. required: true + metadata: + clamp_possible_values: test target: type: onap.datatype.controlloop.Target description: The resource the operation should be performed on. @@ -115,8 +121,6 @@ data_types: type: onap.datatype.controlloop.Actor description: The definition of the operation to be performed. required: true - metadata: - clamp_possible_values: test timeout: type: integer description: The amount of time for the actor to perform the operation. diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file index 1c082b1ee..240009932 100644 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file @@ -59,6 +59,8 @@ data_types: Map of values that identify the resource. If none are provided, it is assumed that the entity that generated the ONSET event will be the target. required: false + metadata: + clamp_possible_values: test entry_schema: type: string @@ -70,10 +72,14 @@ data_types: type: string description: The actor performing the operation. required: true + metadata: + clamp_possible_values: test operation: type: string description: The operation the actor is performing. required: true + metadata: + clamp_possible_values: test target: type: onap.datatype.controlloop.Target description: The resource the operation should be performed on. @@ -103,8 +109,6 @@ data_types: type: onap.datatype.controlloop.Actor description: The definition of the operation to be performed. required: true - metadata: - clamp_possible_values: test timeout: type: integer description: The amount of time for the actor to perform the operation. diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json index b43f6f9d4..6ab84a8cf 100644 --- a/src/test/resources/tosca/operational-policy-json-schema.json +++ b/src/test/resources/tosca/operational-policy-json-schema.json @@ -1,760 +1,734 @@ { - "schema": { - "uniqueItems": "true", - "format": "tabs", - "type": "array", - "minItems": 1, - "maxItems": 1, - "title": "Operational policies", - "items": { - "type": "object", - "title": "Operational Policy Item", - "id": "operational_policy_item", - "headerTemplate": "{{self.name}}", - "required": [ - "name", - "configurationsJson" - ], - "properties": { - "name": { - "type": "string", - "title": "Operational policy name", - "readOnly": "True" - }, - "configurationsJson": { - "type": "object", - "title": "Configuration", - "required": [ - "operational_policy", - "guard_policies" - ], - "properties": { - "operational_policy": { - "type": "object", - "title": "Related Parameters", - "required": [ - "controlLoop", - "policies" - ], - "properties": { - "controlLoop": { - "type": "object", - "title": "Control Loop details", - "required": [ - "timeout", - "abatement", - "trigger_policy", - "controlLoopName" - ], - "properties": { - "timeout": { - "type": "string", - "title": "Overall Time Limit", - "default": "0", - "format": "number" - }, - "abatement": { - "type": "string", - "title": "Abatement", - "enum": [ - "True", - "False" - ] - }, - "trigger_policy": { - "type": "string", - "title": "Policy Decision Entry" - }, - "controlLoopName": { - "type": "string", - "title": "Control loop name", - "readOnly": "True" - } - } - }, - "policies": { - "uniqueItems": "true", - "id": "policies_array", - "type": "array", - "title": "Policy Decision Tree", - "format": "tabs-top", - "items": { - "title": "Policy Decision", - "type": "object", - "id": "policy_item", - "headerTemplate": "{{self.id}} - {{self.recipe}}", - "format": "categories", - "basicCategoryTitle": "recipe", - "required": [ - "id", - "retry", - "timeout", - "actor", - "success", - "failure", - "failure_timeout", - "failure_retries", - "failure_exception", - "failure_guard", - "target" - ], - "properties": { - "id": { - "default": "Policy 1", - "title": "Policy ID", - "type": "string" - }, - "retry": { - "default": "0", - "title": "Number of Retry", - "type": "string", - "format": "number" - }, - "timeout": { - "default": "0", - "title": "Timeout", - "type": "string", - "format": "number" - }, - "actor": { - "type": "object", - "title": "Actor", - "anyOf": [ - { - "title": "APPC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "APPC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SO", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SO", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "VF Module Create", - "VF Module Delete" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "SDNC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "SDNC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "default": "", - "enum": [ - "Reroute", - "BandwidthOnDemand" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "VFC", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "VFC", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "string", - "required": [ - "payload" - ], - "default": "", - "enum": [ - "ModifyConfig" - ] - }, - "payload": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "CDS", - "properties": { - "actor": { - "title": "actor", - "type": "string", - "default": "CDS", - "options": { - "hidden": true - } - }, - "type": { - "title": "recipe", - "type": "object", - "required": [ - "payload" - ], - "anyOf": [ - { - "title": "user-defined", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "format": "textarea" - } - } - }, - { - "title": "resource-assignment", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "activate", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "activate-restconf", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "activate-cli", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "assign-activate", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - }, - { - "title": "imperative-test-wf", - "properties": { - "type": { - "title": "Payload (YAML)", - "type": "string", - "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''", - "format": "textarea" - } - } - } - ] - } - } - } - ] - }, - "success": { - "default": "final_success", - "title": "When Success", - "type": "string" - }, - "failure": { - "default": "final_failure", - "title": "When Failure", - "type": "string" - }, - "failure_timeout": { - "default": "final_failure_timeout", - "title": "When Failure Timeout", - "type": "string" - }, - "failure_retries": { - "default": "final_failure_retries", - "title": "When Failure Retries", - "type": "string" - }, - "failure_exception": { - "default": "final_failure_exception", - "title": "When Failure Exception", - "type": "string" - }, - "failure_guard": { - "default": "final_failure_guard", - "title": "When Failure Guard", - "type": "string" - }, - "target": { - "type": "object", - "required": [ - "type", - "resourceID" - ], - "anyOf": [ - { - "title": "User Defined", - "additionalProperties": "True", - "properties": { - "type": { - "title": "Target type", - "type": "string", - "default": "", - "enum": [ - "VNF", - "VFMODULE", - "VM" - ] - }, - "resourceID": { - "title": "Target type", - "type": "string", - "default": "" - } - } - }, - { - "title": "VNF-vLoadBalancerMS 0", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VNF", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "vLoadBalancerMS", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..vpkg..module-1", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..vpkg..module-1", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "ca052563-eb92-4b5b-ad41-9111768ce043", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..vpkg..module-1", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..vdns..module-3", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..vdns..module-3", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "4fa73b49-8a6c-493e-816b-eb401567b720", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..vdns..module-3", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "bafcdab0-801d-4d81-9ead-f464640a38b1", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..base_template..module-0", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..base_template..module-0", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "63734409-f745-4e4d-a38b-131638a0edce", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..base_template..module-0", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27", - "readOnly": "True" - } - } - }, - { - "title": "VFMODULE-Vloadbalancerms..vlb..module-2", - "properties": { - "type": { - "title": "Type", - "type": "string", - "default": "VFMODULE", - "readOnly": "True" - }, - "resourceID": { - "title": "Resource ID", - "type": "string", - "default": "Vloadbalancerms..vlb..module-2", - "readOnly": "True" - }, - "modelInvariantId": { - "title": "Model Invariant Id (ModelInvariantUUID)", - "type": "string", - "default": "a772a1f4-0064-412c-833d-4749b15828dd", - "readOnly": "True" - }, - "modelVersionId": { - "title": "Model Version Id (ModelUUID)", - "type": "string", - "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a", - "readOnly": "True" - }, - "modelName": { - "title": "Model Name", - "type": "string", - "default": "Vloadbalancerms..vlb..module-2", - "readOnly": "True" - }, - "modelVersion": { - "title": "Model Version", - "type": "string", - "default": "1", - "readOnly": "True" - }, - "modelCustomizationId": { - "title": "Customization ID", - "type": "string", - "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806", - "readOnly": "True" - } - } - } - ] - } - } - } - } - } - }, - "guard_policies": { - "type": "array", - "format": "tabs-top", - "title": "Associated Guard policies", - "items": { - "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", - "anyOf": [ - { - "title": "Guard MinMax", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.minmax.new", - "pattern": "^(guard.minmax\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "min": { - "type": "string", - "default": "0" - }, - "max": { - "type": "string", - "default": "1" - } - } - } - } - }, - { - "title": "Guard Frequency", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.frequency.new", - "pattern": "^(guard.frequency\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "limit": { - "type": "string" - }, - "timeWindow": { - "type": "string" - }, - "timeUnits": { - "type": "string", - "enum": [ - "minute", - "hour", - "day", - "week", - "month", - "year" - ] - } - } - } - } - } - ] - } - } - } - } - } - } - } + "type": "object", + "title": "Configuration", + "required": [ + "operational_policy", + "guard_policies" + ], + "properties": { + "operational_policy": { + "type": "object", + "title": "Related Parameters", + "required": [ + "controlLoop", + "policies" + ], + "properties": { + "controlLoop": { + "type": "object", + "title": "Control Loop details", + "required": [ + "timeout", + "abatement", + "trigger_policy", + "controlLoopName" + ], + "properties": { + "timeout": { + "type": "string", + "title": "Overall Time Limit", + "default": "0", + "format": "number" + }, + "abatement": { + "type": "string", + "title": "Abatement", + "enum": [ + "True", + "False" + ] + }, + "trigger_policy": { + "type": "string", + "title": "Policy Decision Entry" + }, + "controlLoopName": { + "type": "string", + "title": "Control loop name", + "readOnly": "True" + } + } + }, + "policies": { + "uniqueItems": "true", + "id": "policies_array", + "type": "array", + "title": "Policy Decision Tree", + "format": "tabs-top", + "items": { + "title": "Policy Decision", + "type": "object", + "id": "policy_item", + "headerTemplate": "{{self.id}} - {{self.recipe}}", + "format": "categories", + "basicCategoryTitle": "recipe", + "required": [ + "id", + "retry", + "timeout", + "actor", + "success", + "failure", + "failure_timeout", + "failure_retries", + "failure_exception", + "failure_guard", + "target" + ], + "properties": { + "id": { + "default": "Policy 1", + "title": "Policy ID", + "type": "string" + }, + "retry": { + "default": "0", + "title": "Number of Retry", + "type": "string", + "format": "number" + }, + "timeout": { + "default": "0", + "title": "Timeout", + "type": "string", + "format": "number" + }, + "actor": { + "type": "object", + "title": "Actor", + "anyOf": [ + { + "title": "APPC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "APPC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SO", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SO", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "VF Module Create", + "VF Module Delete" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "SDNC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "SDNC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "default": "", + "enum": [ + "Reroute", + "BandwidthOnDemand" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "VFC", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "VFC", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "string", + "required": [ + "payload" + ], + "default": "", + "enum": [ + "ModifyConfig" + ] + }, + "payload": { + "title": "Payload (YAML)", + "type": "string", + "format": "textarea" + } + } + }, + { + "title": "CDS", + "properties": { + "actor": { + "title": "actor", + "type": "string", + "default": "CDS", + "options": { + "hidden": true + } + }, + "type": { + "title": "recipe", + "type": "object", + "required": [ + "payload" + ], + "anyOf": [ + { + "title": "user-defined", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "", + "format": "textarea" + } + } + }, + { + "title": "resource-assignment", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "activate", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "activate-restconf", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "activate-cli", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "assign-activate", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + }, + { + "title": "imperative-test-wf", + "properties": { + "type": { + "title": "Payload (YAML)", + "type": "string", + "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027", + "format": "textarea" + } + } + } + ] + } + } + } + ] + }, + "success": { + "default": "final_success", + "title": "When Success", + "type": "string" + }, + "failure": { + "default": "final_failure", + "title": "When Failure", + "type": "string" + }, + "failure_timeout": { + "default": "final_failure_timeout", + "title": "When Failure Timeout", + "type": "string" + }, + "failure_retries": { + "default": "final_failure_retries", + "title": "When Failure Retries", + "type": "string" + }, + "failure_exception": { + "default": "final_failure_exception", + "title": "When Failure Exception", + "type": "string" + }, + "failure_guard": { + "default": "final_failure_guard", + "title": "When Failure Guard", + "type": "string" + }, + "target": { + "type": "object", + "required": [ + "type", + "resourceID" + ], + "anyOf": [ + { + "title": "User Defined", + "additionalProperties": "True", + "properties": { + "type": { + "title": "Target type", + "type": "string", + "default": "", + "enum": [ + "VNF", + "VFMODULE", + "VM" + ] + }, + "resourceID": { + "title": "Target type", + "type": "string", + "default": "" + } + } + }, + { + "title": "VNF-vLoadBalancerMS 0", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VNF", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "vLoadBalancerMS", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..vpkg..module-1", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..vpkg..module-1", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "ca052563-eb92-4b5b-ad41-9111768ce043", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..vpkg..module-1", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..vdns..module-3", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..vdns..module-3", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "4fa73b49-8a6c-493e-816b-eb401567b720", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..vdns..module-3", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "bafcdab0-801d-4d81-9ead-f464640a38b1", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..base_template..module-0", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..base_template..module-0", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "63734409-f745-4e4d-a38b-131638a0edce", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..base_template..module-0", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27", + "readOnly": "True" + } + } + }, + { + "title": "VFMODULE-Vloadbalancerms..vlb..module-2", + "properties": { + "type": { + "title": "Type", + "type": "string", + "default": "VFMODULE", + "readOnly": "True" + }, + "resourceID": { + "title": "Resource ID", + "type": "string", + "default": "Vloadbalancerms..vlb..module-2", + "readOnly": "True" + }, + "modelInvariantId": { + "title": "Model Invariant Id (ModelInvariantUUID)", + "type": "string", + "default": "a772a1f4-0064-412c-833d-4749b15828dd", + "readOnly": "True" + }, + "modelVersionId": { + "title": "Model Version Id (ModelUUID)", + "type": "string", + "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a", + "readOnly": "True" + }, + "modelName": { + "title": "Model Name", + "type": "string", + "default": "Vloadbalancerms..vlb..module-2", + "readOnly": "True" + }, + "modelVersion": { + "title": "Model Version", + "type": "string", + "default": "1", + "readOnly": "True" + }, + "modelCustomizationId": { + "title": "Customization ID", + "type": "string", + "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806", + "readOnly": "True" + } + } + } + ] + } + } + } + } + } + }, + "guard_policies": { + "type": "array", + "format": "tabs-top", + "title": "Associated Guard policies", + "items": { + "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", + "anyOf": [ + { + "title": "Guard MinMax", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.minmax.new", + "pattern": "^(guard.minmax\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "min": { + "type": "string", + "default": "0" + }, + "max": { + "type": "string", + "default": "1" + } + } + } + } + }, + { + "title": "Guard Frequency", + "type": "object", + "properties": { + "policy-id": { + "type": "string", + "default": "guard.frequency.new", + "pattern": "^(guard.frequency\\..*)$" + }, + "content": { + "properties": { + "actor": { + "type": "string", + "enum": [ + "APPC", + "SO", + "VFC", + "SDNC", + "SDNR" + ] + }, + "recipe": { + "type": "string", + "enum": [ + "Restart", + "Rebuild", + "Migrate", + "Health-Check", + "ModifyConfig", + "VF Module Create", + "VF Module Delete", + "Reroute" + ] + }, + "targets": { + "type": "string", + "default": ".*" + }, + "clname": { + "type": "string", + "template": "{{loopName}}", + "watch": { + "loopName": "operational_policy.controlLoop.controlLoopName" + } + }, + "guardActiveStart": { + "type": "string", + "default": "00:00:00Z" + }, + "guardActiveEnd": { + "type": "string", + "default": "10:00:00Z" + }, + "limit": { + "type": "string" + }, + "timeWindow": { + "type": "string" + }, + "timeUnits": { + "type": "string", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "year" + ] + } + } + } + } + } + ] + } + } + } }
\ No newline at end of file |