*** Settings ***
-Resource environment/configuration.txt
Resource environment/variables.txt
Library MockServerLibrary
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
*** Settings ***
-Resource environment/configuration.txt
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library JSONLibrary
+++ /dev/null
-*** Variables ***
-${VNFM_HOST} localhost # Hostname of the VNFM
-${VNFM_PORT} 8080 # Listening port of the VNFM
-${VNFM_SCHEMA} http
-${ACCEPT} application/json
-${ACCEPT_JSON} application/json
-${CONTENT_TYPE} application/json
-${AUTHORIZATION_HEADER} Authorization
-${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
-${AUTH_USAGE} 1
-${CONTENT_TYPE_PATCH} application/merge-patch+json
-
-${PODS_SCHEMA} http
-${PODS_HOST} localhost # Hostname of the VNFM
-${PODS_PORT} 8080 # Listening port of the VNFM
-
-${apiRoot} /
-${apiName} vnflcm
-${apiVersion} v1
-
-${CancelMode} GRACEFUL
-${VNFM_DUPLICATION} 0
-
-${NFVO_HOST} localhost # Hostname of the NFVO
-${NFVO_PORT} 8081 # Listening port of the NFVO
-${NFVO_SCHEMA} https
-${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
-${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
-${ACCEPT_PLAIN} text/plain
-${ACCEPT_ZIP} application/zip
-${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
-${ARTIFACT_TYPE} application/octet-stream
-${ARTIFACT_ID} artifactId
-${WRONG_ACCEPT} application/json
-${SYNC_MODE} 0
-${sleep_interval} 20s
-${callback_uri} http://localhost
-${callback_port} 9091
-${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
+++ /dev/null
-*** variables ***
-${LccnSubscriptions}
-${scaleInfo}
-${element}
-${aspectId}
-${scaleOutResponse}
*** Variables ***
-${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${anotherInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
+${VNFM_HOST} localhost # Hostname of the VNFM
+${VNFM_PORT} 8080 # Listening port of the VNFM
+${VNFM_SCHEMA} http
-${invalid_etag} invalid etag
+${PODS_SCHEMA} http
+${PODS_HOST} localhost # Hostname of the VNFM
+${PODS_PORT} 8080 # Listening port of the VNFM
${namespaces} default
${name} vdu2
-
-${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-${notExistingVnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-${vnfLcmOpOccIdNotStartingProcessingRollingback} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-${vnfLcmOpOccIdNotFailedTemp} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-
-${VnfLcmOperationOccurrenceNotification} {}
-${VnfIdentifierCreationNotification} {}
-${VnfIdentifierDeletionNotification} {}
-${response} {}
-${json} {}
-${requestedFlavour} test
-
-${sub_filter} filter
-${sub_filter_invalid} filter_invalid
-
-${fields} criteria,objectInstanceIds
-
-${vnfInstanceName} Test-VnfInstance
-${vnfInstanceDescription} description vnf
-${vnfInstanceDescription_Update} Updated description vnf
-${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
-
-${changeVnfFlavourRequest} {}
-${changeVnfOperateRequest} {}
-${requestedState} test
-${changeVnfExtConnectivityRequest} {}
-${patchBodyRequest} {}
-${total_polling_time} 2 min
-${polling_interval} 10 sec
-
-${notification_request} []
-${notification_response} []
-
-${sleep_interval} 20s
-
-${callback_endpoint} /endpoint
-${callback_endpoint_fwd} /endpoint/check
-${callback_endpoint_error} /endpoint_404
-
-${callback_uri} http://localhost
-${callback_port} 9091
-
-${nextPageUri} someuri
+++ /dev/null
-*** Settings ***
-Resource environment/configuration.txt
-Resource environment/variables.txt
-Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
-Library JSONLibrary
-Library JSONSchemaLibrary schemas/
-Resource cnflcm_keywords.robot
-
-*** Test Cases ***
-Create and Instantiate a new VNFInstance
- [Documentation] Test ID: 7.3.1.12.2
- Create a new cnfInstance
- POST instantiate individual cnfInstance
+++ /dev/null
-*** Settings ***
-Resource environment/configuration.txt
-Resource environment/variables.txt
-Resource environment/scaleVariables.txt
-Library MockServerLibrary
-Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
-Library OperatingSystem
-Library BuiltIn
-Library JSONLibrary
-Library Collections
-Library JSONSchemaLibrary schemas/
-Library Process
-Library String
-
-*** Keywords ***
-Create a new cnfInstance
- Run Process curl -X POST -H 'Content-Type:${ACCEPT_JSON}' --data ${TOKEN_DATA} -i ${TOKEN_API} shell=True alias=result
- ${result} Get Process Result result stdout=true
- ${lines} = Get Lines Matching Pattern ${result} X-Subject-Token*
- ${X-Subject-Token}= Run echo ${lines} | cut -d ' ' -f 2
- Log to Console ${vnfdId}
- Run Process curl -g -i -X POST ${vnf_instance_api} -H "Accept: ${ACCEPT}" -H "Content-Type: ${ACCEPT_JSON}" -H "X-Auth-Token: ${X-Subject-Token}" -d '{"vnfdId": "${vnfdId}"}' shell=True alias=result
- ${result} Get Process Result result stdout=true
- ${line} = Get Line ${result} 7
- ${lines1} Create List ${line}
- ${x} = Get From List ${lines1} 0
- ${json}= evaluate json.loads('''${x}''') json
- ${Instance_ID} = Get From Dictionary ${json} id
- Log to Console ${Instance_ID}
- Set Global Variable ${Instance_ID}
-
-
-POST instantiate individual cnfInstance
- Log Trying to Instantiate a vnf Instance
- Run Process curl -X POST -H 'Content-Type:${ACCEPT_JSON}' --data ${TOKEN_DATA} -i ${TOKEN_API} shell=True alias=result
- ${result} Get Process Result result stdout=true
- ${lines} = Get Lines Matching Pattern ${result} X-Subject-Token*
- ${X-Subject-Token}= Run echo ${lines} | cut -d ' ' -f 2
- Set Headers {"Accept":"${ACCEPT}"}
- Set Headers {"Content-pe": "${ACCEPT_JSON}"}
- Set Headers {"${AUTHORIZATION_HEADER}":"${X-Subject-Token}"}
- Run Process api-tests/SOL003/cnflcm/update_config.sh ${Instance_ID} ${X-Subject-Token} shell=yes
- ${body}= Get File api-tests/SOL003/cnflcm/jsons/inst.json
- Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${Instance_ID}/instantiate ${body}
- ${outputResponse}= Output response
- Set Global Variable ${response} ${outputResponse}
- Log to Console ${outputResponse}
+++ /dev/null
-*** Variables ***
-${VNFM_HOST} localhost # Hostname of the VNFM
-${VNFM_PORT} 9890 # Listening port of the VNFM
-${VNFM_SCHEMA} http
-${ACCEPT} application/json
-${ACCEPT_JSON} application/json
-${CONTENT_TYPE} application/json
-${AUTHORIZATION_HEADER} X-Auth-Token
-${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
-${AUTH_USAGE} 1
-${CONTENT_TYPE_PATCH} application/merge-patch+json
-
-${PODS_SCHEMA} http
-${PODS_HOST} localhost # Hostname of the VNFM
-${PODS_PORT} 8080 # Listening port of the VNFM
-
-${vnf_instance_api} http://localhost:9890/vnflcm/v1/vnf_instances
-
-${apiRoot} /
-${apiName} vnflcm
-${apiVersion} v1
-
-${CancelMode} GRACEFUL
-${VNFM_DUPLICATION} 0
-
-${TOKEN_DATA} '{"auth": {"scope": {"project": {"domain": {"id": "default"}, "name": "nfv"}}, "identity": {"password": {"user": {"domain": {"id": "default"}, "password": "devstack", "name": "nfv_user"}}, "methods": ["password"]}}}'
-
-${TOKEN_API} http://localhost/identity/v3/auth/tokens
-
-${NFVO_HOST} localhost # Hostname of the NFVO
-${NFVO_PORT} 8081 # Listening port of the NFVO
-${NFVO_SCHEMA} https
-${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
-${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
-${ACCEPT_PLAIN} text/plain
-${ACCEPT_ZIP} application/zip
-${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
-${ARTIFACT_TYPE} application/octet-stream
-${ARTIFACT_ID} artifactId
-${WRONG_ACCEPT} application/json
-${SYNC_MODE} 0
-${sleep_interval} 20s
-${callback_uri} http://localhost
-${callback_port} 9091
-${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
+++ /dev/null
-*** variables ***
-${LccnSubscriptions}
-${scaleInfo}
-${element}
-${aspectId}
-${scaleOutResponse}
+++ /dev/null
-*** Variables ***
-${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${anotherInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
-
-${invalid_etag} invalid etag
-
-${namespaces} namespace
-${name} name
-
-${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-${notExistingVnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-${vnfLcmOpOccIdNotStartingProcessingRollingback} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-${vnfLcmOpOccIdNotFailedTemp} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
-
-${VnfLcmOperationOccurrenceNotification} {}
-${VnfIdentifierCreationNotification} {}
-${VnfIdentifierDeletionNotification} {}
-${response} {}
-${json} {}
-${requestedFlavour} test
-
-${sub_filter} filter
-${sub_filter_invalid} filter_invalid
-
-${fields} criteria,objectInstanceIds
-
-${vnfInstanceName} Test-VnfInstance
-${vnfInstanceDescription} description vnf
-${vnfInstanceDescription_Update} Updated description vnf
-${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
-
-${changeVnfFlavourRequest} {}
-${changeVnfOperateRequest} {}
-${requestedState} test
-${changeVnfExtConnectivityRequest} {}
-${patchBodyRequest} {}
-${total_polling_time} 2 min
-${polling_interval} 10 sec
-
-${notification_request} []
-${notification_response} []
-
-${sleep_interval} 20s
-
-${callback_endpoint} /endpoint
-${callback_endpoint_fwd} /endpoint/check
-${callback_endpoint_error} /endpoint_404
-
-${callback_uri} http://localhost
-${callback_port} 9091
-
-${nextPageUri} someuri
-${vnfPkgId} bf6ce418-af04-472d-89e0-66227115fae9
-${vnfdId} f671f008-908b-47b6-9c76-b9b30b2523f8
"vdu_mapping": {
"VDU1": {
"kind": "Deployment",
- "name": "vdu1-localhelm",
+ "name": "tacker-test-vdu-localhelm",
"helmreleasename": "tacker-test-vdu"
}
}
+++ /dev/null
-#!/bin/bash
-
-# Update values in variables.txt file
-instance_id='${vnfInstanceId} '$1
-sed -i "s/$(grep vnfInstanceId api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt)/$instance_id/" api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt
-
-port='${VNFM_PORT} ''9890'
-sed -i "s/$(grep VNFM_PORT api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt)/$port/" api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt
-
-schema='${VNFM_SCHEMA} ''http'
-sed -i "s/$(grep VNFM_SCHEMA api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt)/$schema/" api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt
-
-header='${AUTHORIZATION_HEADER} ''X-Auth-Token'
-sed -i "s/$(grep AUTHORIZATION_HEADER api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt)/$header/" api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt
-
-token='${AUTHORIZATION_TOKEN} '$2
-sed -i "s/$(grep AUTHORIZATION_TOKEN api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt)/$token/" api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt
-
-# Comment out incorrect check step and unnecessary test cases
-sed -i 's/ Check Individual VNF LCM operation occurrence operationState is STARTING/\# Check Individual VNF LCM operation occurrence operationState is STARTING\n\n\*\*\* comment \*\*\*/g' api-tests/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
-
-#exit 0
-
--- /dev/null
+#!/bin/bash
+
+# Update VNF instance ID in variables.txt file
+instance_id='${vnfInstanceId} '$1
+sed -i "s/$(grep vnfInstanceId api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt)/$instance_id/" api-tests/SOL003/VNFLifecycleManagement-API/environment/variables.txt
+
+#exit 0
#!/bin/sh
-variableFile=$1
+variableFile=$1 # file path of variables.txt in which environmental variables should be updated
if [ ! $1 ]; then
echo "Input parameter is missing"
exit 1
if [ "$onboardedState" = "ONBOARDED" ]; then
echo "$Packageid uploaded successfully"
- vnfdid=$(curl -g -X GET http://localhost:9890/vnfpkgm/v1/vnf_packages/$Packageid \
- -H "Accept: application/json" -H "User-Agent: python-tackerclient" \
- -H "X-Auth-Token: $token" | jq -r .vnfdId)
-
- sed -i '/${vnfPkgId}/d' $variableFile
- sed -i '/${vnfdId}/d' $variableFile
-
- echo "\${vnfPkgId} $Packageid" >> $variableFile # $variableFile environment file path where package ID will be added
- echo "\${vnfdId} $vnfdid" >> $variableFile
- exit 0
-
else
echo "$Packageid upload Failed, please check tacker logs"
exit 1
fi
+
+#update environmental variables in variables.txt
+vnfdid=$(curl -g -X GET http://localhost:9890/vnfpkgm/v1/vnf_packages/$Packageid \
+ -H "Accept: application/json" -H "User-Agent: python-tackerclient" \
+ -H "X-Auth-Token: $token" | jq -r .vnfdId)
+
+sed -i '/${vnfPkgId}/d' $variableFile
+sed -i '/${vnfdId}/d' $variableFile
+sed -i '/${AUTHORIZATION_HEADER}/d' $variableFile
+sed -i '/${AUTHORIZATION_TOKEN}/d' $variableFile
+sed -i '/${VNFM_PORT}/d' $variableFile
+sed -i '/${VNFM_SCHEMA}/d' $variableFile
+
+echo "" >> $variableFile
+echo "\${vnfPkgId} $Packageid" >> $variableFile
+echo "\${vnfdId} $vnfdid" >> $variableFile
+echo "\${AUTHORIZATION_HEADER} X-Auth-Token" >> $variableFile
+echo "\${AUTHORIZATION_TOKEN} $token" >> $variableFile
+echo "\${VNFM_PORT} 9890" >> $variableFile
+echo "\${VNFM_SCHEMA} http" >> $variableFile
+
+#comment out test cases in api-tests
+# TODO: After the bug in the test case "Check Individual VNF LCM operation occurrence operationState is"
+# is fixed by ESTI NFV TST, we need to remove the step for commenting it out below.
+sed -i 's/ Check Individual VNF LCM operation occurrence operationState is STARTING/\# Check Individual VNF LCM operation occurrence operationState is STARTING\n\n\*\*\* comment \*\*\*/g' ../../SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot
+sed -i 's/ Check Individual VNF LCM operation occurrence operationState is STARTING/\# Check Individual VNF LCM operation occurrence operationState is STARTING\n\n\*\*\* comment \*\*\*/g' ../../SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
+
+#change variable names and values to adapt our test
+sed -i 's/vnfdId=${Descriptor_ID}/vnfdId=${vnfdId}/g' ../../SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot
+
+exit 0
name: robotframework
args:
suites:
- - >-
- /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/cnflcm/cnflcm.robot
- - case_name: cnf-deployments-validation
+ - /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/VNFLifecycleManagement-API/VNFInstances.robot
+ - /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot
+ - case_name: cnf-heal-validation
project_name: smo
criteria: 100
blocking: true
args:
suites:
- >-
- /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/IndividualCnfLcmOperationOccurrence.robot
- - case_name: cnf-heal-validation
+ /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
+ - case_name: cnf-deployments-validation
project_name: smo
criteria: 100
blocking: true
args:
suites:
- >-
- /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot
+ /opt/stack/tacker/tacker/tests/xtesting/api-tests/SOL003/CNFDeployment/IndividualCnfLcmOperationOccurrence.robot