openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

Observing error 500 when device-attribute-value-change notification received for device external-label #991

Closed Ziabatcha closed 5 days ago

Ziabatcha commented 2 months ago

When user edited external-label under ltp-augment-pac, observing error message in docker logs verision:1.1.2.f_impl

Log:

[12.07.2024 08:36.56.925] [LOG]   Send data to Requestor:http://172.28.127.10:3008/core-model-1-4:network-control-domain=live/control-construct=513250006/logical-termination-point=LTP-MWPS-TTP-ODU-A/ltp-augment-1-0:ltp-augment-pac
[12.07.2024 08:36.56.956] [LOG]
 callback : http://172.28.127.19:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=513250006/yang-ext:mount/core-model-1-4:control-construct/logical-termination-point=LTP-MWPS-TTP-ODU-A/ltp-augment-1-0:ltp-augment-pac header :{"Authorization":"Basic YWRtaW46YWRtaW4="}body :""response code:200
GET /core-model-1-4:network-control-domain=live/control-construct=513250006/logical-termination-point=LTP-MWPS-TTP-ODU-A/ltp-augment-1-0:ltp-augment-pac 200 127.854 ms - 193
[12.07.2024 08:36.57.056] [ERROR] TypeError: json.hasOwnProperty is not a function
    at hasAttribute (/home/openbackhaul/microWaveDeviceInventory/service/IndividualServicesService.js:11916:14)
    at hasAttribute (/home/openbackhaul/microWaveDeviceInventory/service/IndividualServicesService.js:11922:13)
    at hasAttribute (/home/openbackhaul/microWaveDeviceInventory/service/IndividualServicesService.js:11922:13)
    at /home/openbackhaul/microWaveDeviceInventory/service/IndividualServicesService.js:10242:19
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
POST /v1/regard-device-attribute-value-change 500 166.686 ms - 55
Ziabatcha commented 5 days ago

image

Tested okay with 1.1.2g package. Able to see the modified value for external label in MWDI once its changed from controller.

Logs:

{"notification-proxy-1-0:attribute-value-changed-notification":{"counter":21,"timestamp":"2024-09-11T08:22:12.0+00:00","object-path":"/core-model-1-4:network-control-domain=live/control-construct=513250006/logical-termination-point=LTP-MWPS-TTP-ODU-A/ltp-augment-1-0:ltp-augment-pac","attribute-name":"external-label","new-value":"513249876A"}}

curl -X POST "http://xx:xx/v1/regard-device-attribute-value-change" -H "accept: application/json" -H "user: User Name" -H "originator: Resolver" -H "x-correlator: 550e8400-e29b-11d4-a716-446655440000" -H "trace-indicator: 1.3.1" -H "customer-journey: Unknown value" -H "operation-key: Operation key not yet provided." -H "Content-Type: application/json" -d "{\"notification-proxy-1-0:attribute-value-changed-notification\":{\"counter\":21,\"timestamp\":\"2024-09-11T08:22:12.0+00:00\",\"object-path\":\"/core-model-1-4:network-control-domain=live/control-construct=513250006/logical-termination-point=LTP-MWPS-TTP-ODU-A/ltp-augment-1-0:ltp-augment-pac\",\"attribute-name\":\"external-label\",\"new-value\":\"513249876A\"}}"

204 Response: access-control-allow-origin: * backend-time: 0 connection: keep-alive date: Wed, 11 Sep 2024 09:53:34 GMT exec-time: 201.272348 keep-alive: timeout=5 life-cycle-state: EXPERIMENTAL x-correlator: 550e8400-e29b-11d4-a716-446655440000 x-powered-by: Express

image