From 681a647d53821ff70024e62d14ccf879bc729b49 Mon Sep 17 00:00:00 2001 From: XunliYang Date: Wed, 4 Feb 2026 16:54:22 +0800 Subject: [PATCH] feat: update and align to CAMARA Commonalities 0.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update device identifier constraints in feature files - Update device identifier logic description to clarify multi-identifier handling - x-camara-commonalities formatted as a string (“0.7”) - Update the names to DeviceIpv4Address and SingleIpv4Address in Device object schema --- code/API_definitions/network-slice-assignment.yaml | 14 +++++++------- code/API_definitions/network-slice-booking.yaml | 2 +- .../network-slice-assignment-assignDevice.feature | 2 +- .../network-slice-assignment-releaseDevice.feature | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/API_definitions/network-slice-assignment.yaml b/code/API_definitions/network-slice-assignment.yaml index bfd3812..75890c2 100644 --- a/code/API_definitions/network-slice-assignment.yaml +++ b/code/API_definitions/network-slice-assignment.yaml @@ -49,7 +49,7 @@ info: As a specific rule, error `501 - NOT_IMPLEMENTED` can be only a possible error response if it is explicitly documented in the API. version: wip - x-camara-commonalities: 0.6 + x-camara-commonalities: "0.7" license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html @@ -393,7 +393,7 @@ components: * `ipv6Address` * `phoneNumber` * `networkAccessIdentifier` - NOTE1: the network operator might support only a subset of these options. The API invoker can provide multiple identifiers to be compatible across different network operators. In this case the identifiers MUST belong to the same device. + NOTE1: the network operator might support only a subset of these options. The API Consumer can provide multiple identifiers to ensure compatibility across different network operators. In this case, the API Provider will use one of the identifiers for the API logic without performing any matching checks among the provided identifiers. NOTE2: as for this Commonalities release, we are enforcing that the networkAccessIdentifier is only part of the schema for future-proofing, and CAMARA does not currently allow its use. After the CAMARA meta-release work is concluded and the relevant issues are resolved, its use will need to be explicitly documented in the guidelines. type: object properties: @@ -402,7 +402,7 @@ components: networkAccessIdentifier: $ref: "#/components/schemas/NetworkAccessIdentifier" ipv4Address: - $ref: "#/components/schemas/DeviceIpv4Addr" + $ref: "#/components/schemas/DeviceIpv4Address" ipv6Address: $ref: "#/components/schemas/DeviceIpv6Address" minProperties: 1 @@ -426,7 +426,7 @@ components: type: string example: "123456789@example.com" - DeviceIpv4Addr: + DeviceIpv4Address: type: object description: | The device should be identified by either the public (observed) IP address and port as seen by the application server, or the private (local) and any public (observed) IP addresses in use by the device (this information can be obtained by various means, for example from some DNS servers). @@ -438,9 +438,9 @@ components: In all cases, publicAddress must be specified, along with at least one of either privateAddress or publicPort, dependent upon which is known. In general, mobile devices cannot be identified by their public IPv4 address alone. properties: publicAddress: - $ref: "#/components/schemas/SingleIpv4Addr" + $ref: "#/components/schemas/SingleIpv4Address" privateAddress: - $ref: "#/components/schemas/SingleIpv4Addr" + $ref: "#/components/schemas/SingleIpv4Address" publicPort: $ref: "#/components/schemas/Port" anyOf: @@ -449,7 +449,7 @@ components: example: publicAddress: "84.125.93.10" publicPort: 59765 - SingleIpv4Addr: + SingleIpv4Address: description: A single IPv4 address with no subnet mask type: string format: ipv4 diff --git a/code/API_definitions/network-slice-booking.yaml b/code/API_definitions/network-slice-booking.yaml index 593663e..8e1b3a4 100644 --- a/code/API_definitions/network-slice-booking.yaml +++ b/code/API_definitions/network-slice-booking.yaml @@ -44,7 +44,7 @@ info: As a specific rule, error `501 - NOT_IMPLEMENTED` can be only a possible error response if it is explicitly documented in the API. version: wip - x-camara-commonalities: 0.6 + x-camara-commonalities: "0.7" license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/code/Test_definitions/network-slice-assignment-assignDevice.feature b/code/Test_definitions/network-slice-assignment-assignDevice.feature index f2b4244..68e642c 100644 --- a/code/Test_definitions/network-slice-assignment-assignDevice.feature +++ b/code/Test_definitions/network-slice-assignment-assignDevice.feature @@ -27,7 +27,7 @@ Feature: CAMARA Network Slice Assignment API vwip - Operation assignDevice And the response header "x-correlator" has same value as the request header "x-correlator" And the response body complies with the OAS schema at "/components/schemas/DeviceAssignmentInfo" And the response property "$.sliceId" is a character string - And the response property "$.device" exists only if provided in the request body and with the same value + And the response property "$.device" exists only if provided in the request body and always if more than one device identifier is provided, And contains a single device identifier that was included in the request And the assigned status include in "SUCCESS" and "FAILURE" And the corresponding status prompt information diff --git a/code/Test_definitions/network-slice-assignment-releaseDevice.feature b/code/Test_definitions/network-slice-assignment-releaseDevice.feature index 8d40f4b..c92685e 100644 --- a/code/Test_definitions/network-slice-assignment-releaseDevice.feature +++ b/code/Test_definitions/network-slice-assignment-releaseDevice.feature @@ -30,7 +30,7 @@ Feature: CAMARA Network Slice Assignment API vwip - Operation releaseDevice And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" And the response property "$.sliceId" is a character string - And the response property "$.device" exists only if provided in the request body and with the same value + And the response property "$.device" exists only if provided in the request body and always if more than one device identifier is provided, And contains a single device identifier that was included in the request And the response property "$.status" include in "SUCCESS" and "FAILURE" And the response property "$.statusInfo" contains a user friendly text