Heat templates doesn't support AZ for trove cluster

Heat templates doesn't support Availability zone for
trove cluster now (support for only single trove instance)

Change-Id: If1df464df6248b46f59f3603177bc7fc45dc2755
Story: #2004821
Task: #28989
Signed-off-by: johjuhyun <juhyun.joh@samsung.com>
This commit is contained in:
johjuhyun 2019-01-20 19:22:04 +09:00 committed by Zane Bitter
parent 28ce9f3ad4
commit c78decaff7
2 changed files with 15 additions and 2 deletions

View File

@ -63,9 +63,9 @@ class TroveCluster(resource.Resource):
) )
_INSTANCE_KEYS = ( _INSTANCE_KEYS = (
FLAVOR, VOLUME_SIZE, NETWORKS, FLAVOR, VOLUME_SIZE, NETWORKS, AVAILABILITY_ZONE,
) = ( ) = (
'flavor', 'volume_size', 'networks', 'flavor', 'volume_size', 'networks', 'availability_zone',
) )
_NICS_KEYS = ( _NICS_KEYS = (
@ -169,6 +169,11 @@ class TroveCluster(resource.Resource):
}, },
), ),
), ),
AVAILABILITY_ZONE: properties.Schema(
properties.Schema.STRING,
_('Name of the availability zone for DB instance.'),
support_status=support.SupportStatus(version='14.0.0'),
),
} }
) )
), ),
@ -230,6 +235,9 @@ class TroveCluster(resource.Resource):
instance_nics = self.get_instance_nics(instance) instance_nics = self.get_instance_nics(instance)
if instance_nics: if instance_nics:
instance_dict["nics"] = instance_nics instance_dict["nics"] = instance_nics
instance_availability_zone = instance[self.AVAILABILITY_ZONE]
if instance_availability_zone:
instance_dict["availability_zone"] = instance_availability_zone
instances.append(instance_dict) instances.append(instance_dict)
args = { args = {

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``OS::Trove::Cluster`` resource type now supports specifying an
availability zone.