From caf97f242a5dd75477a3fa2154c742609aa43119 Mon Sep 17 00:00:00 2001 From: Feilong Wang Date: Fri, 10 May 2019 22:17:08 +1200 Subject: [PATCH] Support tls_enabled for Octavia pool Adding support `tls_enabled` property for the resource `OS::Octavia::Pool`, the property is allowed to be updated as well. The property 'tls_enabled' was introduced in Octavia since Stein release. The default value is False if it is not specified in Heat template. Task: 30926 Story: 2005646 Change-Id: I1de9154e5e2ba9f246b2785f18ce7891e69ec25c --- heat/engine/resources/openstack/octavia/pool.py | 11 ++++++++++- heat/tests/openstack/octavia/test_pool.py | 3 ++- .../octavia-pool-tls-enabled-373a8c74f7c7664b.yaml | 6 ++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/octavia-pool-tls-enabled-373a8c74f7c7664b.yaml diff --git a/heat/engine/resources/openstack/octavia/pool.py b/heat/engine/resources/openstack/octavia/pool.py index 3e454468b2..cc5a969714 100644 --- a/heat/engine/resources/openstack/octavia/pool.py +++ b/heat/engine/resources/openstack/octavia/pool.py @@ -17,6 +17,7 @@ from heat.engine import attributes from heat.engine import constraints from heat.engine import properties from heat.engine.resources.openstack.octavia import octavia_base +from heat.engine import support from heat.engine import translation @@ -32,10 +33,11 @@ class Pool(octavia_base.OctaviaBase): ADMIN_STATE_UP, DESCRIPTION, SESSION_PERSISTENCE, NAME, LB_ALGORITHM, LISTENER, LOADBALANCER, PROTOCOL, SESSION_PERSISTENCE_TYPE, SESSION_PERSISTENCE_COOKIE_NAME, + TLS_ENABLED, ) = ( 'admin_state_up', 'description', 'session_persistence', 'name', 'lb_algorithm', 'listener', 'loadbalancer', 'protocol', - 'type', 'cookie_name' + 'type', 'cookie_name', 'tls_enabled', ) SESSION_PERSISTENCE_TYPES = ( @@ -124,6 +126,13 @@ class Pool(octavia_base.OctaviaBase): constraints.AllowedValues(SUPPORTED_PROTOCOLS), ] ), + TLS_ENABLED: properties.Schema( + properties.Schema.BOOLEAN, + _('Enable backend member re-encryption.'), + default=False, + update_allowed=True, + support_status=support.SupportStatus(version='14.0.0'), + ), } attributes_schema = { diff --git a/heat/tests/openstack/octavia/test_pool.py b/heat/tests/openstack/octavia/test_pool.py index f4e74930f2..34b3e31e82 100644 --- a/heat/tests/openstack/octavia/test_pool.py +++ b/heat/tests/openstack/octavia/test_pool.py @@ -87,7 +87,8 @@ class PoolTest(common.HeatTestCase): 'listener_id': '123', 'loadbalancer_id': 'my_lb', 'protocol': 'HTTP', - 'admin_state_up': True + 'admin_state_up': True, + 'tls_enabled': False, } } diff --git a/releasenotes/notes/octavia-pool-tls-enabled-373a8c74f7c7664b.yaml b/releasenotes/notes/octavia-pool-tls-enabled-373a8c74f7c7664b.yaml new file mode 100644 index 0000000000..8593ad6883 --- /dev/null +++ b/releasenotes/notes/octavia-pool-tls-enabled-373a8c74f7c7664b.yaml @@ -0,0 +1,6 @@ +--- +features: + - Support ``tls_enabled`` property for the resource ``OS::Octavia::Pool``, the + property is allowed to be updated as well. The property 'tls_enabled' was + introduced in Octavia since Stein release. The default value is False if it + is not specified in Heat template.