get new vr after NetworkRestartWithCleanup

apply workaround for CLOUDSTACK-10380
This commit is contained in:
rsmeets 2018-06-15 12:33:17 +02:00 committed by Frank Maximus
parent 02e2825d2d
commit 8d7a1d6943
3 changed files with 14 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class TestNuagePasswordReset(nuageTestCase):
# stop_vm - Stops the given VM, and verifies its state
def stop_vm(self, vm):
self.debug("Stoping VM")
self.debug("Stopping VM")
vm.stop(self.api_client)
list_vm_response = VirtualMachine.list(self.api_client,
id=vm.id
@ -330,12 +330,22 @@ class TestNuagePasswordReset(nuageTestCase):
vm_test_public_ip = public_ip_1
self.debug("Resetting password for VM - %s" % vm_test.name)
self.stop_vm(vm_test)
vm_test.password = vm_test.resetPassword(self.api_client)
self.debug("Password reset to - %s" % vm_test.password)
self.debug("Starting the VM")
vm_test.start(self.api_client)
self.debug("until CLOUDSTACK-10380 is fixed, redo resetPassword")
self.stop_vm(vm_test)
self.debug("Resetting password again for VM - %s" % vm_test.name)
vm_test.password = vm_test.resetPassword(self.api_client)
self.debug("VM - %s password - %s !" %
(vm_test.name, vm_test.password))
self.debug("Starting the VM again")
vm_test.start(self.api_client)
self.debug("verifying that the guest VM template is password "
"enabled...")
self.debug("VM - %s password - %s !" %

View File

@ -2088,6 +2088,7 @@ class TestNuageStaticNat(nuageTestCase):
self.debug("Restarting the created VPC network with cleanup...")
Network.restart(vpc_tier, self.api_client, cleanup=True)
self.validate_Network(vpc_tier, state="Implemented")
vpc_vr = self.get_Router(vpc_tier)
self.check_Router_state(vpc_vr, state="Running")
self.check_VM_state(vpc_vm, state="Running")

View File

@ -1928,6 +1928,7 @@ class TestNuageInternalLb(nuageTestCase):
self.debug("Restarting the Internal tier with cleanup...")
Network.restart(internal_tier, self.api_client, cleanup=True)
self.validate_Network(internal_tier, state="Implemented")
vr = self.get_Router(internal_tier)
self.check_Router_state(vr, state="Running")
self.check_VM_state(internal_vm, state="Running")
self.check_VM_state(internal_vm_1, state="Running")
@ -2011,6 +2012,7 @@ class TestNuageInternalLb(nuageTestCase):
self.debug("Restarting the Public tier with cleanup...")
Network.restart(public_tier, self.api_client, cleanup=True)
self.validate_Network(public_tier, state="Implemented")
vr = self.get_Router(public_tier)
self.check_Router_state(vr, state="Running")
self.check_VM_state(public_vm, state="Running")
self.validate_PublicIPAddress(