Hi,

additionalFileds is a hashMap
According to definition
"hashMap": {
      "description": "an associative array which is an array of key:value 
pairs",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "default": {}
    }
it should be an array and you have object. This match to error you get "
[2019-03-14 12:33:11,367][WARN 
][http-nio-8080-exec-5][org.onap.dcae.restapi.VesRestController] - instance 
type (object) does not match any allowed primitive type (allowed: ["array"])
"
Try changing
{"additionalFields":{"macAddress":"01:02:03:04:05:06","softwareVersion":"1.2.3}
To
{"additionalFields":{["macAddress":"01:02:03:04:05:06","softwareVersion":"1.2.3]}

BR,
Marek

From: [email protected] <[email protected]> On Behalf Of 
Michail Salichos via Lists.Onap.Org
Sent: Thursday, March 14, 2019 1:57 PM
To: [email protected]
Subject: [onap-discuss] VES collector error

Hi,

I am trying to POST a VES event (details below) and getting an error (also 
below). It seems it is related to not conforming with the schema version but I 
can't spot the problem.

https://wiki.onap.org/display/DW/CPE+Authentication+Notification#CPEAuthenticationNotification-CPEAuthenticationVESEvent

CPE authentication VES message sent:
{"event":{"commonEventHeader":{"sourceId":"","startEpochMicrosec":1.413378172E15,"eventId":"ab305d54-85b4-a31b-7db2fb6b9e546015","timeZoneOffset":"","reportingEntityId":"","internalHeaderFields":{},"eventType":"applicationNf","priority":"Normal","version":7.1,"reportingEntityName":"thirdparty-sdnc-idfromesrrequest","sequence":0,"domain":"stateChange","lastEpochMicrosec":1.413378172E15,"eventName":"StateChange_cpe_authentication","vesEventListenerVersion":"","sourceName":"pnf-1"},"stateChangeFields":{"additionalFields":{"macAddress":"01:02:03:04:05:06","softwareVersion":"1.2.3"},"oldState":"outOfService","stateChangeFieldsVersion":1,"stateInterface":"","newState":"inService"}}}

Schema:
https://git.onap.org/dcaegen2/collectors/ves/tree/etc/CommonEventFormat_30.0.1.json

VES collector logs:
[2019-03-14 12:33:11,366][WARN 
][http-nio-8080-exec-5][org.onap.dcae.restapi.VesRestController] - Schema 
validation failed for event: 
{"event":{"commonEventHeader":{"sourceId":"","startEpochMicrosec":1.413378172E15,"eventId":"ab305d54-85b4-a31b-7db2fb6b9e546015","timeZoneOffset":"","reportingEntityId":"","internalHeaderFields":{},"eventType":"applicationNf","priority":"Normal","version":7.1,"reportingEntityName":"thirdparty-sdnc-idfromesrrequest","sequence":0,"domain":"stateChange","lastEpochMicrosec":1.413378172E15,"eventName":"StateChange_cpe_authentication","vesEventListenerVersion":"","sourceName":"pnf-1"},"stateChangeFields":{"additionalFields":{"macAddress":"01:02:03:04:05:06","softwareVersion":"1.2.3"},"oldState":"outOfService","stateChangeFieldsVersion":1,"stateInterface":"","newState":"inService"}}}
[2019-03-14 12:33:11,367][WARN 
][http-nio-8080-exec-5][org.onap.dcae.restapi.VesRestController] - instance 
type (object) does not match any allowed primitive type (allowed: ["array"])

Error:
{"requestError":{"ServiceException":{"messageId":"SVC0002","text":"Bad 
Parameter (JSON does not conform to schema)"}}}

Michail



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16064): https://lists.onap.org/g/onap-discuss/message/16064
Mute This Topic: https://lists.onap.org/mt/30429262/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to