Browse Source

Add allowed_cidrs to Listener data model

Task: 31059
Story: 2003686

Change-Id: I837420afa0d7d67ea98aed40ab9b903f2f8aa33d
changes/25/659625/2
Carlos Goncalves 2 years ago
parent
commit
cf41cb3693
3 changed files with 10 additions and 3 deletions
  1. +3
    -1
      octavia_lib/api/drivers/data_models.py
  2. +4
    -2
      octavia_lib/tests/unit/api/drivers/test_data_models.py
  3. +3
    -0
      releasenotes/notes/add-listener-allowed-cidrs-ef2cd3afbc3a1ebe.yaml

+ 3
- 1
octavia_lib/api/drivers/data_models.py View File

@ -137,7 +137,8 @@ class Listener(BaseDataModel):
timeout_tcp_inspect=Unset, client_ca_tls_container_ref=Unset,
client_ca_tls_container_data=Unset,
client_authentication=Unset, client_crl_container_ref=Unset,
client_crl_container_data=Unset, project_id=Unset):
client_crl_container_data=Unset, project_id=Unset,
allowed_cidrs=Unset):
self.admin_state_up = admin_state_up
self.connection_limit = connection_limit
@ -165,6 +166,7 @@ class Listener(BaseDataModel):
self.client_crl_container_ref = client_crl_container_ref
self.client_crl_container_data = client_crl_container_data
self.project_id = project_id
self.allowed_cidrs = allowed_cidrs
class Pool(BaseDataModel):


+ 4
- 2
octavia_lib/tests/unit/api/drivers/test_data_models.py View File

@ -98,7 +98,8 @@ class TestProviderDataModels(base.TestCase):
client_ca_tls_container_data=None,
client_ca_tls_container_ref=None,
client_crl_container_data=None,
client_crl_container_ref=None)
client_crl_container_ref=None,
allowed_cidrs=None)
self.ref_lb = data_models.LoadBalancer(
admin_state_up=False,
@ -229,7 +230,8 @@ class TestProviderDataModels(base.TestCase):
'client_ca_tls_container_data': None,
'client_ca_tls_container_ref': None,
'client_crl_container_data': None,
'client_crl_container_ref': None, }
'client_crl_container_ref': None,
'allowed_cidrs': None, }
self.ref_lb_dict_with_listener = {
'admin_state_up': False,


+ 3
- 0
releasenotes/notes/add-listener-allowed-cidrs-ef2cd3afbc3a1ebe.yaml View File

@ -0,0 +1,3 @@
---
features:
- Added 'allowed_cidrs' field to Listener data model.

Loading…
Cancel
Save