diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-07-27 16:53:50 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-07-27 16:53:50 -0400 |
commit | 81a9f17a71f9cac4c78ea5ce80b4a96e3bbb9324 (patch) | |
tree | ed9b2fe43f65d2e8fc705020d7cdd4c6307b8988 /cloudinit/sources/DataSourceGCE.py | |
parent | 22cb92421234c31b783ed9df01439c734535ba01 (diff) | |
parent | d68b340f8a6abf40f4d5cb546c91122c8856aa83 (diff) | |
download | vyos-cloud-init-81a9f17a71f9cac4c78ea5ce80b4a96e3bbb9324.tar.gz vyos-cloud-init-81a9f17a71f9cac4c78ea5ce80b4a96e3bbb9324.zip |
merge from trunk
Diffstat (limited to 'cloudinit/sources/DataSourceGCE.py')
-rw-r--r-- | cloudinit/sources/DataSourceGCE.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceGCE.py b/cloudinit/sources/DataSourceGCE.py index 1b28a68c..7e7fc033 100644 --- a/cloudinit/sources/DataSourceGCE.py +++ b/cloudinit/sources/DataSourceGCE.py @@ -152,6 +152,10 @@ class DataSourceGCE(sources.DataSource): def availability_zone(self): return self.metadata['availability-zone'] + @property + def region(self): + return self.availability_zone.rsplit('-', 1)[0] + # Used to match classes to dependencies datasources = [ (DataSourceGCE, (sources.DEP_FILESYSTEM, sources.DEP_NETWORK)), |