Browse Source

NSX|V: Add pool transparency config flag

Allow creation of LB pools with transparent mode on. This is a global
flag which will apply to all of the pools which are created.

Change-Id: If0f9294224270957c00114dd237fc9b98c1a1cbb
changes/46/759646/1
Kobi Samoray 3 months ago
parent
commit
638ff61d3d
2 changed files with 9 additions and 1 deletions
  1. +4
    -0
      vmware_nsx/common/config.py
  2. +5
    -1
      vmware_nsx/services/lbaas/nsx_v/implementation/pool_mgr.py

+ 4
- 0
vmware_nsx/common/config.py View File

@ -854,6 +854,10 @@ nsxv_opts = [
cfg.BoolOpt('init_validation',
default=True,
help=_("Set to False to skip plugin init validation")),
cfg.BoolOpt('loadbalancer_pool_transparency',
default=False,
help=_("Create LBaaS pools with transparent mode on. Use with "
"use_routers_as_lbaas_platform enabled")),
]


+ 5
- 1
vmware_nsx/services/lbaas/nsx_v/implementation/pool_mgr.py View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import helpers as log_helpers
from oslo_log import log as logging
from oslo_utils import excutils
@ -35,6 +36,9 @@ class EdgePoolManagerFromDict(base_mgr.EdgeLoadbalancerBaseManager):
def __init__(self, vcns_driver):
super(EdgePoolManagerFromDict, self).__init__(vcns_driver)
self._fw_section_id = None
self.pool_transparency = (
cfg.CONF.nsxv.use_routers_as_lbaas_platform and
cfg.CONF.nsxv.loadbalancer_pool_transparency)
def create(self, context, pool, completor):
@ -44,7 +48,7 @@ class EdgePoolManagerFromDict(base_mgr.EdgeLoadbalancerBaseManager):
'description': pool.get('description', pool.get('name')),
'algorithm': lb_const.BALANCE_MAP.get(pool['lb_algorithm'],
'round-robin'),
'transparent': False
'transparent': self.pool_transparency
}
lb_id = pool['loadbalancer_id']


Loading…
Cancel
Save