Github user GabrielBrascher commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1326#discussion_r57545397 --- Diff: test/integration/component/test_add_remove_network.py --- @@ -1021,6 +1021,103 @@ def test_29_remove_nic_CS22503(self): self.fail("Failed to delete the nic from vm") return + @attr(tags=["advanced"], required_hardware="true") + def test_30_remove_nic_reattach(self): + """ + Test to verify vm start after NIC removal and reattach + + # 1.Create vm which has 3 nics(e.g. #0,#1,#2) + # 2.Stop the vm + # 3.Remove second nic(#1) + # 4.Add/Reattach same network(#1) + # 5.Start the instance + """ + self.ntwk2 = Network.create( + self.apiclient, + self.services["isolated_network"], + self.account.name, + self.account.domainid, + networkofferingid=self.isolated_network_offering.id + ) + self.ntwk3 = Network.create( + self.apiclient, + self.services["isolated_network"], + self.account.name, + self.account.domainid, + networkofferingid=self.isolated_network_offering.id + ) + self.test_vm = VirtualMachine.create( + self.apiclient, + self.services["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + mode=self.zone.networktype, + networkids=[self.isolated_network.id, self.ntwk2.id, self.ntwk3.id] + ) + self.assertIsNotNone(self.test_vm, "Failed to create vm with 3 nics") + map(lambda x: self.cleanup.append(x), [self.test_vm, self.ntwk2, self.ntwk3]) + vm_res = VirtualMachine.list( + self.apiclient, + id=self.test_vm.id + ) + self.assertEqual(validateList(vm_res)[0], PASS, "Invalid list vm response") + self.nics = vm_res[0].nic + self.assertEqual( + validateList(self.nics)[0], + PASS, + "vm response does not conain nics info" --- End diff -- Hi @sanju1010, just a small typo here ("vm response does not **conain** nics info" -> "... **contain**..."). Thanks.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---