Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions code/API_definitions/connectivity-insights-subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,25 @@ components:
Set to `true` by API consumer if consumer wants to get an event as
soon as the subscription is created and current situation reflects
event request.
monitoringTimeOffset:
type: string
format: duration
maxLength: 20
description: |
This is an optional input parameter. A positive duration can be
provided to request predictive data for the subscription.
The value represents an offset from the current evaluation time to the
future point in time for which network performance is assessed.
If no value is provided, the current date and time is used and network
data for the monitoring data aggregation is used to check network
performance against the application profile defined.
It must follow ISO 8601 Durations.
Examples:
- PT10S = 10 seconds ahead
- PT1M = 1 minute ahead
- PT5M = 5 minutes ahead
- PT10M = 10 minutes ahead
example: "PT10S"
SinkCredential:
type: object
description: |
Expand Down Expand Up @@ -872,6 +891,7 @@ components:
example: "https://notificationSendServer12.supertelco.com"
CloudEvent:
description: The Cloud-Event used for the callback.
type: object
required:
- id
- source
Expand Down
1 change: 1 addition & 0 deletions code/API_definitions/connectivity-insights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ components:
DeviceResponseBody:
description: |
The optional device identifier to include in the response
type: object
properties:
device:
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,25 @@ Feature: CAMARA Connectivity Insights Subscriptions API, vwip - Operations for S
And notification body complies with the OAS schema at "/components/schemas/EventNetworkQuality"
And type="org.camaraproject.connectivity-insights-subscriptions.v0.network-quality"

@connectivity_insights_subscriptions_32_create_subscription_with_monitoring_time_offset
Scenario: Create subscription with monitoringTimeOffset for predictive data
Given that subscriptions are created synchronously
And a valid subscription request body with network quality event type
And the request body property "$.config.monitoringTimeOffset" is set to "PT5M"
When the request "createSubscription" is sent
Then the response code is 201
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/Subscription"

@connectivity_insights_subscriptions_33_create_subscription_without_monitoring_time_offset
Scenario: Create subscription without monitoringTimeOffset defaults to current time
Given that subscriptions are created synchronously
And a valid subscription request body with network quality event type
And the request body property "$.config.monitoringTimeOffset" is not provided
When the request "createSubscription" is sent
Then the response code is 201
And the response body complies with the OAS schema at "/components/schemas/Subscription"

############### Error response scenarios ###########################

# 400 Error Scenarios
Expand Down Expand Up @@ -199,6 +218,16 @@ Feature: CAMARA Connectivity Insights Subscriptions API, vwip - Operations for S
And the response property "$.code" is "INVALID_ARGUMENT"
And the response property "$.message" contains a user friendly text

@connectivity_insights_subscriptions_34_invalid_monitoring_time_offset
Scenario: Create subscription with invalid monitoringTimeOffset format
Given a valid subscription request body with network quality event type
And the request body property "$.config.monitoringTimeOffset" is set to "INVALID_DURATION"
When the request "createSubscription" is sent
Then the response code is 400
And the response property "$.status" is 400
And the response property "$.code" is "INVALID_ARGUMENT"
And the response property "$.message" contains a user friendly text

# 401 Error Scenarios

@connectivity_insights_subscriptions_19_no_authorization_header
Expand Down