diff options
author | Chad Smith <chad.smith@canonical.com> | 2018-07-09 19:59:01 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-07-09 19:59:01 +0000 |
commit | c1a75a697d7cb2e6c97ad90d64c9b2b88db2034a (patch) | |
tree | d5aea65af8d71de25de46ceb537ea1381005fd74 /cloudinit/sources/DataSourceOpenStack.py | |
parent | 802c1d5110db2edd73a83eb57a9ef7f409bd554f (diff) | |
download | vyos-cloud-init-c1a75a697d7cb2e6c97ad90d64c9b2b88db2034a.tar.gz vyos-cloud-init-c1a75a697d7cb2e6c97ad90d64c9b2b88db2034a.zip |
ubuntu,centos,debian: get_linux_distro to align with platform.dist
A recent commit added get_linux_distro to replace the deprecated python
platform.dist module behavior before it is dropped from python. It added
behavior that was compliant on OpenSuSE and SLES, by returning
(<distro_name>, <distro_version>, <cpu-arch>).
Fix get_linux_distro to behave more like the specific distribution's
platform.dist on ubuntu, centos and debian, which will return the
distribution release codename as the third element instead of <cpu-arch>.
SLES and OpenSUSE will retain their current behavior.
Examples follow:
('sles', '15', 'x86_64')
('opensuse', '42.3', 'x86_64')
('debian', '9', 'stretch')
('ubuntu', '16.04', 'xenial')
('centos', '7', 'Core')
LP: #1780481
Diffstat (limited to 'cloudinit/sources/DataSourceOpenStack.py')
0 files changed, 0 insertions, 0 deletions