summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceSmartOS.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-05-15 13:38:20 -0400
committerScott Moser <smoser@brickies.net>2018-05-15 13:38:20 -0400
commit0d7ee5592621d09699d079945ffd6febf16669b2 (patch)
treef768984325f51e7581e64ab85ead14e84ca2f766 /cloudinit/sources/DataSourceSmartOS.py
parentd5374bba2f1b4607a773ebff00e1ee7d66e23033 (diff)
downloadvyos-cloud-init-0d7ee5592621d09699d079945ffd6febf16669b2.tar.gz
vyos-cloud-init-0d7ee5592621d09699d079945ffd6febf16669b2.zip
ds-identify: recognize container-other as a container, test SmartOS.
In playing with a SmartOS container I found that ds-identify did not identify the container there as a container. Systemd-detect-virt identifies it as 'container-other'. Also here are tests for ds-identify for the SmartOS platform identification, and some indentation fixes in ds-identify.
Diffstat (limited to 'cloudinit/sources/DataSourceSmartOS.py')
-rw-r--r--cloudinit/sources/DataSourceSmartOS.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py
index 4ea00eb1..fcb46b14 100644
--- a/cloudinit/sources/DataSourceSmartOS.py
+++ b/cloudinit/sources/DataSourceSmartOS.py
@@ -745,7 +745,7 @@ def get_smartos_environ(uname_version=None, product_name=None):
# report 'BrandZ virtual linux' as the kernel version
if uname_version is None:
uname_version = uname[3]
- if uname_version.lower() == 'brandz virtual linux':
+ if uname_version == 'BrandZ virtual linux':
return SMARTOS_ENV_LX_BRAND
if product_name is None:
@@ -753,7 +753,7 @@ def get_smartos_environ(uname_version=None, product_name=None):
else:
system_type = product_name
- if system_type and 'smartdc' in system_type.lower():
+ if system_type and system_type.startswith('SmartDC'):
return SMARTOS_ENV_KVM
return None