[NSXV]Fix l2gateway creation failure

Change-Id: I870939312d9986083c2c7f645736e0ede4747184
This commit is contained in:
Zhenmei 2017-06-19 04:23:39 -04:00 committed by Gary Kotton
parent 467329c1e9
commit 053459bc54

View File

@ -78,7 +78,7 @@ class NsxvL2GatewayDriver(l2gateway_db.L2GatewayMixin):
if not self._nsxv.vcns.validate_network(interfaces[0]['name']):
msg = _("Configured interface not found")
raise n_exc.InvalidInput(error_message=msg)
interface = self.get_l2gateway_interfaces(context,
interface = self._get_l2gateway_interface(context,
interfaces[0]['name'])
if interface:
msg = _("%s is already used.") % interfaces[0]['name']