Skip to content
Merged
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
185 changes: 185 additions & 0 deletions Z_WIP/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
/v1/provide-device-status-metadata:
post:
operationId: provideDeviceStatusMetadata
summary: 'Provides metadata status of devices from deviceMetadataList'
tags:
- IndividualServices
security:
- apiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- description: 'Mount-name list filter'
type: object
properties:
mount-name-list:
type: array
items:
type: string
example:
mount-name-list:
- '305251234'
- '105258888'
responses:
'200':
description: 'Device status metadata provided'
content:
application/json:
schema:
type: object
required:
- device-status-metadata
properties:
device-status-metadata:
type: array
items:
required:
- mount-name
- connection-status
- changed-to-disconnected-time
- added-to-device-list-time
- last-complete-control-construct-update-time-attempt
- last-successful-complete-control-construct-update-time
- last-control-construct-notification-update-time
- number-of-partial-updates-since-last-complete-update
- schema-cache-directory
- device-type
- vendor
properties:
mount-name:
type: string
connection-status:
type: string
enum:
- 'connected'
- 'disconnected'
changed-to-disconnected-time:
type: string
added-to-device-list-time:
type: string
last-complete-control-construct-update-time-attempt:
type: string
last-successful-complete-control-construct-update-time:
type: string
last-control-construct-notification-update-time:
type: string
number-of-partial-updates-since-last-complete-update:
type: integer
schema-cache-directory:
type: string
device-type:
type: string
vendor:
type: string
example:
device-status-metadata:
- mount-name: '305251234'
connection-status: 'connected'
changed-to-disconnected-time: ''
added-to-device-list-time: '2024-10-10T14:00:00+01:00'
last-complete-control-construct-update-time-attempt: '2024-10-10T14:00:05+01:00'
last-successful-complete-control-construct-update-time: '2024-10-10T14:00:05+01:00'
last-control-construct-notification-update-time: '2024-10-10T15:17:00+01:00'
number-of-partial-updates-since-last-complete-update: 7
schema-cache-directory: 'hua'
device-type: 'RTN950'
vendor: 'Huawei'
headers:
life-cycle-state:
$ref: '#/components/headers/life-cycle-state'

/v1/provide-cache-quality-statistics:
post:
operationId: provideCacheQualityStatistics
summary: 'Provides quality statistics for the cache'
tags:
- IndividualServices
security:
- apiKeyAuth: []
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
group-by:
type: string
enum:
- 'device-type'
responses:
'200':
description: 'Cache quality statistics provided'
content:
application/json:
schema:
type: object
required:
- cache-quality-statistics
properties:
cache-quality-statistics:
type: array
items:
required:
- device-type
- attribute-mismatches
- attribute-class-mismatches
- weighted-score
properties:
device-type:
type: string
attribute-mismatches:
type: integer
attribute-class-mismatches:
type: integer
weighted-score:
type: integer
example:
cache-quality-statistics:
- device-type: 'AGS20'
attribute-mismatches: 18
attribute-class-mismatches: 2
weighted-score: 31
- device-type: 'MLTN'
attribute-mismatches: 5
attribute-class-mismatches: 3
weighted-score: 19
headers:
life-cycle-state:
$ref: '#/components/headers/life-cycle-state'

/v1/provide-list-of-cached-devices:
post:
operationId: provideListOfCachedDevices
summary: 'Provides list of devices for which MWDI has a ControlConstruct in its cache'
tags:
- IndividualServices
security:
- apiKeyAuth: []
responses:
'200':
description: 'List of cached devices provided'
content:
application/json:
schema:
type: object
required:
- mount-name-list
properties:
mount-name-list:
type: array
items:
type: object
properties:
mount-name:
type: string
example:
mount-name-list:
- '305251234'
- '105258888'
headers:
life-cycle-state:
$ref: '#/components/headers/life-cycle-state'
15 changes: 13 additions & 2 deletions testing/2_functional/completeness/v2.0.1/Dataprovider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

