From 98d1f862238784c58349f9624624b6a38ffc9ea1 Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:54:52 +0800 Subject: [PATCH 01/11] Update qod-api.yaml Add a new operation to extend session duration --- code/API_definitions/qod-api.yaml | 79 +++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index bd228c82a9..66d376f89c 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -290,6 +290,68 @@ paths: - threeLegged: - "qod-sessions-delete" + /sessions/{sessionId}/extend: + post: + tags: + - Extend or reduce QoS session duration + summary: "Extend or reduce QoS session duration" + description: | + Extend or reduce the duration of an active QoS session. + If this operation is executed successfully, the new duration of the target session will be original duration plus extended duration. + If the new duration is shorter than or equal to elapsed duration, the session will be terminated. + operationId: extendQosSessionDuration + parameters: + - name: sessionId + in: path + description: Session ID that was obtained from the createSession operation + required: true + schema: + $ref: "#/components/schemas/SessionId" + requestBody: + description: Parameters to extend or reduce the duration of an active session + content: + application/json: + schema: + $ref: "#/components/schemas/ExtendSessionDuration" + required: true + responses: + "200": + description: Contains information about active session + content: + application/json: + schema: + $ref: "#/components/schemas/SessionInfo" + "400": + description: Invalid input for createSession operation + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfo" + examples: + Generic400: + summary: Some parameter combinations or parameter values provided are not schema compliant + value: + status: 400 + code: INVALID_ARGUMENT + message: "Schema validation failed at ..." + InactiveSession: + summary: The target session is inactive + value: + status: 400 + code: INVALID_ARGUMENT + message: "The target session is inactive" + "401": + $ref: "#/components/responses/Generic401" + "403": + $ref: "#/components/responses/Generic403" + "404": + $ref: "#/components/responses/SessionNotFound404" + "500": + $ref: "#/components/responses/Generic500" + "503": + $ref: "#/components/responses/Generic503" + + /qos-profiles: get: tags: @@ -517,6 +579,23 @@ components: - 5060 - 5070 + ExtendSessionDuration: + description: Attributes required to extend or reduce the duration of a session + type: object + properties: + extendedDuration: + description: | + Session duration in seconds. + Positive value means extending the durtion while negative value means reducing. + type: integer + format: int32 + minimum: -86399 + maximum: 86399 + example: 60 + required: + - duration + + QosProfile: description: | Data type with attributes of a QosProfile From 63ebc70df8f0555727284e8f4e0e6076d2496007 Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:01:08 +0800 Subject: [PATCH 02/11] Update qod-api.yaml --- code/API_definitions/qod-api.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index 66d376f89c..fa31768fb6 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -322,7 +322,7 @@ paths: schema: $ref: "#/components/schemas/SessionInfo" "400": - description: Invalid input for createSession operation + description: Invalid input for extendQosSessionDuration operation content: application/json: schema: @@ -593,7 +593,7 @@ components: maximum: 86399 example: 60 required: - - duration + - extendedDuration QosProfile: From 5e2013d2d7e488cc10dccf1c9586df70c469a3da Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:15:37 +0800 Subject: [PATCH 03/11] Update qod-api.yaml --- code/API_definitions/qod-api.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index fa31768fb6..1f7e2df21c 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -296,7 +296,7 @@ paths: - Extend or reduce QoS session duration summary: "Extend or reduce QoS session duration" description: | - Extend or reduce the duration of an active QoS session. + Extend or reduce the duration of an active QoS session. If this operation is executed successfully, the new duration of the target session will be original duration plus extended duration. If the new duration is shorter than or equal to elapsed duration, the session will be terminated. operationId: extendQosSessionDuration @@ -350,7 +350,6 @@ paths: $ref: "#/components/responses/Generic500" "503": $ref: "#/components/responses/Generic503" - /qos-profiles: get: @@ -585,7 +584,7 @@ components: properties: extendedDuration: description: | - Session duration in seconds. + Session duration in seconds. Positive value means extending the durtion while negative value means reducing. type: integer format: int32 From bbecbbb077c77a822ae9f8cad3e68c93a0d73bed Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:43:58 +0800 Subject: [PATCH 04/11] Update qod-api.yaml --- code/API_definitions/qod-api.yaml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index 1f7e2df21c..cbba3e1364 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -293,12 +293,11 @@ paths: /sessions/{sessionId}/extend: post: tags: - - Extend or reduce QoS session duration - summary: "Extend or reduce QoS session duration" + - Change session duration + summary: "Extend the duration of an active session" description: | - Extend or reduce the duration of an active QoS session. - If this operation is executed successfully, the new duration of the target session will be original duration plus extended duration. - If the new duration is shorter than or equal to elapsed duration, the session will be terminated. + Extend the duration of an active QoS session. + If this operation is executed successfully, the new duration of the target session will be the original duration plus extended duration. operationId: extendQosSessionDuration parameters: - name: sessionId @@ -308,7 +307,7 @@ paths: schema: $ref: "#/components/schemas/SessionId" requestBody: - description: Parameters to extend or reduce the duration of an active session + description: Parameters to extend the duration of an active session content: application/json: schema: @@ -579,20 +578,19 @@ components: - 5070 ExtendSessionDuration: - description: Attributes required to extend or reduce the duration of a session + description: Attributes required to extend the duration of an active session type: object properties: - extendedDuration: + additionalDuration: description: | - Session duration in seconds. - Positive value means extending the durtion while negative value means reducing. + Additional duration in seconds to be extended. type: integer format: int32 - minimum: -86399 + minimum: 1 maximum: 86399 example: 60 required: - - extendedDuration + - additionalDuration QosProfile: From 1bb7d164366ab31a6a7d139efc4b98c0e902297b Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:24:22 +0800 Subject: [PATCH 05/11] Update qod-api.yaml --- code/API_definitions/qod-api.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index cbba3e1364..776125a9b9 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -339,6 +339,12 @@ paths: status: 400 code: INVALID_ARGUMENT message: "The target session is inactive" + ExceedMaxDuration: + summary: The extended session duration exceeds the limit + value: + status: 400 + code: INVALID_ARGUMENT + message: "The extended session duration exceeds the limit of 86,400 seconds" "401": $ref: "#/components/responses/Generic401" "403": @@ -349,6 +355,10 @@ paths: $ref: "#/components/responses/Generic500" "503": $ref: "#/components/responses/Generic503" + security: + - oAuth2ClientCredentials: [] + - threeLegged: + - "qod-sessions-write" /qos-profiles: get: From 4ef54ee5b93647f613f2184e6797b8739f8ddcf2 Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:06:12 +0800 Subject: [PATCH 06/11] Update qod-api.yaml --- code/API_definitions/qod-api.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index 776125a9b9..e795482abf 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -297,7 +297,9 @@ paths: summary: "Extend the duration of an active session" description: | Extend the duration of an active QoS session. - If this operation is executed successfully, the new duration of the target session will be the original duration plus extended duration. + If this operation is executed successfully, the new duration of the target session will be the original duration plus the additional duration. + The remaining duration plus the requested additional duration shall not exceed the maximum limit. + Otherwise, the additional duration will be the maximum limit minus the remaining duration. operationId: extendQosSessionDuration parameters: - name: sessionId @@ -339,12 +341,6 @@ paths: status: 400 code: INVALID_ARGUMENT message: "The target session is inactive" - ExceedMaxDuration: - summary: The extended session duration exceeds the limit - value: - status: 400 - code: INVALID_ARGUMENT - message: "The extended session duration exceeds the limit of 86,400 seconds" "401": $ref: "#/components/responses/Generic401" "403": @@ -591,7 +587,7 @@ components: description: Attributes required to extend the duration of an active session type: object properties: - additionalDuration: + requestedAdditionalDuration: description: | Additional duration in seconds to be extended. type: integer @@ -600,7 +596,7 @@ components: maximum: 86399 example: 60 required: - - additionalDuration + - requestedAdditionalDuration QosProfile: From 327b1a2f61781452eafa717196d7ef13836b84bb Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:10:45 +0800 Subject: [PATCH 07/11] Update qod-api.yaml From 58230bded9db401bf6cfa65e32cd1bdba2ef7645 Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:22:01 +0800 Subject: [PATCH 08/11] Update qod-api.yaml From f0f25b709f229deb0677994fcf7fc8ae3462db4f Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:29:13 +0800 Subject: [PATCH 09/11] Update qod-api.yaml --- code/API_definitions/qod-api.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index e795482abf..c9502f8e2b 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -296,10 +296,7 @@ paths: - Change session duration summary: "Extend the duration of an active session" description: | - Extend the duration of an active QoS session. - If this operation is executed successfully, the new duration of the target session will be the original duration plus the additional duration. - The remaining duration plus the requested additional duration shall not exceed the maximum limit. - Otherwise, the additional duration will be the maximum limit minus the remaining duration. + Extend the duration of an active QoS session. If this operation is executed successfully, the new duration of the target session will be the original duration plus the additional duration. The remaining duration plus the requested additional duration shall not exceed the maximum limit. Otherwise, the additional duration will be the maximum limit minus the remaining duration. operationId: extendQosSessionDuration parameters: - name: sessionId From bd03b284814fe4ca0be97141ff792dda98c84d8c Mon Sep 17 00:00:00 2001 From: emil-cheung <90314555+emil-cheung@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:07:51 +0800 Subject: [PATCH 10/11] Update qod-api.yaml Change the tags of extend session duration operation. --- code/API_definitions/qod-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index c9502f8e2b..e71e4e80dc 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -293,7 +293,7 @@ paths: /sessions/{sessionId}/extend: post: tags: - - Change session duration + - QoS Sessions summary: "Extend the duration of an active session" description: | Extend the duration of an active QoS session. If this operation is executed successfully, the new duration of the target session will be the original duration plus the additional duration. The remaining duration plus the requested additional duration shall not exceed the maximum limit. Otherwise, the additional duration will be the maximum limit minus the remaining duration. From 867c74384f8dec5c7cbcf1120342e54b388a72ee Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:08:55 +0100 Subject: [PATCH 11/11] Update code/API_definitions/qod-api.yaml Co-authored-by: Jose Luis Urien --- code/API_definitions/qod-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/qod-api.yaml b/code/API_definitions/qod-api.yaml index e71e4e80dc..215e4738f6 100644 --- a/code/API_definitions/qod-api.yaml +++ b/code/API_definitions/qod-api.yaml @@ -296,7 +296,7 @@ paths: - QoS Sessions summary: "Extend the duration of an active session" description: | - Extend the duration of an active QoS session. If this operation is executed successfully, the new duration of the target session will be the original duration plus the additional duration. The remaining duration plus the requested additional duration shall not exceed the maximum limit. Otherwise, the additional duration will be the maximum limit minus the remaining duration. + Extend the duration of an active QoS session. If this operation is executed successfully, the new duration of the target session will be the original duration plus the additional duration. The remaining duration plus the requested additional duration shall not exceed the maximum limit. Otherwise, the new remaining duration will be the maximum limit. operationId: extendQosSessionDuration parameters: - name: sessionId