Merge "Prohibit use of UDP-CONNECT healthmonitor"
This commit is contained in:
commit
116ac637a0
@ -38,6 +38,7 @@ LB_HEALTH_MONITOR_PING = 'PING'
|
|||||||
LB_HEALTH_MONITOR_TCP = 'TCP'
|
LB_HEALTH_MONITOR_TCP = 'TCP'
|
||||||
LB_HEALTH_MONITOR_HTTP = 'HTTP'
|
LB_HEALTH_MONITOR_HTTP = 'HTTP'
|
||||||
LB_HEALTH_MONITOR_HTTPS = 'HTTPS'
|
LB_HEALTH_MONITOR_HTTPS = 'HTTPS'
|
||||||
|
LB_HEALTH_MONITOR_UDP_CONNECT = 'UDP-CONNECT'
|
||||||
|
|
||||||
HEALTH_MONITOR_MAP = {
|
HEALTH_MONITOR_MAP = {
|
||||||
LB_HEALTH_MONITOR_PING: 'icmp',
|
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 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
|
from vmware_nsx.services.lbaas.octavia import constants as d_const
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
cfg.CONF.import_group('oslo_messaging', 'octavia.common.config')
|
cfg.CONF.import_group('oslo_messaging', 'octavia.common.config')
|
||||||
|
|
||||||
@ -492,6 +492,10 @@ class NSXOctaviaDriver(driver_base.ProviderDriver):
|
|||||||
# Health Monitor
|
# Health Monitor
|
||||||
@log_helpers.log_method_call
|
@log_helpers.log_method_call
|
||||||
def health_monitor_create(self, healthmonitor):
|
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)}
|
kw = {'healthmonitor': self.obj_to_dict(healthmonitor)}
|
||||||
self.client.cast({}, 'healthmonitor_create', **kw)
|
self.client.cast({}, 'healthmonitor_create', **kw)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user