Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Introduce 'qosStatus' and corresponding notification event to fix issue #38 #67

Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 63 additions & 7 deletions code/API_definitions/qod-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ paths:
description: |
Important: this endpoint is to be implemented by the API consumer.
The QoD server will call this endpoint whenever any network related event occurs.
Currently only SESSION_TERMINATED event is implemented. Any other network events are ignored.
Currently only QOS_STATUS_CHANGED event is defined.
operationId: postNotification
requestBody:
required: true
Expand Down Expand Up @@ -251,6 +251,7 @@ components:
- duration
- startedAt
- expiresAt
- qosStatus
properties:
id:
$ref: "#/components/schemas/SessionId"
Expand All @@ -264,6 +265,8 @@ components:
example: 1639566000
description: Timestamp of session expiration if the session was not deleted, in seconds since unix epoch
format: int64
qosStatus:
$ref: "#/components/schemas/QosStatus"
messages:
type: array
items:
Expand All @@ -277,7 +280,10 @@ components:
example: 86400
description: |
Session duration in seconds. Maximal value of 24 hours is used if not set.
After session has expired the client will receive SESSION_TERMINATED event. See notification callback.
After session has expired the client will receive QOS_STATUS_CHANGED event with
- qosStatus is 'UNAVAILABLE', and,
- statusInfo is 'DURATION_EXPIRED'.
See notification callback.
format: int32
minimum: 1
maximum: 86400
Expand Down Expand Up @@ -352,20 +358,58 @@ components:
* `QOS_S` - Qualifier for the requested QoS profile _S_
* `QOS_M` - Qualifier for the requested QoS profile _M_
* `QOS_L` - Qualifier for the requested QoS profile _L_

Notification:
type: object
required:
- sessionId
- event
- eventReports
properties:
sessionId:
$ref: "#/components/schemas/SessionId"
event:
$ref: "#/components/schemas/SessionEvent"
SessionEvent:
eventReports:
type: array
items:
$ref: "#/components/schemas/EventReport"
minItems: 1
description: Contains the reported event and applicable information

EventReport:
oneOf:
- $ref: '#/components/schemas/QosStatusChangedEventReport'
discriminator:
propertyName: eventType
mapping:
QOS_STATUS_CHANGED: "#/components/schemas/QosStatusChangedEventReport"

QosStatusChangedEventReport:
type: object
required:
- eventType
- qosStatus
properties:
eventType:
$ref: "#/components/schemas/SessionEventType"
qosStatus:
$ref: "#/components/schemas/QosStatus"
statusInfo:
$ref: "#/components/schemas/StatusInfo"

StatusInfo:
type: string
enum:
- DURATION_EXPIRED
- NETWORK_TERMINATED
description: |
Reason for the new `qosStatus`. Currently `statusInfo` is only applicable when `qosStatus` is 'UNAVAILABLE'.
* `DURATION_EXPIRED` - Session terminated due to requested duration expired
* `NETWORK_TERMINATED` - Network terminated the session before the requested duration expired

SessionEventType:
type: string
enum:
- SESSION_TERMINATED
- QOS_STATUS_CHANGED

ErrorInfo:
type: object
required:
Expand Down Expand Up @@ -446,6 +490,18 @@ components:
required:
- severity
- description

QosStatus:
type: string
enum:
- REQUESTED
- AVAILABLE
- UNAVAILABLE
description: |
* `REQUESTED` - QoS has been requested by creating a session
* `AVAILABLE` - The requested QoS has been provided by the network
* `UNAVAILABLE` - The requested QoS cannot be provided by the network due to some reason

responses:
Generic400:
description: Invalid input
Expand Down