Merge "Add 2 tls container params for Octavia Pools"

This commit is contained in:
Zuul 2023-08-25 08:46:44 +00:00 committed by Gerrit Code Review
commit eb96ba0bfb
3 changed files with 28 additions and 0 deletions

View File

@ -42,6 +42,8 @@ class Pool(resource.Resource, tag.TagMixin):
'tls_ciphers',
'tls_versions',
'alpn_protocols',
'ca_tls_container_ref',
'crl_container_ref',
is_admin_state_up='admin_state_up',
**tag.TagMixin._tag_query_parameters
)
@ -89,3 +91,7 @@ class Pool(resource.Resource, tag.TagMixin):
updated_at = resource.Body('updated_at')
#: Use TLS for connections to backend member servers *Type: bool*
tls_enabled = resource.Body('tls_enabled', type=bool)
#: Stores the ca certificate used by backend servers
ca_tls_container_ref = resource.Body('ca_tls_container_ref')
#: Stores the revocation list file
crl_container_ref = resource.Body('crl_container_ref')

View File

@ -40,6 +40,14 @@ EXAMPLE = {
'tls_ciphers': 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256',
'tls_versions': ['TLSv1.1', 'TLSv1.2'],
'alpn_protocols': ['h2', 'http/1.1', 'http/1.0'],
'ca_tls_container_ref': (
'http://198.51.100.10:9311/v1/containers/'
'a570068c-d295-4780-91d4-3046a325db52'
),
'crl_container_ref': (
'http://198.51.100.10:9311/v1/containers/'
'a570068c-d295-4780-91d4-3046a325db53'
),
}
@ -88,6 +96,12 @@ class TestPool(base.TestCase):
self.assertEqual(EXAMPLE['tls_ciphers'], test_pool.tls_ciphers)
self.assertEqual(EXAMPLE['tls_versions'], test_pool.tls_versions)
self.assertEqual(EXAMPLE['alpn_protocols'], test_pool.alpn_protocols)
self.assertEqual(
EXAMPLE['ca_tls_container_ref'], test_pool.ca_tls_container_ref
)
self.assertEqual(
EXAMPLE['crl_container_ref'], test_pool.crl_container_ref
)
self.assertDictEqual(
{
@ -114,6 +128,8 @@ class TestPool(base.TestCase):
'tls_ciphers': 'tls_ciphers',
'tls_versions': 'tls_versions',
'alpn_protocols': 'alpn_protocols',
'ca_tls_container_ref': 'ca_tls_container_ref',
'crl_container_ref': 'crl_container_ref',
},
test_pool._query_mapping._mapping,
)

View File

@ -0,0 +1,6 @@
---
features:
- |
Add both ``ca_tls_container_ref`` and ``crl_container_ref``
parameters for Octavia pools, which can be used to store the ca
certificate used by backend servers and the revocation list file.