summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-04-24 18:09:46 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-24 18:09:46 +0000
commit535002fbb8b2ffeb81564b4ed8858889ac6404d4 (patch)
treee3b54f266aca62a5209f46bf51253df81db2c85b /ms/controllerblueprints
parentfb8d3807fe21a575bfe918687ed0ae971b4367c8 (diff)
parentf79ef8c3f922e6d467d74c2ac3e8bec9cb2b991a (diff)
Merge "Rework remote command arguments"
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
index 72c2c1df3..0e45232f2 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
@@ -101,6 +101,12 @@ fun ArrayNode.asListOfString(): List<String> {
return JacksonUtils.getListFromJsonNode(this, String::class.java)
}
+fun JsonNode.returnNullIfMissing(): JsonNode? {
+ return if (this is NullNode || this is MissingNode) {
+ null
+ } else this
+}
+
/**
* Convert Json to map of json node, the root fields will be map keys
*/