Browse Source

Merge "Heat templates doesn't support AZ for trove cluster"

changes/85/694485/3
Zuul 2 years ago
committed by Gerrit Code Review
parent
commit
329570afe7
  1. 12
      heat/engine/resources/openstack/trove/cluster.py
  2. 5
      releasenotes/notes/heat-template-support-trove-cluster-996efba5dfb6f02d.yaml

12
heat/engine/resources/openstack/trove/cluster.py

@ -63,9 +63,9 @@ class TroveCluster(resource.Resource):
)
_INSTANCE_KEYS = (
FLAVOR, VOLUME_SIZE, NETWORKS,
FLAVOR, VOLUME_SIZE, NETWORKS, AVAILABILITY_ZONE,
) = (
'flavor', 'volume_size', 'networks',
'flavor', 'volume_size', 'networks', 'availability_zone',
)
_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)
if 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)
args = {

5
releasenotes/notes/heat-template-support-trove-cluster-996efba5dfb6f02d.yaml

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