Add availability_zone to the LoadBalancer model

Temporarily make the tips jobs non-voting so we can merge this change
that relies on a change in the main repo.

Depends-On: https://review.opendev.org/#/c/693765/
Change-Id: I6dcbe72328369089ed62330098b38f8d4029749c
This commit is contained in:
Sam Morrison 2019-11-18 12:25:41 +11:00 committed by Michael Johnson
parent 787a8edcbe
commit 012d908b9c
5 changed files with 21 additions and 5 deletions

View File

@ -103,7 +103,8 @@ 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, additional_vips=Unset):
vip_qos_policy_id=Unset, additional_vips=Unset,
availability_zone=Unset):
self.admin_state_up = admin_state_up
self.description = description
@ -119,6 +120,7 @@ class LoadBalancer(BaseDataModel):
self.vip_subnet_id = vip_subnet_id
self.vip_qos_policy_id = vip_qos_policy_id
self.additional_vips = additional_vips
self.availability_zone = availability_zone
class Listener(BaseDataModel):

View File

@ -179,6 +179,7 @@ ADDITIONAL_VIPS = 'additional_vips'
ADDRESS = 'address'
ADMIN_STATE_UP = 'admin_state_up'
ALLOWED_CIDRS = 'allowed_cidrs'
AVAILABILITY_ZONE = 'availability_zone'
BACKUP = 'backup'
CA_TLS_CONTAINER_DATA = 'ca_tls_container_data'
CA_TLS_CONTAINER_REF = 'ca_tls_container_ref'

View File

@ -44,6 +44,7 @@ class TestProviderDataModels(base.TestCase):
self.healthmonitor_id = uuidutils.generate_uuid()
self.l7policy_id = uuidutils.generate_uuid()
self.l7rule_id = uuidutils.generate_uuid()
self.availability_zone = uuidutils.generate_uuid()
self.ref_l7rule = data_models.L7Rule(
admin_state_up=True,
@ -113,7 +114,8 @@ class TestProviderDataModels(base.TestCase):
vip_network_id=self.vip_network_id,
vip_port_id=self.vip_port_id,
vip_subnet_id=self.vip_subnet_id,
vip_qos_policy_id=self.vip_qos_policy_id)
vip_qos_policy_id=self.vip_qos_policy_id,
availability_zone=self.availability_zone)
self.ref_vip = data_models.VIP(
vip_address=self.vip_address,
@ -201,7 +203,8 @@ class TestProviderDataModels(base.TestCase):
'description': 'One great load balancer',
'vip_subnet_id': self.vip_subnet_id,
'name': 'favorite_lb',
'vip_qos_policy_id': self.vip_qos_policy_id}
'vip_qos_policy_id': self.vip_qos_policy_id,
'availability_zone': self.availability_zone}
self.ref_listener_dict = {
'admin_state_up': True,
@ -245,7 +248,8 @@ class TestProviderDataModels(base.TestCase):
'vip_network_id': self.vip_network_id,
'vip_port_id': self.vip_port_id,
'vip_subnet_id': self.vip_subnet_id,
'vip_qos_policy_id': self.vip_qos_policy_id}
'vip_qos_policy_id': self.vip_qos_policy_id,
'availability_zone': self.availability_zone}
self.ref_vip_dict = {
'vip_address': self.vip_address,
@ -419,7 +423,8 @@ class TestProviderDataModels(base.TestCase):
vip_network_id=self.vip_network_id,
vip_port_id=self.vip_port_id,
vip_subnet_id=self.vip_subnet_id,
vip_qos_policy_id=self.vip_qos_policy_id)
vip_qos_policy_id=self.vip_qos_policy_id,
availability_zone=self.availability_zone)
ref_lb_dict_with_listener = deepcopy(self.ref_lb_dict_with_listener)
ref_lb_dict_with_listener['pools'] = None

View File

@ -0,0 +1,4 @@
---
other:
- |
Load balancer objects now have an ``availability_zone`` attribute. This can be None.

View File

@ -8,3 +8,7 @@
- publish-openstack-docs-pti
- release-notes-jobs-python3
- octavia-tox-tips
check:
jobs:
- octavia-tox-functional-py37-tips:
voting: false