From 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 31 Dec 2018 17:21:27 +0200 Subject: Merge from ECOMP's repository Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern --- .../main/java/org/onap/vid/model/ServiceModel.java | 41 +++++++++++++++------- 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java') diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java index 53eb18c64..d82bd55aa 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java @@ -21,14 +21,11 @@ package org.onap.vid.model; import org.apache.commons.collections.MapUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.asdc.beans.tosca.Group; import org.onap.vid.asdc.beans.tosca.ToscaModel; import org.onap.vid.properties.VidProperties; -import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @@ -40,9 +37,7 @@ public class ServiceModel { /** The Constant LOG. */ private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ServiceModel.class); - - /** The Constant dateFormat. */ - static final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + /** The service. */ private Service service; @@ -54,10 +49,12 @@ public class ServiceModel { private Map collectionResource; - /** Port Mirroring Configuration node templates */ private Map configurations; + /** Fabric Configuration node templates */ + private Map fabricConfigurations; + /** Service Proxy Nodes */ private Map serviceProxies; @@ -74,6 +71,10 @@ public class ServiceModel { /** The pnfs. */ private Map pnfs; + + /** Resource groups of VF (VNF) type. */ + private Map vnfGroups; + /** * Instantiates a new service model. */ @@ -135,6 +136,10 @@ public class ServiceModel { return serviceProxies; } + public Map getVnfGroups() { + return vnfGroups; + } + /** * Sets the service. * @@ -221,6 +226,10 @@ public class ServiceModel { */ public void setPnfs(Map pnfs) {this.pnfs = pnfs;} + public void setVnfGroups(Map vnfGroups) { + this.vnfGroups = vnfGroups; + } + public Map getCollectionResource() { return collectionResource; } @@ -229,6 +238,14 @@ public class ServiceModel { this.collectionResource = collectionResource; } + public Map getFabricConfigurations() { + return fabricConfigurations; + } + + public void setFabricConfigurations(Map fabricConfigurations) { + this.fabricConfigurations = fabricConfigurations; + } + /** * Extract service. * @@ -288,7 +305,7 @@ public class ServiceModel { */ public void associateGroups() { String methodName = "associateGroups()"; - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); + LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); // go through the vnfs, get the vnf normalized name and look for a vf module with a customization name that starts // with vnf + ".." String vnfCustomizationName = null; @@ -300,7 +317,7 @@ public class ServiceModel { vnfCustomizationName = vnfComponent.getValue().getModelCustomizationName(); normalizedVnfCustomizationName = VNF.normalizeName(vnfCustomizationName); - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " VNF customizationName=" + vnfCustomizationName + "normalized customization name=" + normalizedVnfCustomizationName); // now check to see if there is a vf module with customization name that starts with normalizedVnfCustomizationName @@ -309,7 +326,7 @@ public class ServiceModel { for (Entry vfModuleComponent : getVfModules().entrySet()) { vfModuleCustomizationName = vfModuleComponent.getValue().getModelCustomizationName(); - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " VF Module customizationName=" + vfModuleCustomizationName ); if ( vfModuleCustomizationName.startsWith(normalizedVnfCustomizationName + ".." )) { handleCustomizationName(methodName, vnfCustomizationName, vfModuleCustomizationName, vnfComponent, vfModuleComponent); @@ -328,7 +345,7 @@ public class ServiceModel { tmpVnf = vnfComponent.getValue(); (tmpVnf.getVfModules()).put(vfModuleComponent.getKey(), vfModuleComponent.getValue()); - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName); // now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF -- cgit 1.2.3-korg