summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2013-02-12 22:51:57 +0000
committerJoe Gordon <jogo@cloudscaling.com>2013-02-12 22:51:57 +0000
commita71ff71e8b91b1d2f1ac97e170e6c60995679cd6 (patch)
tree9060470d73a53e33c8d8a00f9583a4a8cb877522 /nova/tests
parent5f1fc3a854f483c0b9f8039a54d5d1fa36664434 (diff)
Allow aggregate create to have None as the az
Aggregates do not require a zone any more, but in order to keep the current API, Allow for availibilty zone to be set to None. Fixes bug 1123468 Change-Id: I5209311f3417b5d7cdf343e5c06104357ed523d5
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/compute/test_compute.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index 12bd3cf19..5afaa8e3c 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -6190,6 +6190,16 @@ class ComputeAPIAggrTestCase(BaseTestCase):
self.stubs.Set(rpc, 'call', fake_rpc_method)
self.stubs.Set(rpc, 'cast', fake_rpc_method)
+ def test_aggregate_no_zone(self):
+ # Ensure we can create an aggregate without an availability zone
+ aggr = self.api.create_aggregate(self.context, 'fake_aggregate',
+ None)
+ self.api.delete_aggregate(self.context, aggr['id'])
+ db.aggregate_get(self.context.elevated(read_deleted='yes'),
+ aggr['id'])
+ self.assertRaises(exception.AggregateNotFound,
+ self.api.delete_aggregate, self.context, aggr['id'])
+
def test_update_aggregate_metadata(self):
# Ensure metadata can be updated.
aggr = self.api.create_aggregate(self.context, 'fake_aggregate',