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
This commit is contained in:
parent
fa1f36c675
commit
da6c1f7a46
@ -810,6 +810,10 @@ nsxv_opts = [
|
|||||||
cfg.BoolOpt('init_validation',
|
cfg.BoolOpt('init_validation',
|
||||||
default=True,
|
default=True,
|
||||||
help=_("Set to False to skip plugin init validation")),
|
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")),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_log import helpers as log_helpers
|
from oslo_log import helpers as log_helpers
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
@ -35,6 +36,9 @@ class EdgePoolManagerFromDict(base_mgr.EdgeLoadbalancerBaseManager):
|
|||||||
def __init__(self, vcns_driver):
|
def __init__(self, vcns_driver):
|
||||||
super(EdgePoolManagerFromDict, self).__init__(vcns_driver)
|
super(EdgePoolManagerFromDict, self).__init__(vcns_driver)
|
||||||
self._fw_section_id = None
|
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):
|
def create(self, context, pool, completor):
|
||||||
|
|
||||||
@ -44,7 +48,7 @@ class EdgePoolManagerFromDict(base_mgr.EdgeLoadbalancerBaseManager):
|
|||||||
'description': pool.get('description', pool.get('name')),
|
'description': pool.get('description', pool.get('name')),
|
||||||
'algorithm': lb_const.BALANCE_MAP.get(pool['lb_algorithm'],
|
'algorithm': lb_const.BALANCE_MAP.get(pool['lb_algorithm'],
|
||||||
'round-robin'),
|
'round-robin'),
|
||||||
'transparent': False
|
'transparent': self.pool_transparency
|
||||||
}
|
}
|
||||||
|
|
||||||
lb_id = pool['loadbalancer_id']
|
lb_id = pool['loadbalancer_id']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user