}
}
- on("ves hv message including header with vesEventListenerVersion field not matching required pattern") {
- val commonHeader = commonHeader(vesEventListenerVersion = "1.2.3")
- val commonHeader2 = commonHeader(vesEventListenerVersion = "sample-version")
+ on("ves hv message including header.vesEventListenerVersion with non-string major part") {
+ val commonHeader = commonHeader(vesEventListenerVersion = "sample-version")
+ val rawMessageBytes = vesEventBytes(commonHeader)
+
+
+ it("should not accept message header") {
+ val vesMessage = VesMessage(commonHeader, rawMessageBytes)
+ assertThat(cut.isValid(vesMessage)).describedAs("message validation result").isFalse()
+ }
+ }
+ on("ves hv message including header.vesEventListenerVersion with major part != 7") {
+ val commonHeader = commonHeader(vesEventListenerVersion = "1.2.3")
val rawMessageBytes = vesEventBytes(commonHeader)
- val rawMessageBytes2 = vesEventBytes(commonHeader2)
it("should not accept message header") {
val vesMessage = VesMessage(commonHeader, rawMessageBytes)
assertThat(cut.isValid(vesMessage)).describedAs("message validation result").isFalse()
+ }
+ }
+
+ on("ves hv message including header.vesEventListenerVersion with minor part not starting with a digit") {
+ val commonHeader = commonHeader(vesEventListenerVersion = "7.test")
+ val rawMessageBytes = vesEventBytes(commonHeader)
- val vesMessage2 = VesMessage(commonHeader2, rawMessageBytes2)
- assertThat(cut.isValid(vesMessage2)).describedAs("second message validation result").isFalse()
+ it("should not accept message header") {
+ val vesMessage = VesMessage(commonHeader, rawMessageBytes)
+ assertThat(cut.isValid(vesMessage)).describedAs("message validation result").isFalse()
}
}
}
CommonEventHeader commonEventHeader=1; // required
bytes eventFields=2; // required, payload
- // this field contains a domain-specific GPB message
- // the field being opaque (bytes), the decoding of the payload occurs in a separate step
- // the name of the GPB message for domain XYZ is XyzFields
- // e.g. for domain==perf3gpp, the GPB message is Perf3gppFields
+ // this field contains a domain-specific GPB message
+ // the field being opaque (bytes), the decoding of the payload occurs in a separate step
+ // the name of the GPB message for domain XYZ is XyzFields
+ // e.g. for domain==perf3gpp, the GPB message is Perf3gppFields
}
// VES CommonEventHeader adapted to GPB (Google Protocol Buffers)
-// Aligned with VES 7.0.1 schema, and extending to Performance Domain.
message CommonEventHeader
{
string version = 1; // required, "version of the gpb common event header", current value "1.0"
string domain = 2; // required, "the eventing domain associated with the event", allowed values:
- // fault, heartbeat, measurement, mobileFlow, other, pnfRegistration, sipSignaling,
- // stateChange, syslog, thresholdCrossingAlert, voiceQuality, perf3gpp
+ // fault, heartbeat, measurement, mobileFlow, other, pnfRegistration, sipSignaling,
+ // stateChange, syslog, thresholdCrossingAlert, voiceQuality, perf3gpp
uint32 sequence = 3; // required, "ordering of events communicated by an event source instance or 0 if not needed"
bytes sourceId = 15; // "UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process"
string sourceName = 16; // required, "name of the entity experiencing the event issued use A&AI entry"
string timeZoneOffset = 17; // "Offset to GMT to indicate local time zone for the device"
- string vesEventListenerVersion = 18; // required, "Version of the VesEvent Listener", current value "7.0.2"
+ string vesEventListenerVersion = 18; // required, "Version of the VesEvent Listener", current value "7.2"
reserved "InternalHeaderFields"; // "enrichment fields for internal VES Event Listener service use only, not supplied by event sources"
reserved 100;