diff options
Diffstat (limited to 'cloudinit/sources/DataSourceSmartOS.py')
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 93b8b50b..2813ffb3 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -46,6 +46,7 @@ SMARTOS_ATTRIB_MAP = { 'user-data': ('user-data', False), 'iptables_disable': ('iptables_disable', True), 'motd_sys_info': ('motd_sys_info', True), + 'availability_zone': ('region', True), } DS_NAME = 'SmartOS' @@ -81,8 +82,9 @@ BUILTIN_CLOUD_CONFIG = { 'layout': False, 'overwrite': False} }, - 'fs_setup': [{'label': 'ephemeral0', 'filesystem': 'ext3', - 'device': 'ephemeral0', 'partition': 'auto'}], + 'fs_setup': [{'label': 'ephemeral0', + 'filesystem': 'ext3', + 'device': 'ephemeral0'}], } @@ -174,6 +176,13 @@ class DataSourceSmartOS(sources.DataSource): seed_timeout=self.seed_timeout, default=default, b64=b64) + @property + def availability_zone(self): + try: + return self.metadata['availability-zone'] + except KeyError: + return None + def get_serial(seed_device, seed_timeout): """This is replaced in unit testing, allowing us to replace |