Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions test/integration/component/test_configdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def _umount_config_drive(self, ssh, mount_path):
"""
ssh.execute("umount -d %s" % mount_path)
# Give the VM time to unlock the iso device
time.sleep(2)
time.sleep(0.5)
# Verify umount
result = ssh.execute("ls %s" % mount_path)
self.assertTrue(len(result) == 0,
Expand Down Expand Up @@ -1089,10 +1089,8 @@ def update_and_validate_sshkeypair(self, vm, public_ip=None):

vm.details = vm_new_ssh.details

# reset SSH key also resets the password.
self._decrypt_password(vm)

vm.password_test = ConfigDriveUtils.PasswordTest(vm=vm)
# reset SSH key also removes the password (see https://github.com/apache/cloudstack/pull/4819)
vm.password_test = ConfigDriveUtils.PasswordTest(expect_pw=False)
vm.key_pair = self.keypair

if public_ip:
Expand All @@ -1119,7 +1117,7 @@ def _decrypt_password(self, vm):
cipher = PKCS1_v1_5.new(key)
new_password = cipher.decrypt(b64decode(password_), None)
if new_password:
vm.password = new_password
vm.password = new_password.decode()
else:
self.fail("Failed to decrypt new password")
except ImportError:
Expand Down Expand Up @@ -1511,7 +1509,6 @@ def ssh_into_VM(self, vm, public_ip, reconnect=True,
tries = 1 if negative_test else 3
private_key_file_location = keypair.private_key_file if keypair else None

@retry(tries=tries)
def retry_ssh():
ssh_client = vm.get_ssh_client(
ipaddress=public_ip.ipaddress.ipaddress,
Expand Down Expand Up @@ -1732,8 +1729,7 @@ def restart_Vpc(self, vpc, cleanup=False):
self.api_client.restartVPC(cmd)
self.debug("Restarted VPC with ID - %s" % vpc.id)

# was tags=["advanced", "isonw"]
@attr(tags=["TODO"], required_hardware="true")
@attr(tags=["advanced", "isonw"], required_hardware="true")
def test_configdrive_isolated_network(self):
"""Test Configdrive as provider for isolated Networks
to provide userdata and password reset functionality
Expand Down Expand Up @@ -2500,6 +2496,7 @@ def test_configdrive_vpc_network_verify_metadata(self):
# =====================================================================
self.debug("+++ Scenario: "
"validate updated userdata after migrate")
time.sleep(30)
host = self.migrate_VM(vm)
vm.hostname = host.name
self.then_config_drive_is_as_expected(vm, public_ip_1, metadata=True)
Expand Down