openBackhaul / MicroWaveDeviceInventory

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

[NotificationService] /v1/regard-device-attribute-value-changes has inconsistent error handling #983

Open kmohr-soprasteria opened 4 months ago

kmohr-soprasteria commented 4 months ago

The service returns inconsistent responses.

I noticed the following when calling the service. If I call the service with the responseBody containg

See examples below.



Examples:

A: returns 204, all fine
{
  "notification-proxy-1-0:attribute-value-changed-notification":
  {
    "counter": 1,
    "timestamp": "2024-06-06T11:41:08.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"
  }
}
--------------------------------------------------------------
B: unknown attribute-name, still returns 204
{
  "notification-proxy-1-0:attribute-value-changed-notification":
  {
    "counter": 1,
    "timestamp": "2024-06-06T11:41:08.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": "some-unknown-attribute",
    "new-value": "513249876A"
  }
}
--------------------------------------------------------------
C: invalid object-path due to unknown mountName/ltp combination
{
  "notification-proxy-1-0:attribute-value-changed-notification":
  {
    "counter": 1,
    "timestamp": "2024-06-06T11:41:08.0+00:00",
    "object-path": "/core-model-1-4:network-control-domain=live/control-construct=513250006/logical-termination-point=someUnknownLtp/ltp-augment-1-0:ltp-augment-pac",
    "attribute-name": "external-label",
    "new-value": "513249876A"
  }
}
--------------------------------------------------------------
D: invalid object-path due to invalid path itself
{
  "notification-proxy-1-0:attribute-value-changed-notification":
  {
    "counter": 1,
    "timestamp": "2024-06-06T11:41:08.0+00:00",
    "object-path": "/core-model-1-4:network-control-domain=live/control-construct={a-valid-mountName}/logical-termination-point={a-valid-LTP}/some-unknown-class",
    "attribute-name": "external-label",
    "new-value": "513249876A"
  }
}

Screenshots: image image