Prohibit use of UDP-CONNECT healthmonitor
Octavia UDP-CONNECT healthmonitor is not supported with NSX due to mismatch in the operation mode and parameters. Change-Id: I61b459fe2e3c0ddbc920b397a7aa5c162f559e30
This commit is contained in:
parent
e643f01d14
commit
83b1014d2b
@ -38,6 +38,7 @@ LB_HEALTH_MONITOR_PING = 'PING'
|
||||
LB_HEALTH_MONITOR_TCP = 'TCP'
|
||||
LB_HEALTH_MONITOR_HTTP = 'HTTP'
|
||||
LB_HEALTH_MONITOR_HTTPS = 'HTTPS'
|
||||
LB_HEALTH_MONITOR_UDP_CONNECT = 'UDP-CONNECT'
|
||||
|
||||
HEALTH_MONITOR_MAP = {
|
||||
LB_HEALTH_MONITOR_PING: 'icmp',
|
||||
|
@ -32,9 +32,9 @@ from octavia_lib.api.drivers import exceptions
|
||||
|
||||
from octavia_lib.api.drivers import provider_base as driver_base
|
||||
|
||||
from vmware_nsx.services.lbaas import lb_const
|
||||
from vmware_nsx.services.lbaas.octavia import constants as d_const
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
cfg.CONF.import_group('oslo_messaging', 'octavia.common.config')
|
||||
|
||||
@ -492,6 +492,10 @@ class NSXOctaviaDriver(driver_base.ProviderDriver):
|
||||
# Health Monitor
|
||||
@log_helpers.log_method_call
|
||||
def health_monitor_create(self, healthmonitor):
|
||||
if healthmonitor.type == lb_const.LB_HEALTH_MONITOR_UDP_CONNECT:
|
||||
raise exceptions.UnsupportedOptionError(
|
||||
user_fault_string="UDP-CONNECT monitor is not supported")
|
||||
|
||||
kw = {'healthmonitor': self.obj_to_dict(healthmonitor)}
|
||||
self.client.cast({}, 'healthmonitor_create', **kw)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user