openBackhaul / MicroWaveDeviceInventory

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

[LinkService] Putting a life-cycle-state for /core-mode-1-4:network-control-domain=cache/link={uuid} does not work (uuid pattern check fails) #958

Open kmohr-soprasteria opened 5 months ago

kmohr-soprasteria commented 5 months ago

To put a life-cycle-state the following operation is called: /core-model-1-4:control-construct/logical-termination-point={uuid}/layer-protocol=0/operation-server-interface-1-0:operation-server-interface-pac/operation-server-interface-configuration/life-cycle-state

It contains the uuid-path parameter, which is the related uuid of the service, for which the life-cycle-state shall be put, in this case, the operation to test is GET /core-mode-1-4:network-control-domain=cache/link={uuid}

The GET operation has the uuid mwdi-1-1-0-op-s-get-is-205.

Postman returns the following error:

{
  "code": 400,
  "message": "request.params.uuid should match pattern \"^([a-z]{2,6})-([0-9]{1,2})-([0-9]{1,2})-([0-9]{1,2})-op-s-([bi][ms])-([0-9]{3})$\"",
  "errors": [
    {
      "path": ".params.uuid",
      "message": "should match pattern \"^([a-z]{2,6})-([0-9]{1,2})-([0-9]{1,2})-([0-9]{1,2})-op-s-([bi][ms])-([0-9]{3})$\"",
      "errorCode": "pattern.openapi.validation"
    }
  ]
}

Executing the request fails, because the related service uuid does not match the provided pattern, as for MWDI we have the special case, that the following two operation servers have uuids containing get/put/del. See:

# individual services:
        - operation-name: /core-model-1-4:network-control-domain=cache/link={uuid}
          uuid: mwdi-1-1-0-op-s-get-is-205, mwdi-1-1-0-op-s-put-is-205, mwdi-1-1-0-op-s-del-is-205
        - operation-name: /core-model-1-4:network-control-domain=cache/link={uuid}/link-port={localId}
          uuid: mwdi-1-1-0-op-s-get-is-206, mwdi-1-1-0-op-s-put-is-206, mwdi-1-1-0-op-s-del-is-206

As this fails, I would assume that this is a general problem for both services for all paths under "OAM Layer - Basic Part", as they all use the uuid as path parameter.

I will create an additional issue for that as well.

nardecchia-siae commented 5 months ago

This behavior is due to the openapi validator implementation in the framework. It is necessary to modify this part that is not developed by SIAE.