Blah I should have looked deeper.
https://jira.onap.org/browse/INT-1784 created and updated to track this. Delete VNF in the normal testing is part of the life cycle test so vnf orchestration test template saves the stack list as part of the create and then passes that to “Delete VNF” as vf_module_name_list without using the VARIABLES data in the file. In the demo-k8s.sh the variable file has the stack name (although there is a difference in variable name STACK_NAME vs STACK_NAMES) so I suspect we haven’t worked on deleteVNF from demo-k8s.sh since we moved from single stack VNF demonstration in robot to multiple stack VNF demonstrations. I would go back to demo-k8s.sh but modify the script as follows (I can’t test this right now so I would be helpful if you could try it and let me know if I’ve missed something else) Sorry for the confusion. Brian demo-k8s.sh “patch”: deleteVNF) TAG="deleteVNF" shift if [ $# -ne 1 ];then echo "Usage: demo-k8s.sh <namespace> deleteVNF <module_name from instantiateVFW>" exit fi VARFILE=$1.py VARIABLES="$VARIABLES -V /share/${VARFILE} -v STACK_NAMES:$1" #if [ -e /opt/eteshare/${VARFILE} ]; then # VARIABLES="$VARIABLES -V /share/${VARFILE}" #else # echo "Cache file ${VARFILE} is not found" # exit #fi shift ;; Here is the path through the robot code for this. vnf_orchestration (normal regression test): Orchestrate VNF Template [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} ${service} ${product_family} ${delete_flag}=DELETE ${uuid}= Generate UUID4 ${catalog_service_id}= Set Variable ${None} # default to empty ${catalog_resource_ids}= Set Variable ${None} # default to empty ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete}= Orchestrate VNF ${customer_name}_${uuid} ${service} ${product_family} ${tenant_id} ${tenant_name} Run Keyword If '${delete_flag}' == 'DELETE' Delete VNF ${tenant_name} ${server_id} ${customer_name}_${uuid} ${service_instance_id} ${vf_module_name_list} ${uris_to_delete} [Teardown] Teardown VNF ${customer_name}_${uuid} ${catalog_service_id} ${catalog_resource_ids} testsuite:demo.robot Delete Instantiated VNF [Documentation] This test assumes all necessary variables are loaded via the variable file create in Save For Delete ... The Teardown VNF needs to be in the teardown step of the test case... [Tags] deleteVNF Setup Browser Login To VID GUI Delete VNF ${TENANT_NAME} ${VVG_SERVER_ID} ${CUSTOMER_NAME} ${SERVICE_INSTANCE_ID} ${STACK_NAMES} ${REVERSE_HEATBRIDGE} [Teardown] Teardown VNF ${CUSTOMER_NAME} ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS} resources/demo_preload.robot: Save For Delete [Documentation] Create a variable file to be loaded for save for delete [Arguments] ${tenant_id} ${tenant_name} ${vvg_server_id} ${customer_name} ${service_instance_id} ${stack_name} ${catalog_service_id} ${catalog_resource_ids} ${dict}= Create Dictionary Set To Dictionary ${dict} TENANT_NAME=${tenant_name} Set To Dictionary ${dict} TENANT_ID=${tenant_id} Set To Dictionary ${dict} CUSTOMER_NAME=${customer_name} Set To Dictionary ${dict} STACK_NAME=${stack_name} Set To Dictionary ${dict} VVG_SERVER_ID=${vvg_server_id} Set To Dictionary ${dict} SERVICE_INSTANCE_ID=${service_instance_id} Set To Dictionary ${dict} CATALOG_SERVICE_ID=${catalog_service_id} ${vars}= Catenate ${keys}= Get Dictionary Keys ${dict} :FOR ${key} IN @{keys} \ ${value}= Get From Dictionary ${dict} ${key} \ ${vars}= Catenate ${vars}${key} = "${value}"\n ${comma}= Catenate ${vars}= Catenate ${vars}CATALOG_RESOURCE_IDS = [ :FOR ${id} IN @{catalog_resource_ids} \ ${vars}= Catenate ${vars}${comma} "${id}" \ ${comma}= Catenate , ${vars}= Catenate ${vars}]\n OperatingSystem.Create File ${FILE_CACHE}/${stack_name}.py ${vars} OperatingSystem.Create File ${FILE_CACHE}/lastVNF4HEATBRIGE.py ${vars} resources/test_templates/vnf_orchestration_test_template.robot Delete VNF [Documentation] Called at the end of a test case to tear down the VNF created by Orchestrate VNF [Arguments] ${tenant_name} ${server_id} ${customer_name} ${service_instance_id} ${vf_module_name_list} ${uris_to_delete} ${lcp_region}= Get Openstack Region ${list}= Create List # remove duplicates, sort vFW-> vPKG , revers to get vPKG > vFWSNK ${sorted_stack_names}= Create List ${sorted_stack_names}= Remove Duplicates ${vf_module_name_list} Sort List ${sorted_stack_names} Reverse List ${sorted_stack_names} :FOR ${stack} IN @{sorted_stack_names} \ ${keypair_name}= Get Stack Keypairs ${stack} \ Append To List ${list} ${keypair_name} Teardown VVG Server ${server_id} Run Keyword and Ignore Error Teardown VID ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} ${uris_to_delete} # :FOR ${stack} IN @{sorted_stack_names} \ Run Keyword and Ignore Error Teardown Stack ${stack} \ Log Stack Deleted ${stack} # only needed if stack deleted but not keypair :FOR ${key_pair} IN @{list} \ Run Keyword and Ignore Error Delete Stack Keypair ${key_pair} \ Log Key pair Deleted ${key_pair} Log VNF Deleted From: [email protected] <[email protected]> On Behalf Of [email protected] Sent: Friday, November 20, 2020 3:14 AM To: [email protected]; [email protected] Subject: Re: [onap-discuss] demo-k8s.sh deleteVNF fails #frankfurt #robot Hi Brain, I tested delete the service with "ete-k8s.sh onap deleteVNF Vfmodule_Ete_vFWCLvPKG_452156c1_1". It did not work. This service was the one i created with "ete-k8s.sh onap instantiateVFWCL". [cid:[email protected]] ubuntu@onap-nfs:~/oom/kubernetes/robot$ ./ete-k8s.sh onap deleteVNF Vfmodule_Ete_vFWCLvPKG_452156c1_1 ++ export NAMESPACE=onap ++ NAMESPACE=onap +++ kubectl --namespace onap get pods +++ sed 's/ .*//' +++ grep robot ++ POD=dev-robot-547f588cc8-vgc7s ++ TAGS='-i deleteVNF' +++ dirname ./ete-k8s.sh ++ DIR=. ++ SCRIPTDIR=scripts/etescript ++ ETEHOME=/var/opt/ONAP ++ [[ Vfmodule_Ete_vFWCLvPKG_452156c1_1 == \e\x\e\c\s\c\r\i\p\t ]] +++ kubectl --namespace onap exec dev-robot-547f588cc8-vgc7s -- bash -c 'ls -1q /share/logs/ | wc -l' ++ export GLOBAL_BUILD_NUMBER=20 ++ GLOBAL_BUILD_NUMBER=20 +++ printf %04d 20 ++ OUTPUT_FOLDER=0020_ete_deleteVNF ++ DISPLAY_NUM=110 ++ VARIABLEFILES='-V /share/config/robot_properties.py' ++ VARIABLES='-v GLOBAL_BUILD_NUMBER:29671' ++ case $2 in ++ kubectl --namespace onap exec dev-robot-547f588cc8-vgc7s -- /var/opt/ONAP/runTags.sh -V /share/config/robot_properties.py -v GLOBAL_BUILD_NUMBER:29671 -d /share/logs/0020_ete_deleteVNF -i deleteVNF --display 110 Starting Xvfb on display :110 with res 1280x1024x24 Executing robot tests at log level TRACE ============================================================================== Testsuites ============================================================================== [ WARN ] Error in file '/var/opt/ONAP/robot/resources/test_templates/vnf_orchestration_test_template.robot': Escaping empty cells with '\' before line continuation marker '...' is deprecated. Remove escaping before Robot Framework 3.2. [ WARN ] Error in file '/var/opt/ONAP/robot/resources/test_templates/vnf_orchestration_test_template.robot': Escaping empty cells with '\' before line continuation marker '...' is deprecated. Remove escaping before Robot Framework 3.2. Testsuites.Demo :: Executes the VNF Orchestration Test cases including setu... ============================================================================== Delete Instantiated VNF :: This test assumes all necessary variabl... | FAIL | TypeError: Expected argument 1 to be a list or list-like, got string instead. ------------------------------------------------------------------------------ Testsuites.Demo :: Executes the VNF Orchestration Test cases inclu... | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed ============================================================================== Testsuites | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed ============================================================================== Output: /share/logs/0020_ete_deleteVNF/output.xml Log: /share/logs/0020_ete_deleteVNF/log.html Report: /share/logs/0020_ete_deleteVNF/report.html command terminated with exit code 1 Regards, Emin -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22499): https://lists.onap.org/g/onap-discuss/message/22499 Mute This Topic: https://lists.onap.org/mt/78360702/21656 Mute #robot:https://lists.onap.org/g/onap-discuss/mutehashtag/robot Mute #frankfurt:https://lists.onap.org/g/onap-discuss/mutehashtag/frankfurt Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
