cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject git commit: updated refs/heads/4.4-forward to a34faae
Date Mon, 30 Jun 2014 13:52:09 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 004d61632 -> a34faae91


CLOUDSTACK-7009: add ability to handle serviceofferingdetails to base.py
to support creation of service offering upon passing details in the  following format
            serviceofferingdetails[1].key=pciDevice
            serviceofferingdetails[1].value=Group of NVIDIA Corporation GK107GL [GRID
K1] GPUs
            serviceofferingdetails[2].key=vgpuType
            serviceofferingdetails[2].value=GRID K120Q


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

Branch: refs/heads/4.4-forward
Commit: a34faae919b280fe6009e2608c95f59eafdfac48
Parents: 004d616
Author: SrikanteswaraRao Talluri <talluri@apache.org>
Authored: Mon Jun 30 19:20:07 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Mon Jun 30 19:20:07 2014 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_deploy_vgpu_enabled_vm.py | 3 ++-
 tools/marvin/marvin/lib/base.py                       | 8 ++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a34faae9/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 13c1e5e..2188c7f 100644
--- a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
+++ b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
@@ -75,11 +75,12 @@ 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'},
+                                                                                       {'vgpuType':'GRID
K120Q'}]
         #create a service offering
         self.service_offering = ServiceOffering.create(
                 self.apiclient,
                 self.testdata["service_offerings"]["vgpu260qwin"],
-                serviceofferingdetails={'pciDevice': 'VGPU'}
         )
         #build cleanup list
         self.cleanup = [

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a34faae9/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 1ea4fa7..5d75037 100644
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -1883,8 +1883,12 @@ class ServiceOffering:
             cmd.deploymentplanner = services["deploymentplanner"]
 
         if "serviceofferingdetails" in services:
-            cmd.serviceofferingdetails.append(
-                {services['serviceofferingdetails']})
+            count = 1
+            for i in services["serviceofferingdetails"]:
+                for key, value in i.items():
+                    setattr(cmd, "serviceofferingdetails[%d].key" % count, key)
+                    setattr(cmd, "serviceofferingdetails[%d].value" % count, value)
+                count = count + 1
 
         if "isvolatile" in services:
             cmd.isvolatile = services["isvolatile"]


Mime
View raw message