diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-07-23 13:10:33 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-07-23 13:10:33 -0400 |
commit | ccbdf8c360e4272055208afb013a17a218c9f097 (patch) | |
tree | 655c1f51c77867bc9455e1c0034f1d11b0815363 /cloudinit/sources | |
parent | 838d6c7ddcac8544afb99cb78e8d044fd63b835f (diff) | |
download | vyos-cloud-init-ccbdf8c360e4272055208afb013a17a218c9f097.tar.gz vyos-cloud-init-ccbdf8c360e4272055208afb013a17a218c9f097.zip |
alias 'availability_zone' to availability-zone in metadata service.
The place this was noticed was in trying to use the
'nova.clouds.archive.ubuntu.com' mirror selection.
Because the config-drive-v2 has a metadata entry of 'availability_zone', it
didn't get found by the availabilty_zone property in
cloudinit/sources/__init__.py
LP: #1190431
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index d8fbacdd..974c0407 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -135,7 +135,8 @@ class DataSource(object): @property def availability_zone(self): - return self.metadata.get('availability-zone') + return self.metadata.get('availability-zone', + self.metadata.get('availability_zone')) def get_instance_id(self): if not self.metadata or 'instance-id' not in self.metadata: |