summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java2
-rw-r--r--src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file7
-rw-r--r--src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.file80
-rw-r--r--src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.header1
-rw-r--r--ui-react/src/components/dialogs/Policy/PolicyModal.js2
5 files changed, 90 insertions, 2 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java b/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java
index 23586712a..5e6d9d98d 100644
--- a/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java
@@ -118,7 +118,7 @@ public class PolicyEngineServices {
LinkedHashMap<String, Object> policyTypesMap = (LinkedHashMap<String, Object>) loadedYaml
.get("policy_types");
- policyTypesMap.entrySet().parallelStream().forEach(entryPolicyType -> {
+ policyTypesMap.entrySet().stream().forEach(entryPolicyType -> {
policyModelsService.createPolicyInDbIfNeeded(
createPolicyModelFromPolicyEngine(entryPolicyType.getKey(),
((String) ((LinkedHashMap<String, Object>) entryPolicyType.getValue()).get("version"))));
diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes&#63;connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes&#63;connectionTimeToLive=5000/.file
index 6f24f3ca6..7f5b897bf 100644
--- a/src/test/resources/http-cache/example/policy/api/v1/policytypes&#63;connectionTimeToLive=5000/.file
+++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes&#63;connectionTimeToLive=5000/.file
@@ -29,6 +29,13 @@ policy_types:
# Omitted for brevity, see Section 1
onap.policies.controlloop.guard.common.MinMax:
+ version: 1.0.0
+ description: Supports Min/Max number of VF Modules
+ derived_from: onap.policies.controlloop.Guard
+ properties:
+ # Omitted for brevity, see Section 1
+
+ onap.policies.controlloop.guard.common.MinMax:
version: 2.0.0
description: Supports Min/Max number of VF Modules
derived_from: onap.policies.controlloop.Guard
diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0&#63;connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0&#63;connectionTimeToLive=5000/.file
new file mode 100644
index 000000000..778efae9e
--- /dev/null
+++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0&#63;connectionTimeToLive=5000/.file
@@ -0,0 +1,80 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "policy_types": {
+ "onap.policies.controlloop.guard.Common": {
+ "properties": {
+ "id": {
+ "name": "id",
+ "type": "string",
+ "typeVersion": "0.0.0",
+ "description": "The Control Loop id this applies to.",
+ "required": false,
+ "constraints": [],
+ "metadata": {}
+ },
+ "actor": {
+ "name": "actor",
+ "type": "string",
+ "typeVersion": "0.0.0",
+ "description": "Specifies the Actor the guard applies to.",
+ "required": true,
+ "constraints": [],
+ "metadata": {}
+ },
+ "operation": {
+ "name": "operation",
+ "type": "string",
+ "typeVersion": "0.0.0",
+ "description": "Specified the operation that the actor is performing the guard applies to.",
+ "required": true,
+ "constraints": [],
+ "metadata": {}
+ },
+ "timeRange": {
+ "name": "timeRange",
+ "type": "tosca.datatypes.TimeInterval",
+ "typeVersion": "0.0.0",
+ "description": "An optional range of time during the day the guard policy is valid for.\n",
+ "required": false,
+ "constraints": [],
+ "metadata": {}
+ }
+ },
+ "name": "onap.policies.controlloop.guard.Common",
+ "version": "1.0.0",
+ "derived_from": "tosca.policies.Root",
+ "metadata": {},
+ "description": "This is the base Policy Type for Guard policies that guard the execution of Operational\nPolicies.\n"
+ },
+ "onap.policies.controlloop.guard.common.MinMax": {
+ "properties": {
+ "min": {
+ "name": "min",
+ "type": "integer",
+ "typeVersion": "0.0.0",
+ "description": "The minimum instances of this entity",
+ "required": true,
+ "constraints": [],
+ "metadata": {}
+ },
+ "max": {
+ "name": "max",
+ "type": "integer",
+ "typeVersion": "0.0.0",
+ "description": "The maximum instances of this entity",
+ "required": false,
+ "constraints": [],
+ "metadata": {}
+ }
+ },
+ "name": "onap.policies.controlloop.guard.common.MinMax",
+ "version": "1.0.0",
+ "derived_from": "onap.policies.controlloop.guard.Common",
+ "metadata": {},
+ "description": "Supports Min/Max number of entity for scaling operations"
+ }
+ },
+ "name": "ToscaServiceTemplateSimple",
+ "version": "1.0.0",
+ "metadata": {}
+} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0&#63;connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0&#63;connectionTimeToLive=5000/.header
new file mode 100644
index 000000000..6a280d972
--- /dev/null
+++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0&#63;connectionTimeToLive=5000/.header
@@ -0,0 +1 @@
+{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file
diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.js b/ui-react/src/components/dialogs/Policy/PolicyModal.js
index 0f41beb09..428e443cf 100644
--- a/ui-react/src/components/dialogs/Policy/PolicyModal.js
+++ b/ui-react/src/components/dialogs/Policy/PolicyModal.js
@@ -122,7 +122,7 @@ export default class PolicyModal extends React.Component {
startval: editorData,
theme: 'myBootstrap4',
object_layout: 'grid',
- disable_properties: true,
+ disable_properties: false,
disable_edit_json: false,
disable_array_reorder: true,
disable_array_delete_last_row: true,