From 88774a93e88d83bdf2868b382f66ecfae441a69a Mon Sep 17 00:00:00 2001 From: Miguel Ferreira Date: Thu, 24 Dec 2015 11:08:42 +0100 Subject: [PATCH] Only set L2 Gateway in NSX device if defined --- tools/marvin/marvin/lib/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 379ecd90e01..35d0b2732e2 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -3878,7 +3878,7 @@ class NiciraNvp: if l2gatewayserviceuuid: cmd.l2gatewayserviceuuid = l2gatewayserviceuuid - else: + elif services and 'l2gatewayserviceuuid' in services: cmd.l2gatewayserviceuuid = services['l2gatewayserviceuuid'] return NiciraNvp(apiclient.addNiciraNvpDevice(cmd).__dict__) @@ -4060,9 +4060,9 @@ 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"]