diff options
| author | Scott Moser <smoser@ubuntu.com> | 2012-08-21 11:16:02 -0400 |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2012-08-21 11:19:00 -0400 |
| commit | 30e6879d8139e13fc70b0d1c8ef13d7ee03ca5c3 (patch) | |
| tree | ae3209b45b4a7bff1b172858d32612a4455943ba /nova/api | |
| parent | 0272c063bbc32f1ff39f2baa8ae3f0764723ef73 (diff) | |
add availability_zone to openstack metadata
This adds the key 'availability_zone' to the metadata for openstack.
'availability-zone' in EC2 is very useful to the instance to figure out
where it is. For example, Ubuntu uses this information to determine
mirror location on EC2.
Fixes bug 1039579.
Change-Id: I212d3854b75e08a67138b5cd0bea178c47840e11
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/metadata/base.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py index d9710dc37..24bdb592f 100644 --- a/nova/api/metadata/base.py +++ b/nova/api/metadata/base.py @@ -294,6 +294,7 @@ class InstanceMetadata(): FLAGS.dhcp_domain) metadata['name'] = self.instance['display_name'] + metadata['availability_zone'] = self.availability_zone data = { MD_JSON_NAME: json.dumps(metadata), |
