Skip to content
Snippets Groups Projects
Commit 8bd05da7 authored by scivoletto's avatar scivoletto
Browse files

MEC028 completed for AP_INFO and EXT_SUB

parent c93fc816
No related branches found
No related tags found
1 merge request!3Merge of TT027 branch into master
......@@ -9,13 +9,12 @@ Library String
Library OperatingSystem
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
*** Test Cases ***
TP_MEC_MEC028_SRV_WAI_001_OK
TC_MEC_MEC028_SRV_WAI_001_OK
[Documentation]
... Check that the IUT responds with the list of WLAN Access Point
... Reference "ETSI GS MEC 028 2.2.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/ApInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the access point information
......@@ -28,11 +27,11 @@ TP_MEC_MEC028_SRV_WAI_001_OK
END
Should Be True ${passed}
TP_MEC_MEC028_SRV_WAI_002_OK
TC_MEC_MEC028_SRV_WAI_002_OK
[Documentation]
... Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter
... Reference "ETSI GS MEC 028 2.2.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/ApInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the access point information using filters ${filter}
......@@ -46,11 +45,11 @@ TP_MEC_MEC028_SRV_WAI_002_OK
Should Be True ${passed}
TP_MEC_MEC028_SRV_WAI_002_BR
TC_MEC_MEC028_SRV_WAI_002_BR
[Documentation]
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... Reference "ETSI GS MEC 028 2.2.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/ApInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the access point information using filters ${bad_filter}
......@@ -78,4 +77,7 @@ Retrieve the access point information using filters
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/queries/ap/ap_information?filter=${filter}
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
Set Suite Variable ${response} ${output}
......@@ -4,11 +4,16 @@ ${apiName} wai
${apiVersion} v2
${MEC-APP_SCHEMA} http
${MEC-APP_HOST} 127.0.0.1
${MEC-APP_PORT} 8082
${MEC-APP_HOST} mockoon
${MEC-APP_PORT} 3001
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${MAC_ID} macId01
${filter} (eq,apId/macId,macId01)
${bad_filter} (eq,apId/mac,macId01)
\ No newline at end of file
${filter} macId01
${bad_filter} badMacId
${REGISTER_ACTION} REGISTER
${REMOVE_ACTION} REMOVE
${NO_ACTION} NO_ACTION
${DEVICE_ID_PLACEHOLDER} PLACEHOLDER_DEVICEID
......@@ -248,7 +248,7 @@
"geolocation": {
"properties": {
"altitude": {
"description": "The altitude value of location as defined in IETF RFC6225 [6]",
"description": "The altitude value of location as defined in IETF RFC 6225 [6]",
"format": "uint32",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
......@@ -276,7 +276,7 @@
"x-etsi-mec-origin-type": "Uint8"
},
"lat": {
"description": "The latitude value of location as defined in IETF RFC6225 [6]",
"description": "The latitude value of location as defined in IETF RFC�6225 [6]",
"format": "int64",
"type": "integer",
"x-etsi-mec-cardinality": "1",
......@@ -290,7 +290,7 @@
"x-etsi-mec-origin-type": "Uint8"
},
"long": {
"description": "The longitude value of location as defined in IETF RFC6225 [6]",
"description": "The longitude value of location as defined in IETF RFC�6225 [6]",
"format": "int64",
"type": "integer",
"x-etsi-mec-cardinality": "1",
......@@ -375,7 +375,7 @@
"x-etsi-mec-origin-type": "Uint16"
},
"channelUtilization": {
"description": "The percentage of time, linearly scaled with 255 representing 100%, that the AP sensed the medium was busy, as indicated by either the physical or virtual Carrier Sense (CS) mechanism.",
"description": "The percentage of time, linearly scaled with 255 representing 100�%, that the AP sensed the medium was busy, as indicated by either the physical or virtual Carrier Sense (CS) mechanism.",
"format": "uint8",
"type": "integer",
"x-etsi-mec-cardinality": "1",
......@@ -435,7 +435,7 @@
"x-etsi-mec-origin-type": "Uint8"
},
"spatStreamUnderUtil": {
"description": "The percentage of time, linearly scaled with 255 representing 100%, that the AP has underutilized spatial domain resources for given busy time of the medium.",
"description": "The percentage of time, linearly scaled with 255 representing 100�%, that the AP has underutilized spatial domain resources for given busy time of the medium.",
"format": "uint8",
"type": "integer",
"x-etsi-mec-cardinality": "1",
......
......@@ -5,16 +5,21 @@
Resource environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Library Collections
Library String
Library OperatingSystem
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
*** Test Cases ***
TP_MEC_MEC028_SRV_WAI_008_OK
TC_MEC_MEC028_SRV_WAI_008_OK
[Documentation]
... Check that the IUT responds with the list of Subscription"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.6.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
[Setup] Create New Subscription Info ${SUB_ID}
Set Suite Variable ${Location} ${response['headers']['Location']}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve existing subscription information ${SUB_ID}
......@@ -22,25 +27,31 @@ TP_MEC_MEC028_SRV_WAI_008_OK
Check HTTP Response Body Json Schema Is AssocStaSubscription
Should Be Equal As Strings ${response['body']['subscriptionType']} ${SUB_TYPE}
Should Be Equal As Strings ${response['body']['callbackReference']} ${CALLBACK_URI}
Should Be Equal As Strings ${response['body']['apId']['macId']} ${MAC_ID}
Should Be Equal As Strings ${response['body']['apId']['bssid']} ${BSSID}
[TearDown] Remove Subscription Info ${Location}
TP_MEC_MEC028_SRV_WAI_008_NF
TC_MEC_MEC028_SRV_WAI_008_NF
[Documentation]
... Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.6.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
[Setup] Remove Subscription Info Using SubId ${SUB_ID}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve existing subscription information ${NOT_EXISTING_SUB_ID}
Check HTTP Response Status Code Is 404
Check HTTP Response Status Code Is 404
*** Test Cases ***
TP_MEC_MEC028_SRV_WAI_009_OK
TC_MEC_MEC028_SRV_WAI_009_OK
[Documentation]
... Check that the IUT responds with a Notification Subscription when it is modified"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.2
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.6.3.2
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
[Setup] Create New Subscription Info ${SUB_ID}
Set Suite Variable ${Location} ${response['headers']['Location']}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Modify existing subscription information ${SUB_ID} UpdateAssocStaSubscription.json
......@@ -49,31 +60,40 @@ TP_MEC_MEC028_SRV_WAI_009_OK
Should Be Equal As Strings ${response['body']['subscriptionType']} ${SUB_TYPE}
Should Be Equal As Strings ${response['body']['callbackReference']} ${NEW_CALLBACK_URI}
Should Be Equal As Strings ${response['body']['apId']['macId']} ${MAC_ID}
[TearDown] Remove Subscription Info ${Location}
TP_MEC_MEC028_SRV_WAI_009_BR
TC_MEC_MEC028_SRV_WAI_009_BR
[Documentation]
... Check that the IUT responds with an error when an invalid field is set in the subscription modification request"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.2
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.6.3.2
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Modify existing subscription information ${SUB_ID} UpdateAssocStaSubscription_BR.json
Modify existing subscription information ${BAD_REQUEST_SUB_ID} UpdateAssocStaSubscription_BR.json
Check HTTP Response Status Code Is 400
TP_MEC_MEC028_SRV_WAI_010_OK
TC_MEC_MEC028_SRV_WAI_010_OK
[Documentation]
... Check that the IUT responds with 204 when an existing subscription is correctly deleted"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.5
... Reference "ETSI GS MEC 028 2.3.1, clause 7.6.3.5
[Setup] Create New Subscription Info ${SUB_ID}
Set Suite Variable ${Location} ${response['headers']['Location']}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Remove existing subscription information ${SUB_ID}
Check HTTP Response Status Code Is 204
TP_MEC_MEC028_SRV_WAI_010_NF
TC_MEC_MEC028_SRV_WAI_010_NF
[Documentation]
... Check that the IUT responds with an error when an not existing subscription cannot be deleted"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.5
[Setup] Remove Subscription Info Using SubId ${NOT_EXISTING_SUB_ID}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Remove existing subscription information ${NOT_EXISTING_SUB_ID}
......@@ -115,4 +135,38 @@ Remove existing subscription information
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${SUB_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
Set Suite Variable ${response} ${output}
Create New Subscription Info
[Arguments] ${content}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ CreateAssocStaSubscription .json
${body}= Get File ${file}
${json_data}= Evaluate json.loads('''${body}''') json
Log Original JSON: ${json_data}
${new_href}= Set Variable ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}/${apiRoot}/${apiName}/${apiVersion}/subscriptions/${SUB_ID}
Set To Dictionary ${json_data["_links"]["self"]} href=${new_href}
${modified_json_string}= Evaluate json.dumps(${json_data})
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${modified_json_string}
${output}= Output response
Set Suite Variable ${response} ${output}
Remove Subscription Info
[Arguments] ${delete_url}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${delete_url}
Remove Subscription Info Using SubId
[Arguments] ${SUB_ID}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}/${apiRoot}/${apiName}/${apiVersion}/subscriptions/${SUB_ID}
\ No newline at end of file
......@@ -4,14 +4,20 @@ ${apiName} wai
${apiVersion} v2
${MEC-APP_SCHEMA} http
${MEC-APP_HOST} 127.0.0.1
${MEC-APP_PORT} 8082
${MEC-APP_HOST} mockoon
${MEC-APP_PORT} 3001
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${SUB_TYPE} AssocStaSubscription
${SUB_ID} 1
${NOT_EXISTING_SUB_ID} 99
${BAD_REQUEST_SUB_ID} 98
${CALLBACK_URI} http://callback.uri/1
${NEW_CALLBACK_URI} http://new.callback.uri/1
${MAC_ID} macId01
\ No newline at end of file
${MAC_ID} macId01
${BSSID} 005C0A0A0A0A
${REGISTER_ACTION} REGISTER
${REMOVE_ACTION} REMOVE
${NO_ACTION} NO_ACTION
\ No newline at end of file
{
"subscriptionType": "AssocStaSubscription",
"callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1",
"_links": {
"self": {
"href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123"
}
},
"expiryDeadline": {
"seconds": 1977836800,
"nanoSeconds": 0
},
"apId": {
"bssid": "005C0A0A0A0A",
"ssid": [
"myNetworkSsid"
],
"macId": "macId01",
"ipAddress": [
"10.10.100.1"
]
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment