From 456c21fd9a5e7904ee5be8f40f8d75ad6284eb6c Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Wed, 11 Jan 2017 02:57:48 -0800 Subject: [PATCH] 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 --- vmware_nsx/dvs/dvs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vmware_nsx/dvs/dvs.py b/vmware_nsx/dvs/dvs.py index 85299a14cf..2243cae562 100644 --- a/vmware_nsx/dvs/dvs.py +++ b/vmware_nsx/dvs/dvs.py @@ -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