aboutsummaryrefslogtreecommitdiffstats
path: root/policy-domains
diff options
context:
space:
mode:
Diffstat (limited to 'policy-domains')
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/artifact/NativeArtifactPolicy.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerPolicy.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSinkTopic.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerTopic.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicy.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalPolicy.java2
-rw-r--r--policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalProperties.java2
-rw-r--r--policy-domains/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyTest.java2
-rw-r--r--policy-domains/src/test/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicyTest.java2
-rw-r--r--policy-domains/src/test/java/org/onap/policy/drools/domain/models/operational/OperationalPolicyTest.java7
11 files changed, 19 insertions, 8 deletions
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/artifact/NativeArtifactPolicy.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/artifact/NativeArtifactPolicy.java
index 0f53b532..9fa8230d 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/artifact/NativeArtifactPolicy.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/artifact/NativeArtifactPolicy.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.artifact;
import java.io.Serializable;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
import org.onap.policy.drools.domain.models.DroolsPolicy;
@@ -31,6 +32,7 @@ import org.onap.policy.drools.domain.models.DroolsPolicy;
@Data
@SuperBuilder
+@EqualsAndHashCode(callSuper = true)
public class NativeArtifactPolicy extends DroolsPolicy implements Serializable {
private static final long serialVersionUID = -8171337852833516581L;
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerPolicy.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerPolicy.java
index 09236c84..92372765 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerPolicy.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerPolicy.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.controller;
import java.io.Serializable;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
import org.onap.policy.drools.domain.models.DroolsPolicy;
@@ -31,6 +32,7 @@ import org.onap.policy.drools.domain.models.DroolsPolicy;
@Data
@SuperBuilder
+@EqualsAndHashCode(callSuper = true)
public class ControllerPolicy extends DroolsPolicy implements Serializable {
private static final long serialVersionUID = -8171337852833516581L;
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSinkTopic.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSinkTopic.java
index 87af6c36..c4772f3b 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSinkTopic.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSinkTopic.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.controller;
import java.io.Serializable;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
@@ -31,6 +32,7 @@ import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
+@EqualsAndHashCode(callSuper = true)
public class ControllerSinkTopic extends ControllerTopic implements Serializable {
private static final long serialVersionUID = 8770353732981476267L;
}
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java
index e41f4dc3..97a21e6c 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.controller;
import java.io.Serializable;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
@@ -31,6 +32,7 @@ import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
+@EqualsAndHashCode(callSuper = true)
public class ControllerSourceTopic extends ControllerTopic implements Serializable {
private static final long serialVersionUID = -1732598566914643612L;
}
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerTopic.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerTopic.java
index 2954350d..fd78da76 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerTopic.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerTopic.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.controller;
import java.util.List;
import lombok.Data;
+import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@@ -31,6 +32,7 @@ import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
+@NoArgsConstructor
public abstract class ControllerTopic {
protected String topicName;
protected List<ControllerEvent> events;
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicy.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicy.java
index f4fcb702..d18300d1 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicy.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicy.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.legacy;
import java.io.Serializable;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
import org.onap.policy.drools.domain.models.DroolsPolicy;
@@ -32,6 +33,7 @@ import org.onap.policy.drools.domain.models.DroolsPolicy;
@Data
@SuperBuilder
+@EqualsAndHashCode(callSuper = true)
public class LegacyPolicy extends DroolsPolicy implements Serializable {
private static final long serialVersionUID = 4100092564657497713L;
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalPolicy.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalPolicy.java
index d158608b..433dc3e1 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalPolicy.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalPolicy.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.domain.models.operational;
import java.io.Serializable;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
import org.onap.policy.drools.domain.models.DroolsPolicy;
@@ -32,6 +33,7 @@ import org.onap.policy.drools.domain.models.DroolsPolicy;
@Data
@SuperBuilder
+@EqualsAndHashCode(callSuper = true)
public class OperationalPolicy extends DroolsPolicy implements Serializable {
private static final long serialVersionUID = 4100092564657497713L;
diff --git a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalProperties.java b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalProperties.java
index 993ba024..f41d5c0f 100644
--- a/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalProperties.java
+++ b/policy-domains/src/main/java/org/onap/policy/drools/domain/models/operational/OperationalProperties.java
@@ -44,11 +44,13 @@ public class OperationalProperties implements Serializable {
/**
* Timeout in seconds.
*/
+ @Builder.Default
private int timeout = 30;
/**
* Abatement.
*/
+ @Builder.Default
private boolean abatement = false;
/**
diff --git a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyTest.java b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyTest.java
index c6e8990e..98ddd4c8 100644
--- a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyTest.java
+++ b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyTest.java
@@ -32,6 +32,7 @@ import com.openpojo.validation.test.impl.SetterTester;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.junit.Test;
@@ -41,6 +42,7 @@ public class DroolsPolicyTest {
@Data
@SuperBuilder
@NoArgsConstructor
+ @EqualsAndHashCode(callSuper = true)
public static class DerivedDomainPolicy extends DroolsPolicy implements Serializable {
private static final long serialVersionUID = -1027974819756498893L;
}
diff --git a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicyTest.java b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicyTest.java
index 7eb2532f..13e91cc0 100644
--- a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicyTest.java
+++ b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/legacy/LegacyPolicyTest.java
@@ -38,7 +38,7 @@ public class LegacyPolicyTest {
private static final String OPERATIONAL_LEGACY_POLICY_TYPE = "onap.policies.controlloop.Operational";
// Operational vCPE Legacy Policy
- private static final String OP_POLICY_NAME_VCPE = "operational.restart";
+ public static final String OP_POLICY_NAME_VCPE = "operational.restart";
public static final String VCPE_OPERATIONAL_LEGACY_POLICY_JSON = "src/test/resources/tosca-legacy-vcpe.json";
@Test
diff --git a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/operational/OperationalPolicyTest.java b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/operational/OperationalPolicyTest.java
index bf50a3df..8f37b47c 100644
--- a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/operational/OperationalPolicyTest.java
+++ b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/operational/OperationalPolicyTest.java
@@ -23,9 +23,6 @@ package org.onap.policy.drools.domain.models.operational;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
@@ -102,10 +99,6 @@ public class OperationalPolicyTest {
assertNotNull(policy);
}
- private String getJsonFromFile(String filePath) throws IOException {
- return Files.readString(Paths.get(filePath));
- }
-
private String getJsonFromResource(String resourcePath) {
return ResourceUtils.getResourceAsString(resourcePath);
}