NSX|V: set teaming standby ports

In the event that the active teaming port fails then we will enable
the stanby ports.

Change-Id: If85711b2fae916559c8e1c62a82ed91f8a7e29d4
This commit is contained in:
Gary Kotton 2017-01-11 02:57:48 -08:00
parent 8d7f6e07d0
commit 456c21fd9a
1 changed files with 8 additions and 0 deletions

View File

@ -465,3 +465,11 @@ class DvsManager(object):
policy.uplinkPortOrder.inherited = False
ports = teaming_data['failoverUplinkPortNames']
policy.uplinkPortOrder.activeUplinkPort = ports
# The standby port will be those not configure as active ones
uplinks = self._session.invoke_api(vim_util,
"get_object_property",
self._session.vim,
self._dvs_moref,
"config.uplinkPortPolicy")
standby = list(set(uplinks.uplinkPortName) - set(ports))
policy.uplinkPortOrder.standbyUplinkPort = standby