diff options
author | Rokhvarg David <dr2032@att.com> | 2018-03-11 14:23:17 +0200 |
---|---|---|
committer | Rokhvarg David <dr2032@att.com> | 2018-03-11 16:10:23 +0200 |
commit | 435ce5399f3393ec1b7ddcaaa42a52aaedcb1e3d (patch) | |
tree | 0f4f9e34086b76d6d1c174b8fb358630faae87ad /src/main/java | |
parent | a492ff29a0ff1a69991dd2a101c0e06168d43c85 (diff) |
vLAN Tagging - Support Tosca Policies
Change-Id: I3086a3562dd4fa16f0a446884fbbd20041eb9691
Issue-ID: SDC-1056
Signed-off-by: Rokhvarg David <dr2032@att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/sdc/toscaparser/api/Policy.java | 6 | ||||
-rw-r--r-- | src/main/java/org/onap/sdc/toscaparser/api/ToscaTemplate.java | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/onap/sdc/toscaparser/api/Policy.java b/src/main/java/org/onap/sdc/toscaparser/api/Policy.java index f7ec967..437563e 100644 --- a/src/main/java/org/onap/sdc/toscaparser/api/Policy.java +++ b/src/main/java/org/onap/sdc/toscaparser/api/Policy.java @@ -119,6 +119,12 @@ public class Policy extends EntityTemplate { ", properties=" + properties + '}'; } + + public int compareTo(Policy other){ + if(this.equals(other)) + return 0; + return this.getName().compareTo(other.getName()) == 0 ? this.getType().compareTo(other.getType()) : this.getName().compareTo(other.getName()); + } } /*python diff --git a/src/main/java/org/onap/sdc/toscaparser/api/ToscaTemplate.java b/src/main/java/org/onap/sdc/toscaparser/api/ToscaTemplate.java index 3d94d6e..b06c045 100644 --- a/src/main/java/org/onap/sdc/toscaparser/api/ToscaTemplate.java +++ b/src/main/java/org/onap/sdc/toscaparser/api/ToscaTemplate.java @@ -836,6 +836,10 @@ public class ToscaTemplate extends Object { return nestedToscaTemplatesWithTopology; } + public ConcurrentHashMap<String, Object> getNestedTopologyTemplates() { + return nestedToscaTplsWithTopology; + } + @Override public String toString() { return "ToscaTemplate{" + |