Loading SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot +10 −10 Original line number Original line Diff line number Diff line Loading @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** *** Keywords *** POST API Version POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} GET API Version GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PUT API Version PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PATCH API Version PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} DELETE API Version DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Loading SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot +42 −1 Original line number Original line Diff line number Diff line Loading @@ -6,6 +6,7 @@ Resource environment/pmJobs.txt Resource environment/IndividualPmJob.txt Resource environment/IndividualPmJob.txt Resource environment/thresholds.txt Resource environment/thresholds.txt Resource environment/individualThresholds.txt Resource environment/individualThresholds.txt Resource environment/notifications.txt Library JSONLibrary Library JSONLibrary Library OperatingSystem Library OperatingSystem Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Loading Loading @@ -112,7 +113,7 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector Log Query VNF The GET method queries information about multiple VNF instances. Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Loading Loading @@ -497,3 +498,43 @@ Check HTTP Response Body Threshold Identifier matches the requested Threshold Log Trying to check response ID Log Trying to check response ID Should Be Equal ${response['body']['id']} ${thresholdId} Should Be Equal ${response['body']['id']} ${thresholdId} Log Pm Job identifier as expected Log Pm Job identifier as expected Check PM Job resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} Integer response status 200 Validate Json response body PmJob.schema.json Set Global Variable ${callbackResp} response body callbackUri POST Performance Information Available Notification Log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/PerformanceInformationAvailabilityNotification.json ${body}= Format String ${template} pmJobId=${pmJobId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Check Threshold resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} Integer response status 200 Validate Json response body Threshold.schema.json Set Global Variable ${callbackResp} response body callbackUri POST Threshold Crossed Notification Log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/ThresholdCrossedNotification.json ${body}= Format String ${template} thresholdId=${thresholdId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} SOL009/NFVMANOPerformanceManagement-API/NotificationEndpoint.robot +3 −52 Original line number Original line Diff line number Diff line *** Settings *** *** Settings *** Library JSONSchemaLibrary schemas/ Resource NFVMANOPMKeywords.robot Resource environment/variables.txt Resource environment/individualThresholds.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary Library String Suite Setup Check resource existence and get CallbackUri *** Test Cases *** *** Test Cases *** Loading @@ -19,6 +12,7 @@ Performance Information Available Notification ... Config ID: Config_prod_Notif_Endpoint ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Applicability: none ... Post-Conditions: none ... Post-Conditions: none Check PM Job resource existence and get CallbackUri POST Performance Information Available Notification POST Performance Information Available Notification Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204 Loading @@ -31,49 +25,6 @@ Threshold Crossed Notification ... Config ID: Config_prod_Notif_Endpoint ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Applicability: none ... Post-Conditions: none ... Post-Conditions: none Check Threshold resource existence and get CallbackUri POST Threshold Crossed Notification POST Threshold Crossed Notification Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204 *** Keywords *** Check resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Validate Json response body PmSubscription.schema.json Set Global Variable ${callbackResp} response body callbackUri Check HTTP Response Status Code Is [Arguments] ${expected_status} Should Be Equal As Strings ${response['status']} ${expected_status} Log Status code validated POST Performance Information Available Notification log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/PerformanceInformationAvailabilityNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Threshold Crossed Notification log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/ThresholdCrossedNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} thresholdId=${thresholdId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} SOL009/NFVMANOPerformanceManagement-API/environment/individualSubscription.txtdeleted 100644 → 0 +0 −5 Original line number Original line Diff line number Diff line *** Variables *** ${erroneousSubscriptionId} erroneousSubscriptionId ${newSubscriptionId} newSubsciptionId ${response} httpresponse ${origResponse} httpresponse No newline at end of file SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt +2 −3 Original line number Original line Diff line number Diff line Loading @@ -4,7 +4,8 @@ ${NFVMANO_PORT} 8080 # Listening port of the VNFM ${NFVMANO_SCHEMA} https ${NFVMANO_SCHEMA} https ${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION} Bearer negativetoken ${NEG_AUTHORIZATION} Bearer negativetoken ${BAD_AUTHORIZATION} Bear sometoken ${BAD_AUTHORIZATION} Bear sometoken Loading Loading @@ -32,8 +33,6 @@ ${polling_interval} 10 sec ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${response} ${response} ${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 ${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 Loading Loading
SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot +10 −10 Original line number Original line Diff line number Diff line Loading @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** *** Keywords *** POST API Version POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} GET API Version GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PUT API Version PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PATCH API Version PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} DELETE API Version DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Loading
SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot +42 −1 Original line number Original line Diff line number Diff line Loading @@ -6,6 +6,7 @@ Resource environment/pmJobs.txt Resource environment/IndividualPmJob.txt Resource environment/IndividualPmJob.txt Resource environment/thresholds.txt Resource environment/thresholds.txt Resource environment/individualThresholds.txt Resource environment/individualThresholds.txt Resource environment/notifications.txt Library JSONLibrary Library JSONLibrary Library OperatingSystem Library OperatingSystem Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Loading Loading @@ -112,7 +113,7 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector Log Query VNF The GET method queries information about multiple VNF instances. Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field ${outputResponse}= Output response ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse} Loading Loading @@ -497,3 +498,43 @@ Check HTTP Response Body Threshold Identifier matches the requested Threshold Log Trying to check response ID Log Trying to check response ID Should Be Equal ${response['body']['id']} ${thresholdId} Should Be Equal ${response['body']['id']} ${thresholdId} Log Pm Job identifier as expected Log Pm Job identifier as expected Check PM Job resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} Integer response status 200 Validate Json response body PmJob.schema.json Set Global Variable ${callbackResp} response body callbackUri POST Performance Information Available Notification Log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/PerformanceInformationAvailabilityNotification.json ${body}= Format String ${template} pmJobId=${pmJobId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Check Threshold resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} Integer response status 200 Validate Json response body Threshold.schema.json Set Global Variable ${callbackResp} response body callbackUri POST Threshold Crossed Notification Log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/ThresholdCrossedNotification.json ${body}= Format String ${template} thresholdId=${thresholdId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse}
SOL009/NFVMANOPerformanceManagement-API/NotificationEndpoint.robot +3 −52 Original line number Original line Diff line number Diff line *** Settings *** *** Settings *** Library JSONSchemaLibrary schemas/ Resource NFVMANOPMKeywords.robot Resource environment/variables.txt Resource environment/individualThresholds.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary Library String Suite Setup Check resource existence and get CallbackUri *** Test Cases *** *** Test Cases *** Loading @@ -19,6 +12,7 @@ Performance Information Available Notification ... Config ID: Config_prod_Notif_Endpoint ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Applicability: none ... Post-Conditions: none ... Post-Conditions: none Check PM Job resource existence and get CallbackUri POST Performance Information Available Notification POST Performance Information Available Notification Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204 Loading @@ -31,49 +25,6 @@ Threshold Crossed Notification ... Config ID: Config_prod_Notif_Endpoint ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Applicability: none ... Post-Conditions: none ... Post-Conditions: none Check Threshold resource existence and get CallbackUri POST Threshold Crossed Notification POST Threshold Crossed Notification Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204 *** Keywords *** Check resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Validate Json response body PmSubscription.schema.json Set Global Variable ${callbackResp} response body callbackUri Check HTTP Response Status Code Is [Arguments] ${expected_status} Should Be Equal As Strings ${response['status']} ${expected_status} Log Status code validated POST Performance Information Available Notification log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/PerformanceInformationAvailabilityNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Threshold Crossed Notification log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/ThresholdCrossedNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} thresholdId=${thresholdId} objectInstanceId=${objectInstanceIds} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse}
SOL009/NFVMANOPerformanceManagement-API/environment/individualSubscription.txtdeleted 100644 → 0 +0 −5 Original line number Original line Diff line number Diff line *** Variables *** ${erroneousSubscriptionId} erroneousSubscriptionId ${newSubscriptionId} newSubsciptionId ${response} httpresponse ${origResponse} httpresponse No newline at end of file
SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt +2 −3 Original line number Original line Diff line number Diff line Loading @@ -4,7 +4,8 @@ ${NFVMANO_PORT} 8080 # Listening port of the VNFM ${NFVMANO_SCHEMA} https ${NFVMANO_SCHEMA} https ${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION} Bearer negativetoken ${NEG_AUTHORIZATION} Bearer negativetoken ${BAD_AUTHORIZATION} Bear sometoken ${BAD_AUTHORIZATION} Bear sometoken Loading Loading @@ -32,8 +33,6 @@ ${polling_interval} 10 sec ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${response} ${response} ${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 ${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 Loading