Skip to content
Permalink
Browse files

10569 FIX lnx_distro: Fixed handling of empty codename for RedHat Vir…

…tualization Host

Updated lnx_distro to work with RedHat Virtualization Host, RHVH (Minimal RHEL
release for RHEV), that displays no codename.

Change-Id: I59a522e122ede7a5e54c5ee09e7122d1063f1d51
  • Loading branch information
rmoorecpcc authored and makanakoeln committed Aug 30, 2019
1 parent e092e49 commit 71fed265be42ad4f9130f03efaf146e5d77af1bc
Showing with 16 additions and 1 deletion.
  1. +12 −0 .werks/10569
  2. +4 −1 inventory/lnx_distro
@@ -0,0 +1,12 @@
Title: lnx_distro: Fixed handling of empty codename for RedHat Virtualization Host
Class: fix
Compatible: compat
Component: inv
Date: 1573824287
Edition: cre
Knowledge: doc
Level: 1
Version: 1.7.0i1

Updated lnx_distro to work with RedHat Virtualization Host, RHVH (Minimal RHEL
release for RHEV), that displays no codename.
@@ -127,7 +127,10 @@ def inv_lnx_parse_redhat(node, line):
else:
parts = entry.split("(")
left = parts[0].strip()
node["code_name"] = parts[1].rstrip(")")
# if codename "(CODENAME)" is present, list looks like
# ['Red Hat Enterprise Linux Server release 6.7 ', 'Santiago)']
if len(parts) == 2:
node["code_name"] = parts[1].rstrip(")")
name, _release, version = left.rsplit(None, 2)
if name.startswith("Red Hat"):
node["vendor"] = "Red Hat"

0 comments on commit 71fed26

Please sign in to comment.
You can’t perform that action at this time.