From 217fdd24973cf1eff478c7c19fa2b3020b2fa654 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Tue, 3 Jul 2012 12:56:42 -0700 Subject: [PATCH] From: jason.bausewein@tier3.com Fixed deployDataCenter.py to select the correct network offering based on if security groups are enabled. Also added default value to configGenerator.py for basic setup. --- tools/marvin/marvin/configGenerator.py | 1 + tools/marvin/marvin/deployDataCenter.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py index 1e84f900573..60526a89f8a 100644 --- a/tools/marvin/marvin/configGenerator.py +++ b/tools/marvin/marvin/configGenerator.py @@ -164,6 +164,7 @@ def describe_setup_in_basic_mode(): z.internaldns2 = "192.168.110.253" z.name = "test"+str(l) z.networktype = 'Basic' + z.securitygroupenabled = 'True' '''create 10 pods''' for i in range(2): diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index 5c7880e60ae..d4838072432 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -257,8 +257,15 @@ class deployDataCenters(): listnetworkoffering = \ listNetworkOfferings.listNetworkOfferingsCmd() - listnetworkoffering.name = \ - "DefaultSharedNetworkOfferingWithSGService" + if zone.securitygroupenabled: + listnetworkoffering.name = \ + "DefaultSharedNetworkOfferingWithSGService" + else: + # need both name and display text for single result + listnetworkoffering.name = \ + "DefaultSharedNetworkOffering" + listnetworkoffering.displaytext = \ + "Offering for Shared networks" listnetworkofferingresponse = \ self.apiClient.listNetworkOfferings(listnetworkoffering)