You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2014/06/30 15:53:27 UTC

git commit: updated refs/heads/master to 2148a1a

Repository: cloudstack
Updated Branches:
  refs/heads/master 2fedc281b -> 2148a1a64


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/2148a1a6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2148a1a6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2148a1a6

Branch: refs/heads/master
Commit: 2148a1a64d6d652b7aa24077daaaa331a85173ce
Parents: 2fedc28
Author: SrikanteswaraRao Talluri <ta...@apache.org>
Authored: Mon Jun 30 19:20:07 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Mon Jun 30 19:23:03 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/2148a1a6/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/2148a1a6/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 7d2622e..2ef6f82 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -1866,8 +1866,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"]