aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/aai
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-08-15 16:34:02 -0400
committerJim Hahn <jrh3@att.com>2018-08-15 17:29:16 -0400
commita9b2b1d16797fefa4c7be8ba0bf01f0fdab22b7b (patch)
tree7861483dd73fe36776b6a1e2842294b51888ba7d /controlloop/common/model-impl/aai
parent7ee4720a0a6a7a5ea418ebea0eeff845d70170d6 (diff)
add prov-status check to AAI queries
Also had to add prov-status field to AaiGetVnfResponse class. Removed bogus comment from test. Verify response is not null in test. Verify no requery by vnf name in test. Add prov-status to template.demo tests. Add prov-status to sample json for archetype-cl's. Change-Id: I3f36a2bb6de8265ce5b10103690d6d8813c15b1a Issue-ID: POLICY-964 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/aai')
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java11
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java3
2 files changed, 14 insertions, 0 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
index 8db3a7619..b6c38477a 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
@@ -52,6 +52,9 @@ public class AaiGetVnfResponse extends AaiGetResponse implements Serializable {
@SerializedName("model-invariant-id")
private String modelInvariantId;
+ @SerializedName("prov-status")
+ private String provStatus;
+
@SerializedName("resource-version")
private String resourceVersion;
@@ -90,6 +93,10 @@ public class AaiGetVnfResponse extends AaiGetResponse implements Serializable {
return modelInvariantId;
}
+ public String getProvStatus() {
+ return provStatus;
+ }
+
public String getResourceVersion() {
return resourceVersion;
}
@@ -130,6 +137,10 @@ public class AaiGetVnfResponse extends AaiGetResponse implements Serializable {
this.modelInvariantId = modelInvariantId;
}
+ public void setProvStatus(String provStatus) {
+ this.provStatus = provStatus;
+ }
+
public void setResourceVersion(String resourceVersion) {
this.resourceVersion = resourceVersion;
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
index d56aaaece..26f3ca2dc 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
@@ -49,6 +49,7 @@ public class AaiGetVnfResponseTest {
assertEquals(false, resp.getInMaint());
assertEquals(true, resp.getIsClosedLoopDisabled());
assertEquals("53638a85-361a-437d-8830-4b0d5329225e", resp.getModelInvariantId());
+ assertEquals("PROV", resp.getProvStatus());
assertEquals("Active", resp.getOrchestrationStatus());
assertEquals("50e1b0be-e0c9-48e2-9f42-15279a783ee8", resp.getServiceId());
@@ -72,6 +73,7 @@ public class AaiGetVnfResponseTest {
resp.setIsClosedLoopDisabled(false);
resp.setModelInvariantId("modiv");
resp.setOrchestrationStatus("orch");
+ resp.setProvStatus("mystatus");
resp.setRelationshipList(relationshipList);
resp.setResourceVersion("vers");
resp.setServiceId("svc");
@@ -86,6 +88,7 @@ public class AaiGetVnfResponseTest {
assertEquals(true, resp.getInMaint());
assertEquals(false, resp.getIsClosedLoopDisabled());
assertEquals("modiv", resp.getModelInvariantId());
+ assertEquals("mystatus", resp.getProvStatus());
assertEquals("orch", resp.getOrchestrationStatus());
assertEquals("svc", resp.getServiceId());
assertEquals(relationshipList, resp.getRelationshipList());