aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-core/src/main/kotlin
diff options
context:
space:
mode:
authorkjaniak <kornel.janiak@nokia.com>2018-07-05 08:13:59 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-08-02 11:48:39 +0200
commitded37b93986695c241de62c77f48fa631e071287 (patch)
tree8f9ebe08ec17dbcad5677b2c16bdf392f7bebbf8 /hv-collector-core/src/main/kotlin
parentc3accea4f7e27df5c032e369a15965ef6109b364 (diff)
Enhancement of routing test
Change-Id: I432c09a219928d1a89a0c619db0e8cc3104af0ec Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
Diffstat (limited to 'hv-collector-core/src/main/kotlin')
-rw-r--r--hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt
index 12e1c1e6..3f355e34 100644
--- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt
+++ b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt
@@ -27,20 +27,18 @@ internal class MessageValidator {
val requiredFieldDescriptors = listOf(
"version",
"eventName",
- "domain",
+ // "domain", TODO to be restored back when GPB schema will include default value
"eventId",
"sourceName",
"reportingEntityName",
- "priority",
+ // "priority", TODO to be restored back when GPB schema will include default value
"startEpochMicrosec",
"lastEpochMicrosec",
"sequence")
.map { fieldName -> CommonEventHeader.getDescriptor().findFieldByName(fieldName)}
fun isValid(message: VesMessage): Boolean {
- val header = message.header
- val ret = allMandatoryFieldsArePresent(header) && header.domain == CommonEventHeader.Domain.HVRANMEAS
- return ret
+ return allMandatoryFieldsArePresent(message.header)
}
private fun allMandatoryFieldsArePresent(header: CommonEventHeader) =