The following list contains the services from the above diagram, for which completness tests are provided.
The list gives some information about testing limitations (currently this applies only for the link-related services):
- /v1/provide-list-of-connected-devices
- /v1/provide-list-of-device-interfaces
- /v1/provide-list-of-actual-device-equipment
- /v1/provide-list-of-links:
Expand All @@ -19,6 +18,10 @@ The list gives some information about testing limitations (currently this applie
- /v1/provide-list-of-link-ports
- /v1/provide-data-of-all-link-ports
- /v1/provide-device-status-metadata
- /v1/provide-cache-quality-statistics
- and optional filter for the link type can be provided in the requestBody upon call
- the completeness test will be executed without providing the optional filter
- /v1/provide-list-of-cached-devices

---

Expand All @@ -30,4 +33,12 @@ Therefore the related services will not return any data, unless testers add test
*Additional note*:
*The examples for the complete service responses (for services under test) should have the same identation as the* schema *keyword*.
*However, if the simulators are created from the OAS accordingly, the import in Mockoon will lead to empty examples, altough the examples are shown correctly in the Swagger editor.*
*Therefore, it was necessary to change the identation of response examples in the simulators to match the identation of the* properties *keyword.*
*Therefore, it was necessary to change the identation of response examples in the simulators to match the identation of the* properties *keyword.*


### Deprecated services

The below diagram shows the deprecated services, for which the related testcase collection can be found in the subfolder *_deprecated-services tests*.

![OverviewDeprecated](./_deprecated-services%20tests/mwdi+diagram.completeness.dataprovider.deprecated.png)

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{
"mode": "debug",
"serverList": [
{
"serverName": "dummy",
"dummyUri": "ping.openBackhaul.com"
},
{
"serverName": "mwdi",
"server": "http://IP_ADRESS:PORT",
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
"authorizationCode": "YOUR_BASIC_AUTH_CODE",
"operationKey": "Operation key not yet provided.",
"userName": "Thorsten Heinze",
"originator": "InterfaceValidator_TR532v2.0",
"xCorrelator": "00000000-0000-0000-0000-000000000532",
"traceIndicator": "1",
"customerJourney": ""
},
{
"serverName": "mwdi in mwdi+simulator.completeness.dataprovider.deprecated",
"server": "http://localhost:3002",
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
"authorizationCode": "",
"operationKey": "Operation key not yet provided.",
"userName": "Thorsten Heinze",
"originator": "InterfaceValidator_TR532v2.0",
"xCorrelator": "00000000-0000-0000-0000-000000000532",
"traceIndicator": "1",
"customerJourney": ""
}
],
"collectionInputList": [
{
"collectionName": "completeness.dataprovider.deprecated",
"serverToBeApplied": "mwdi",
"mountName": "513250004",
"linkId": "101550001",
"kindOfReference": "dynamic"
},
{
"collectionName": "completeness.dataprovider.deprecated_simulator",
"serverToBeApplied": "mwdi in mwdi+simulator.completeness.dataprovider.deprecated",
"mountName": "305250001",
"linkId": "101550001",
"kindOfReference": "static",
"suffixUrlEncodingIsRequired": true
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@startuml mwdi+diagram.completeness.dataprovider.deprecated
skinparam responseMessageBelowArrow true

title
mwdi+testcase.completeness.dataprovider.deprecated
end title

participant "Postman" as Postman
participant "Data" as Data
participant "Collection" as Collection

participant "/v1/provide-list-of-connected-devices" as PLOCD



group Preparation
Data --\\o Postman : {servers, mount-name, linkd-id}
activate Postman
Postman --\\o Collection : {servers, mount-name, link-id}
end

group /v1/provide-list-of-connected-devices
Collection --\\o Postman : {servers}
Postman -> PLOCD
Postman <-- PLOCD : {mount-name-list}
note right Postman #Orange
schema validation
end note
Postman --\\o Collection : {mount-name-list}
end

deactivate Postman

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading