summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-11-10 12:24:11 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-11-10 13:28:36 +0200
commitf460e950df7c5a411f1efa5437c4b8ed403a77c8 (patch)
tree20e5cb1f207fb2deb4c387d97b4b3c38c875f463 /vid-app-common/src/main/java/org
parentf02305ae720426a2fc06d76c9fb1bf0c88dbd1da (diff)
VidNotion identify vlan tagging service
Issue-ID: VID-701 Change-Id: Iffba5bca82e0511715e5ecb6b91cc9f4e077eaee Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java14
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt3
2 files changed, 16 insertions, 1 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
index 042675899..5ed5f6a58 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
@@ -157,6 +157,9 @@ public class VidNotionsBuilder {
if (isPortMirroringService(serviceModel)) {
return ModelCategory.PORT_MIRRORING;
}
+ if (isVlanTaggingService(serviceModel)) {
+ return ModelCategory.VLAN_TAGGING;
+ }
if (isInfraStructureVpn(csarHelper)) {
return VidNotions.ModelCategory.INFRASTRUCTURE_VPN;
}
@@ -241,4 +244,15 @@ public class VidNotionsBuilder {
return (serviceModel.getService()!=null &&
StringUtils.equals(serviceModel.getService().getServiceType(), "portMirroring"));
}
+
+ private boolean isVlanTaggingService(ServiceModel serviceModel) {
+ if (serviceModel==null || serviceModel.getVnfs()==null) {
+ return false;
+ }
+
+ return serviceModel.getVnfs().values().stream().anyMatch(
+ vnf-> MapUtils.isNotEmpty(vnf.getVfcInstanceGroups())
+ );
+
+ }
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt b/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt
index 66fe2ddba..205a79b50 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt
@@ -59,7 +59,8 @@ class VidNotions(@get:JsonInclude(JsonInclude.Include.NON_NULL)
Transport,
SERVICE_WITH_COLLECTION_RESOURCE,
INFRASTRUCTURE_VPN,
- PORT_MIRRORING,
+ PORT_MIRRORING,
+ VLAN_TAGGING,
@JsonProperty("other")
OTHER
}