You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/12/12 11:31:29 UTC

[2/4] git commit: updated refs/heads/master to 7fa62a5

CLOUDSTACK-9135 - Makes possible to add multiple providers per service

   - Same is done in the Java side. Check the createVpcOffering() method in the VpcManagerImpl class


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

Branch: refs/heads/master
Commit: 590af145b0c703f9c957c6f81ef450856dc2c407
Parents: 632ee18
Author: Wilder Rodrigues <wr...@schubergphilis.com>
Authored: Fri Dec 11 15:02:55 2015 +0100
Committer: Wilder Rodrigues <wr...@schubergphilis.com>
Committed: Fri Dec 11 15:02:55 2015 +0100

----------------------------------------------------------------------
 tools/marvin/marvin/lib/base.py | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/590af145/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 4b04e77..ab15a78 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -4055,17 +4055,25 @@ class VpcOffering:
     @classmethod
     def create(cls, apiclient, services):
         """Create vpc offering"""
-
+        
+        import logging
+        
         cmd = createVPCOffering.createVPCOfferingCmd()
         cmd.name = "-".join([services["name"], random_gen()])
         cmd.displaytext = services["displaytext"]
         cmd.supportedServices = services["supportedservices"]
         if "serviceProviderList" in services:
             for service, provider in services["serviceProviderList"].items():
-                cmd.serviceproviderlist.append({
-                    'service': service,
-                    'provider': provider
-                })
+                providers = provider
+                if isinstance(provider, str):
+                    providers = [provider]
+
+                for provider_item in providers:
+                    cmd.serviceproviderlist.append({
+                        'service': service,
+                        'provider': provider_item
+                    })
+
         if "serviceCapabilityList" in services:
             cmd.servicecapabilitylist = []
             for service, capability in \