Merge "Add TLS versions and ciphers unsets"
This commit is contained in:
commit
5a1346ca32
|
@ -610,10 +610,20 @@ class UnsetListener(command.Command):
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Clear all allowed CIDRs from the listener."
|
help="Clear all allowed CIDRs from the listener."
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--tls-versions',
|
||||||
|
action='store_true',
|
||||||
|
help='Clear all TLS versions from the listener.',
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--tls-ciphers',
|
||||||
|
action='store_true',
|
||||||
|
help='Clear all TLS ciphers from the listener.',
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--wait',
|
'--wait',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Wait for action to complete',
|
help='Wait for action to complete.',
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
|
@ -443,6 +443,16 @@ class UnsetPool(command.Command):
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Clear the certificate reference for this pool."
|
help="Clear the certificate reference for this pool."
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--tls-versions',
|
||||||
|
action='store_true',
|
||||||
|
help='Clear all TLS versions from the pool.',
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--tls-ciphers',
|
||||||
|
action='store_true',
|
||||||
|
help='Clear all TLS ciphers from the pool.',
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--wait',
|
'--wait',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|
|
@ -388,7 +388,7 @@ class TestListenerUnset(TestListener):
|
||||||
'timeout_member_connect', 'timeout_member_data',
|
'timeout_member_connect', 'timeout_member_data',
|
||||||
'timeout_tcp_inspect', 'client_ca_tls_container_ref',
|
'timeout_tcp_inspect', 'client_ca_tls_container_ref',
|
||||||
'client_authentication', 'client_crl_container_ref',
|
'client_authentication', 'client_crl_container_ref',
|
||||||
'allowed_cidrs')
|
'allowed_cidrs', 'tls_versions', 'tls_ciphers')
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUp()
|
super().setUp()
|
||||||
|
@ -442,6 +442,12 @@ class TestListenerUnset(TestListener):
|
||||||
def test_listener_unset_allowed_cidrs(self):
|
def test_listener_unset_allowed_cidrs(self):
|
||||||
self._test_listener_unset_param('allowed_cidrs')
|
self._test_listener_unset_param('allowed_cidrs')
|
||||||
|
|
||||||
|
def test_listener_unset_tls_versions(self):
|
||||||
|
self._test_listener_unset_param('tls_versions')
|
||||||
|
|
||||||
|
def test_listener_unset_tls_ciphers(self):
|
||||||
|
self._test_listener_unset_param('tls_ciphers')
|
||||||
|
|
||||||
def _test_listener_unset_param(self, param):
|
def _test_listener_unset_param(self, param):
|
||||||
self.api_mock.listener_set.reset_mock()
|
self.api_mock.listener_set.reset_mock()
|
||||||
arg_param = param.replace('_', '-') if '_' in param else param
|
arg_param = param.replace('_', '-') if '_' in param else param
|
||||||
|
|
|
@ -257,7 +257,7 @@ class TestPoolSet(TestPool):
|
||||||
class TestPoolUnset(TestPool):
|
class TestPoolUnset(TestPool):
|
||||||
PARAMETERS = ('name', 'description', 'ca_tls_container_ref',
|
PARAMETERS = ('name', 'description', 'ca_tls_container_ref',
|
||||||
'crl_container_ref', 'session_persistence',
|
'crl_container_ref', 'session_persistence',
|
||||||
'tls_container_ref')
|
'tls_container_ref', 'tls_versions', 'tls_ciphers')
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUp()
|
super().setUp()
|
||||||
|
@ -284,6 +284,12 @@ class TestPoolUnset(TestPool):
|
||||||
def test_pool_unset_tls_container_ref(self):
|
def test_pool_unset_tls_container_ref(self):
|
||||||
self._test_pool_unset_param('tls_container_ref')
|
self._test_pool_unset_param('tls_container_ref')
|
||||||
|
|
||||||
|
def test_pool_unset_tls_versions(self):
|
||||||
|
self._test_pool_unset_param('tls_versions')
|
||||||
|
|
||||||
|
def test_pool_unset_tls_ciphers(self):
|
||||||
|
self._test_pool_unset_param('tls_ciphers')
|
||||||
|
|
||||||
def _test_pool_unset_param(self, param):
|
def _test_pool_unset_param(self, param):
|
||||||
self.api_mock.pool_set.reset_mock()
|
self.api_mock.pool_set.reset_mock()
|
||||||
arg_param = param.replace('_', '-') if '_' in param else param
|
arg_param = param.replace('_', '-') if '_' in param else param
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Added TLS versions and ciphers unset to listeners and pools.
|
Loading…
Reference in New Issue