]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Make Volumes work with the default AvailabilityZone
authorZane Bitter <zbitter@redhat.com>
Thu, 1 Aug 2013 15:22:18 +0000 (17:22 +0200)
committerZane Bitter <zbitter@redhat.com>
Thu, 1 Aug 2013 15:22:18 +0000 (17:22 +0200)
commit8ede7612a0fcf56fbce2ac392812de51f2ccb878
treea6b279b053966da49bdfc5bf9e8d548c2c83d2b8
parente6ec146fcfe4623269a952bb7ec532c9ab79329d
Make Volumes work with the default AvailabilityZone

The most common way to specify an AvailabiltyZone for a volume is to grab
it from the Instance it is going to be attached to:

    "AvailabilityZone" : {"Fn::GetAtt": ["WikiDatabase",
                                         "AvailabilityZone"]},

But the first unit tests to check the value passed to Cinder for the AZ,
introduced in 134b11ccd145f982b7173bc9a5d0f1bc3e8eef8c, just forced the
value instead of obtaining it from the Instance.

Add a unit test to check the common case, and fix the resulting error (an
empty string is returned instead of None).

Fixes bug #1207416

Change-Id: I83ea2f3f0c417eb9e97abdf27a9eaffd441cb070
heat/engine/resources/volume.py
heat/tests/test_volume.py