[Arguments] ${host}
${rc} ${stdout}= Run and Return RC and Output ping -c 2 -W 1 ${host}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Test Connectivity
Should Not Be Empty ${application_name} ${model_name}
${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$
${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju show-status ${application_name} --format yaml -m ${model_name} | grep scale | awk -F ': ' '{print $2}'
- log ${stdout}
+ Log ${stdout}
[Return] ${stdout}
Get Model Name
Should Not Be Empty ${ns_id} ${kdu_name}
${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$
${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju models | grep -i ${kdu_name} | grep -i ${ns_id} | cut -f1 -d " "
- log ${stdout}
+ Log ${stdout}
${model_name}= Set Variable ${kdu_name}-${ns_id}
Should Be Equal As Strings ${model_name} ${stdout}
[Return] ${stdout}
Should Not Be Empty ${model_name}
${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$
${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-vdu" | grep -v "*" | grep -i ${vdu_profile_id} | cut -f1 -d " "
- log ${stdout}
+ Log ${stdout}
Should Not Be Empty ${stdout}
Should Contain ${stdout} ${ee_name}
[Return] ${stdout}
Should Not Be Empty ${model_name}
${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$
${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-ns" | grep -v "*" | grep -i ${charm_name} | cut -f1 -d " "
- log ${stdout}
+ Log ${stdout}
Should Not Be Empty ${stdout}
[Return] ${stdout}
Should Not Be Empty ${model_name}
${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$
${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-vnf" | grep -v "*" | grep -i ${vnf_profile_id} | cut -f1 -d " "
- log ${stdout}
+ Log ${stdout}
Should Not Be Empty ${stdout}
Should Contain ${stdout} ${ee_name}
[Return] ${stdout}
\ No newline at end of file
Create K8s Cluster
[Arguments] ${k8scluster_creds} ${k8scluster_version} ${k8scluster_vim} ${k8scluster_net} ${k8scluster_name}
${rc} ${stdout}= Run and Return RC and Output osm k8scluster-add --creds ${k8scluster_creds} --version ${k8scluster_version} --vim ${k8scluster_vim} --k8s-nets '{"net1": "${k8scluster_net}"}' ${k8scluster_name} --description "Robot cluster"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
WAIT UNTIL KEYWORD SUCCEEDS ${k8scluster_launch_max_wait_time} ${k8scluster_launch_pol_time} Check For K8s Cluster To Be Ready ${k8scluster_name}
Check For K8s Cluster To Be Enabled ${k8scluster_name}
Get K8s Cluster
${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list
Should Be Equal As Integers ${rc} ${success_return_code}
- log ${stdout}
+ Log ${stdout}
[Return] ${stdout}
Check for K8s Cluster
Check For K8s Cluster To Be Ready
[Arguments] ${k8scluster_name}
${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}" --filter _admin.operationalState="ENABLED,DEGRADED"
- log ${stdout}
+ Log ${stdout}
${rc} ${stdout}= Run and Return RC and Output echo "${stdout}" | awk '{print $2}' | grep ${k8scluster_name}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Be Equal As Strings ${stdout} ${k8scluster_name}
Check For K8s Cluster To Be Enabled
[Arguments] ${k8scluster_name}
${rc2} ${stdout2}= Run and Return RC and Output osm k8scluster-show ${k8scluster_name}
- log ${stdout2}
+ Log ${stdout2}
${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}" --filter _admin.operationalState="ENABLED"
- log ${stdout}
+ Log ${stdout}
${rc} ${stdout}= Run and Return RC and Output echo "${stdout}" | awk '{print $2}' | grep ${k8scluster_name}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Be Equal As Strings ${stdout} ${k8scluster_name}
${config_file_attr} Set Variable If '${config_file}'!='${EMPTY}' --config_file '${config_file}' \
${ns_id}= Instantiate Network Service ${ns_name} ${nsd} ${vim_name} ${config_attr} ${sshkeys_attr} ${config_file_attr}
- log ${ns_id}
+ Log ${ns_id}
WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For NS Instance To Configured ${ns_name}
Check For NS Instance For Failure ${ns_name}
[Arguments] ${ns_name} ${nsd} ${vim_name} ${ns_extra_args}
${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
[Arguments] ${ns_id} ${update_type} ${ns_update_config} ${ns_update_timeout}
${rc} ${stdout}= Run and Return RC and Output osm ns-update ${ns_id} --updatetype ${update_type} --config ${ns_update_config} --timeout ${ns_update_timeout} --wait
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${ns_id}
Should Not Be Empty ${vnf_member_index}
${rc} ${stdout}= Run and Return RC and Output osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${ns_id}
Should Not Be Empty ${vnf_member_index}
${rc} ${stdout}= Run and Return RC and Output osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $2}' 2>&1
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${ns_name}
${rc} ${stdout}= Run and Return RC and Output osm ns-list | grep ${ns_name} | awk '{print $4}' 2>&1
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Not Be Empty ${stdout}
[Return] ${stdout}
should not be empty @{vnf_list}
@{temp_list}= Create List
FOR ${vnf_id} IN @{vnf_list}
- log ${vnf_id}
+ Log ${vnf_id}
@{vnf_ip_list} Get Vnf Ip List ${vnf_id}
@{temp_list}= Combine Lists ${temp_list} ${vnf_ip_list}
END
# returns a string of ip addresses and needs to be converted into a list
should not be empty ${vnf_ip_list_string}[1]
@{vnf_ip_list} = split string ${vnf_ip_list_string}[1]
- log list ${vnf_ip_list}
+ Log Many ${vnf_ip_list}
should not be empty ${vnf_ip_list}
[return] @{vnf_ip_list}
[arguments] ${ns_name}
${rc} ${stdout}= Run and Return RC and Output openstack server list
- log ${stdout}
+ Log ${stdout}
${rc} ${stdout}= run and return rc and output osm ns-list --filter name="${ns_name}"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain Any ${stdout} READY BROKEN
[Arguments] ${ns_name}
${rc} ${stdout}= Run and Return RC and Output openstack server list
- log ${stdout}
+ Log ${stdout}
${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Not Contain ${stdout} BROKEN
[Arguments] ${ns}
${rc} ${stdout}= Run and Return RC and Output openstack server list
- log ${stdout}
+ Log ${stdout}
${rc} ${stdout}= Run and Return RC and Output osm ns-list | awk '{print $2}' | grep ${ns}
Should Not Be Equal As Strings ${stdout} ${ns}
Should Not Be Empty ${ns_name}
${rc} ${stdout}= Run and Return RC and Output osm ns-op-list ${ns_name}
- log ${stdout}
- log ${rc}
+ Log ${stdout}
+ Log ${rc}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Not Be Empty ${ns_operation_id}
${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain ${stdout} COMPLETED msg=The ns-action with id ${ns_operation_id} was not completed values=False
Should Not Be Empty ${ns_operation_id}
${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain ${stdout} FAILED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
Should Not Be Empty ${ns_operation_id}
${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain Any ${stdout} FAILED COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
[Arguments] ${ns_name} ${vnf_id} ${vdur_id}
${rc} ${affinity_group_id}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(.id == "'${vdur_id}'")' | yq '."affinity-or-anti-affinity-group-id"[0]' | tr -d \\" 2>&1
- log ${affinity_group_id}
+ Log ${affinity_group_id}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${affinity_group_id} values=False
${rc} ${affinity_group_name}= Run and Return RC and Output osm ns-show ${ns_name} --literal | yq '."affinity-or-anti-affinity-group"[] | select(.id == "'${affinity_group_id}'")' | yq '.name' | tr -d \\" 2>&1
- log ${affinity_group_name}
+ Log ${affinity_group_name}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${affinity_group_name} values=False
[Return] ${affinity_group_name}
Should Not Be Empty ${ns_id}
Should Not Be Empty ${type}
${rc} ${stdout}= Run and Return RC and Output osm ns-op-list ${ns_id} | grep ${type} | awk '{print $2}' 2>&1
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Not Be Empty ${stdout}
[Return] ${stdout}
*** Keywords ***
Get NSDs List
${rc} ${stdout}= Run and Return RC and Output osm nspkg-list
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Arguments] ${nsd_pkg}
${rc} ${stdout}= Run and Return RC and Output osm nspkg-create ${nsd_pkg}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${lines}= Get Line Count ${stdout}
${last}= Evaluate ${lines} - 1
${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm nspkg-delete ${nsd_id}
Should Be Equal As Integers ${rc} ${success_return_code}
- log ${stdout}
+ Log ${stdout}
WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NSD ${nsd_id}
${config_file_attr} Set Variable If '${config_file}'!='${EMPTY}' --config_file '${config_file}' \
${nsi_id}= Instantiate Network Slice ${slice_name} ${nst} ${vim_name} ${config_attr} ${config_file_attr} ${sshkeys_attr}
- log ${nsi_id}
+ Log ${nsi_id}
WAIT UNTIL KEYWORD SUCCEEDS ${slice_launch_max_wait_time} ${slice_launch_pol_time} Check For Network Slice Instance To Configured ${slice_name}
Check For Network Slice Instance For Failure ${slice_name}
[Arguments] ${slice_name} ${nst} ${vim_name} ${slice_extra_args} ${sshkeys_attr}
${rc} ${stdout}= Run and Return RC and Output osm nsi-create --nsi_name ${slice_name} --nst_name ${nst} --vim_account ${vim_name} ${sshkeys_attr} ${slice_extra_args}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${slice_name}
${rc} ${stdout}= Run and Return RC and Output osm ns-list | grep ${slice_name} | wc -l 2>&1
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
# Get all the ns_id in the slice
@{slice_ns_list} Get Slice Ns List ${slice_name}
- log many @{slice_ns_list}
+ Log Many @{slice_ns_list}
@{temp_list}= Create List
# For each ns_id in the list, get all the vnf_id and their IP addresses
FOR ${ns_id} IN @{slice_ns_list}
- log ${ns_id}
+ Log ${ns_id}
@{vnf_id_list} Get Ns Vnf List ${ns_id}
# For each vnf_id in the list, get all its IP addresses
@{ns_ip_list} Get Ns Ip List @{vnf_id_list}
[Arguments] ${slice_name}
${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain Any ${stdout} READY BROKEN configured
[Arguments] ${slice_name}
${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}"
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Not Contain ${stdout} failed
[Arguments] ${slice_name} ${slice_delete_max_wait_time}=4min
${rc} ${stdout}= Run and Return RC and Output osm nsi-delete ${slice_name}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${slice_delete_max_wait_time}= Convert Time ${slice_delete_max_wait_time} result_format=number
*** Keywords ***
Get NST List
${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list
- log ${stdout}
- log ${rc}
+ Log ${stdout}
+ Log ${rc}
Should Be Equal As Integers ${rc} ${success_return_code}
[Arguments] ${nst}
${rc} ${stdout}= Run and Return RC and Output osm netslice-template-create ${nst}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
[Arguments] ${nst_id}
${rc} ${stdout}= Run and Return RC and Output osm netslice-template-delete ${nst_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NST ${nst_id}
Should Not Be Empty ${server_id}
${rc} ${stdout}= Run and Return RC and Output openstack server show ${server_id} | grep flavor | awk 'NR>1{print $1}' RS='(' FS=')'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${flavor_id}
${rc} ${stdout}= Run and Return RC and Output openstack flavor show ${flavor_id} | grep properties | awk -F '|' '{print $3}'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${ns_name}
${rc} ${stdout}= Run and Return RC and Output openstack server list | grep ${ns_name} | awk '{print $4}'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
@{servers} = Split String ${stdout}
${n_servers}= Get Length ${servers}
Should Not Be Empty ${field}
${rc} ${stdout}= Run and Return RC and Output openstack quota show -c ${field} -f value
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${server_id}
Should Not Be Empty ${field}
${rc} ${stdout}= Run and Return RC and Output openstack server show ${server_id} -c ${field} -f value
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${server_group_name}
Should Not Be Empty ${server_id}
${rc} ${stdout}= Run and Return RC and Output openstack server group show ${server_group_name} -c members -f value
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain ${stdout} ${server_id}
Should Not Be Empty ${volume_id}
${rc} ${stdout}= Run and Return RC and Output openstack volume list | grep ${volume_id} | wc -l
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${volume_id}
${rc} ${stdout}= Run and Return RC and Output openstack volume delete ${volume_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${server_id}
${rc} ${stdout}= Run and Return RC and Output openstack server stop ${server_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${server_id}
${rc} ${stdout}= Run and Return RC and Output openstack server set --state error ${server_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${server_id}
${rc} ${stdout}= Run and Return RC and Output openstack server delete ${server_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
# Proceedes with the onboarding with the appropriate arguments
${rc} ${stdout}= Run and Return RC and Output tar -czf ${pkg}.tar.gz -C ${pkg} .
${rc} ${stdout}= Run and Return RC and Output osm upload-package ${pkg}.tar.gz
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${project_name}
Should Not Be Empty ${new_name}
${rc} ${stdout}= Run and Return RC and Output osm project-update ${project_name} --name ${new_name}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${osm_update_command}= Catenate ${osm_update_command} --${param_name}=${param_value}
END
${rc} ${stdout}= Run and Return RC and Output ${osm_update_command}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${osm_sdnc_create_command}= Catenate ${osm_sdnc_create_command} --${param_name}=${param_value}
END
${rc} ${stdout}= Run and Return RC and Output ${osm_sdnc_create_command}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
[Arguments] ${sdnc_name}
${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm sdnc-delete ${sdnc_name}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Wait Until Keyword Succeeds ${delete_max_wait_time} ${delete_pol_time} Check for SDNC To Be Deleted ${sdnc_name}
Get SDNC List
${rc} ${stdout}= Run and Return RC and Output osm sdnc-list
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Arguments] ${sdnc_id}
${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${sdnc_id} | grep -io ENABLED
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
&{headers} Create Dictionary Content-Type=application/json Accept=application/json
&{data} Create Dictionary username=${osm_user} password=${osm_password} project-id=${osm_project}
${resp}= Post On Session osmhit ${auth_token_uri} json=${data} headers=${headers}
- log ${resp}
+ Log ${resp}
Pass Execution If ${resp.status_code} in ${success_status_code_list} Get Auth Token completed
Set Suite Variable ${token_status_code} ${resp.status_code}
${access_token}= Get Value From Json ${resp.json()} $..id
Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
... ELSE Login With Public Key ${username} ${privatekey}
${stdout} ${rc}= Execute Command ${command} return_rc=True return_stdout=True
- log ${rc}
- log ${stdout}
+ Log ${rc}
+ Log ${stdout}
Close All Connections
Should Be Equal As Integers ${rc} 0
[Return] ${stdout}
${osm_vim_create_command}= Catenate ${osm_vim_create_command} --${param_name}=${param_value}
END
${rc} ${stdout}= Run and Return RC and Output ${osm_vim_create_command}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
[Arguments] ${vim_name}
${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm vim-delete ${vim_name}
- log ${stdout}
+ Log ${stdout}
Wait Until Keyword Succeeds ${delete_max_wait_time} ${delete_pol_time} Check for VIM Target ${vim_name}
Get VIM Targets
${rc} ${stdout}= Run and Return RC and Output osm vim-list
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Not Be Empty ${vnf_id}
${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | grep vim-id | awk '{print $2}'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
Should Not Be Empty ${vnf_id}
${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[].id'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
@{vdur_ids}= Split String ${stdout}
[Return] @{vdur_ids}
Should Not Be Empty ${vnf_id}
${rc} ${vm_vim_id}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[] | select(.id == "'${vdur_id}'")' | yq '."vim-id"' | tr -d \\"
- log ${vm_vim_id}
+ Log ${vm_vim_id}
Should Be Equal As Integers ${rc} ${success_return_code} msg=${vm_vim_id} values=False
[Return] ${vm_vim_id}
*** Keywords ***
Get VNFDs List
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-list
- log ${stdout}
- log ${rc}
+ Log ${stdout}
+ Log ${rc}
Should Be Equal As Integers ${rc} ${success_return_code}
# Proceedes with the onboarding with the appropriate arguments
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-create ${overrides} ${vnfd_pkg}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${lines}= Get Line Count ${stdout}
${last}= Evaluate ${lines} - 1
# Proceedes with the onboarding with the appropriate arguments
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-update --content ${vnfd_pkg} ${vnfd_name}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${lines}= Get Line Count ${stdout}
${last}= Evaluate ${lines} - 1
# Proceedes with the onboarding with the appropriate arguments
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-create ${overrides} ${vnfd_pkg} --override '${override_fields}'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
${lines}= Get Line Count ${stdout}
${last}= Evaluate ${lines} - 1
[Arguments] ${vnfd_id}
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-delete ${vnfd_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For VNFD ${vnfd_id}
[Arguments] ${vnfd_id}
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-delete ${vnfd_id}
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${failure_return_code}
Should Contain ${stdout} 409 msg=Expected Conflict values=False
WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For VNFD ${vnfd_id} True
Get Management Ip Addresses
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Get Management Ip Addresses
${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
+ Log ${ip_addr_1}
Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
+ Log ${ip_addr_2}
Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
Get Management Ip Addresses
[Tags] verify
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Get Management Ip Addresses
${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
+ Log ${ip_addr_1}
Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
+ Log ${ip_addr_2}
Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
[Arguments] ${folder_name}
${rc} ${stdout}= Run and Return RC and Output rm -rf '${folder_name}'
- log ${stdout}
+ Log ${stdout}
Set Suite Variable ${vnf_id2} ${vnfr_list}[1]
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
Set Suite Variable ${vnf1_ipmgmt} ${ip}
- log ${vnf1_ipmgmt}
+ Log ${vnf1_ipmgmt}
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
Set Suite Variable ${vnf2_ipmgmt} ${ip}
- log ${vnf2_ipmgmt}
+ Log ${vnf2_ipmgmt}
Check Vnf1 IPs
Variable Should Exist ${privatekey} msg=SSH private key not available
Sleep 10 seconds Wait for SSH daemon to be up
${stdout}= Execute Remote Command Check Rc Return Output ${vnf1_ipmgmt} ${username} ${EMPTY} ${privatekey} ip --brief addr show up | grep -v "^lo" | awk '{print $3}'
- log ${stdout}
+ Log ${stdout}
@{ip} = Split String ${stdout}
Should Match Regexp ${ip}[1] ${datanet1_prefix} msg=${ip}[1] doesn't match subnet's regexp ${datanet1_prefix}
Should Match Regexp ${ip}[2] ${datanet2_prefix} msg=${ip}[2] doesn't match subnet's regexp ${datanet2_prefix}
Variable Should Exist ${vnf2_ipmgmt} msg=IP address of the data VNF '${vnf_member_index_2}' is not available
Variable Should Exist ${privatekey} msg=SSH private key not available
${stdout}= Execute Remote Command Check Rc Return Output ${vnf2_ipmgmt} ${username} ${EMPTY} ${privatekey} ip --brief addr show up | grep -v "^lo" | awk '{print $3}'
- log ${stdout}
+ Log ${stdout}
@{ip} = Split String ${stdout}
Should Match Regexp ${ip}[1] ${datanet1_prefix} msg=${ip}[1] doesn't match subnet's regexp ${datanet1_prefix}
Should Match Regexp ${ip}[2] ${datanet2_prefix} msg=${ip}[2] doesn't match subnet's regexp ${datanet2_prefix}
Variable Should Exist ${vnf1_ipmgmt} msg=IP address of the data VNF '${vnf_member_index_1}' is not available
Variable Should Exist ${privatekey} msg=SSH private key not available
${stdout}= Execute Remote Command Check Rc Return Output ${vnf1_ipmgmt} ${username} ${EMPTY} ${privatekey} ip addr ; ping -c 5 ${vnf2_ipmgmt}
- log ${stdout}
+ Log ${stdout}
${stdout}= Execute Remote Command Check Rc Return Output ${vnf1_ipmgmt} ${username} ${EMPTY} ${privatekey} ping -c 5 ${vnf2_ip1}
- log ${stdout}
+ Log ${stdout}
${stdout}= Execute Remote Command Check Rc Return Output ${vnf1_ipmgmt} ${username} ${EMPTY} ${privatekey} ping -c 5 ${vnf2_ip2}
- log ${stdout}
+ Log ${stdout}
${stdout}= Execute Remote Command Check Rc Return Output ${vnf1_ipmgmt} ${username} ${EMPTY} ${privatekey} ping -c 5 ${vnf2_ip3}
- log ${stdout}
+ Log ${stdout}
Ping from Vnf2 to Vnf1
Variable Should Exist ${vnf1_ipmgmt} msg=IP address of the data VNF '${vnf_member_index_2}' is not available
Variable Should Exist ${privatekey} msg=SSH private key not available
${stdout}= Execute Remote Command Check Rc Return Output ${vnf2_ipmgmt} ${username} ${EMPTY} ${privatekey} ip addr ; ping -c 5 ${vnf1_ipmgmt}
- log ${stdout}
+ Log ${stdout}
${stdout}= Execute Remote Command Check Rc Return Output ${vnf2_ipmgmt} ${username} ${EMPTY} ${privatekey} ip addr ; ping -c 5 ${vnf1_ip1}
- log ${stdout}
+ Log ${stdout}
${stdout}= Execute Remote Command Check Rc Return Output ${vnf2_ipmgmt} ${username} ${EMPTY} ${privatekey} ip addr ; ping -c 5 ${vnf1_ip2}
- log ${stdout}
+ Log ${stdout}
${stdout}= Execute Remote Command Check Rc Return Output ${vnf2_ipmgmt} ${username} ${EMPTY} ${privatekey} ip addr ; ping -c 5 ${vnf1_ip3}
- log ${stdout}
+ Log ${stdout}
Delete NS Instance
Set Suite Variable ${vnf_id} ${vnfr_list}[0]
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
Set Suite Variable ${vnf_ipmgmt} ${ip}
- log ${vnf_ipmgmt}
+ Log ${vnf_ipmgmt}
Check Vnf IPs
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${num_virtual_storage}= Convert To Integer ${stdout}
Set Suite Variable ${vnf_num_volumes} ${num_virtual_storage}
- log ${vnf_num_volumes}
+ Log ${vnf_num_volumes}
Get VNF IP Address
[Tags] verify
Variable Should Exist ${ns_id} msg=NS is not available
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Variable Should Exist ${vnf_ip_addr} msg=VNF is not available
Sleep 30 seconds Wait for SSH daemon to be up
${stdout}= Execute Remote Command Check Rc Return Output ${vnf_ip_addr} ${username} ${password} ${privatekey} sudo lsblk -l
- log ${stdout}
+ Log ${stdout}
${lines}= Get Lines Containing String ${stdout} disk
${num_lines}= Get Line Count ${lines}
Run Keyword If ${num_lines} < ${vnf_num_volumes} Fail msg=Number of disks (${num_lines}) is less than specified in VDU (${vnf_num_volumes})
# [Tags] cleanup
# Variable Should Exist ${volume_id} msg=Volume is not available
# ${exists}= Check If Volume Exists ${volume_id}
-# log ${exists}
+# Log ${exists}
# IF ${exists}==0
# Fail msg=Persistent volume was deleted
# Set Suite Variable ${volume_id} ${EMPTY}}
# ELSE
-# log Persistent volume still exists, deleting...
+# Log Persistent volume still exists, deleting...
# Delete Volume ${volume_id}
# Set Suite Variable ${volume_id} ${EMPTY}}
# END
Variable Should Exist ${ns_id} msg=NS is not available
${id} Get Vnf Id ${ns_id} ${vnf_member_index}
- log ${id}
+ Log ${id}
Set Suite Variable ${vnf_id} ${id}
Set Suite Variable ${ns_update_config} '{changeVnfPackageData: [{vnfInstanceId: "${vnf_id}", vnfdId: "${vnfd_id}"}]}'
Get Management Ip Address
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Get Management Ip Address
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Variable Should Exist ${ns_id} msg=NS is not available
${id} Get Vnf Id ${ns_id} ${vnf_member_index}
- log ${id}
+ Log ${id}
Set Suite Variable ${vnf_id} ${id}
Set Suite Variable ${ns_update_config} '{changeVnfPackageData: [{vnfInstanceId: "${vnf_id}", vnfdId: "${vnfd_id}"}]}'
Get Management Ip Address
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Get VNF IP Address
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
${vnfs_list}= Get Ns Vnf List ${ns_id}
${vim_id}= Get VNF VIM ID ${vnfs_list}[0]
- log ${vim_id}
+ Log ${vim_id}
Set Suite Variable ${vnf_server_id} ${vim_id}
${flavor_id}= Get Server Flavor ID ${vnf_server_id}
${properties}= Get Flavor Properties ${flavor_id}
- log ${properties}
+ Log ${properties}
Set Suite Variable ${flavor_properties} ${properties}
Variable Should Exist ${ns_id} msg=Network service instance is not available
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
Set Suite Variable ${ip_mgmt_1} ${ip}
- log ${ip_mgmt_1}
+ Log ${ip_mgmt_1}
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
Set Suite Variable ${ip_mgmt_2} ${ip}
- log ${ip_mgmt_2}
+ Log ${ip_mgmt_2}
Ping from Vnf1 to Vnf2
Variable Should Exist ${ip_mgmt_1} msg=IP address of the data VNF '${vnf_member_index_1}' is not available
Sleep 30 seconds Wait for SSH daemon to be up
${stdout}= Execute Remote Command Check Rc Return Output ${ip_mgmt_1} ${username} ${password} ${EMPTY} ip addr ; ping -c 5 ${datanet_ip2}
- log ${stdout}
+ Log ${stdout}
Ping from Vnf2 to Vnf1
Variable Should Exist ${ip_mgmt_2} msg=IP address of the data VNF '${vnf_member_index_2}' is not available
${stdout}= Execute Remote Command Check Rc Return Output ${ip_mgmt_2} ${username} ${password} ${EMPTY} ip addr ; ping -c 5 ${datanet_ip1}
- log ${stdout}
+ Log ${stdout}
Delete NS Instance
Variable Should Exist ${ns_id} msg=Network service instance is not available
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
Set Suite Variable ${ip_mgmt_1} ${ip}
- log ${ip_mgmt_1}
+ Log ${ip_mgmt_1}
${ip} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
Set Suite Variable ${ip_mgmt_2} ${ip}
- log ${ip_mgmt_2}
+ Log ${ip_mgmt_2}
Ping from Vnf1 to Vnf2
Variable Should Exist ${ip_mgmt_1} msg=IP address of the data VNF '${vnf_member_index_1}' is not available
Sleep 30 seconds Wait for SSH daemon to be up
${stdout}= Execute Remote Command Check Rc Return Output ${ip_mgmt_1} ${username} ${password} ${EMPTY} ip addr ; ping -c 5 ${datanet_ip2}
- log ${stdout}
+ Log ${stdout}
Ping from Vnf2 to Vnf1
Variable Should Exist ${ip_mgmt_2} msg=IP address of the data VNF '${vnf_member_index_2}' is not available
${stdout}= Execute Remote Command Check Rc Return Output ${ip_mgmt_2} ${username} ${password} ${EMPTY} ip addr ; ping -c 5 ${datanet_ip1}
- log ${stdout}
+ Log ${stdout}
Delete NS Instance
ELSE
${memory}= Evaluate ${ram_quota} / 1000
END
- log ${memory}
+ Log ${memory}
Create VNFD Overriding Fields '%{PACKAGES_FOLDER}/${vnfd_pkg}' virtual-compute-desc.1.virtual-memory.size=${memory}
${rand}= Generate Random String 4 [NUMBERS]
${ns_name}= Catenate SEPARATOR=_ ${ns_name_prefix} ${rand}
Set Suite Variable ${ns_name}
- log ${ns_name}
+ Log ${ns_name}
${id}= Instantiate Network Service ${ns_name} ${nsd_name} %{VIM_TARGET} --config '${ns_config}' --ssh_keys ${publickey}
- log ${id}
+ Log ${id}
Set Suite Variable ${ns_id} ${id}
WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For Ns Instance To Configured ${ns_name}
${rc} ${stdout}= run and return rc and output osm ns-list --filter id="${ns_id}" | grep ${ns_id} | awk '{print $8}'
- log ${stdout}
+ Log ${stdout}
Should Contain ${stdout} BROKEN
${rc} ${stdout}= run and return rc and output osm ns-show ${ns_id} --literal | yq .errorDetail
- log ${stdout}
+ Log ${stdout}
Should Contain ${stdout} Deploying at VIM: Error at create vdu
Get Vnf Ip Address
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Test Ping
Get Vnf Ip Address
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Check Remote File Injected Via Cloud-init
${stdout}= Execute Remote Command Check Rc Return Output ${vnf_ip_addr} ${username} ${password} ${EMPTY} sudo cat /root/helloworld.txt
- log ${stdout}
+ Log ${stdout}
Delete NS Instance Test
Get Vnf Ip Address
${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Test Ping
Get VIM Objects
Variable Should Exist ${ns_id} msg=NS is not available
@{vnf_id_list}= Get Ns Vnf List ${ns_id}
- log ${vnf_id_list}
+ Log ${vnf_id_list}
FOR ${vnf_id} IN @{vnf_id_list}
- log ${vnf_id}
+ Log ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
@{vdu_ids}= Split String ${id}
Append To List ${vim_vdus} @{vdu_ids}
END
END
END
- log Many @{vim_vdus}
- log Many @{vim_volumes}
+ Log Many @{vim_vdus}
+ Log Many @{vim_volumes}
Get Volume VNF Info
Variable Should Exist ${ns_id} msg=NS is not available
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_several_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_volumes_ip_addr} ${ip_addr}
${vnf_id}= Get Vnf Id ${ns_id} ${vnf_several_index}
Set Suite Variable ${vnf_volumes_id} ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
Set Suite Variable ${vdu_volumes_id} ${id}
- log ${vdu_volumes_id}
+ Log ${vdu_volumes_id}
@{volumes_ip_list}= Get Vnf Vdur IPs ${vnf_volumes_id}
Set Suite Variable @{volumes_ip_list} @{volumes_ip_list}
- log @{volumes_ip_list}
+ Log @{volumes_ip_list}
Get Volumes Info
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${num_virtual_storage}= Convert To Integer ${stdout}
Set Suite Variable ${vnf_num_volumes} ${num_virtual_storage}
- log ${vnf_num_volumes}
+ Log ${vnf_num_volumes}
${volumes_attached}= Get Server Property ${vdu_volumes_id} volumes_attached
${match}= Get Regexp Matches ${volumes_attached} '([0-9a-f\-]+)' 1
Set Suite Variable ${volume_id} ${match}[0]
Variable Should Exist ${vnf_volumes_ip_addr} msg=VNF is not available
Sleep 20 seconds Wait for SSH daemon to be up
${stdout}= Execute Remote Command Check Rc Return Output ${vnf_volumes_ip_addr} ${username} ${password} ${privatekey} sudo lsblk -l
- log ${stdout}
+ Log ${stdout}
${lines}= Get Lines Containing String ${stdout} disk
${num_lines}= Get Line Count ${lines}
Run Keyword If ${num_lines} < ${vnf_num_volumes} Fail msg=Number of disks (${num_lines}) is less than specified in VDU (${vnf_num_volumes})
Variable Should Exist ${vnf_volumes_id} msg=VNF is not available
@{ip_list}= Get Vnf Vdur IPs ${vnf_volumes_id}
- log @{ip_list}
+ Log @{ip_list}
Should Be Equal ${ip_list} ${volumes_ip_list} IP addresses have changed after healing
${id}= Get VNF VIM ID ${vnf_volumes_id}
- log ${id}
+ Log ${id}
Should Not Be Equal ${id} ${vdu_volumes_id} VDU id has not changed after healing
${volumes_attached}= Get Server Property ${id} volumes_attached
Sleep 30 seconds Wait for SSH daemon to be up
${stdout}= Execute Remote Command Check Rc Return Output ${vnf_volumes_ip_addr} ${username} ${password} ${privatekey} sudo lsblk -l
- log ${stdout}
+ Log ${stdout}
${lines}= Get Lines Containing String ${stdout} disk
${num_lines}= Get Line Count ${lines}
Run Keyword If ${num_lines} < ${vnf_num_volumes} Fail msg=Number of disks (${num_lines}) is less than specified in VDU (${vnf_num_volumes})
END
END
END
- log Many @{vim_vdus}
- log Many @{vim_volumes}
+ Log Many @{vim_vdus}
+ Log Many @{vim_volumes}
Delete NS Instance
[Tags] cleanup
${error}= Set Variable 0
FOR ${vol_id} IN @{vim_volumes}
- log Checking if volume ${vol_id} is still in VIM
+ Log Checking if volume ${vol_id} is still in VIM
${exists}= Check If Volume Exists ${vol_id}
IF ${exists}!=0
${error}= Set Variable 1
- log Deleting volume ${vol_id}
+ Log Deleting volume ${vol_id}
Run Keyword And Ignore Error Delete Volume ${vol_id}
END
END
FOR ${vdu_id} IN @{vim_vdus}
- log Checking if server ${vdu_id} is still in VIM
+ Log Checking if server ${vdu_id} is still in VIM
${status}= Run Keyword And Ignore Error Get Server Property ${vdu_id} id
- log ${status}[0]
+ Log ${status}[0]
IF '${status}[0]' == 'PASS'
${error}= Set Variable 1
- log Deleting server ${vdu_id}
+ Log Deleting server ${vdu_id}
Run Keyword And Ignore Error Delete Server ${vdu_id}
END
END
Get VIM Objects
Variable Should Exist ${ns_id} msg=NS is not available
@{vnf_id_list}= Get Ns Vnf List ${ns_id}
- log ${vnf_id_list}
+ Log ${vnf_id_list}
FOR ${vnf_id} IN @{vnf_id_list}
- log ${vnf_id}
+ Log ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
@{vdu_ids}= Split String ${id}
Append To List ${vim_vdus} @{vdu_ids}
END
END
END
- log Many @{vim_vdus}
- log Many @{vim_volumes}
+ Log Many @{vim_vdus}
+ Log Many @{vim_volumes}
Get Charm VNF Info
${id}= Get VNF VIM ID ${vnf_charm_id}
@{vdu_charm_ids}= Split String ${id}
Set Suite Variable @{vdu_charm_ids} @{vdu_charm_ids}
- log ${vdu_charm_ids}[1]
+ Log ${vdu_charm_ids}[1]
@{charm_ip_list}= Get Vnf Vdur IPs ${vnf_charm_id}
Set Suite Variable @{charm_ip_list} @{charm_ip_list}
${ip}= Get Vdu Attribute ${vnf_charm_id} ip-address 1
${stdout}= Execute Remote Command Check Rc Return Output ${ip} ${username} ${password} ${privatekey} sudo ls ${vnf_charm_cloudinit_file}
- log ${stdout}
+ Log ${stdout}
Check If remote File Exists ${ip} ${username} ${password} ${privatekey} ${vnf_charm_day1_file}
END
END
END
- log Many @{vim_vdus}
- log Many @{vim_volumes}
+ Log Many @{vim_vdus}
+ Log Many @{vim_volumes}
Delete NS Instance
[Tags] cleanup
${error}= Set Variable 0
FOR ${vol_id} IN @{vim_volumes}
- log Checking if volume ${vol_id} is still in VIM
+ Log Checking if volume ${vol_id} is still in VIM
${exists}= Check If Volume Exists ${vol_id}
IF ${exists}!=0
${error}= Set Variable 1
- log Deleting volume ${vol_id}
+ Log Deleting volume ${vol_id}
Run Keyword And Ignore Error Delete Volume ${vol_id}
END
END
FOR ${vdu_id} IN @{vim_vdus}
- log Checking if server ${vdu_id} is still in VIM
+ Log Checking if server ${vdu_id} is still in VIM
${status}= Run Keyword And Ignore Error Get Server Property ${vdu_id} id
- log ${status}[0]
+ Log ${status}[0]
IF '${status}[0]' == 'PASS'
${error}= Set Variable 1
- log Deleting server ${vdu_id}
+ Log Deleting server ${vdu_id}
Run Keyword And Ignore Error Delete Server ${vdu_id}
END
END
Get VIM Objects
Variable Should Exist ${ns_id} msg=NS is not available
@{vnf_id_list}= Get Ns Vnf List ${ns_id}
- log ${vnf_id_list}
+ Log ${vnf_id_list}
FOR ${vnf_id} IN @{vnf_id_list}
- log ${vnf_id}
+ Log ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
@{vdu_ids}= Split String ${id}
Append To List ${vim_vdus} @{vdu_ids}
END
END
END
- log Many @{vim_vdus}
- log Many @{vim_volumes}
+ Log Many @{vim_vdus}
+ Log Many @{vim_volumes}
Get Charm VNF Info
${id}= Get VNF VIM ID ${vnf_charm_id}
@{vdu_charm_ids}= Split String ${id}
Set Suite Variable @{vdu_charm_ids} @{vdu_charm_ids}
- log ${vdu_charm_ids}[1]
+ Log ${vdu_charm_ids}[1]
@{charm_ip_list}= Get Vnf Vdur IPs ${vnf_charm_id}
Set Suite Variable @{charm_ip_list} @{charm_ip_list}
Get Volume VNF Info
Variable Should Exist ${ns_id} msg=NS is not available
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_several_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_volumes_ip_addr} ${ip_addr}
${vnf_id}= Get Vnf Id ${ns_id} ${vnf_several_index}
Set Suite Variable ${vnf_volumes_id} ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
Set Suite Variable ${vdu_volumes_id} ${id}
- log ${vdu_volumes_id}
+ Log ${vdu_volumes_id}
@{volumes_ip_list}= Get Vnf Vdur IPs ${vnf_volumes_id}
Set Suite Variable @{volumes_ip_list} @{volumes_ip_list}
- log @{volumes_ip_list}
+ Log @{volumes_ip_list}
Stop VDUs
${ip}= Get Vdu Attribute ${vnf_charm_id} ip-address 1
${stdout}= Execute Remote Command Check Rc Return Output ${ip} ${username} ${password} ${privatekey} sudo ls ${vnf_charm_cloudinit_file}
- log ${stdout}
+ Log ${stdout}
Check If remote File Exists ${ip} ${username} ${password} ${privatekey} ${vnf_charm_day1_file}
END
END
END
- log Many @{vim_vdus}
- log Many @{vim_volumes}
+ Log Many @{vim_vdus}
+ Log Many @{vim_volumes}
Delete NS Instance
[Tags] cleanup
${error}= Set Variable 0
FOR ${vol_id} IN @{vim_volumes}
- log Checking if volume ${vol_id} is still in VIM
+ Log Checking if volume ${vol_id} is still in VIM
${exists}= Check If Volume Exists ${vol_id}
IF ${exists}!=0
${error}= Set Variable 1
- log Deleting volume ${vol_id}
+ Log Deleting volume ${vol_id}
Run Keyword And Ignore Error Delete Volume ${vol_id}
END
END
FOR ${vdu_id} IN @{vim_vdus}
- log Checking if server ${vdu_id} is still in VIM
+ Log Checking if server ${vdu_id} is still in VIM
${status}= Run Keyword And Ignore Error Get Server Property ${vdu_id} id
- log ${status}[0]
+ Log ${status}[0]
IF '${status}[0]' == 'PASS'
${error}= Set Variable 1
- log Deleting server ${vdu_id}
+ Log Deleting server ${vdu_id}
Run Keyword And Ignore Error Delete Server ${vdu_id}
END
END
Get VIM Objects
Variable Should Exist ${ns_id} msg=NS is not available
@{vnf_id_list}= Get Ns Vnf List ${ns_id}
- log ${vnf_id_list}
+ Log ${vnf_id_list}
FOR ${vnf_id} IN @{vnf_id_list}
- log ${vnf_id}
+ Log ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
@{vdu_ids}= Split String ${id}
Append To List ${vim_vdus} @{vdu_ids}
END
- log Many @{vim_vdus}
+ Log Many @{vim_vdus}
Get VNF Info
Variable Should Exist ${ns_id} msg=NS is not available
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
${vnf_id}= Get Vnf Id ${ns_id} ${vnf_index}
Set Suite Variable ${vnf_autoheal_id} ${vnf_id}
${id}= Get VNF VIM ID ${vnf_id}
Set Suite Variable ${vdu_autoheal_id} ${id}
- log ${vdu_autoheal_id}
+ Log ${vdu_autoheal_id}
@{autoheal_ip_list}= Get Vnf Vdur IPs ${vnf_autoheal_id}
Set Suite Variable @{autoheal_ip_list} @{autoheal_ip_list}
- log @{autoheal_ip_list}
+ Log @{autoheal_ip_list}
Stop Autoheal VDU
Variable Should Exist ${vnf_autoheal_id} msg=VNF is not available
@{ip_list}= Get Vnf Vdur IPs ${vnf_autoheal_id}
- log @{ip_list}
+ Log @{ip_list}
Should Be Equal ${ip_list} ${autoheal_ip_list} IP addresses have changed after healing
${id}= Get VNF VIM ID ${vnf_autoheal_id}
- log ${id}
+ Log ${id}
Should Not Be Equal ${id} ${vdu_autoheal_id} VDU id has not changed after healing
END
END
END
- log Many @{vim_vdus}
+ Log Many @{vim_vdus}
Delete NS Instance
[Tags] cleanup
${error}= Set Variable 0
FOR ${vdu_id} IN @{vim_vdus}
- log Checking if server ${vdu_id} is still in VIM
+ Log Checking if server ${vdu_id} is still in VIM
${status}= Run Keyword And Ignore Error Get Server Property ${vdu_id} id
- log ${status}[0]
+ Log ${status}[0]
IF '${status}[0]' == 'PASS'
${error}= Set Variable 1
- log Deleting server ${vdu_id}
+ Log Deleting server ${vdu_id}
Run Keyword And Ignore Error Delete Server ${vdu_id}
END
END
Get Management Ip Addresses
${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
+ Log ${ip_addr_1}
Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
+ Log ${ip_addr_2}
Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
${ip_addr_3} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_3}
- log ${ip_addr_3}
+ Log ${ip_addr_3}
Set Suite Variable ${vnf_3_ip_addr} ${ip_addr_3}
${ip_addr_4} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_4}
- log ${ip_addr_4}
+ Log ${ip_addr_4}
Set Suite Variable ${vnf_4_ip_addr} ${ip_addr_4}
${ip_addr_5} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_5}
- log ${ip_addr_5}
+ Log ${ip_addr_5}
Set Suite Variable ${vnf_5_ip_addr} ${ip_addr_5}
[Tags] verify
Variable Should Exist ${ns_id} msg=Network service instance is not available
${count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- log ${count}
+ Log ${count}
Should Be Equal As Integers ${count} ${replica_count}
Execute Rollback Operation
[Tags] verify
Variable Should Exist ${ns_id} msg=Network service instance is not available
${count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- log ${count}
+ Log ${count}
Should Be Empty ${count}
Delete Network Service Instance
Get Management Ip Addresses
${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
+ Log ${ip_addr_1}
Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
+ Log ${ip_addr_2}
Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
Get Management Ip Addresses
[Tags] verify
${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
+ Log ${ip_addr_1}
Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
+ Log ${ip_addr_2}
Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
Get Management Ip Addresses
${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
+ Log ${ip_addr_1}
Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
+ Log ${ip_addr_2}
Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
Variable Should Exist ${ns_id} msg=Network service instance is not available
${kdu_count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- log ${kdu_count}
+ Log ${kdu_count}
Set Suite Variable ${initial_kdu_count} ${kdu_count}
Perform Manual KDU Scale Out
Variable Should Exist ${initial_kdu_count} msg=Initial KDU count is not available
${kdu_count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- log ${kdu_count}
+ Log ${kdu_count}
Run Keyword If ${kdu_count} != ${initial_kdu_count} + 2 Fail msg=There is no new KDU in the model after Scale Out
Perform Manual KDU Scale In
Check Replicas After Upgrade Operation
Variable Should Exist ${ns_id} msg=Network service instance is not available
${count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- log ${count}
+ Log ${count}
Should Be Equal As Integers ${count} ${replica_count}
Execute Rollback Operation
Check Replicas After Rollback Operation
Variable Should Exist ${ns_id} msg=Network service instance is not available
${count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- log ${count}
+ Log ${count}
Should Be Empty ${count}
Delete Network Service Instance
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
${scaleout_threshold}= Convert To Number ${stdout}
Set Suite Variable ${metric_threshold} ${scaleout_threshold}
- log ${metric_threshold}
+ Log ${metric_threshold}
Create NS Descriptor
Get VNF IP Address
${ip_addr}= Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${vnf_ip_addr} ${ip_addr}
Get Webhook Service VNF IP Address
${ip_addr}= Get Vnf Management Ip Address ${ws_ns_id} ${ws_vnf_member_index}
- log ${ip_addr}
+ Log ${ip_addr}
Set Suite Variable ${ws_vnf_ip_addr} ${ip_addr}
Create VNF Descriptor
${rc} ${stdout}= Run and Return RC and Output mkdir '%{PACKAGES_FOLDER}/${new_vnfd_pkg}' && WEBHOOK_URL="http://${ws_vnf_ip_addr}:${ws_port}" envsubst < '%{PACKAGES_FOLDER}/${vnfd_pkg}'/'${vnfd_file}' > '%{PACKAGES_FOLDER}/${new_vnfd_pkg}'/'${vnfd_file}'
- log ${stdout}
+ Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Create VNFD '%{PACKAGES_FOLDER}/${new_vnfd_pkg}'
[Documentation] Removes the temporary package folder created for the test
[Arguments] ${folder_name}
${rc} ${stdout}= Run and Return RC and Output rm -rf '${folder_name}'
- log ${stdout}
+ Log ${stdout}
# Get all the ns_id in the slice except the middle one to avoid self ping
@{slice_ns_list} Get Slice Ns List Except One ${slice_name} ${middle_ns_name}
- log many @{slice_ns_list}
+ Log many @{slice_ns_list}
@{temp_list}= Create List
# For each ns_id in the list, get all the vnf_id and their IP addresses
FOR ${ns_id} IN @{slice_ns_list}
- log ${ns_id}
+ Log ${ns_id}
@{vnf_id_list} Get Ns Vnf List ${ns_id}
# For each vnf_id in the list, get all its IP addresses
@{ns_ip_list} Get Ns Ip List @{vnf_id_list}
Sleep 60s Waiting for the network to be up
# Ping to the middle VNF
- log ${mgmt_vnf_ip}
+ Log ${mgmt_vnf_ip}
Test Connectivity ${mgmt_vnf_ip}