Loading SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +27 −1 Original line number Original line Diff line number Diff line Loading @@ -916,9 +916,18 @@ POST subscriptions Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} POST subscriptions DUPLICATION POST subscriptions DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Loading @@ -927,9 +936,18 @@ POST subscriptions DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} POST subscriptions NO DUPLICATION POST subscriptions NO DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Loading @@ -938,10 +956,18 @@ POST subscriptions NO DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} GET Subscriptions GET Subscriptions Log Get the list of active subscriptions Log Get the list of active subscriptions Loading SOL005/NSLifecycleManagement-API/Subscriptions.robot +3 −0 Original line number Original line Diff line number Diff line *** Settings *** *** Settings *** Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Resource environment/variables.txt Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem Library OperatingSystem Library JSONLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/ Library Process *** Test Cases *** *** Test Cases *** POST Create a new subscription POST Create a new subscription Loading SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json +1 −1 Original line number Original line Diff line number Diff line Loading @@ -6,5 +6,5 @@ ] ] } } }, }, "callbackUri": "http://127.0.0.1/subscribe" "callbackUri": "${callback_uri}:${callback_port}${callback_endpoint}" } } No newline at end of file Loading
SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +27 −1 Original line number Original line Diff line number Diff line Loading @@ -916,9 +916,18 @@ POST subscriptions Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} POST subscriptions DUPLICATION POST subscriptions DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Loading @@ -927,9 +936,18 @@ POST subscriptions DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} POST subscriptions NO DUPLICATION POST subscriptions NO DUPLICATION Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content Loading @@ -938,10 +956,18 @@ POST subscriptions NO DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Get File jsons/LccnSubscriptionRequest.json ${body}= Replace String ${body} \${callback_uri} ${callback_uri} ${body}= Replace String ${body} \${callback_port} ${callback_port} ${body}= Replace String ${body} \${callback_endpoint} ${callback_endpoint} Log Creating mock request and response to handle GET operation on notification endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} GET Subscriptions GET Subscriptions Log Get the list of active subscriptions Log Get the list of active subscriptions Loading
SOL005/NSLifecycleManagement-API/Subscriptions.robot +3 −0 Original line number Original line Diff line number Diff line *** Settings *** *** Settings *** Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Resource environment/variables.txt Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem Library OperatingSystem Library JSONLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/ Library Process *** Test Cases *** *** Test Cases *** POST Create a new subscription POST Create a new subscription Loading
SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json +1 −1 Original line number Original line Diff line number Diff line Loading @@ -6,5 +6,5 @@ ] ] } } }, }, "callbackUri": "http://127.0.0.1/subscribe" "callbackUri": "${callback_uri}:${callback_port}${callback_endpoint}" } } No newline at end of file