diff --git a/MEC028/WAI/AP_INFO/WaiApInfo.robot b/MEC028/WAI/AP_INFO/WaiApInfo.robot index c181ba049bc6b7b1132a84027b45ae1ab8cb1a53..39b43c5130116e568759c37d8729c7fb222e12bb 100644 --- a/MEC028/WAI/AP_INFO/WaiApInfo.robot +++ b/MEC028/WAI/AP_INFO/WaiApInfo.robot @@ -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} + + + diff --git a/MEC028/WAI/AP_INFO/environment/variables.txt b/MEC028/WAI/AP_INFO/environment/variables.txt index 0f20b2e2afce7307555bfb94507188687d96807b..b368c618a2924ad227b2a809c8d7ae4b220857fa 100644 --- a/MEC028/WAI/AP_INFO/environment/variables.txt +++ b/MEC028/WAI/AP_INFO/environment/variables.txt @@ -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 diff --git a/MEC028/WAI/AP_INFO/jsons/APInfo.json b/MEC028/WAI/AP_INFO/jsons/APInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/MEC028/WAI/AP_INFO/schemas/ApInfo.schema.json b/MEC028/WAI/AP_INFO/schemas/ApInfo.schema.json index 19cc713220070b8093914883827757377fa798fa..854d99f4bf67b4c4544d221ab361696023db8641 100644 --- a/MEC028/WAI/AP_INFO/schemas/ApInfo.schema.json +++ b/MEC028/WAI/AP_INFO/schemas/ApInfo.schema.json @@ -248,7 +248,7 @@ "geolocation": { "properties": { "altitude": { - "description": "The altitude value of location as defined in IETF RFC 6225 [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 RFC 6225 [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 RFC 6225 [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", diff --git a/MEC028/WAI/EXT_SUB/ExistingSubscription.robot b/MEC028/WAI/EXT_SUB/ExistingSubscription.robot index 187ff91203c19be4db2cb2d499ce0f67524ae160..2015b8b0e853c05ceeeb934b9c090625e4cbc275 100644 --- a/MEC028/WAI/EXT_SUB/ExistingSubscription.robot +++ b/MEC028/WAI/EXT_SUB/ExistingSubscription.robot @@ -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 diff --git a/MEC028/WAI/EXT_SUB/environment/variables.txt b/MEC028/WAI/EXT_SUB/environment/variables.txt index d7beea87162ae10b50b7270001a5bf1fb1404bec..7bf7a4bbbf0552db5c80009c89f1f86f4191627f 100644 --- a/MEC028/WAI/EXT_SUB/environment/variables.txt +++ b/MEC028/WAI/EXT_SUB/environment/variables.txt @@ -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 diff --git a/MEC028/WAI/EXT_SUB/jsons/CreateAssocStaSubscription.json b/MEC028/WAI/EXT_SUB/jsons/CreateAssocStaSubscription.json new file mode 100644 index 0000000000000000000000000000000000000000..3e04ff82fe9ea239a084649ffbe6967bfffaee21 --- /dev/null +++ b/MEC028/WAI/EXT_SUB/jsons/CreateAssocStaSubscription.json @@ -0,0 +1,23 @@ +{ + "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