diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-04-23 16:06:54 +0530 |
---|---|---|
committer | Alexis de Talhouƫt <adetalhouet89@gmail.com> | 2019-04-24 09:43:37 -0400 |
commit | f79ef8c3f922e6d467d74c2ac3e8bec9cb2b991a (patch) | |
tree | 2229aede34364e19b71d355d51ba66f129e36288 /ms/controllerblueprints/modules/blueprint-core | |
parent | 5a82232d3502a566466fac1f8d6f6aadc50fbc6e (diff) |
Rework remote command arguments
Change-Id: Ibd24ce87ed67aee6ae1a66fc9ec6af35bee5008a
Issue-ID: CCSDK-1215
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-core')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt | 6 |
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 */ |