Merge "Support tags for Octavia pool member"
This commit is contained in:
commit
3b34ef05d2
@ -15,6 +15,7 @@ from heat.common.i18n import _
|
||||
from heat.engine import constraints
|
||||
from heat.engine import properties
|
||||
from heat.engine.resources.openstack.octavia import octavia_base
|
||||
from heat.engine import support
|
||||
from heat.engine import translation
|
||||
|
||||
|
||||
@ -26,10 +27,10 @@ class PoolMember(octavia_base.OctaviaBase):
|
||||
|
||||
PROPERTIES = (
|
||||
POOL, ADDRESS, PROTOCOL_PORT, MONITOR_ADDRESS, MONITOR_PORT,
|
||||
WEIGHT, ADMIN_STATE_UP, SUBNET,
|
||||
WEIGHT, ADMIN_STATE_UP, SUBNET, TAGS
|
||||
) = (
|
||||
'pool', 'address', 'protocol_port', 'monitor_address', 'monitor_port',
|
||||
'weight', 'admin_state_up', 'subnet'
|
||||
'weight', 'admin_state_up', 'subnet', 'tags'
|
||||
)
|
||||
|
||||
ATTRIBUTES = (
|
||||
@ -101,6 +102,13 @@ class PoolMember(octavia_base.OctaviaBase):
|
||||
constraints.CustomConstraint('neutron.subnet')
|
||||
],
|
||||
),
|
||||
TAGS: properties.Schema(
|
||||
properties.Schema.LIST,
|
||||
_('A list of simple strings assigned to the member. The property '
|
||||
'is supported with Stein Octavia or newer version.'),
|
||||
update_allowed=True,
|
||||
support_status=support.SupportStatus(version='13.0.0'),
|
||||
),
|
||||
}
|
||||
|
||||
def translation_rules(self, props):
|
||||
|
@ -80,6 +80,7 @@ resources:
|
||||
weight: 1
|
||||
subnet: sub123
|
||||
admin_state_up: True
|
||||
tags: ['tag1', 'tag2']
|
||||
'''
|
||||
|
||||
MONITOR_TEMPLATE = '''
|
||||
|
@ -61,6 +61,7 @@ class PoolMemberTest(common.HeatTestCase):
|
||||
'weight': 1,
|
||||
'subnet_id': '123',
|
||||
'admin_state_up': True,
|
||||
'tags': ['tag1', 'tag2']
|
||||
}
|
||||
}
|
||||
props = self.member.handle_create()
|
||||
@ -95,6 +96,7 @@ class PoolMemberTest(common.HeatTestCase):
|
||||
prop_diff = {
|
||||
'admin_state_up': False,
|
||||
'weight': 2,
|
||||
'tags': ['tag3', 'tag4']
|
||||
}
|
||||
|
||||
prop_diff = self.member.handle_update(None, None, prop_diff)
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- Support ``tags`` property for the resource ``OS::Octavia::PoolMember``, the
|
||||
property is allowed to be updated as well. The resource tag was introduced
|
||||
in Octavia since Stein release, do not specify tags in Heat template if you are
|
||||
using the previous versions.
|
Loading…
Reference in New Issue
Block a user