diff options
author | Ittay Stern <ittay.stern@att.com> | 2018-12-31 17:21:27 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-01-09 20:19:55 +0200 |
commit | 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (patch) | |
tree | 3bd672dff83e3218232cd8665680416b7fc26a5d /vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java | |
parent | 5ec29ff5e3864f1ba6ecac71f8bffbefa400cf27 (diff) |
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 <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java | 41 |
1 files changed, 29 insertions, 12 deletions
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<String, CR> collectionResource; - /** Port Mirroring Configuration node templates */ private Map<String, PortMirroringConfig> configurations; + /** Fabric Configuration node templates */ + private Map<String, Node> fabricConfigurations; + /** Service Proxy Nodes */ private Map<String, ServiceProxy> serviceProxies; @@ -74,6 +71,10 @@ public class ServiceModel { /** The pnfs. */ private Map<String, Node> pnfs; + + /** Resource groups of VF (VNF) type. */ + private Map<String, ResourceGroup> vnfGroups; + /** * Instantiates a new service model. */ @@ -135,6 +136,10 @@ public class ServiceModel { return serviceProxies; } + public Map<String, ResourceGroup> getVnfGroups() { + return vnfGroups; + } + /** * Sets the service. * @@ -221,6 +226,10 @@ public class ServiceModel { */ public void setPnfs(Map<String,Node> pnfs) {this.pnfs = pnfs;} + public void setVnfGroups(Map<String, ResourceGroup> vnfGroups) { + this.vnfGroups = vnfGroups; + } + public Map<String, CR> getCollectionResource() { return collectionResource; } @@ -229,6 +238,14 @@ public class ServiceModel { this.collectionResource = collectionResource; } + public Map<String, Node> getFabricConfigurations() { + return fabricConfigurations; + } + + public void setFabricConfigurations(Map<String, Node> 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<String, VfModule> 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 |