diff options
| author | Joe Gordon <jogo@cloudscaling.com> | 2013-02-12 22:51:57 +0000 |
|---|---|---|
| committer | Joe Gordon <jogo@cloudscaling.com> | 2013-02-12 22:51:57 +0000 |
| commit | a71ff71e8b91b1d2f1ac97e170e6c60995679cd6 (patch) | |
| tree | 9060470d73a53e33c8d8a00f9583a4a8cb877522 /nova/compute | |
| parent | 5f1fc3a854f483c0b9f8039a54d5d1fa36664434 (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/compute')
| -rw-r--r-- | nova/compute/api.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index a5d8ab6e8..658673e50 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -2513,8 +2513,11 @@ class AggregateAPI(base.Base): """Creates the model for the aggregate.""" values = {"name": aggregate_name} + metadata = None + if availability_zone: + metadata = {'availability_zone': availability_zone} aggregate = self.db.aggregate_create(context, values, - metadata={'availability_zone': availability_zone}) + metadata=metadata) aggregate = self._get_aggregate_info(context, aggregate) # To maintain the same API result as before. del aggregate['hosts'] |
