diff options
author | 2019-07-16 17:17:36 +0300 | |
---|---|---|
committer | 2019-07-30 06:01:44 +0300 | |
commit | e601bbdc43bae9a08e2e10c5139a6f76b47860d7 (patch) | |
tree | 1913f0b369ead3f2ea5557e5649d8281eca9871c /vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt | |
parent | 76c6ee4a697617ec4cdee2f3b48bc83136c858c5 (diff) |
Implant vid-app-common org.onap.vid.job (main and test)
Issue-ID: VID-378
Change-Id: I41b0bdc2c4e3635f3f3319b1cd63cefc61912dfc
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt new file mode 100644 index 000000000..054618dd5 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt @@ -0,0 +1,15 @@ +package org.onap.vid.model.aaiTree + +import org.apache.commons.lang.StringUtils + +fun isNfc(node: AAITreeNode): Boolean { + return node.type == NodeType.INSTANCE_GROUP && + node.additionalProperties["instance-group-type"] != null && + StringUtils.equalsIgnoreCase(node.additionalProperties["instance-group-type"].toString(), "L3-NETWORK") +} + +class CollectionResource(node: AAITreeNode) : Node(node) { + + val ncfs: Map<String, NCF> = node.children.filter { isNfc(it) }.map { it.uniqueNodeKey to NCF(it) }.toMap() + +}
\ No newline at end of file |