Commit 302a6968 authored by Yann Garcia's avatar Yann Garcia

Bug fixed in PlatBandwidthManager.robot

parent ccbd8c7c
This diff is collapsed.
......@@ -4,7 +4,6 @@ ${MEC-APP_SCHEMA} http
#${MEC-APP_HOST} 127.0.0.1
${MEC-APP_HOST} 192.168.56.1
${MEC-APP_PORT} 8081
${ETAG_LABEL} Location
${INVALID_ETAG} invalid_etag
${APP_INSTANCE_ID} appInst01
${NON_EXISTENT_APP_INSTANCE_ID} appInst99
......@@ -17,3 +16,5 @@ ${REQUEST_FOR_DELTAS_CHANGES} { "appInsId": "${APP_INSTANCE_ID}", "request
${REQUEST_FOR_DELTAS_CHANGES_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKNOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"}
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${ETAG_VALUE}
......@@ -7,39 +7,40 @@ Library JSONSchemaLibrary schemas/
*** Keywords ***
Register Bandwidth Management Service
Register Bandwidth Management Service
... Register a Bandwidth Management Service
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Post /exampleAPI/bwm/v1/bw_allocations ${REQUEST_FOR_BW_REQUIREMENTS}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is bwInfo
# Extract ETAG_VALUE
${etag_value}= ${response['status']['${etag_label}']}
# TODO Extract allocationId
${allocation_id}= 'todo'
[return] ${allocation_id} ${etag_value}
Unregister Bandwidth Management Service
... Unregister a Bandwidth Management Service
[Arguments] ${value}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Delete /exampleAPI/bwm/v1/bw_allocations/${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 204
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Post /exampleAPI/bwm/v1/bw_allocations ${REQUEST_FOR_BW_REQUIREMENTS}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is bwInfo
# Extract ETAG_VALUE
Set Suite Variable ${ETAG_VALUE} ${response['status']['ETag']}
Should Not Be Empty ${ETAG_VALUE}
# TODO Extract allocationId not possible, information is missing in the standard doc
Set Suite Variable ${ALLOCATION_ID} ${response['body']['bwInfo']['allocationId']}
Should Not Be Empty ${ALLOCATION_ID}
Unregister Bandwidth Management Service
... Unregister a Bandwidth Management Service
[Arguments] ${value}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Delete /exampleAPI/bwm/v1/bw_allocations/${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 204
Check AppInstanceId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment