Only set L2 Gateway in NSX device if defined

This commit is contained in:
Miguel Ferreira 2015-12-24 11:08:42 +01:00 committed by nvazquez
parent 4ac2737754
commit 88774a93e8
1 changed files with 3 additions and 3 deletions

View File

@ -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"]