Browse Source

Add TLS versions and ciphers unsets

Task: 40617
Task: 40618
Story: 2006627

Task: 40615
Task: 40616
Story: 2006733

Change-Id: Iab8b8339cf096ee1f5c56a828629f0ebf94484a9
changes/18/745118/2
Carlos Goncalves 10 months ago
parent
commit
c58880e448
5 changed files with 39 additions and 3 deletions
  1. +11
    -1
      octaviaclient/osc/v2/listener.py
  2. +10
    -0
      octaviaclient/osc/v2/pool.py
  3. +7
    -1
      octaviaclient/tests/unit/osc/v2/test_listener.py
  4. +7
    -1
      octaviaclient/tests/unit/osc/v2/test_pool.py
  5. +4
    -0
      releasenotes/notes/add-tls-versions-ciphers-unsets-8d06a502c8ad38ff.yaml

+ 11
- 1
octaviaclient/osc/v2/listener.py View File

@ -610,10 +610,20 @@ class UnsetListener(command.Command):
action='store_true',
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(
'--wait',
action='store_true',
help='Wait for action to complete',
help='Wait for action to complete.',
)
return parser


+ 10
- 0
octaviaclient/osc/v2/pool.py View File

@ -443,6 +443,16 @@ class UnsetPool(command.Command):
action='store_true',
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(
'--wait',
action='store_true',


+ 7
- 1
octaviaclient/tests/unit/osc/v2/test_listener.py View File

@ -388,7 +388,7 @@ class TestListenerUnset(TestListener):
'timeout_member_connect', 'timeout_member_data',
'timeout_tcp_inspect', 'client_ca_tls_container_ref',
'client_authentication', 'client_crl_container_ref',
'allowed_cidrs')
'allowed_cidrs', 'tls_versions', 'tls_ciphers')
def setUp(self):
super().setUp()
@ -442,6 +442,12 @@ class TestListenerUnset(TestListener):
def test_listener_unset_allowed_cidrs(self):
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):
self.api_mock.listener_set.reset_mock()
arg_param = param.replace('_', '-') if '_' in param else param


+ 7
- 1
octaviaclient/tests/unit/osc/v2/test_pool.py View File

@ -257,7 +257,7 @@ class TestPoolSet(TestPool):
class TestPoolUnset(TestPool):
PARAMETERS = ('name', 'description', 'ca_tls_container_ref',
'crl_container_ref', 'session_persistence',
'tls_container_ref')
'tls_container_ref', 'tls_versions', 'tls_ciphers')
def setUp(self):
super().setUp()
@ -284,6 +284,12 @@ class TestPoolUnset(TestPool):
def test_pool_unset_tls_container_ref(self):
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):
self.api_mock.pool_set.reset_mock()
arg_param = param.replace('_', '-') if '_' in param else param


+ 4
- 0
releasenotes/notes/add-tls-versions-ciphers-unsets-8d06a502c8ad38ff.yaml View File

@ -0,0 +1,4 @@
---
features:
- |
Added TLS versions and ciphers unset to listeners and pools.

Loading…
Cancel
Save