Add attributes
property to OS::Designate::Zone
Task: 51416 Change-Id: Ica6626a84222057b5076c73363857831e9426e50 Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
parent
eeaf67d56f
commit
042bed8044
@ -32,9 +32,11 @@ class DesignateZone(resource.Resource):
|
|||||||
version='8.0.0')
|
version='8.0.0')
|
||||||
|
|
||||||
PROPERTIES = (
|
PROPERTIES = (
|
||||||
NAME, TTL, DESCRIPTION, EMAIL, TYPE, PRIMARIES, MASTERS
|
NAME, TTL, DESCRIPTION, EMAIL, TYPE, PRIMARIES,
|
||||||
|
MASTERS, ATTRS,
|
||||||
) = (
|
) = (
|
||||||
'name', 'ttl', 'description', 'email', 'type', 'primaries', 'masters'
|
'name', 'ttl', 'description', 'email', 'type', 'primaries',
|
||||||
|
'masters', 'attributes',
|
||||||
)
|
)
|
||||||
|
|
||||||
ATTRIBUTES = (
|
ATTRIBUTES = (
|
||||||
@ -103,6 +105,14 @@ class DesignateZone(resource.Resource):
|
|||||||
'Mandatory for zone type SECONDARY, otherwise ignored.'),
|
'Mandatory for zone type SECONDARY, otherwise ignored.'),
|
||||||
update_allowed=True
|
update_allowed=True
|
||||||
),
|
),
|
||||||
|
ATTRS: properties.Schema(
|
||||||
|
properties.Schema.MAP,
|
||||||
|
_('Key:Value pairs of information about this zone, '
|
||||||
|
'and the pool the user would like to place the zone in. '
|
||||||
|
'This information can be used by the scheduler to place '
|
||||||
|
'zones on the correct pool.'),
|
||||||
|
support_status=support.SupportStatus(version='24.0.0')
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
attributes_schema = {
|
attributes_schema = {
|
||||||
|
@ -32,6 +32,9 @@ sample_template = {
|
|||||||
'name': 'test-zone.com',
|
'name': 'test-zone.com',
|
||||||
'description': 'Test zone',
|
'description': 'Test zone',
|
||||||
'ttl': 3600,
|
'ttl': 3600,
|
||||||
|
'attributes': {
|
||||||
|
'tier': 'gold', 'ha': 'true'
|
||||||
|
},
|
||||||
'email': 'abc@test-zone.com',
|
'email': 'abc@test-zone.com',
|
||||||
'type': 'PRIMARY',
|
'type': 'PRIMARY',
|
||||||
'masters': []
|
'masters': []
|
||||||
@ -108,7 +111,8 @@ class DesignateZoneTest(common.HeatTestCase):
|
|||||||
description='Test zone',
|
description='Test zone',
|
||||||
ttl=3600,
|
ttl=3600,
|
||||||
email='abc@test-zone.com',
|
email='abc@test-zone.com',
|
||||||
type_='PRIMARY'
|
type_='PRIMARY',
|
||||||
|
attributes=dict(tier='gold', ha='true')
|
||||||
)
|
)
|
||||||
|
|
||||||
mock_zone_create.assert_called_once_with(**args)
|
mock_zone_create.assert_called_once_with(**args)
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Added ``attributes`` property to resource type
|
||||||
|
``OS::Designate::Zone``. It can be any key:value
|
||||||
|
pairs of information about this zone including the
|
||||||
|
pool where the user wants to place the zone used
|
||||||
|
by scheduler.
|
Loading…
x
Reference in New Issue
Block a user