summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorRobert Schweikert <rjschwei@suse.com>2018-10-22 19:31:51 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-10-22 19:31:51 +0000
commit4ea64f153c87a786642abfa4db4b31c4bdd5bc9d (patch)
tree0e255f1af8cbfb5186d4d211353480cb29ed49f4 /cloudinit/util.py
parent1d5e9aefdab06a2574d78e644deed6c6fa1da171 (diff)
downloadvyos-cloud-init-4ea64f153c87a786642abfa4db4b31c4bdd5bc9d.tar.gz
vyos-cloud-init-4ea64f153c87a786642abfa4db4b31c4bdd5bc9d.zip
update detection of openSUSE variants
openSUSE has changed the way the distribution is identified in os-release. Add support detecting for openSUSE Leap 42.3, Leap 15 and TumbleWeed. Reference: boo#1111427
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index c67d6be6..7800f7bc 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -615,8 +615,8 @@ def get_linux_distro():
distro_name = os_release.get('ID', '')
distro_version = os_release.get('VERSION_ID', '')
if 'sles' in distro_name or 'suse' in distro_name:
- # RELEASE_BLOCKER: We will drop this sles ivergent behavior in
- # before 18.4 so that get_linux_distro returns a named tuple
+ # RELEASE_BLOCKER: We will drop this sles divergent behavior in
+ # the future so that get_linux_distro returns a named tuple
# which will include both version codename and architecture
# on all distributions.
flavor = platform.machine()
@@ -668,7 +668,8 @@ def system_info():
var = 'ubuntu'
elif linux_dist == 'redhat':
var = 'rhel'
- elif linux_dist in ('opensuse', 'sles'):
+ elif linux_dist in (
+ 'opensuse', 'opensuse-tumbleweed', 'opensuse-leap', 'sles'):
var = 'suse'
else:
var = 'linux'