aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-11-10 09:58:54 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-11-10 13:22:11 +0200
commitf02305ae720426a2fc06d76c9fb1bf0c88dbd1da (patch)
tree3adfaed51aad0e690eb09160c1b2cdbbcc14438c /vid-app-common/src/main/java
parent28389331a544dcf8d74584c215467b149b959ecf (diff)
VidNotion identify port mirroring service
Issue-ID: VID-701 Change-Id: I805acab9380c779d2609107c1c65ef25bb0dad47 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java9
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt1
2 files changed, 10 insertions, 0 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 d35c8df9c..042675899 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
@@ -34,6 +34,7 @@ import org.onap.sdc.toscaparser.api.NodeTemplate;
import org.onap.sdc.toscaparser.api.elements.Metadata;
import org.onap.vid.model.ServiceModel;
import org.onap.vid.model.VidNotions;
+import org.onap.vid.model.VidNotions.ModelCategory;
import org.onap.vid.properties.Features;
import org.togglz.core.manager.FeatureManager;
@@ -153,6 +154,9 @@ public class VidNotionsBuilder {
if(isALaCarte(csarHelper) && hasFabricConfiguration(csarHelper)) {
return VidNotions.ModelCategory.IS_5G_FABRIC_CONFIGURATION_MODEL;
}
+ if (isPortMirroringService(serviceModel)) {
+ return ModelCategory.PORT_MIRRORING;
+ }
if (isInfraStructureVpn(csarHelper)) {
return VidNotions.ModelCategory.INFRASTRUCTURE_VPN;
}
@@ -232,4 +236,9 @@ public class VidNotionsBuilder {
final String serviceRole = csarHelper.getServiceMetadata().getValue(ToscaParserImpl2.Constants.SERVICE_ROLE);
return StringUtils.equalsIgnoreCase(serviceRole, ToscaParserImpl2.Constants.GROUPING);
}
+
+ private boolean isPortMirroringService(ServiceModel serviceModel) {
+ return (serviceModel.getService()!=null &&
+ StringUtils.equals(serviceModel.getService().getServiceType(), "portMirroring"));
+ }
}
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 f67d8fbd9..66fe2ddba 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,6 +59,7 @@ class VidNotions(@get:JsonInclude(JsonInclude.Include.NON_NULL)
Transport,
SERVICE_WITH_COLLECTION_RESOURCE,
INFRASTRUCTURE_VPN,
+ PORT_MIRRORING,
@JsonProperty("other")
OTHER
}