From d0a7a54266c184dc23206fd6c06898b54b52e8b2 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Fri, 18 May 2018 14:53:16 +0200 Subject: Update version to 2.0.1 Move to 2.0.1 to support additional fixes on 2.0.0 Clamp version Issue-ID: CLAMP-168 Change-Id: I8d0dec593f84f09f172f12ef5fdf23f7d11793a2 Signed-off-by: Determe, Sebastien (sd378r) --- docs/release-notes.rst | 2 +- pom.xml | 2 +- version.properties | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 2e6fd4793..fa5d8b6a0 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,7 +5,7 @@ Release Notes ============= -Version: 2.0.0 +Version: 2.0.1 -------------- :Release Date: 2018-06-25 diff --git a/pom.xml b/pom.xml index c79fb908a..894f62072 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 4.0.0 org.onap.clamp clds - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT clamp diff --git a/version.properties b/version.properties index a81893c7a..93dca4bb4 100644 --- a/version.properties +++ b/version.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP CLAMP # ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights +# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,7 +27,7 @@ major=2 minor=0 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} -- cgit 1.2.3-korg From a40e20c5b1fdc8ea38454279c7e00894075af46f Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Fri, 18 May 2018 14:55:19 +0200 Subject: Fix op policy Fix op policy so that when UI sends empty string the targetResourceId is set to null Issue-ID: CLAMP-153 Change-Id: I0b6680106548111d59f2170f8f7c42414e0644c8 Signed-off-by: Determe, Sebastien (sd378r) --- .../clamp/clds/model/properties/PolicyItem.java | 24 +++++++++-------- .../policy/modelBpmnProperties.json | 30 ++++++++++++++++------ .../operational-policy/yaml-policy-chain-1.yaml | 2 +- .../operational-policy/yaml-policy-chain-2.yaml | 2 +- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java b/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java index bb14b235f..337a97633 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java @@ -48,17 +48,17 @@ import java.util.List; * "targetResourceId","value":["Eace933104d443b496b8.nodes.heat.vpg"]}]]}] */ public class PolicyItem implements Cloneable { - protected static final EELFLogger logger = EELFManager.getInstance().getLogger(PolicyItem.class); - protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger(); - private String id; - private String recipe; - private int maxRetries; - private int retryTimeLimit; - private String parentPolicy; - private List parentPolicyConditions; - private String actor; - private String targetResourceId; + protected static final EELFLogger logger = EELFManager.getInstance().getLogger(PolicyItem.class); + protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger(); + private String id; + private String recipe; + private int maxRetries; + private int retryTimeLimit; + private String parentPolicy; + private List parentPolicyConditions; + private String actor; + private String targetResourceId; /** * Parse Policy given json node. @@ -73,7 +73,9 @@ public class PolicyItem implements Cloneable { parentPolicy = AbstractModelElement.getValueByName(node, "parentPolicy"); parentPolicyConditions = AbstractModelElement.getValuesByName(node, "parentPolicyConditions"); targetResourceId = AbstractModelElement.getValueByName(node, "targetResourceId"); - + if (targetResourceId != null && targetResourceId.isEmpty()) { + this.setTargetResourceId(null); + } } /** diff --git a/src/test/resources/example/model-properties/policy/modelBpmnProperties.json b/src/test/resources/example/model-properties/policy/modelBpmnProperties.json index 5c2214e84..0ef387529 100644 --- a/src/test/resources/example/model-properties/policy/modelBpmnProperties.json +++ b/src/test/resources/example/model-properties/policy/modelBpmnProperties.json @@ -100,7 +100,14 @@ "name": "targetResourceId", "value": [ - "resource-id" + "" + ] + }, + { + "name": "targetResourceIdOther", + "value": + [ + "" ] } ], @@ -162,6 +169,13 @@ [ "resource-id" ] + }, + { + "name": "targetResourceIdOther", + "value": + [ + "resource-idOther" + ] } ] ] @@ -227,13 +241,6 @@ [ "" ] - }, - { - "name": "targetResourceId", - "value": - [ - "resource-id" - ] } ], @@ -294,6 +301,13 @@ [ "resource-id" ] + }, + { + "name": "targetResourceIdOther", + "value": + [ + "resource-idOther" + ] } ] ] diff --git a/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml b/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml index fec0e1e6c..3d0252a00 100644 --- a/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml +++ b/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml @@ -31,7 +31,7 @@ policies: retry: 3 success: target: - resourceID: resource-id + resourceID: null type: VM timeout: 180 - actor: APPC diff --git a/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml b/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml index fec0e1e6c..3d0252a00 100644 --- a/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml +++ b/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml @@ -31,7 +31,7 @@ policies: retry: 3 success: target: - resourceID: resource-id + resourceID: null type: VM timeout: 180 - actor: APPC -- cgit 1.2.3-korg From 4e68a4d91db14f6495c3a255bd422b50ff99c841 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Fri, 18 May 2018 14:58:25 +0200 Subject: Help added to targetResourceId Combo box with Invariant Resource ID + Other possibility & empty string added to targetResourceId field in Operational policy UI Issue-ID: CLAMP-153 Change-Id: Ic01aebb4cb6cc2c640763f4fd09d01eb2b1d1663 Signed-off-by: Determe, Sebastien (sd378r) --- .../portfolios/PolicyWindow_properties.html | 38 +++++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html index 7dd2c4dd7..f63fb53a9 100644 --- a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html +++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html @@ -286,9 +286,13 @@ label {
- +
+ @@ -304,6 +308,14 @@ label {