From bcfaca57048ff16b9a68cc479497fdf0f4f7642d Mon Sep 17 00:00:00 2001 From: Norm Traxler Date: Wed, 6 Mar 2019 21:29:17 +0000 Subject: Add Audit Data Quality Summary Issue-ID: LOG-665 Change-Id: I3ce6ca51e2d59eb27fafed6326571c24a638a27e Signed-off-by: Norm Traxler --- pom.xml | 2 - .../datatypes/AggregatedModels.java | 136 +- .../datatypes/DataQualitySummary.java | 83 ++ .../contextaggregator/datatypes/POAEvent.java | 14 +- .../datatypes/AggregatedModelsTest.java | 53 +- .../contextaggregator/datatypes/POAEventTest.java | 41 +- src/test/resources/modelContextAAI-input.json | 1341 ++++++++++++++++++++ 7 files changed, 1576 insertions(+), 94 deletions(-) create mode 100644 src/main/java/org/onap/pomba/contextaggregator/datatypes/DataQualitySummary.java create mode 100644 src/test/resources/modelContextAAI-input.json diff --git a/pom.xml b/pom.xml index 25c8aa1..33be969 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,6 @@ org.eclipse.jetty jetty-security - 9.4.12.RC1 org.onap.dmaap.messagerouter.dmaapclient @@ -49,7 +48,6 @@ ch.qos.logback logback-classic - 1.2.3 org.onap.aai diff --git a/src/main/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModels.java b/src/main/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModels.java index a502425..49dbefe 100644 --- a/src/main/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModels.java +++ b/src/main/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModels.java @@ -15,18 +15,27 @@ * limitations under the License. * ============LICENSE_END===================================================== */ + package org.onap.pomba.contextaggregator.datatypes; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; + import org.onap.pomba.common.datatypes.ModelContext; import org.onap.pomba.contextaggregator.config.EventHeaderConfig; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.annotations.Expose; -import com.google.gson.annotations.SerializedName; public class AggregatedModels { @@ -35,53 +44,110 @@ public class AggregatedModels { Header entityHeader; @Expose @SerializedName("entity") - POAEntity poaEntity; - + PoaEntity poaEntity; /** - * Creates an event with an entity header and entity containing the models and poa-event from Dmaap + * Creates an event with an entity header and entity containing the models and + * poa-event from Dmaap. * - * @param headerConfig - * @param jsonContextMap + * @param headerConfig The event header config + * @param jsonContextMap The context map + * @param event The POA Event */ public AggregatedModels(EventHeaderConfig headerConfig, Map jsonContextMap, POAEvent event) { entityHeader = new Header(headerConfig); Gson gson = new GsonBuilder().create(); Map contextMap = new HashMap<>(); + List errorTexts = new ArrayList<>(); + for (Entry entry : jsonContextMap.entrySet()) { ModelContext context = null; if (entry.getValue().isEmpty()) { context = new ModelContext(); } else { context = gson.fromJson(entry.getValue(), ModelContext.class); + JsonParser parser = new JsonParser(); + JsonElement jsonElement = parser.parse(entry.getValue()); + errorTexts.addAll(extractErrors(entry.getKey(), jsonElement)); } contextMap.put(entry.getKey(), context); } - poaEntity = new POAEntity(contextMap, event); + if (errorTexts.isEmpty()) { + event.setDataQualitySummary(DataQualitySummary.ok()); + } else { + // Fill the errors: + event.setDataQualitySummary(DataQualitySummary.error(errorTexts)); + } + + poaEntity = new PoaEntity(contextMap, event); } + /** + * Recursive method to find all the dataQuality errors in the JsonElement. + * @param errorPath Path to the current element + * @param jsonElement The json element + * @return list of error strings extracted from the json element and it's children. + */ + private static List extractErrors(String errorPath, JsonElement jsonElement) { + List errorTexts = new ArrayList<>(); + if (jsonElement.isJsonArray()) { + JsonArray jsonArray = jsonElement.getAsJsonArray(); + for (int i = 0; i < jsonArray.size(); i++) { + JsonElement indexElement = jsonArray.get(i); + errorTexts.addAll(extractErrors(errorPath + "[" + i + "]", indexElement)); + } + } else if (jsonElement.isJsonObject()) { + JsonObject jsonObject = jsonElement.getAsJsonObject(); + extractErrorsFromJsonObject(errorPath, errorTexts, jsonObject); + } + + return errorTexts; + } + + private static void extractErrorsFromJsonObject(String errorPath, List errorTexts, JsonObject jsonObject) { + for (Entry entrySet : jsonObject.entrySet()) { + if ("dataQuality".equals(entrySet.getKey())) { + JsonElement dqElement = entrySet.getValue(); + + JsonObject dqObject = dqElement.getAsJsonObject(); + JsonElement dqStatusElement = dqObject.get("status"); + if (dqStatusElement == null) { + continue; + } + String statusValue = dqStatusElement.getAsString(); + + if ("error".equals(statusValue)) { + JsonElement dqErrorTextElement = dqObject.get("errorText"); + if (dqErrorTextElement != null) { + String errorTextValue = dqErrorTextElement.getAsString(); + errorTexts.add(errorPath + ": " + errorTextValue); + } + } + } else { + // recursive call to extract errors from other JsonElements: + errorTexts.addAll(extractErrors(errorPath + "/" + entrySet.getKey(), entrySet.getValue())); + } + } + } /** - * Returns this instance as a JSON payload + * Returns this instance as a JSON payload. * * @return */ public String generateJsonPayload() { Gson gson = new GsonBuilder().create(); - String payload = gson.toJson(this); - return payload; + return gson.toJson(this); } public Header getEntityHeader() { return entityHeader; } - - /** - * Entity header class for JSON serialization + * Entity header class for JSON serialization. */ private class Header { @Expose @@ -117,43 +183,9 @@ public class AggregatedModels { topicName = config.getTopicName(); eventId = UUID.randomUUID().toString(); } - - - public String getId() { - return id; - } - - public String getDomain() { - return domain; - } - - public String getSourceName() { - return sourceName; - } - - public String getEventType() { - return eventType; - } - - public String getEntityType() { - return entityType; - } - - public String getTopEntityType() { - return topEntityType; - } - - public String getTopicName() { - return topicName; - } - - public String getEventId() { - return eventId; - } } - - private class POAEntity { + private class PoaEntity { @Expose @SerializedName("poa-event") POAEvent event; @@ -161,7 +193,7 @@ public class AggregatedModels { @SerializedName("context-list") private Map contextMap; - public POAEntity(Map contextMap, POAEvent event) { + public PoaEntity(Map contextMap, POAEvent event) { this.contextMap = contextMap; this.event = event; } diff --git a/src/main/java/org/onap/pomba/contextaggregator/datatypes/DataQualitySummary.java b/src/main/java/org/onap/pomba/contextaggregator/datatypes/DataQualitySummary.java new file mode 100644 index 0000000..21941cc --- /dev/null +++ b/src/main/java/org/onap/pomba/contextaggregator/datatypes/DataQualitySummary.java @@ -0,0 +1,83 @@ +/* + * ============LICENSE_START=================================================== + * Copyright (c) 2019 Amdocs + * ============================================================================ + * 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 org.onap.pomba.contextaggregator.datatypes; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; + +public class DataQualitySummary { + @Expose + @SerializedName("status") + private Status status; + @Expose + @SerializedName("errors") + private List errors = new ArrayList<>(); + + public enum Status { + ok, + error + } + + public Status getStatus() { + return this.status; + } + + public void setStatus(Status status) { + this.status = status; + } + + public List getErrors() { + return this.errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + /** + * Creates an "ok" DataQualitySummary instance. + * @return + */ + public static DataQualitySummary ok() { + DataQualitySummary result = new DataQualitySummary(); + result.setStatus(Status.ok); + return result; + } + + /** + * Creates an "error" DataQualitySummary instance. + * @param errors List of error descriptions + * @return + */ + public static DataQualitySummary error(List errors) { + DataQualitySummary result = new DataQualitySummary(); + result.setStatus(Status.error); + result.setErrors(errors); + return result; + } + + @Override + public String toString() { + return "DataQuality [status=" + this.status + ", errors=" + this.errors + "]"; + } + +} diff --git a/src/main/java/org/onap/pomba/contextaggregator/datatypes/POAEvent.java b/src/main/java/org/onap/pomba/contextaggregator/datatypes/POAEvent.java index 36b2dc9..15d1b2a 100644 --- a/src/main/java/org/onap/pomba/contextaggregator/datatypes/POAEvent.java +++ b/src/main/java/org/onap/pomba/contextaggregator/datatypes/POAEvent.java @@ -27,8 +27,7 @@ public class POAEvent { private String modelInvariantId; private String xFromAppId; private String xTransactionId; - - public POAEvent() {} + private DataQualitySummary dataQualitySummary; public String getServiceInstanceId() { return serviceInstanceId; @@ -70,6 +69,14 @@ public class POAEvent { this.xTransactionId = xTransactionId; } + public DataQualitySummary getDataQualitySummary() { + return dataQualitySummary; + } + + public void setDataQualitySummary(DataQualitySummary dataQualitySummary) { + this.dataQualitySummary = dataQualitySummary; + } + public boolean validate() throws ContextAggregatorException { final String missing = " is missing"; @@ -108,6 +115,7 @@ public class POAEvent { @Override public String toString() { return "POAEvent [serviceInstanceId=" + serviceInstanceId + ", modelVersionId=" + modelVersionId - + ", modelInvariantId=" + modelInvariantId + ", xFromAppId=" + xFromAppId + ", xTransactionId=" + xTransactionId + "]"; + + ", modelInvariantId=" + modelInvariantId + ", xFromAppId=" + xFromAppId + ", xTransactionId=" + xTransactionId + + ", dataQualitySummary=" + dataQualitySummary + "]"; } } diff --git a/src/test/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModelsTest.java b/src/test/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModelsTest.java index e0c9705..743b032 100644 --- a/src/test/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModelsTest.java +++ b/src/test/java/org/onap/pomba/contextaggregator/datatypes/AggregatedModelsTest.java @@ -18,20 +18,17 @@ package org.onap.pomba.contextaggregator.datatypes; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.onap.pomba.contextaggregator.config.EventHeaderConfig; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest public class AggregatedModelsTest { AggregatedModels aggregatedModels; @@ -43,27 +40,55 @@ public class AggregatedModelsTest { private String topEntityType; private String topicName; - EventHeaderConfig eventHeaderConfig = new EventHeaderConfig( - domain, sourceName, eventType, entityType, topEntityType, topicName); + EventHeaderConfig eventHeaderConfig = new EventHeaderConfig(domain, sourceName, eventType, entityType, + topEntityType, topicName); Map jsonContextMap = new HashMap<>(); - POAEvent pOAEvent = new POAEvent(); + POAEvent poaEvent = new POAEvent(); + /** + * JUnit setup. + */ @Before public void setUp() { MockitoAnnotations.initMocks(this); - pOAEvent.setServiceInstanceId("a"); - pOAEvent.setModelVersionId("b"); - pOAEvent.setModelInvariantId("c"); - pOAEvent.setxFromAppId("e"); - pOAEvent.setxTransactionId("f"); + poaEvent.setServiceInstanceId("a"); + poaEvent.setModelVersionId("b"); + poaEvent.setModelInvariantId("c"); + poaEvent.setxFromAppId("e"); + poaEvent.setxTransactionId("f"); } @Test public void testGenerateJsonPayload() throws Exception { - aggregatedModels = new AggregatedModels(eventHeaderConfig,jsonContextMap,pOAEvent); + aggregatedModels = new AggregatedModels(eventHeaderConfig, jsonContextMap, poaEvent); Assert.assertNotNull(aggregatedModels.generateJsonPayload()); Assert.assertNotNull(aggregatedModels.getEntityHeader()); } + + @Test + public void testDataQualitySummaryError() throws Exception { + String filename = "src/test/resources/modelContextAAI-input.json"; + String fileContent = new String(Files.readAllBytes(Paths.get(filename))); + + jsonContextMap.put("aai", fileContent); + jsonContextMap.put("sdnc", fileContent); + aggregatedModels = new AggregatedModels(eventHeaderConfig, jsonContextMap, poaEvent); + Assert.assertNotNull(aggregatedModels.generateJsonPayload()); + Assert.assertNotNull(aggregatedModels.getEntityHeader()); + Assert.assertNotNull(poaEvent.getDataQualitySummary()); + System.err.println(poaEvent.getDataQualitySummary()); + Assert.assertEquals(DataQualitySummary.Status.error, poaEvent.getDataQualitySummary().getStatus()); + } + + @Test + public void testDataQualitySummaryOk() throws Exception { + jsonContextMap.put("aai", "{}"); + aggregatedModels = new AggregatedModels(eventHeaderConfig, jsonContextMap, poaEvent); + Assert.assertNotNull(aggregatedModels.generateJsonPayload()); + Assert.assertNotNull(aggregatedModels.getEntityHeader()); + Assert.assertNotNull(poaEvent.getDataQualitySummary()); + Assert.assertEquals(DataQualitySummary.Status.ok, poaEvent.getDataQualitySummary().getStatus()); + } } diff --git a/src/test/java/org/onap/pomba/contextaggregator/datatypes/POAEventTest.java b/src/test/java/org/onap/pomba/contextaggregator/datatypes/POAEventTest.java index 13f15dd..7041840 100644 --- a/src/test/java/org/onap/pomba/contextaggregator/datatypes/POAEventTest.java +++ b/src/test/java/org/onap/pomba/contextaggregator/datatypes/POAEventTest.java @@ -23,36 +23,31 @@ import static org.junit.Assert.assertTrue; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; import org.onap.pomba.contextaggregator.exception.ContextAggregatorException; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest public class POAEventTest { - POAEvent pOAEvent = new POAEvent(); + POAEvent poaEvent = new POAEvent(); @Before public void setup() { - pOAEvent.setServiceInstanceId("a"); - pOAEvent.setModelVersionId("b"); - pOAEvent.setModelInvariantId("c"); - pOAEvent.setxFromAppId("e"); - pOAEvent.setxTransactionId("f"); + poaEvent.setServiceInstanceId("a"); + poaEvent.setModelVersionId("b"); + poaEvent.setModelInvariantId("c"); + poaEvent.setxFromAppId("e"); + poaEvent.setxTransactionId("f"); } @Test public void testValidate() throws ContextAggregatorException { - pOAEvent.validate(); + poaEvent.validate(); } @Test public void testValidateEmptyServiceInstanceId() throws ContextAggregatorException { - pOAEvent.setServiceInstanceId(""); + poaEvent.setServiceInstanceId(""); try { - pOAEvent.validate(); + poaEvent.validate(); } catch (ContextAggregatorException e) { assertTrue(e.getMessage().contains("is missing")); @@ -61,10 +56,10 @@ public class POAEventTest { @Test public void testValidateEmptyModelVersionId() throws ContextAggregatorException { - pOAEvent.setModelVersionId(""); + poaEvent.setModelVersionId(""); try { - pOAEvent.validate(); + poaEvent.validate(); } catch (ContextAggregatorException e) { assertTrue(e.getMessage().contains("is missing")); @@ -73,10 +68,10 @@ public class POAEventTest { @Test public void testValidateEmptyModelInvariantId() throws ContextAggregatorException { - pOAEvent.setModelInvariantId(""); + poaEvent.setModelInvariantId(""); try { - pOAEvent.validate(); + poaEvent.validate(); } catch (ContextAggregatorException e) { assertTrue(e.getMessage().contains("is missing")); @@ -85,10 +80,10 @@ public class POAEventTest { @Test public void testValidateEmptyxFromAppId() throws ContextAggregatorException { - pOAEvent.setxFromAppId(""); + poaEvent.setxFromAppId(""); try { - pOAEvent.validate(); + poaEvent.validate(); } catch (ContextAggregatorException e) { assertTrue(e.getMessage().contains("is missing")); @@ -97,10 +92,10 @@ public class POAEventTest { @Test public void testValidateEmptyxTransactionId() throws ContextAggregatorException { - pOAEvent.setxTransactionId(""); + poaEvent.setxTransactionId(""); try { - pOAEvent.validate(); + poaEvent.validate(); } catch (ContextAggregatorException e) { assertTrue(e.getMessage().contains("is missing")); @@ -109,7 +104,7 @@ public class POAEventTest { @Test public void testToString() { - String result = pOAEvent.toString(); + String result = poaEvent.toString(); Assert.assertNotEquals("", result); } } diff --git a/src/test/resources/modelContextAAI-input.json b/src/test/resources/modelContextAAI-input.json new file mode 100644 index 0000000..9f095f7 --- /dev/null +++ b/src/test/resources/modelContextAAI-input.json @@ -0,0 +1,1341 @@ +{ + "service": { + "uuid": "PombaDemoCust_001-ServiceInst-001", + "name": "PombaDemoCust_001-ServiceInst-001-name", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "error", + "errorText": "error1" + }, + "attributeList": [ + { + "name": "hostName", + "dataQuality": { + "status": "error", + "errorText": "error1.1" + } + } + ] + }, + "dataQuality": { + "status": "error", + "errorText": "error2" + }, + "attributeList": [], + "vnfList": [ + { + "uuid": "PombaDemoCust_001-VNF-id-001-2", + "name": "Firewall-2", + "type": "vFW-vSINK-service/vFWvSINK 0", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "error", + "errorText": "error3" + }, + "attributeList": [], + "vfModuleList": [ + { + "uuid": "PombaDemoCust_001-VNF-id-001-VfModule001", + "name": "PombaDemoCust_001-VNF-id-001-VfModule001-name", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "modelCustomizationUUID": "3b822416-475d-4e1c-aac3-2544b0a0fdfc", + "maxInstances": 1, + "minInstances": 0, + "dataQuality": { + "status": "error", + "errorText": "error4" + }, + "attributeList": [], + "vmList": [ + { + "uuid": "a6a609e3-967a-48bd-8ce5-41c7ff5c19b9-2", + "name": "Firewall-001-2", + "dataQuality": { + "status": "error", + "errorText": "error5" + }, + "attributeList": [ + { + "name": "hostName", + "dataQuality": { + "status": "error", + "errorText": "error6" + } + }, + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "imageId", + "value": "PombaRegion001-image001", + "dataQuality": { + "status": "ok" + } + } + ], + "pServer": { + "dataQuality": { + "status": "ok" + }, + "attributeList": [], + "pInterfaceList": [] + }, + "lInterfaceList": [] + } + ], + "networkList": [ + { + "uuid": "2ea02809-7279-4b5e-931a-62b231615497", + "name": "NET_1105", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "error", + "errorText": "error7" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "error", + "errorText": "error8" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591130123", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + }, + { + "uuid": "01e8d84a-17a6-47b5-a167-6a45d1d56603", + "name": "NET_1106", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591133012", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + } + ] + } + ], + "vnfcList": [], + "networkList": [ + { + "uuid": "2ea02809-7279-4b5e-931a-62b231615497", + "name": "NET_1105", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591130123", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + }, + { + "uuid": "01e8d84a-17a6-47b5-a167-6a45d1d56603", + "name": "NET_1106", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591133012", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + } + ] + }, + { + "uuid": "PombaDemoCust_001-VNF-id-001", + "name": "Firewall-1", + "type": "vFW-vSINK-service/vFWvSINK 0", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "nfNamingCode", + "value": "nf-naming-code1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "nfType", + "value": "nf-type1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "nfRole", + "value": "nf-role1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "nfFunction", + "value": "nf-function1", + "dataQuality": { + "status": "ok" + } + } + ], + "vfModuleList": [ + { + "uuid": "PombaDemoCust_001-VNF-id-001-VfModule001", + "name": "PombaDemoCust_001-VNF-id-001-VfModule001-name", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "modelCustomizationUUID": "3b822416-475d-4e1c-aac3-2544b0a0fdfc", + "maxInstances": 1, + "minInstances": 0, + "dataQuality": { + "status": "ok" + }, + "attributeList": [], + "vmList": [ + { + "uuid": "a6a609e3-967a-48bd-8ce5-41c7ff5c19b9", + "name": "Firewall-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "hostName", + "value": "PombaDemoCust_001-pserver-id-001", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "lockedBoolean", + "value": "false", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "imageId", + "value": "PombaRegion001-image001", + "dataQuality": { + "status": "ok" + } + } + ], + "pServer": { + "uuid": "PombaDemoCust_001-pserver-id-001", + "name": "PombaDemoCust_001-pserver-id-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "name2", + "value": "PombaDemoCust_001-pserver-id-001-name2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipType", + "value": "equip-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipVendor", + "value": "equip-vendor-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipModel", + "value": "equip-model-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "serialNumber", + "value": "serial-number", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "fqdn", + "value": "fqdn-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591242783", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "ptniiName", + "value": "ptnii-equip-name-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "topology", + "value": "internet-topology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "purpose", + "value": "purpose-1", + "dataQuality": { + "status": "ok" + } + } + ], + "pInterfaceList": [ + { + "name": "interface-name-pserver1-1", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceRole", + "value": "interface-role-pserver1-1", + "dataQuality": { + "status": "error", + "errorText": "error9" + } + }, + { + "name": "interfaceType", + "value": "interface-type-pserver1-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedValue", + "value": "100", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedUnits", + "value": "Mbps", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "portDescription", + "value": "port-description-pserver1-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591243386", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipmentID", + "value": "equipment-identifier-pnf1-1", + "dataQuality": { + "status": "ok" + } + } + ], + "physicalLinkList": [], + "logicalLinkList": [] + }, + { + "name": "interface-name-pserver1-2", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceRole", + "value": "interface-role-pserver1-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceType", + "value": "interface-type-pserver1-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedValue", + "value": "1000", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedUnits", + "value": "Mbps", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "portDescription", + "value": "port-description-pserver1-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591243407", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipmentID", + "value": "equipment-identifier-pserver1-2", + "dataQuality": { + "status": "ok" + } + } + ], + "physicalLinkList": [], + "logicalLinkList": [] + } + ] + }, + "lInterfaceList": [] + } + ], + "networkList": [ + { + "uuid": "2ea02809-7279-4b5e-931a-62b231615497", + "name": "NET_1105", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591130123", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + }, + { + "uuid": "01e8d84a-17a6-47b5-a167-6a45d1d56603", + "name": "NET_1106", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591133012", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + } + ] + } + ], + "vnfcList": [], + "networkList": [ + { + "uuid": "2ea02809-7279-4b5e-931a-62b231615497", + "name": "NET_1105", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591130123", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + }, + { + "uuid": "01e8d84a-17a6-47b5-a167-6a45d1d56603", + "name": "NET_1106", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591133012", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + } + ] + } + ], + "pnfList": [ + { + "uuid": "PombaDemoCust_001-PNF2-id-001-id", + "name": "PombaDemoCust_001-PNF2-id-001", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "error", + "errorText": "error10" + }, + "attributeList": [ + { + "name": "nfRole", + "value": "nf-role-2", + "dataQuality": { + "status": "error" + } + }, + { + "name": "name2", + "value": "PombaDemoCust_001-PNF2-id-001-name2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipType", + "value": "equip-type-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipVendor", + "value": "equip-vendor-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipModel", + "value": "equip-model-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "swVersion", + "value": "sw-version-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "serialNumber", + "value": "serial-number-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591234748", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "name2Source", + "value": "pnf2-name2-source-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "managementOptions", + "value": "management-option-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "frameId", + "value": "frame-id-02", + "dataQuality": { + "status": "ok" + } + } + ], + "pInterfaceList": [ + { + "uuid": "equipment-identifier-pnf2-1", + "name": "interface-name-pnf2-1", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceRole", + "value": "interface-role-pnf2-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceType", + "value": "interface-type-pnf2-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedValue", + "value": "100", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedUnits", + "value": "Mbps", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "portDescription", + "value": "port-description-pnf2-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591235395", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipmentID", + "value": "equipment-identifier-pnf2-1", + "dataQuality": { + "status": "ok" + } + } + ], + "physicalLinkList": [], + "logicalLinkList": [] + }, + { + "uuid": "equipment-identifier-pnf2-2", + "name": "interface-name-pnf2-2", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceRole", + "value": "interface-role-pnf2-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceType", + "value": "interface-type-pnf2-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedValue", + "value": "1000", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedUnits", + "value": "Mbps", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "portDescription", + "value": "port-description-pnf2-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591235633", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipmentID", + "value": "equipment-identifier-pnf2-2", + "dataQuality": { + "status": "ok" + } + } + ], + "physicalLinkList": [], + "logicalLinkList": [] + } + ] + }, + { + "uuid": "PombaDemoCust_001-PNF-id-001-id", + "name": "PombaDemoCust_001-PNF-id-001", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "nfRole", + "value": "nf-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "name2", + "value": "PombaDemoCust_001-PNF-id-001-name2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipType", + "value": "equip-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipVendor", + "value": "equip-vendor-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipModel", + "value": "equip-model-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "swVersion", + "value": "sw-version-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "serialNumber", + "value": "serial-number-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591220149", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "name2Source", + "value": "pnf-name2-source-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "managementOptions", + "value": "management-option-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "frameId", + "value": "frame-id-01", + "dataQuality": { + "status": "ok" + } + } + ], + "pInterfaceList": [ + { + "uuid": "equipment-identifier-pnf1-1", + "name": "interface-name-pnf1-1", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceRole", + "value": "interface-role-pnf1-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceType", + "value": "interface-type-pnf1-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedValue", + "value": "100", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedUnits", + "value": "Mbps", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "portDescription", + "value": "port-description-pnf1-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591221599", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipmentID", + "value": "equipment-identifier-pnf1-1", + "dataQuality": { + "status": "ok" + } + } + ], + "physicalLinkList": [], + "logicalLinkList": [] + }, + { + "uuid": "equipment-identifier-pnf1-2", + "name": "interface-name-pnf1-2", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "lockedBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceRole", + "value": "interface-role-pnf1-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "interfaceType", + "value": "interface-type-pnf1-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedValue", + "value": "1000", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "speedUnits", + "value": "Mbps", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "portDescription", + "value": "port-description-pnf1-2", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591222076", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "equipmentID", + "value": "equipment-identifier-pnf1-2", + "dataQuality": { + "status": "ok" + } + } + ], + "physicalLinkList": [], + "logicalLinkList": [] + } + ] + } + ], + "networkList": [ + { + "uuid": "2ea02809-7279-4b5e-931a-62b231615497", + "name": "NET_1105", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591130123", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + }, + { + "uuid": "01e8d84a-17a6-47b5-a167-6a45d1d56603", + "name": "NET_1106", + "modelVersionID": "pomba-demo-sdc-model-001-version001", + "modelInvariantUUID": "pomba-demo-sdc-model-001", + "dataQuality": { + "status": "ok" + }, + "attributeList": [ + { + "name": "networkType", + "value": "network-type-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkTechnology", + "value": "network-technology-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "sharedNetworkBoolean", + "value": "true", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "networkRole", + "value": "network-role-1", + "dataQuality": { + "status": "ok" + } + }, + { + "name": "resourceVersion", + "value": "1550591133012", + "dataQuality": { + "status": "ok" + } + } + ], + "networkPolicyList": [] + } + ] +} \ No newline at end of file -- cgit 1.2.3-korg