cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sailajam...@apache.org
Subject git commit: updated refs/heads/master to 1e4695b
Date Fri, 18 Jul 2014 05:56:41 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master f3cbb6999 -> 1e4695b9a


Fixing vGPU BVT testcase to skip the test on unsupported hypervisors


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

Branch: refs/heads/master
Commit: 1e4695b9aa5e42f26b84b47349fd81e567deb7e9
Parents: f3cbb69
Author: sailajamada <sailaja.mada@citrix.com>
Authored: Fri Jul 18 09:55:22 2014 +0530
Committer: sailajamada <sailaja.mada@citrix.com>
Committed: Fri Jul 18 10:57:36 2014 +0530

----------------------------------------------------------------------
 .../smoke/test_deploy_vgpu_enabled_vm.py        | 45 +++++++++++++++++---
 1 file changed, 38 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e4695b9/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
index 2188c7f..aca5971 100644
--- a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
+++ b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
@@ -42,14 +42,45 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
     Test deploy a vGPU enabled VM into a user account
     """
     @classmethod
-    def setUpClass(cls):
-        testClient = super(TestDeployvGPUenabledVM, cls).getClsTestClient()
+    def setUpClass(self):
+        testClient = super(TestDeployvGPUenabledVM, self).getClsTestClient()
+        self.apiclient = testClient.getApiClient()
+        self.testdata = self.testClient.getParsedTestDataConfig()
         #Need to add check whether zone containing the xen hypervisor or not as well
-        hypervisor = testClient.getHypervisorInfo()
-        if hypervisor.lower() != XEN_SERVER.lower():
-            raise unittest.skipTest("GPU feature is supported only on XenServer")
-
+        hosts = list_hosts(
+               self.apiclient,
+               hypervisor="XenServer"
+               )
+        if hosts is None:
+            raise unittest.SkipTest("There are no XenServers available. GPU feature is supported
only on XenServer.Check listhosts response")
+        else: 
+             gpuhosts=0
+             for ghost in hosts :
+                    if ghost.hypervisorversion >= "6.2.0":
+                       sshClient = SshClient(host=ghost.ipaddress, port=22, user='root',passwd=self.testdata["xen_host_password"])

+                       if ghost.hypervisorversion == "6.2.0":
+                          res = sshClient.execute("xe patch-list uuid=0850b186-4d47-11e3-a720-001b2151a503")
+                          if len(res) == 0:
+                              continue
+                       res = sshClient.execute("xe vgpu-type-list model-name=\"GRID K120Q\"")
+                       if len(res) != 0 :
+                           gpuhosts=gpuhosts+1 
+                       else:        
+                           continue
+        if gpuhosts == 0:
+           raise unittest.SkipTest("No XenServer available with GPU Drivers installed")
 
+        self.domain = get_domain(self.apiclient)
+        self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
+        #Creating Account 
+        self.account = Account.create(
+            self.apiclient,
+            self.testdata["account"],
+            domainid=self.domain.id
+            )
+        self._cleanup = [
+                         self.account
+                        ]
     def setUp(self):
         self.testdata = self.testClient.getParsedTestDataConfig()["vgpu"]
         self.apiclient = self.testClient.getApiClient()
@@ -75,7 +106,7 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
 
         self.testdata["vgpu140q"]["zoneid"] = self.zone.id
         self.testdata["vgpu140q"]["template"] = self.template.id
-        self.testdata["service_offerings"]["vgpu260qwin"]["serviceofferingdetails"] = [{'pciDevice':
'VGPU'},
+        self.testdata["service_offerings"]["vgpu260qwin"]["serviceofferingdetails"] = [{'pciDevice':
'Group of NVIDIA Corporation GK107GL [GRID K1] GPUs'},
                                                                                        {'vgpuType':'GRID
K120Q'}]
         #create a service offering
         self.service_offering = ServiceOffering.create(


Mime
View raw message