Add tls_enabled param for Octavia Pools

tls_enabled parameter allows the user to enable TLS communication
between a load balancer and its members.

Story 2008368
Task 41278

Change-Id: If0a2e0c98403baa5fcb2352fc99239106d27ffc6
This commit is contained in:
Gregory Thiemonge 2020-11-18 15:12:59 +01:00
parent c2d925dd92
commit ed8564ef2a
3 changed files with 13 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class Pool(resource.Resource, resource.TagMixin):
'health_monitor_id', 'lb_algorithm', 'listener_id', 'loadbalancer_id',
'description', 'name', 'project_id', 'protocol',
'created_at', 'updated_at', 'provisioning_status', 'operating_status',
'tls_ciphers', 'tls_versions', is_admin_state_up='admin_state_up',
'tls_enabled', 'tls_ciphers', 'tls_versions',
is_admin_state_up='admin_state_up',
**resource.TagMixin._tag_query_parameters
)
@ -72,3 +73,5 @@ class Pool(resource.Resource, resource.TagMixin):
tls_versions = resource.Body('tls_versions', type=list)
#: Timestamp when the pool was updated
updated_at = resource.Body('updated_at')
#: Use TLS for connections to backend member servers *Type: bool*
tls_enabled = resource.Body('tls_enabled', type=bool)

View File

@ -35,6 +35,7 @@ EXAMPLE = {
'health_monitor': 'healthmonitor',
'health_monitor_id': uuid.uuid4(),
'members': [{'id': uuid.uuid4()}],
'tls_enabled': True,
'tls_ciphers': 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256',
'tls_versions': ['TLSv1.1', 'TLSv1.2'],
}
@ -83,6 +84,8 @@ class TestPool(base.TestCase):
self.assertEqual(EXAMPLE['health_monitor_id'],
test_pool.health_monitor_id)
self.assertEqual(EXAMPLE['members'], test_pool.members)
self.assertEqual(EXAMPLE['tls_enabled'],
test_pool.tls_enabled)
self.assertEqual(EXAMPLE['tls_ciphers'],
test_pool.tls_ciphers)
self.assertEqual(EXAMPLE['tls_versions'],
@ -109,6 +112,7 @@ class TestPool(base.TestCase):
'listener_id': 'listener_id',
'loadbalancer_id': 'loadbalancer_id',
'protocol': 'protocol',
'tls_enabled': 'tls_enabled',
'tls_ciphers': 'tls_ciphers',
'tls_versions': 'tls_versions',
},

View File

@ -0,0 +1,5 @@
---
features:
- |
Add ``tls_enabled`` parameter for Octavia pools, it can be used to enable
TLS communications between a load balancer and its member servers.