@{VIM_VDUS} @{EMPTY}
@{VIM_VOLUMES} @{EMPTY}
+# Variables to control time for healing and polling
+${VNF_MAX_TIME_TO_BE_READY} 120sec
+${VNF_POL_TIME} 30sec
+
*** Test Cases ***
Create VNF Descriptors
Log ${VDU_MANUALSCALE_IDS}[1]
@{manualscale_ip_list}= Get Vnf Vdur IPs ${VNF_MANUALSCALE_ID}
Set Suite Variable @{MANUALSCALE_IP_LIST} @{manualscale_ip_list}
+ ${ip}= Get Vdu Attribute ${VNF_MANUALSCALE_ID} ip-address 1
+ Set Suite Variable ${HEALED_VDU_MGMT_IP} ${ip}
Get Volume VNF Info
[Documentation] Get info about volumes and VM of the VNF with several volumes and stores them in suite variables.
Set Suite Variable @{VOLUMES_IP_LIST} @{volumes_ip_list}
Log @{VOLUMES_IP_LIST}
+Check Day0 And Day1 In VDU Before Stopping VM
+ [Documentation] Check that the VDU is accessible via SSH in its mgmt IP address.
+ ... It also checks if day-0 worked and a remote file has been created in the VDU.
+ ... It also checks if day-1 worked and a remote file has been created in the VDU.
+ ${ip}= Get Vdu Attribute ${VNF_MANUALSCALE_ID} ip-address 1
+ Variable Should Exist ${HEALED_VDU_MGMT_IP} msg=IP address of the healed VDU is not available
+ Wait Until Keyword Succeeds ${VNF_MAX_TIME_TO_BE_READY} ${VNF_POL_TIME} Test SSH Connection ${HEALED_VDU_MGMT_IP} ${USERNAME} ${PASSWORD} ${PRIVATEKEY}
+ ${stdout}= Execute Remote Command Check Rc Return Output ${ip} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} sudo ls ${VNF_MANUALSCALE_CLOUDINIT_FILE}
+ Log ${stdout}
+ # Check If Remote File Exists ${HEALED_VDU_MGMT_IP} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} ${VNF_MANUALSCALE_DAY1_FILE}
+
Stop VDUs
[Documentation] Stop all VMs.
Variable Should Exist @{VDU_MANUALSCALE_IDS} msg=Manual Scale VDUs are not available
${id}= Get VNF VIM ID ${VNF_VOLUMES_ID}
Should Not Be Equal ${id} ${VDU_VOLUMES_ID} VDU id has not changed after healing
${ip}= Get Vdu Attribute ${VNF_MANUALSCALE_ID} ip-address 1
- ${stdout}= Execute Remote Command Check Rc Return Output ${ip} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} sudo ls ${VNF_MANUALSCALE_CLOUDINIT_FILE}
+ Should Be Equal ${HEALED_VDU_MGMT_IP} ${ip}
+
+Check Day0 And Day1 In VDU After Healing
+ [Documentation] Check that the healed VDU is accessible via SSH in its mgmt IP address.
+ ... It also checks if day-0 worked after healing and a remote file has been created in the VDU.
+ ... It also checks if day-1 worked after healing and a remote file has been created in the VDU.
+ Variable Should Exist ${HEALED_VDU_MGMT_IP} msg=IP address of the healed VDU is not available
+ Wait Until Keyword Succeeds ${VNF_MAX_TIME_TO_BE_READY} ${VNF_POL_TIME} Test SSH Connection ${HEALED_VDU_MGMT_IP} ${USERNAME} ${PASSWORD} ${PRIVATEKEY}
+ ${stdout}= Execute Remote Command Check Rc Return Output ${HEALED_VDU_MGMT_IP} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} sudo ls ${VNF_MANUALSCALE_CLOUDINIT_FILE}
Log ${stdout}
- Check If Remote File Exists ${ip} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} ${VNF_MANUALSCALE_DAY1_FILE}
+ # Check If Remote File Exists ${HEALED_VDU_MGMT_IP} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} ${VNF_MANUALSCALE_DAY1_FILE}
Update VIM Objects
[Documentation] Retrieve all VMs and volumes from the NS and stores them in VIM_VDUS and VIM_VOLUMES lists.