From 590af145b0c703f9c957c6f81ef450856dc2c407 Mon Sep 17 00:00:00 2001 From: Wilder Rodrigues Date: Fri, 11 Dec 2015 15:02:55 +0100 Subject: [PATCH] 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 --- tools/marvin/marvin/lib/base.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 4b04e778bd4..ab15a78c4ea 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 \