summaryrefslogtreecommitdiffstats
path: root/local-setup/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'local-setup/src/test')
-rw-r--r--local-setup/src/test/java/onap/aai/AaiResourcesIT.java98
-rw-r--r--local-setup/src/test/java/onap/aai/AaiTraversalIT.java127
-rw-r--r--local-setup/src/test/resources/add_customer.xml18
-rw-r--r--local-setup/src/test/resources/add_generic_vnf.xml38
-rw-r--r--local-setup/src/test/resources/complex_data.json18
-rw-r--r--local-setup/src/test/resources/create_query.json184
-rw-r--r--local-setup/src/test/resources/example_model.json13
-rw-r--r--local-setup/src/test/resources/execute_query.json22
-rw-r--r--local-setup/src/test/resources/models.csv91
-rw-r--r--local-setup/src/test/resources/query_response.json48
10 files changed, 657 insertions, 0 deletions
diff --git a/local-setup/src/test/java/onap/aai/AaiResourcesIT.java b/local-setup/src/test/java/onap/aai/AaiResourcesIT.java
new file mode 100644
index 0000000..7d8055f
--- /dev/null
+++ b/local-setup/src/test/java/onap/aai/AaiResourcesIT.java
@@ -0,0 +1,98 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2018-2019 Nokia Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package onap.aai;
+
+import static java.net.HttpURLConnection.HTTP_CREATED;
+import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
+import static java.net.HttpURLConnection.HTTP_NO_CONTENT;
+import static java.net.HttpURLConnection.HTTP_OK;
+import static onap.aai.util.AaiRequest.v14;
+import static onap.aai.util.Resources.inputStreamFrom;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.github.kevinsawicki.http.HttpRequest;
+import com.jayway.jsonpath.JsonPath;
+import onap.aai.util.AaiRequest;
+import org.junit.After;
+import org.junit.Test;
+
+public class AaiResourcesIT {
+
+ private String id;
+
+ @After
+ public void tearDown() {
+ if (id != null && !id.isEmpty()) {
+ AaiRequest.delete(v14("/cloud-infrastructure/complexes/complex/clli2?resource-version=" + id));
+ }
+ }
+
+ @Test
+ public void aai_resources_docker_test() {
+ System.out.println("Get complexes...");
+ assert_getComplexes_returns_notFound();
+
+ System.out.println("Adding complex...");
+ assert_putComplex_returns_created();
+
+ System.out.println("Get complexes...");
+ id = assert_getComplexes_returns_complex();
+
+ System.out.println("Remove complex...");
+ assert_deleteComplex_returns_noContent(id);
+
+ System.out.println("Get complex...");
+ assert_getComplexes_returns_notFound();
+ }
+
+ private void assert_getComplexes_returns_notFound() {
+ HttpRequest request = AaiRequest.get(v14("/cloud-infrastructure/complexes"));
+
+ assertThat(request.code()).isEqualTo(HTTP_NOT_FOUND);
+ assertThat(request.body()).contains("requestError");
+ }
+
+ private void assert_putComplex_returns_created() {
+ HttpRequest request = AaiRequest
+ .put(v14("/cloud-infrastructure/complexes/complex/clli2"))
+ .send(inputStreamFrom("complex_data.json"));
+
+ assertThat(request.code()).isEqualTo(HTTP_CREATED);
+ }
+
+ private String assert_getComplexes_returns_complex() {
+ HttpRequest request = AaiRequest.get(v14("/cloud-infrastructure/complexes"))
+ .acceptJson();
+
+ assertThat(request.code()).isEqualTo(HTTP_OK);
+ String body = request.body();
+
+ assertThat(body).contains("clli2").contains("resource-version");
+
+ return JsonPath.read(body, "$.complex.[0].resource-version");
+ }
+
+ private void assert_deleteComplex_returns_noContent(String id) {
+ HttpRequest request = AaiRequest
+ .delete(v14("/cloud-infrastructure/complexes/complex/clli2?resource-version=" + id));
+
+ assertThat(request.code()).isEqualTo(HTTP_NO_CONTENT);
+ }
+} \ No newline at end of file
diff --git a/local-setup/src/test/java/onap/aai/AaiTraversalIT.java b/local-setup/src/test/java/onap/aai/AaiTraversalIT.java
new file mode 100644
index 0000000..8fdb74a
--- /dev/null
+++ b/local-setup/src/test/java/onap/aai/AaiTraversalIT.java
@@ -0,0 +1,127 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2018-2019 Nokia Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package onap.aai;
+
+import static com.fasterxml.jackson.databind.PropertyNamingStrategy.KEBAB_CASE;
+import static java.net.HttpURLConnection.HTTP_CREATED;
+import static java.net.HttpURLConnection.HTTP_OK;
+import static onap.aai.util.AaiRequest.v14;
+import static onap.aai.util.Resources.inputStreamFrom;
+import static onap.aai.util.Resources.rawTextFrom;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.kevinsawicki.http.HttpRequest;
+import java.io.UncheckedIOException;
+import onap.aai.dto.Model;
+import onap.aai.dto.ModelGenerator;
+import onap.aai.util.AaiRequest;
+import org.json.JSONException;
+import org.junit.Before;
+import org.junit.Test;
+import org.skyscreamer.jsonassert.JSONAssert;
+import org.skyscreamer.jsonassert.JSONCompareMode;
+
+public class AaiTraversalIT {
+
+ private static final String APPLICATION_XML = "application/xml";
+
+ private final ObjectMapper objectMapper = new ObjectMapper().setPropertyNamingStrategy(KEBAB_CASE);
+
+ @Before
+ public void prepare_aai_resources() throws Exception {
+ Model model = new Model("action", "123", "456");
+ assertThat(objectMapper.writeValueAsString(model))
+ .isEqualToIgnoringWhitespace(rawTextFrom("example_model.json"));
+
+ System.out.println("Adding models...");
+ assert_putModels_succeed();
+
+ System.out.println("Adding query...");
+ assert_putQuery_returns_created();
+
+ System.out.println("Adding customer...");
+ assert_putCustomer_returns_created();
+
+ System.out.println("Adding VNF...");
+ assert_putVnf_returns_created();
+ }
+
+ @Test
+ public void aai_traversal_docker_test() throws Exception {
+ assert_postQuery_returns_inventory();
+ }
+
+ private void assert_putModels_succeed() {
+ ModelGenerator
+ .generate("models.csv")
+ .forEach(this::assert_putModel_returns_created);
+ }
+
+ private void assert_putModel_returns_created(Model model) {
+ HttpRequest request;
+ try {
+ request = AaiRequest
+ .put(v14("/service-design-and-creation/models/model/" + model.getModelInvariantId()))
+ .send(objectMapper.writeValueAsString(model));
+ } catch (JsonProcessingException e) {
+ throw new UncheckedIOException(e);
+ }
+
+ assertThat(request.code()).isEqualTo(HTTP_CREATED);
+ }
+
+ private void assert_putQuery_returns_created() {
+ HttpRequest request = AaiRequest
+ .put(v14("/service-design-and-creation/named-queries/named-query/0367193e-c785-4d5f-9cb8-7bc89dc9ddb7"))
+ .send(inputStreamFrom("create_query.json"));
+
+ assertThat(request.code()).isEqualTo(HTTP_CREATED);
+ }
+
+ private void assert_putCustomer_returns_created() {
+ HttpRequest request = AaiRequest
+ .put(v14("/business/customers/customer/aai_demo_for_onap_community"))
+ .contentType(APPLICATION_XML)
+ .send(inputStreamFrom("add_customer.xml"));
+
+ assertThat(request.code()).isEqualTo(HTTP_CREATED);
+ }
+
+ private void assert_putVnf_returns_created() {
+ HttpRequest request = AaiRequest
+ .put(v14("/network/generic-vnfs/generic-vnf/de7cc3ab-0212-47df-9e64-da1c79234deb"))
+ .contentType(APPLICATION_XML)
+ .send(inputStreamFrom("add_generic_vnf.xml"));
+
+ assertThat(request.code()).isEqualTo(HTTP_CREATED);
+ }
+
+ private void assert_postQuery_returns_inventory() throws JSONException {
+ HttpRequest request = AaiRequest
+ .post("/search/named-query")
+ .contentType(HttpRequest.CONTENT_TYPE_JSON)
+ .send(inputStreamFrom("execute_query.json"));
+
+ assertThat(request.code()).isEqualTo(HTTP_OK);
+ JSONAssert.assertEquals(rawTextFrom("query_response.json"), request.body(), JSONCompareMode.LENIENT);
+ }
+} \ No newline at end of file
diff --git a/local-setup/src/test/resources/add_customer.xml b/local-setup/src/test/resources/add_customer.xml
new file mode 100644
index 0000000..402c063
--- /dev/null
+++ b/local-setup/src/test/resources/add_customer.xml
@@ -0,0 +1,18 @@
+<customer xmlns="http://org.onap.aai.inventory/v14">
+ <global-customer-id>aai_demo_for_onap_community</global-customer-id>
+ <subscriber-name>AAI Demo for ONAP Community</subscriber-name>
+ <service-subscriptions>
+ <service-subscription>
+ <service-type>vDNS</service-type>
+ <service-instances>
+ <service-instance>
+ <service-instance-id>37b8cdb7-94eb-468f-a0c2-4e3c3546578e</service-instance-id>
+ <service-instance-name>Demo Service Instance</service-instance-name>
+ <model-invariant-id>82194af1-3c2c-485a-8f44-420e22a9eaa4</model-invariant-id>
+ <model-version-id>46b92144-923a-4d20-b85a-3cbd847668a9</model-version-id>
+ <orchestration-status>Active</orchestration-status>
+ </service-instance>
+ </service-instances>
+ </service-subscription>
+ </service-subscriptions>
+</customer> \ No newline at end of file
diff --git a/local-setup/src/test/resources/add_generic_vnf.xml b/local-setup/src/test/resources/add_generic_vnf.xml
new file mode 100644
index 0000000..ca3e168
--- /dev/null
+++ b/local-setup/src/test/resources/add_generic_vnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.onap.aai.inventory/v14">
+ <vnf-id>de7cc3ab-0212-47df-9e64-da1c79234deb</vnf-id>
+ <vnf-name>ZRDM2MMEX39</vnf-name>
+ <vnf-type>vMME Svc Jul 14/vMME VF Jul 14 1</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <model-invariant-id>82194af1-3c2c-485a-8f44-420e22a9eaa4</model-invariant-id>
+ <model-version-id>46b92144-923a-4d20-b85a-3cbd847668a9</model-version-id>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>aai_demo_for_onap_community</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>vDNS</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>37b8cdb7-94eb-468f-a0c2-4e3c3546578e</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>ef71d47a-53e8-40f4-a5ed-7d2cac1b20f1</vf-module-id>
+ <vf-module-name>ZRDM2MMEX39_base</vf-module-name>
+ <orchestration-status>pending-create</orchestration-status>
+ <is-base-vf-module>true</is-base-vf-module>
+ <model-invariant-id>82194af1-3c2c-485a-8f44-420e22a9eaa4</model-invariant-id>
+ <model-version-id>46b92144-923a-4d20-b85a-3cbd847668a9</model-version-id>
+ </vf-module>
+ </vf-modules>
+</generic-vnf> \ No newline at end of file
diff --git a/local-setup/src/test/resources/complex_data.json b/local-setup/src/test/resources/complex_data.json
new file mode 100644
index 0000000..baf2e3b
--- /dev/null
+++ b/local-setup/src/test/resources/complex_data.json
@@ -0,0 +1,18 @@
+{
+ "physical-location-id": "clli2",
+ "data-center-code": "example-data-center-code-val-6667",
+ "complex-name": "clli2",
+ "identity-url": "example-identity-url-val-28399",
+ "physical-location-type": "example-physical-location-type-val-28399",
+ "street1": "example-street1-val-28399",
+ "street2": "example-street2-val-28399",
+ "city": "example-city-val-28399",
+ "state": "example-state-val-28399",
+ "postal-code": "example-postal-code-val-28399",
+ "country": "example-country-val-28399",
+ "region": "example-region-val-28399",
+ "latitude": "1111",
+ "longitude": "2222",
+ "elevation": "example-elevation-val-28399",
+ "lata": "example-lata-val-28399"
+} \ No newline at end of file
diff --git a/local-setup/src/test/resources/create_query.json b/local-setup/src/test/resources/create_query.json
new file mode 100644
index 0000000..838b802
--- /dev/null
+++ b/local-setup/src/test/resources/create_query.json
@@ -0,0 +1,184 @@
+{
+ "named-query-uuid": "0367193e-c785-4d5f-9cb8-7bc89dc9ddb7",
+ "named-query-name": "get-component-list",
+ "named-query-version": "1.1",
+ "description": "Named Query - Get Component List",
+ "named-query-elements": {
+ "named-query-element": [
+ {
+ "property-collect-list": [
+ "service-instance-id",
+ "service-instance-name"
+ ],
+ "named-query-elements": {
+ "named-query-element": [
+ {
+ "named-query-elements": {
+ "named-query-element": [
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "1b2c9ba7-e449-4831-ba15-3073672f5ef2"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "3d560d81-57d0-438b-a2a1-5334dba0651a"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "named-query-elements": {
+ "named-query-element": [
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "fcec1b02-b2d0-4834-aef8-d71be04717dd"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "named-query-elements": {
+ "named-query-element": [
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "ff69d4e0-a8e8-4108-bdb0-dd63217e63c7"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "fcec1b02-b2d0-4834-aef8-d71be04717dd"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "named-query-elements": {
+ "named-query-element": [
+ {
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "1b2c9ba7-e449-4831-ba15-3073672f5ef2"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "3d560d81-57d0-438b-a2a1-5334dba0651a"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "ef86f9c5-2165-44f3-8fc3-96018b609ea5"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "acc6edd8-a8d4-4b93-afaa-0994068be14c"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "model",
+ "relationship-data": [
+ {
+ "relationship-key": "model.model-invariant-id",
+ "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/local-setup/src/test/resources/example_model.json b/local-setup/src/test/resources/example_model.json
new file mode 100644
index 0000000..b0ab619
--- /dev/null
+++ b/local-setup/src/test/resources/example_model.json
@@ -0,0 +1,13 @@
+{
+ "model-invariant-id": "123",
+ "model-type": "widget",
+ "model-vers": {
+ "model-ver": [
+ {
+ "model-version-id": "456",
+ "model-version": "1.0",
+ "model-name": "action"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/local-setup/src/test/resources/execute_query.json b/local-setup/src/test/resources/execute_query.json
new file mode 100644
index 0000000..6dc2462
--- /dev/null
+++ b/local-setup/src/test/resources/execute_query.json
@@ -0,0 +1,22 @@
+{
+ "query-parameters": {
+ "named-query": {
+ "named-query-uuid": "0367193e-c785-4d5f-9cb8-7bc89dc9ddb7"
+ }
+ },
+ "instance-filters": {
+ "instance-filter": [
+ {
+ "service-instance": {
+ "service-instance-id": "37b8cdb7-94eb-468f-a0c2-4e3c3546578e"
+ },
+ "service-subscription": {
+ "service-type": "vDNS"
+ },
+ "customer": {
+ "global-customer-id": "aai_demo_for_onap_community"
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/local-setup/src/test/resources/models.csv b/local-setup/src/test/resources/models.csv
new file mode 100644
index 0000000..4382446
--- /dev/null
+++ b/local-setup/src/test/resources/models.csv
@@ -0,0 +1,91 @@
+model-invariant-id,model-version-id,model-name
+af593b4b-490e-4665-ad74-2f6351c0a7ce,fd7fb09e-d930-41b9-b83f-cfde9df48640,action
+9551346c-7d8b-4daf-9926-b93e96e2344a,2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd,action-data
+f6d6a23d-a1a9-48ff-8419-b6530da2d381,7ad0915f-25c0-4a70-b9bc-185a75f87564,allotted-resource
+61b88c01-d819-41c0-8e21-7fd7ba47148e,6c092fb1-21b2-456b-9e01-67fb4de1896e,availability-zone
+53dc00d4-e6d9-48ec-b6cc-3d3797e9b896,b2dea88d-78a0-49bf-95c9-5819df08e966,az-and-dvs-switches
+18094b19-d16d-4822-8acf-e92c6aefa178,d2fb27cc-15eb-4c4e-828e-71d41aaecc5b,class-of-service
+425b2158-e51d-4509-9945-dad4556474a3,2a160989-b202-47dd-874b-4a0f275998f7,cloud-region
+af91c2f7-35fc-43cf-a13d-443f385b2353,3a8ab1ee-9220-4fe8-b89c-9251d160ddc2,complex
+4c01c948-7607-4d66-8a6c-99c2c2717936,22104c9f-29fd-462f-be07-96cd6b46dd33,connector
+c0292b4f-ee97-40cc-8c2e-f967c48f5701,01102126-9c04-4a89-945b-b131e61e95d7,constrained-element-set
+fcb8d46b-b656-4ad6-8fa4-22cef74b443f,44e5cb1f-0938-41aa-b766-d4595109fe89,ctag-assignment
+46c51d4e-d67e-4a9c-b1f5-49b1e9c6fcaa,2056c41f-23b9-4de7-9f50-819adad37d76,ctag-pool
+c1d4305f-cdbd-4bbe-9069-a2f4978fd89e,d4df5c27-98a1-4812-a8aa-c17f055b7a3f,customer
+245cf4b0-7cc5-4eea-bbd9-753e939adcab,c3878ffb-8d85-4114-bee6-e4074a9db10b,cvlan-tag-entry
+98fbb471-1f86-428e-bd8a-c8a25de6fa23,4cb44ae8-e3ab-452a-9f95-bcc8a44c55ea,dvs-switch
+7a08cad4-8759-46a5-8245-095d1ba57ac6,f0442326-8201-4d0e-857c-74b4ddcbfc9f,edge-prop-names
+9a011958-7165-47a3-b872-00951d1f09ae,af27fbfd-598d-44da-aeae-0f9d3a5fcd6a,element-choice-set
+ae75b5a0-d5e1-4f3a-b8fb-37626a753da3,7e27ba2e-b7db-4e13-9fae-d142152ef98a,entitlement
+bace8d1c-a261-4041-9e37-823117415d0f,36200fb5-f251-4f5d-a520-7c5ad5c2cd4b,flavor
+acc6edd8-a8d4-4b93-afaa-0994068be14c,93a6166f-b3d5-4f06-b4ba-aed48d009ad9,generic-vnf
+7cc05f25-7ba2-42b7-a237-c5662a1689e1,fe578080-ce19-4604-8760-fc264fbb2565,group-assignment
+3f4c7204-739b-4bbb-87a7-8a6856439c90,f6a038c2-820c-42ba-8c2b-375e24e8f932,image
+2a2d8ad2-af0a-4e1f-9982-0c899e7dc827,f05f804d-7057-4ffe-bdc5-39f2f0c9c9fd,include-node-filter
+3bf1e610-45f7-4ad6-b833-ca4c5ee6a3fd,8e6ee9dc-9017-444a-83b3-219edb018128,instance-group
+cd57d844-9017-4078-aa19-926935a3d77c,69957f4a-2155-4b95-8d72-d6dd9b88b27b,inventory-item
+87a383ae-cf03-432e-a9de-04e6a622d0fd,0e54bb87-bd6e-4a2b-ad1c-6d935b87ae51,inventory-item-data
+aca4c310-cb45-42bd-9f88-73e40ba7b962,d949fd10-36bf-408a-ac7a-cad5004d2e0d,ipsec-configuration
+f5faa464-c2f2-4cc3-89d2-a90452dc3a07,c23ea04d-1a3b-453d-bc49-a6c783a5e92b,key-data
+aad85df2-09be-40fa-b867-16415e4e10e2,41e76b6f-1e06-4fd4-82cd-81c50fc4574b,l3-interface-ipv4-address-list
+82966045-43ee-4982-8307-7e9610866140,d040621d-541a-477b-bb1b-a2b61b14e295,l3-interface-ipv6-address-list
+3d560d81-57d0-438b-a2a1-5334dba0651a,9111f20f-e680-4001-b83f-19a2fc23bfc1,l3-network
+e0ee9bde-c1fc-4651-a95d-8e0597bf7d70,ce95f7c3-b61b-4758-ae9e-7e943b1c103d,lag-interface
+86ffe6e5-4d0e-4cec-80b5-5c38aa3eff98,d29a087a-af59-4053-a3f8-0f95a92faa75,lag-link
+b9a9b337-1f86-42d3-b9f9-f987a089507c,6889274b-a1dc-40ab-9090-93677e13e2e6,license
+9022ebfe-b54f-4911-a6b2-8c3f5ec189b7,24b25f8c-b8bd-4c62-9421-87c12667aac9,license-key-resource
+cea0a982-8d55-4093-921e-418fbccf7060,a32613fd-18b9-459e-aab8-fffb3912966a,l-interface
+fe012535-2c31-4a39-a739-612374c638a0,a1481a38-f8ba-4ae4-bdf1-06c2c6af4c54,logical-link
+86dbb63a-265e-4614-993f-6771c30b56a5,6bae950e-8939-41d3-a6a7-251b03e4c1fc,metadatum
+06d1418a-5faa-452d-a94b-a2829df5f67b,1f51c05c-b164-4c27-9c03-5cbb239fd6be,model
+c28966f3-e758-4483-b37b-a90b05d3dd33,ad70dd19-f156-4fb5-a865-97b5563b0d37,model-constraint
+2076e726-3577-477a-a300-7fa65cd4df11,753e813a-ba9e-4a1d-ab34-b2f6dc6eec0c,model-element
+b5cd462f-e426-4146-b1fe-5475ae272c3d,93f2f8bc-cb12-4a01-96c8-3d2649e4ab8f,model-ver
+ea78c9e3-514d-4a0a-9162-13837fa54c35,666a06ee-4b57-46df-bacf-908da8f10c3f,multicast-configuration
+80b712fd-0ad3-4180-a99c-8c995cf1cc32,5c3b7c33-afa3-4be5-8da7-1a5ac6f99896,named-query
+3c504d40-b847-424c-9d25-4fb7e0a3e994,204c641a-3494-48c8-979a-86856f5fd32a,named-query-element
+6aa05779-94d7-4d8b-9bee-59ef2ab0c246,a0ccd9dc-7062-4940-9bcc-e91dd28af510,network-policy
+2734b44a-b8a2-40f6-957d-6256589e5d00,01f45471-4240-498c-a9e1-235dc0b8b4a6,network-profile
+4b05ec9c-c55d-4987-83ff-e08d6ddb694f,7c79e11f-a408-4593-aa86-ba948a1236af,newvce
+2851cf01-9c40-4064-87d4-6184a6fcff35,f4fb34f3-fd6e-4a8f-a3fb-4ab61a343b79,oam-network
+c822d81f-822f-4304-9623-1025b53da568,9c523936-95b4-4d7f-9f53-6bdfe0cf2c05,physical-link
+94043c37-4e73-439c-a790-0fdd697924cd,d2cdb2d0-fc1f-4a57-a89e-591b1c4e3754,p-interface
+862b25a1-262a-4961-bdaa-cdc55d69785a,e9f1fa7d-c839-418a-9601-03dc0d2ad687,pnf
+8ce940fb-55d7-4230-9e7f-a56cc2741f77,03e8bb6b-b48a-46ae-b5d4-e5af577e6844,port-group
+f4a863c3-6886-470a-a6ae-05723837ea45,81706bbd-981e-4362-ae20-995cbcb2d995,property-constraint
+6d932c8f-463b-4e76-83fb-87acfbaa2e2d,72f0d495-bc27-4653-9e1a-eef76bd34bc9,pserver
+468f6f5b-2996-41bb-b2a3-7cf9613ebb9b,0988bab5-bf4f-4938-a419-ab249867d12a,related-lookup
+0c3e0ba3-618c-498d-9127-c8d42b00170f,ac49d26d-9163-430e-934a-13b738a04f5c,reserved-prop-names
+ff656f23-6185-406f-9006-4b26834f3e1c,4e9b50aa-5227-4f6f-b489-62e6bbc03c79,result-data
+a8614b63-2636-4c4f-98df-fd448c4241db,fed7e326-03a7-45ff-a3f2-471470d268c4,route-table-reference
+1c2ded4f-8b01-4193-829c-966847dfec3e,3ccbcbc7-d19e-44d5-a52f-7e18aa8d69fa,routing-instance
+738ff299-6290-4c00-8998-bd0e96a07b93,1380619d-dd1a-4cec-b755-c6407833e065,secondary-filter
+6e814aee-46e1-4583-a9d4-0049bfd2b59b,c5171ae0-44fb-4c04-b482-d56702241a44,segmentation-assignment
+07a3a60b-1b6c-4367-8173-8014386f89e3,ecce2c42-3957-4ae0-9442-54bc6afe27b6,service
+b1a7cc05-d19d-443b-a5d1-733e325c4232,f9cfec1b-18da-4bba-bd83-4b26cca115cd,service-capability
+82194af1-3c2c-485a-8f44-420e22a9eaa4,46b92144-923a-4d20-b85a-3cbd847668a9,service-instance
+2e1a602a-acd8-4f78-94ff-618b802a303b,5e68299a-79f2-4bfb-8fbc-2bae877a2459,service-subscription
+db63f3e6-f8d1-484e-8d5e-191600b7914b,7106bc02-6552-4fc3-8a56-4f3df9034531,site-pair
+5d4dae3e-b402-4bfd-909e-ece12ff75d26,a5c6c1bc-dc38-468e-9459-bb08f87247df,site-pair-set
+24de00ef-aead-4b52-995b-0adf8d4bd90d,962a7c8b-687f-4d32-a775-fe098e214bcd,snapshot
+04b2935f-33c4-40a9-8af0-8b52690042dc,1e8b331f-3d4a-4160-b7aa-f4d5a8916625,sriov-vf
+083093a3-e407-447a-ba5d-7583e4d23e1d,aad96fd3-e75f-42fc-9777-3450c36f1168,start-node-filter
+1b2c9ba7-e449-4831-ba15-3073672f5ef2,f902a6bc-6be4-4fe5-8458-a6ec0056b374,subnet
+e78a7eaa-f65d-4919-9c2b-5b258c8c4d7e,c246f6e2-e3a1-4697-94c0-5672a7fbbf04,tagged-inventory-item-list
+97c26c99-6870-44c1-8a07-1d900d3f4ce6,abcc54bc-bb74-49dc-9043-7f7171707545,tenant
+50b9e2fa-005c-4bbe-b651-3251dece4cd8,e7cb4ca8-e1a5-4487-a716-4ae0bcd8aef5,tunnel-xconnect
+fe81c801-f65d-408a-b2b7-a729a18f8154,6004cfa6-eb6d-4062-971f-b1fde6b74aa0,update-node-key
+bab6dceb-e7e6-4301-a5e0-a7399b48d792,b6cf54b5-ec45-43e1-be64-97b4e1513333,vce
+ef86f9c5-2165-44f3-8fc3-96018b609ea5,c00563ae-812b-4e62-8330-7c4d0f47088a,vf-module
+bed7c3b7-35d0-4cd9-abde-41b20e68b28e,8e8c22f1-fbdf-48ea-844c-8bdeb44e7b16,vig-server
+5150abcf-0c5f-4593-9afe-a19c48fc4824,6dd43ced-d789-47af-a759-d3abc14e3ac1,virtual-data-center
+d2b1eaf1-ae59-4116-9ee4-aa0179faa4f8,257d88a5-a269-4c35-944f-aca04fbdb791,vlan
+96129eb9-f0de-4e05-8af2-73146473f766,5761e0a7-c6df-4d8a-9ebd-b8f445054dec,vnfc
+f9a628ff-7aa0-40e2-a93d-02d91c950982,c4d3e747-ba4a-4b17-9896-94c6f18c19d3,vnf-image
+ddd739b4-2b25-46c4-affc-41a32af5cc42,0fbe2e8f-4d91-4415-a772-88387049b38d,volume
+fcec1b02-b2d0-4834-aef8-d71be04717dd,99d44c90-1f61-4418-b9a6-56586bf38c79,volume-group
+053ec3a7-5b72-492d-b54d-123805a9b967,203817d3-829c-42d4-942d-2a935478e993,vpe
+457ba89b-334c-4fbd-acc4-160ac0e0cdc0,b1566228-6785-4ce1-aea2-053736f80341,vpls-pe
+9e23b675-db2b-488b-b459-57aa9857baa0,21a146e5-9901-448c-9197-723076770119,vpn-binding
+ff69d4e0-a8e8-4108-bdb0-dd63217e63c7,8ecb2c5d-7176-4317-a255-26274edfdd53,vserver
+16f7cb93-e807-4065-816b-9cdf391d4992,f7f21a66-4714-431c-af17-52d64e21de95,zone \ No newline at end of file
diff --git a/local-setup/src/test/resources/query_response.json b/local-setup/src/test/resources/query_response.json
new file mode 100644
index 0000000..d68f815
--- /dev/null
+++ b/local-setup/src/test/resources/query_response.json
@@ -0,0 +1,48 @@
+{
+ "inventory-response-item": [
+ {
+ "model-name": "service-instance",
+ "service-instance": {
+ "service-instance-id": "37b8cdb7-94eb-468f-a0c2-4e3c3546578e",
+ "service-instance-name": "Demo Service Instance"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "service-instance",
+ "generic-vnf": {
+ "vnf-id": "de7cc3ab-0212-47df-9e64-da1c79234deb",
+ "vnf-name": "ZRDM2MMEX39",
+ "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "orchestration-status": "active",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
+ "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "service-instance",
+ "vf-module": {
+ "vf-module-id": "ef71d47a-53e8-40f4-a5ed-7d2cac1b20f1",
+ "vf-module-name": "ZRDM2MMEX39_base",
+ "orchestration-status": "pending-create",
+ "is-base-vf-module": true,
+ "automated-assignment": false,
+ "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
+ "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
+ },
+ "extra-properties": {}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file