From 33ff28e3fab91baa36e954c4fd167b615e94993c Mon Sep 17 00:00:00 2001 From: Jakub Dudycz Date: Thu, 15 Nov 2018 13:29:09 +0100 Subject: 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 Issue-ID: DCAEGEN2-976 Change-Id: I2f9fd6f375ccca3255cc9e035918dc37cc97bd6a --- .../main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hv-collector-domain') 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() -- cgit 1.2.3-korg