summaryrefslogtreecommitdiffstats
path: root/controlloop/common/simulators
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-12-11 04:21:33 +0000
committerGerrit Code Review <gerrit@onap.org>2017-12-11 04:21:33 +0000
commit5cfd3b7066e6a6305e140fa59b1fccb8e3c5f81b (patch)
treefff192566312a14dab3331f55b396f2615dec815 /controlloop/common/simulators
parent379e02e7e500b4c022771e5a1f4bdd1566069a9b (diff)
parentc3619a82215b2277087f73741d57d3a3b75325f6 (diff)
Merge "Technical Debt in AAI."
Diffstat (limited to 'controlloop/common/simulators')
-rw-r--r--controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java6
-rw-r--r--controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java8
2 files changed, 7 insertions, 7 deletions
diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
index 8c13db079..2f511f4bc 100644
--- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
+++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java
@@ -52,9 +52,9 @@ public class AaiSimulatorJaxRs {
{
AAINQRequest request = Serialization.gsonPretty.fromJson(req, AAINQRequest.class);
- if (request.instanceFilters.instanceFilter.get(0).containsKey("vserver"))
+ if (request.instanceFilters.getInstanceFilter().get(0).containsKey("vserver"))
{
- String vserverName = request.instanceFilters.instanceFilter.get(0).get("vserver").get("vserver-name");
+ String vserverName = request.instanceFilters.getInstanceFilter().get(0).get("vserver").get("vserver-name");
if ("error".equals(vserverName)) {
return "{\"requestError\":{\"serviceException\":{\"messageId\":\"SVC3001\",\"text\":\"Resource not found for %1 using id %2 (msg=%3) (ec=%4)\",\"variables\":[\"POST Search\",\"getNamedQueryResponse\",\"Node Not Found:No Node of type vserver found for properties\",\"ERR.5.4.6114\"]}}}";
}
@@ -66,7 +66,7 @@ public class AaiSimulatorJaxRs {
}
else
{
- String vnfID = request.instanceFilters.instanceFilter.get(0).get("generic-vnf").get("vnf-id");
+ String vnfID = request.instanceFilters.getInstanceFilter().get(0).get("generic-vnf").get("vnf-id");
if ("error".equals(vnfID)) {
return "{\"requestError\":{\"serviceException\":{\"messageId\":\"SVC3001\",\"text\":\"Resource not found for %1 using id %2 (msg=%3) (ec=%4)\",\"variables\":[\"POST Search\",\"getNamedQueryResponse\",\"Node Not Found:No Node of type generic-vnf found for properties\",\"ERR.5.4.6114\"]}}}";
}
diff --git a/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java b/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java
index 121a889f7..66c65ff82 100644
--- a/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java
+++ b/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java
@@ -84,13 +84,13 @@ public class AaiSimulatorTest {
List<Map<String, Map<String, String>>> tempInstanceFilter = new LinkedList<>();
tempInstanceFilter.add(tempOuterMap);
AAINQInstanceFilters tempInstanceFilters = new AAINQInstanceFilters();
- tempInstanceFilters.instanceFilter = tempInstanceFilter;
+ tempInstanceFilters.setInstanceFilter(tempInstanceFilter);
request.instanceFilters = tempInstanceFilters;
AAINQResponse response = AAIManager.postQuery("http://localhost:6666", "testUser", "testPass",
request, UUID.randomUUID());
assertNotNull(response);
- assertNotNull(response.inventoryResponseItems);
+ assertNotNull(response.getInventoryResponseItems());
tempNamedQuery.namedQueryUUID = UUID.fromString("a93ac487-409c-4e8c-9e5f-334ae8f99087");
tempQueryParameters.namedQuery = tempNamedQuery;
@@ -102,12 +102,12 @@ public class AaiSimulatorTest {
tempInstanceFilter = new LinkedList<>();
tempInstanceFilter.add(tempOuterMap);
tempInstanceFilters = new AAINQInstanceFilters();
- tempInstanceFilters.instanceFilter = tempInstanceFilter;
+ tempInstanceFilters.setInstanceFilter(tempInstanceFilter);
request.instanceFilters = tempInstanceFilters;
response = AAIManager.postQuery("http://localhost:6666", "testUser", "testPass", request,
UUID.randomUUID());
assertNotNull(response);
- assertNotNull(response.inventoryResponseItems);
+ assertNotNull(response.getInventoryResponseItems());
}
}