cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gau...@apache.org
Subject git commit: updated refs/heads/master to f2d056e
Date Thu, 28 May 2015 15:49:04 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master b61652208 -> f2d056ee1


CLOUDSTACK-8526: Use more memory for HyperV VMs in case SSH is tried to VM

Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
This closes #322


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f2d056ee
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f2d056ee
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f2d056ee

Branch: refs/heads/master
Commit: f2d056ee1e8568d9ef07230e105cae326851dba1
Parents: b616522
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Thu May 28 20:49:51 2015 +0530
Committer: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Committed: Thu May 28 21:18:05 2015 +0530

----------------------------------------------------------------------
 test/integration/testpaths/testpath_vmlc.py | 73 ++++++++++++------------
 1 file changed, 37 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2d056ee/test/integration/testpaths/testpath_vmlc.py
----------------------------------------------------------------------
diff --git a/test/integration/testpaths/testpath_vmlc.py b/test/integration/testpaths/testpath_vmlc.py
index 33e6860..f6c8640 100644
--- a/test/integration/testpaths/testpath_vmlc.py
+++ b/test/integration/testpaths/testpath_vmlc.py
@@ -42,7 +42,6 @@ from marvin.lib.common import (get_domain,
                                setSharedNetworkParams,
                                get_free_vlan)
 from marvin.codes import (PASS,
-                          ERROR_NO_HOST_FOR_MIGRATION,
                           ISOLATED_NETWORK,
                           SHARED_NETWORK,
                           VPC_NETWORK)
@@ -194,9 +193,13 @@ class TestPathVMLC(cloudstackTestCase):
             # Create 3 service offerings with different values for
             # for cpunumber, cpuspeed, and memory
 
-            cls.testdata["service_offering"]["cpunumber"] = "1"
-            cls.testdata["service_offering"]["cpuspeed"] = "128"
-            cls.testdata["service_offering"]["memory"] = "256"
+            cls.testdata["service_offering"]["cpuspeed"] = 128
+            cls.testdata["service_offering"]["memory"] = 256
+
+            cls.testdata["service_offering"]["cpunumber"] = 1
+            if cls.hypervisor.lower() == "hyperv":
+                cls.testdata["service_offering"]["cpuspeed"] = 2048
+                cls.testdata["service_offering"]["memory"] = 2048
 
             cls.service_offering_1 = ServiceOffering.create(
                 cls.apiclient,
@@ -204,10 +207,7 @@ class TestPathVMLC(cloudstackTestCase):
             )
             cls._cleanup.append(cls.service_offering_1)
 
-            cls.testdata["service_offering"]["cpunumber"] = "2"
-            cls.testdata["service_offering"]["cpuspeed"] = "256"
-            cls.testdata["service_offering"]["memory"] = "512"
-
+            cls.testdata["service_offering"]["cpunumber"] = 2
             cls.service_offering_2 = ServiceOffering.create(
                 cls.apiclient,
                 cls.testdata["service_offering"]
@@ -491,21 +491,22 @@ class TestPathVMLC(cloudstackTestCase):
         except Exception as e:
             self.fail("Exception while SSHing to VM: %s" % e)
 
-        # Find suitable host for VM to migrate and migrate the VM
-        # Verify that it is accessible on the new host
-        host = findSuitableHostForMigration(self.apiclient,
-                                            self.virtual_machine.id)
-        if host is None:
-            self.fail(ERROR_NO_HOST_FOR_MIGRATION)
-        self.virtual_machine.migrate(self.apiclient, host.id)
 
-        try:
-            SshClient(host=publicip.ipaddress.ipaddress,
-                      port=22,
-                      user=self.virtual_machine.username,
-                      passwd=self.virtual_machine.password)
-        except Exception as e:
-            self.fail("Exception while SSHing to VM: %s" % e)
+        if not self.hypervisor.lower() == "lxc":
+            # Find suitable host for VM to migrate and migrate the VM
+            # Verify that it is accessible on the new host
+            host = findSuitableHostForMigration(self.apiclient,
+                                            self.virtual_machine.id)
+            if host is not None:
+                self.virtual_machine.migrate(self.apiclient, host.id)
+
+                try:
+                    SshClient(host=publicip.ipaddress.ipaddress,
+                        port=22,
+                        user=self.virtual_machine.username,
+                        passwd=self.virtual_machine.password)
+                except Exception as e:
+                    self.fail("Exception while SSHing to VM: %s" % e)
         return
 
     @attr(tags=["advanced"], required_hardware="True")
@@ -705,21 +706,21 @@ class TestPathVMLC(cloudstackTestCase):
         except Exception as e:
             self.fail("Exception while SSHing to VM: %s" % e)
 
-        # Find suitable host for VM to migrate and migrate the VM
-        # Verify that it is accessible on the new host
-        host = findSuitableHostForMigration(self.apiclient,
+        if not self.hypervisor.lower() == "lxc":
+            # Find suitable host for VM to migrate and migrate the VM
+            # Verify that it is accessible on the new host
+            host = findSuitableHostForMigration(self.apiclient,
                                             self.virtual_machine.id)
-        if host is None:
-            self.fail(ERROR_NO_HOST_FOR_MIGRATION)
-        self.virtual_machine.migrate(self.apiclient, host.id)
-
-        try:
-            SshClient(host=self.virtual_machine.ssh_ip,
-                      port=22,
-                      user=self.virtual_machine.username,
-                      passwd=self.virtual_machine.password)
-        except Exception as e:
-            self.fail("Exception while SSHing to VM: %s" % e)
+            if host is not None:
+                self.virtual_machine.migrate(self.apiclient, host.id)
+
+                try:
+                    SshClient(host=self.virtual_machine.ssh_ip,
+                        port=22,
+                        user=self.virtual_machine.username,
+                        passwd=self.virtual_machine.password)
+                except Exception as e:
+                    self.fail("Exception while SSHing to VM: %s" % e)
         return
 
     @attr(tags=["advanced"], required_hardware="True")


Mime
View raw message