Make health monitor resource creation to be conditional
Change-Id: If11726f73941079862a6fe7c37b76c3413579b84
This commit is contained in:
parent
0036ed08cd
commit
b3fad42c1b
@ -152,6 +152,9 @@ class OctaviaPoolStackFixture(heat.HeatStackFixture):
|
|||||||
|
|
||||||
hm_timeout = 3
|
hm_timeout = 3
|
||||||
|
|
||||||
|
#: whenever to create the health monitor
|
||||||
|
has_monitor = True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def listener_id(self):
|
def listener_id(self):
|
||||||
return self.listener.listener_id
|
return self.listener.listener_id
|
||||||
@ -247,6 +250,9 @@ class OctaviaOvnProviderPoolStackFixture(OctaviaPoolStackFixture):
|
|||||||
|
|
||||||
lb_algorithm = 'SOURCE_IP_PORT'
|
lb_algorithm = 'SOURCE_IP_PORT'
|
||||||
|
|
||||||
|
#: There is any health monitor available for OVN provider
|
||||||
|
has_monitor = False
|
||||||
|
|
||||||
|
|
||||||
class OctaviaOvnProviderMemberServerStackFixture(
|
class OctaviaOvnProviderMemberServerStackFixture(
|
||||||
OctaviaMemberServerStackFixture):
|
OctaviaMemberServerStackFixture):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
heat_template_version: 2015-10-15
|
heat_template_version: newton
|
||||||
|
|
||||||
description: A pool for a Load Balancer
|
description: A pool for a Load Balancer
|
||||||
|
|
||||||
@ -17,7 +17,11 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
description: ID of the listener
|
description: ID of the listener
|
||||||
|
|
||||||
# healthmonitor params
|
# Health monitor parameters
|
||||||
|
has_monitor:
|
||||||
|
type: boolean
|
||||||
|
description: whenever to create the health monitor
|
||||||
|
|
||||||
hm_delay:
|
hm_delay:
|
||||||
type: number
|
type: number
|
||||||
default: 10
|
default: 10
|
||||||
@ -43,6 +47,12 @@ parameters:
|
|||||||
default: HTTP
|
default: HTTP
|
||||||
description: Type of health-monitor
|
description: Type of health-monitor
|
||||||
|
|
||||||
|
|
||||||
|
conditions:
|
||||||
|
has_monitor:
|
||||||
|
get_param: has_monitor
|
||||||
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
pool:
|
pool:
|
||||||
type: OS::Octavia::Pool
|
type: OS::Octavia::Pool
|
||||||
@ -53,6 +63,7 @@ resources:
|
|||||||
|
|
||||||
monitor:
|
monitor:
|
||||||
type: OS::Octavia::HealthMonitor
|
type: OS::Octavia::HealthMonitor
|
||||||
|
condition: has_monitor
|
||||||
properties:
|
properties:
|
||||||
delay: { get_param: hm_delay }
|
delay: { get_param: hm_delay }
|
||||||
type: { get_param: hm_type }
|
type: { get_param: hm_type }
|
||||||
@ -68,3 +79,4 @@ outputs:
|
|||||||
monitor_id:
|
monitor_id:
|
||||||
description: Healthmonitor ID
|
description: Healthmonitor ID
|
||||||
value: { get_resource: monitor }
|
value: { get_resource: monitor }
|
||||||
|
condition: has_monitor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user