Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
${origOutput}= Output response
Set Suite Variable ${origResponse} ${origOutput}
PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable @{response} ${output}
Check Postcondition NSD Management Subscription is Unmodified (Implicit)
Log Check postconidtion subscription not modified
GET individual NSD Management Subscription
Log Check Response matches original VNF Threshold
${subscription}= evaluate json.loads('''${response['body']}''') json
Should Be Equal ${origResponse['body']['id']} ${subscription.id}
Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri}
Check Postcondition NSD Management Subscription is not Created
Log Trying to get a new subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId}
${output}= Output response
Set Suite Variable @{response} ${output}
Check HTTP Response Status Code Is 404
Check HTTP Response Body Subscription Identifier matches the requested Subscription
Log Trying to check response ID
Should Be Equal ${response['body']['id']} ${subscriptionId}
Log Subscription identifier as expected
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Should Contain ${response['headers']} ${CONTENT_TYPE}
Check HTTP Response Header Contains Etag
Should Contain ${response['headers']} Etag
Set Suite Variable ${original_etag} ${response['headers]['ETag']}
Create Sessions
Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint
Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}
Check Notification Endpoint
&{notification_request}= Create Mock Request Matcher GET ${callback_endpoint}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Check LINK in Header
${linkURL}= Get Value From Json ${response.headers} $..Link
Should Not Be Empty ${linkURL}