NSX|V: ensure that only LAG is configured and not standby

In the event that there is a LAG only configure the LAG
and no standby.

Change-Id: Ieacf386ce9a8ca02d795e53c7ddab9d1356ecf88
This commit is contained in:
Gary Kotton 2018-01-21 18:30:08 +02:00
parent 6268a1f313
commit 41e61b9ae8
1 changed files with 5 additions and 2 deletions

View File

@ -437,8 +437,11 @@ class DvsManager(VCManagerBase):
self._session.vim,
dvs_moref,
"config.uplinkPortPolicy")
standby = list(set(uplinks.uplinkPortName) - set(ports))
policy.uplinkPortOrder.standbyUplinkPort = standby
# VC does not support LAG and normal uplinks. So need to check
# if we need to configure standby links
if set(ports) & set(uplinks.uplinkPortName):
standby = list(set(uplinks.uplinkPortName) - set(ports))
policy.uplinkPortOrder.standbyUplinkPort = standby
def update_port_group_spec_name(self, pg_spec, name):
pg_spec.name = name