shwstppr commented on code in PR #6385:
URL: https://github.com/apache/cloudstack/pull/6385#discussion_r872117027


##########
test/integration/smoke/test_vm_life_cycle.py:
##########
@@ -1671,6 +1671,15 @@ def setUp(self):
             self.network
         ]
 
+    def tearDown(self):
+        try:
+            #Clean up, terminate the created templates
+            cleanup_resources(self.apiclient, self.cleanup)
+
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return

Review Comment:
   Done



##########
test/integration/smoke/test_vm_life_cycle.py:
##########
@@ -1752,6 +1761,31 @@ def test_01_unmanage_vm_cycle(self):
             "PowerOn",
             "Unmanaged VM is still running"
         )
+        unmanaged_vm_nic = unmanaged_vm.nic[0]
+        nicnetworklist = [{}]
+        nicnetworklist[0]["nic"] = unmanaged_vm_nic.id
+        nicnetworklist[0]["network"] = self.network.id
+        nicipaddresslist = [{}]
+        nicipaddresslist[0]["nic"] = unmanaged_vm_nic.id
+        nicipaddresslist[0]["ip4Address"] = "auto"
+        importedVMService = {
+            "nicnetworklist": nicnetworklist,
+            "nicipaddresslist": nicipaddresslist
+        }
+        imported_vm = VirtualMachine.importUnmanagedInstance(
+            clusterid=clusterid,
+            name=vm_instance_name,
+            serviceofferingid=self.small_offering.id,
+            service=importedVMService,
+            templateid=self.template.id)
+
+        self.assertEqual(
+            self.small_offering.id,
+            imported_vm.serviceofferingid,
+            "Imported VM service offering is different"
+        )
+
+        self.cleanup.append(imported_vm)

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to