Browse Source

Add 'additional_vips' field to driver datamodel

Story: 2005608
Task: 33612
Change-Id: Ie1e2532f3aa9dca542ddeee120002e11d0f9f0b1
changes/38/660238/2
Adam Harwell 2 years ago
parent
commit
7c9cb9dcb9
4 changed files with 13 additions and 1 deletions
  1. +4
    -0
      .gitignore
  2. +2
    -1
      octavia_lib/api/drivers/data_models.py
  3. +2
    -0
      octavia_lib/tests/unit/api/drivers/test_data_models.py
  4. +5
    -0
      releasenotes/notes/add-additional-vip-support-becdb29c5187b514.yaml

+ 4
- 0
.gitignore View File

@ -59,3 +59,7 @@ ChangeLog
# Files created by releasenotes build
releasenotes/build
# IDEs
.idea/*
.vscode/*

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

@ -106,7 +106,7 @@ class LoadBalancer(BaseDataModel):
listeners=Unset, loadbalancer_id=Unset, name=Unset,
pools=Unset, project_id=Unset, vip_address=Unset,
vip_network_id=Unset, vip_port_id=Unset, vip_subnet_id=Unset,
vip_qos_policy_id=Unset):
vip_qos_policy_id=Unset, additional_vips=Unset):
self.admin_state_up = admin_state_up
self.description = description
@ -121,6 +121,7 @@ class LoadBalancer(BaseDataModel):
self.vip_port_id = vip_port_id
self.vip_subnet_id = vip_subnet_id
self.vip_qos_policy_id = vip_qos_policy_id
self.additional_vips = additional_vips
class Listener(BaseDataModel):


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

@ -362,6 +362,7 @@ class TestProviderDataModels(base.TestCase):
new_ref_lib_dict = deepcopy(self.ref_lb_dict)
new_ref_lib_dict['pools'] = None
new_ref_lib_dict['listeners'] = None
new_ref_lib_dict['additional_vips'] = None
self.assertEqual(new_ref_lib_dict, ref_lb_converted_to_dict)
@ -409,6 +410,7 @@ class TestProviderDataModels(base.TestCase):
ref_lb_dict_with_listener = deepcopy(self.ref_lb_dict_with_listener)
ref_lb_dict_with_listener['pools'] = None
ref_lb_dict_with_listener['name'] = None
ref_lb_dict_with_listener['additional_vips'] = None
ref_lb_converted_to_dict = ref_lb.to_dict(recurse=True,
render_unsets=True)


+ 5
- 0
releasenotes/notes/add-additional-vip-support-becdb29c5187b514.yaml View File

@ -0,0 +1,5 @@
---
features:
- |
Add the ability to pass multiple VIP objects to providers. This allows for
multiple subnets/IPs on a single LB.

Loading…
Cancel
Save