aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-domain
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2018-11-15 13:29:09 +0100
committerJakub Dudycz <jakub.dudycz@nokia.com>2018-11-19 09:29:35 +0100
commit33ff28e3fab91baa36e954c4fd167b615e94993c (patch)
tree33ed79a9d53e9457a18f9aa355962d6f89f95f5c /hv-collector-domain
parent3fdd2fe2b4f35e18998d050c632fc6de24a7e3b1 (diff)
Fix Common Event Header fields validation
- "sequence" is no longer a required parameter, since deafult value "0" is acceptable - "vesEventListenerVersion" has to match the regular expression "7\.[0-9]+\.[0-9]+" Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-976 Change-Id: I2f9fd6f375ccca3255cc9e035918dc37cc97bd6a
Diffstat (limited to 'hv-collector-domain')
-rw-r--r--hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt b/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt
index 339a652c..e0615bbe 100644
--- a/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt
+++ b/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt
@@ -24,7 +24,7 @@ import org.onap.ves.VesEventOuterClass
val headerRequiredFieldDescriptors = listOf(
"version",
"domain",
- "sequence",
+ /* field "sequence" has been removed from validation, since default value "0" is acceptable */
"priority",
"eventId",
"eventName",
@@ -34,3 +34,5 @@ val headerRequiredFieldDescriptors = listOf(
"sourceName",
"vesEventListenerVersion")
.map { fieldName -> VesEventOuterClass.CommonEventHeader.getDescriptor().findFieldByName(fieldName) }
+
+val vesEventListenerVersionRegex = """7\.[0-9]+\.[0-9]+""".toRegex()