Add availability_zone to OS::Octavia::LoadBalancer

Change-Id: I63369b92b77b4f84bc2646ab35632006ee6b841b
This commit is contained in:
Jake Yip 2021-05-25 23:44:43 +10:00
parent f341395a46
commit ba0b6676c0
4 changed files with 14 additions and 2 deletions

View File

@ -29,10 +29,10 @@ class LoadBalancer(octavia_base.OctaviaBase):
PROPERTIES = (
DESCRIPTION, NAME, PROVIDER, VIP_ADDRESS, VIP_SUBNET,
ADMIN_STATE_UP, TENANT_ID, FLAVOR
ADMIN_STATE_UP, TENANT_ID, FLAVOR, AVAILABILITY_ZONE
) = (
'description', 'name', 'provider', 'vip_address', 'vip_subnet',
'admin_state_up', 'tenant_id', 'flavor'
'admin_state_up', 'tenant_id', 'flavor', 'availability_zone'
)
ATTRIBUTES = (
@ -96,7 +96,13 @@ class LoadBalancer(octavia_base.OctaviaBase):
constraints=[
constraints.CustomConstraint('octavia.flavor')
]
),
AVAILABILITY_ZONE: properties.Schema(
properties.Schema.STRING,
_('The availability zone of the Load Balancer.'),
support_status=support.SupportStatus(version='17.0.0'),
)
}
attributes_schema = {

View File

@ -26,6 +26,7 @@ resources:
tenant_id: 1234
admin_state_up: True
flavor: f123
availability_zone: nova
'''
LISTENER_TEMPLATE = '''

View File

@ -62,6 +62,7 @@ class LoadBalancerTest(common.HeatTestCase):
'project_id': '1234',
'admin_state_up': True,
'flavor_id': 'f123',
'availability_zone': 'nova',
}
}

View File

@ -0,0 +1,4 @@
---
features:
- |
Add availabilty_zone parameter to OS::Octavia::LoadBalancer