diff options
author | 2020-09-23 20:47:43 +0000 | |
---|---|---|
committer | 2020-09-23 20:47:43 +0000 | |
commit | a550707a39f0947a904018a3de8523bff9ead59c (patch) | |
tree | bd89c4de7ce537f06d145a5a4afcadb31a6369b4 /mod/bpgenerator/src/main/java/org | |
parent | 834f5db267860396e3fd3ed1529abf37bd299b4c (diff) | |
parent | 9daf8aa8049a347f1f8010071df73c663e4c3bbd (diff) |
Merge "Restore test assertions. Update default plugin imports. Fix sonar issues in bpgenerator models/componentspec package."
Diffstat (limited to 'mod/bpgenerator/src/main/java/org')
22 files changed, 216 insertions, 118 deletions
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java index 5d4131b..f9fa2cb 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java @@ -18,18 +18,32 @@ */ - package org.onap.blueprintgenerator.core; - - - +import java.util.ArrayList; +import java.util.TreeMap; import lombok.Getter; import lombok.Setter; +import org.onap.blueprintgenerator.models.componentspec.Artifacts; +import org.onap.blueprintgenerator.models.componentspec.Auxilary; +import org.onap.blueprintgenerator.models.componentspec.CallsObj; +import org.onap.blueprintgenerator.models.componentspec.ComponentSpec; +import org.onap.blueprintgenerator.models.componentspec.Container; +import org.onap.blueprintgenerator.models.componentspec.HealthCheck; +import org.onap.blueprintgenerator.models.componentspec.Host; +import org.onap.blueprintgenerator.models.componentspec.Parameters; +import org.onap.blueprintgenerator.models.componentspec.Policy; +import org.onap.blueprintgenerator.models.componentspec.ProvidesObj; +import org.onap.blueprintgenerator.models.componentspec.Publishes; +import org.onap.blueprintgenerator.models.componentspec.Self; +import org.onap.blueprintgenerator.models.componentspec.Services; +import org.onap.blueprintgenerator.models.componentspec.Streams; +import org.onap.blueprintgenerator.models.componentspec.Subscribes; +import org.onap.blueprintgenerator.models.componentspec.Volumes; @Getter @Setter public class TestComponentSpec { - private String cs = "{\r\n" + + private String componentSpecAsString = "{\r\n" + " \"self\": {\r\n" + " \"component_type\": \"docker\",\r\n" + " \"description\": \"Test component spec\",\r\n" + @@ -129,4 +143,128 @@ public class TestComponentSpec { " }] \r\n" + "\r\n" + "}"; + private ComponentSpec componentSpec; + + public TestComponentSpec() { + this.componentSpec = createComponentSpec(); + } + + private ComponentSpec createComponentSpec(){ + //Manually fill a component spec object with the values from the file itself + ComponentSpec manualSpec = new ComponentSpec(); + + Self self = new Self(); + self.setComponent_type("docker"); + self.setDescription("Test component spec"); + self.setName("test.component.spec"); + self.setVersion("1.0.1"); + manualSpec.setSelf(self); + + Services services = new Services(); + CallsObj[] calls = new CallsObj[0]; + ProvidesObj[] provides = new ProvidesObj[0]; + services.setCalls(calls); + services.setProvides(provides); + manualSpec.setServices(null); + + Streams streams = new Streams(); + Publishes[] publishes = new Publishes[2]; + Publishes pub1 = new Publishes(); + pub1.setConfig_key("TEST-PUB-DR"); + pub1.setFormat("dataformat_Hello_World_PM"); + pub1.setType("data_router"); + pub1.setVersion("1.0.0"); + + Publishes pub2 = new Publishes(); + pub2.setConfig_key("TEST-PUB-MR"); + pub2.setFormat("dataformat_Hello_World_PM"); + pub2.setType("message_router"); + pub2.setVersion("1.0.0"); + publishes[0] = pub1; + publishes[1] = pub2; + streams.setPublishes(publishes); + + Subscribes[] subscribes = new Subscribes[2]; + Subscribes sub1 = new Subscribes(); + sub1.setConfig_key("TEST-SUB-MR"); + sub1.setFormat("dataformat_Hello_World_PM"); + sub1.setRoute("/TEST_HELLO_WORLD_SUB_MR"); + sub1.setType("message_router"); + sub1.setVersion("1.0.0"); + + Subscribes sub2 = new Subscribes(); + sub2.setConfig_key("TEST-SUB-DR"); + sub2.setFormat("dataformat_Hello_World_PM"); + sub2.setRoute("/TEST-HELLO-WORLD-SUB-DR"); + sub2.setType("data_router"); + sub2.setVersion("1.0.0"); + subscribes[0] = sub1; + subscribes[1] = sub2; + streams.setSubscribes(subscribes); + + manualSpec.setStreams(streams); + + Parameters[] parameters = new Parameters[1]; + Parameters par1 = new Parameters(); + par1.setName("testParam1"); + par1.setValue("test-param-1"); + par1.setDescription("test parameter 1"); + par1.setSourced_at_deployment(true); + par1.setDesigner_editable(true); + par1.setPolicy_editable(true); + par1.setPolicy_group("Test_Parameters"); + par1.setRequired(true); + par1.setType("string"); + parameters[0] = par1; + + manualSpec.setParameters(parameters); + + Auxilary auxilary = new Auxilary(); + HealthCheck healthcheck = new HealthCheck(); + healthcheck.setInterval("300s"); + healthcheck.setTimeout("120s"); + healthcheck.setScript("/etc/init.d/nagios status"); + healthcheck.setType("docker"); + auxilary.setHealthcheck(healthcheck); + + Volumes[] volumes = new Volumes[1]; + Volumes vol1 = new Volumes(); + Container con1 = new Container(); + con1.setBind("/opt/app/manager/config/hostname"); + Host host1 = new Host(); + host1.setPath("/etc/hostname"); + host1.setMode("ro"); + vol1.setContainer(con1); + vol1.setHost(host1); + + volumes[0] = vol1; + + auxilary.setVolumes(volumes); + + ArrayList<Object> ports = new ArrayList(); + ports.add("80:80"); + + TreeMap<String, String> dataBases = new TreeMap<>(); + dataBases.put("TestDB1", "PGaaS"); + dataBases.put("TestDB2", "PGaaS"); + auxilary.setDatabases(dataBases); + + Policy pol = new Policy(); + pol.setTrigger_type("docker"); + pol.setScript_path("/opt/app/manager/bin/reconfigure.sh"); + auxilary.setPolicy(pol); + + auxilary.setPorts(ports); + + manualSpec.setAuxilary(auxilary); + + Artifacts[] artifacts = new Artifacts[1]; + Artifacts art = new Artifacts(); + art.setType("docker image"); + art.setUri("test.tester"); + + artifacts[0] = art; + manualSpec.setArtifacts(artifacts); + return manualSpec; + } } diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java index 139790a..4e7a4f1 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java @@ -41,21 +41,21 @@ public class Imports { private ArrayList<String> imports; public static ArrayList<String> createOnapImports() { - ArrayList<String> imps = new ArrayList<String>(); - imps.add("http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"); - imps.add("https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml"); - imps.add("https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml"); + ArrayList<String> imps = new ArrayList<>(); + imps.add("https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml"); + imps.add("plugin:k8splugin?version=3.4.2"); + imps.add("plugin:dcaepolicyplugin?version=2.4.0"); return imps; } public static ArrayList<String> createDmaapImports(){ - ArrayList<String> imps = new ArrayList<String>(); - imps.add("http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"); - imps.add("https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.6.0/k8splugin_types.yaml"); - imps.add("https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml"); + ArrayList<String> imps = new ArrayList<>(); + imps.add("https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml"); + imps.add("plugin:k8splugin?version=3.4.2"); + imps.add("plugin:dmaap?version=1.5.0"); return imps; } public static ArrayList<String> createImportsFromFile(String path) { - Imports imports = new Imports(); + Imports imports; ObjectMapper importMapper = new ObjectMapper(new YAMLFactory().configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true)); File importPath = new File(path); try { @@ -63,10 +63,6 @@ public class Imports { } catch (IOException e) { throw new RuntimeException(e); } - ArrayList<String> imps = new ArrayList<String>(); - for(String s: imports.getImports()) { - imps.add(s); - } - return imps; + return imports.getImports(); } } diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java index f7f5a03..198dc19 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java @@ -21,13 +21,11 @@ package org.onap.blueprintgenerator.models.componentspec; - import com.fasterxml.jackson.annotation.JsonInclude; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -53,6 +51,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(JsonInclude.Include.NON_NULL) +@EqualsAndHashCode //Called in Component Spec Object public class Artifacts { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java index a36deb5..58e1e0c 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java @@ -22,19 +22,15 @@ package org.onap.blueprintgenerator.models.componentspec; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.TreeMap; - -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import java.util.ArrayList; +import java.util.TreeMap; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -64,6 +60,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode //Called in component Spec Object public class Auxilary { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java index 0b7dcee..d130632 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java @@ -24,11 +24,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; -import lombok.NoArgsConstructor; - // TODO: Auto-generated Javadoc /** diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java index 3615605..785df35 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java @@ -20,18 +20,10 @@ package org.onap.blueprintgenerator.models.componentspec; -import java.util.HashMap; - - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; -import lombok.NoArgsConstructor; - // TODO: Auto-generated Javadoc /** * The Class ConstraintsObj. diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java index d94e2bb..cbe02dc 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java @@ -22,11 +22,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -50,6 +49,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode public class Container { /** The bind. */ diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java index 45f9091..ef33aaf 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java @@ -24,11 +24,9 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /** diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java index acc9379..76e1036 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java @@ -23,11 +23,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -53,6 +52,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode //Called in Auxillary Object public class HealthCheck { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java index 91734ad..f178c94 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java @@ -22,11 +22,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -46,6 +45,7 @@ import lombok.NoArgsConstructor; * @param mode the mode */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode public class Host{ /** The path. */ diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java index 515ecc7..eb95202 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java @@ -20,17 +20,13 @@ package org.onap.blueprintgenerator.models.componentspec; -import java.util.ArrayList; - - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /** @@ -68,6 +64,7 @@ import lombok.NoArgsConstructor; * @param constraints the constraints */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode //Called in component Spec Object public class Parameters { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java index 3cc14fe..d295ca4 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java @@ -23,11 +23,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -51,6 +50,7 @@ import lombok.NoArgsConstructor; * @param script_path the script path */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode //called in auxilary public class Policy { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java index 7af16d6..aa38271 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java @@ -24,11 +24,9 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /** diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java index ad9c87d..9ad24c3 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java @@ -21,11 +21,9 @@ package org.onap.blueprintgenerator.models.componentspec; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java index 3ee47b9..4f46313 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java @@ -23,11 +23,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -54,6 +53,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(value=Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode //Called in Streams Object public class Publishes { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java index 6c389d6..6d78805 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java @@ -23,11 +23,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -50,7 +49,7 @@ import lombok.NoArgsConstructor; * @param policy the policy */ @JsonInclude(value=Include.NON_NULL) - +@EqualsAndHashCode public class ReconfigsObj { /** The dti. */ diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java index 2aaf60b..7ca1830 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java @@ -25,11 +25,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; -import lombok.NoArgsConstructor; - // TODO: Auto-generated Javadoc /** diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java index a566661..8b5f35e 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java @@ -20,16 +20,13 @@ package org.onap.blueprintgenerator.models.componentspec; -import java.util.Map; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -55,6 +52,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(value=Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode //called in Component Spec object public class Self { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java index afe0904..772d859 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java @@ -24,11 +24,9 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java index 1b7dcd3..500f32d 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java @@ -24,11 +24,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -52,6 +51,7 @@ import lombok.NoArgsConstructor; */ @JsonInclude(value=Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode //Called in Component Spec Object public class Streams { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java index 14485a0..ec4aa41 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java @@ -23,11 +23,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -57,6 +56,7 @@ import lombok.NoArgsConstructor; @JsonInclude(value=Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode //Called in Streams Object public class Subscribes { diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java index 1034242..777bdeb 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java @@ -23,11 +23,10 @@ package org.onap.blueprintgenerator.models.componentspec; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import lombok.Setter; +import lombok.EqualsAndHashCode; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; // TODO: Auto-generated Javadoc /* (non-Javadoc) @@ -50,6 +49,7 @@ import lombok.NoArgsConstructor; * @param host the host */ @JsonInclude(value=Include.NON_NULL) +@EqualsAndHashCode //Called in Auxillary Object public class Volumes { @@ -58,4 +58,4 @@ public class Volumes { /** The host. */ private Host host; -}
\ No newline at end of file +} |