Closed Ziabatcha closed 9 months ago
Done. The logic for determining the resource path has been adapted. Please retest.
Still observing the issue in v1.0.0_impl branch logs: "method": "post", "url": "HTTP://x.x.x.x:xxxx/v1/regard-device-attribute-value-change", "data": "{\"notification-proxy-1-0:attribute-value-changed-notification\":{\"new-value\":\"false\",\"timestamp\":\"2023-12-07T06:53:50+01:00\",\"attribute-name\":\"adaptive-modulation-is-on\",\"object-id-ref\":\"LTP-MWPS-TTP-5-1\",\"counter\":3}}" }, "code": "ERR_BAD_REQUEST", "status": 400 }
We construct resource output path from the node-id and object-id-ref. Please verify that the structure is as expected.
input:
{
"ietf-restconf:notification": {
"air-interface-2-0:attribute-value-changed-notification": {
"new-value": "true",
"timestamp": "2023-11-29T10:30:31+01:00",
"attribute-name": "adaptive-modulation-is-on",
"object-id-ref": "LTP-MWPS-TTP-5-1",
"counter": 25
}
},
"event-time": "2023-11-29T09:30:31.435Z",
"node-id": "513250004"
}
output:
{
"notification-proxy-1-0:attribute-value-changed-notification": {
"new-value": "true",
"timestamp": "2023-11-29T10:30:31+01:00",
"attribute-name": "adaptive-modulation-is-on",
"counter": 25,
"resource": "/core-model-1-4:network-control-domain=live/control-construct=513250004/logical-termination-point=LTP-MWPS-TTP-5-1",
}
}
According to the updated definition of the Notifications, it should be object-path instead of resource. v1.0.1_spec will be updated.
Apart from that. there should be no comma in front of curly bracket.
After invoking API request:v1/notify-device-attribute-value-changes, got response as 204 in swagger. Now user tried to trigger the device attribute change notification from device, observing below error message in docker logs
Logs:
[11:11:53.353] ERROR (1): error during subscriber-notification for /v1/notify-device-attribute-value-changes err: { "message": "Request failed with status code 404", "name": "AxiosError", "stack": AxiosError: Request failed with status code 404 at settle (/home/openbackhaul/NotificationProxy/node_modules/axios/dist/node/axios.cjs:1913:12) at IncomingMessage.handleStreamEnd (/home/openbackhaul/NotificationProxy/node_modules/axios/dist/node/axios.cjs:2995:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "adapter": [ "xhr", "http" ], "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "Blob": null }, ... ...
"method": "post", "url": "HTTP://x.x.x.x:xxxx/v1/regard-device-attribute-value-change", "data": "{\"notification-proxy-1-0:attribute-value-changed-notification\":{\"new-value\":\"200\",\"attribute-name\":\"maintenance-timer\",\"timestamp\":\"2023-11-30T11:11:53.0+00:00\",\"counter\":4,\"resource\":\"/core-model-1-4:network-control-domain=live/control-construct=513250006/logical-termination-point[uuid='LTP-MWPS-TTP-ODU-A']/layer-protocol[local-id='LP-MWPS-TTP-ODU-A']/air-interface-2-0:air-interface-pac/air-interface-configuration\"}}" }, "code": "ERR_BAD_REQUEST", "status": 404 }