aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/model/Node.java
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2018-12-31 17:21:27 +0200
committerIttay Stern <ittay.stern@att.com>2019-01-09 20:19:55 +0200
commit6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (patch)
tree3bd672dff83e3218232cd8665680416b7fc26a5d /vid-app-common/src/main/java/org/onap/vid/model/Node.java
parent5ec29ff5e3864f1ba6ecac71f8bffbefa400cf27 (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/Node.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/Node.java44
1 files changed, 18 insertions, 26 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Node.java b/vid-app-common/src/main/java/org/onap/vid/model/Node.java
index 3b7abd39b..64e4cc0b8 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/Node.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/Node.java
@@ -20,51 +20,44 @@
package org.onap.vid.model;
-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;
-
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.vid.asdc.beans.tosca.Input;
import org.onap.vid.asdc.beans.tosca.NodeTemplate;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
/**
* The Class Node.
*/
-public class Node {
+public class Node implements MinimalNode {
/** The Constant LOG. */
private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(Node.class);
-
- /** The Constant dateFormat. */
- final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
/** The uuid. */
private String uuid;
-
+
/** The invariant uuid. */
private String invariantUuid;
-
+
/** The description. */
private String description;
-
+
/** The name. */
private String name;
-
+
/** The version. */
private String version;
-
+
/** The model customization uuid. */
private String customizationUuid;
-
+
/** The inputs. */
private Map<String, Input> inputs = new HashMap<>();
-
+
/** The get_input or other constructs from node template properties. */
private Map<String, CommandProperty> commands;
-
+
/** The get_input or other constructs from node template properties. */
private Map<String, String> properties;
@@ -74,8 +67,8 @@ public class Node {
* Instantiates a new node.
*/
public Node() {
- this.commands = new HashMap<String, CommandProperty>();
- this.properties = new HashMap<String, String>();
+ this.commands = new HashMap<>();
+ this.properties = new HashMap<>();
}
/**
@@ -253,7 +246,6 @@ public class Node {
/**
* Extract node.
*
- * @param modelCustomizationName the model customization name
* @param nodeTemplate the node template
* @return the node
*/
@@ -272,14 +264,14 @@ public class Node {
try {
// nodeTemplate.getProperties() map of String->Object
for (Entry<String, Object> entrySet : nodeTemplate.getProperties().entrySet()) {
- LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " node template property: " + entrySet.getKey());
+ LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " node template property: " + entrySet.getKey());
if ( entrySet.getValue() != null ) {
readStringAndCommandsProperties(entrySet);
}
}
}
catch ( Exception e ) {
- LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse node properties: e=" +
+ LOG.error(EELFLoggerDelegate.errorLogger, methodName + " Unable to parse node properties: e=" +
e.toString());
}
}
@@ -287,7 +279,7 @@ public class Node {
private void readStringAndCommandsProperties(Entry<String, Object> entrySet) {
String key = entrySet.getKey();
String methodName = "readStringAndCommandsProperties";
- LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " property: " +
+ LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " property: " +
key + "=" + entrySet.getValue());
Class<?> c = entrySet.getValue().getClass();
if ( c.getName().equalsIgnoreCase(String.class.getName())) {