- ${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]
- @{CHARM_IP_LIST}= Get Vnf Vdur IPs ${VNF_CHARM_ID}
- Set Suite Variable @{CHARM_IP_LIST} @{CHARM_IP_LIST}
-
-Halt Charm VDU
- [Documentation] Halt one of the VM of the charm VNF.
- Variable Should Exist @{VDU_CHARM_IDS} msg=VDU is not available
- Halt Server ${VDU_CHARM_IDS}[1]
+ ${id}= Get VNF VIM ID ${VNF_MANUALSCALE_ID}
+ @{vdu_manualscale_ids}= Split String ${id}
+ Set Suite Variable @{VDU_MANUALSCALE_IDS} @{vdu_manualscale_ids}
+ 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}
+
+Check Day0 And Day1 In VDU Before Halting 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}
+
+Halt Manual Scale VDU
+ [Documentation] Halt one of the VM of the Manual Scale VNF.
+ Variable Should Exist @{VDU_MANUALSCALE_IDS} msg=VDU is not available
+ Halt Server ${VDU_MANUALSCALE_IDS}[1]