cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/4] git commit: updated refs/heads/master to 7fa62a5
Date Sat, 12 Dec 2015 10:31:29 GMT
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 <wrodrigues@schubergphilis.com>
Authored: Fri Dec 11 15:02:55 2015 +0100
Committer: Wilder Rodrigues <wrodrigues@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 \


Mime
View raw message