Dan Kenigsberg has posted comments on this change.

Change subject: caps.py: osversion() providing product short info
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(3 inline comments)

....................................................
Commit Message
Line 6: 
Line 7: caps.py: osversion() providing product short info
Line 8: 
Line 9: osversion() reads /etc/default/version into node to provide
Line 10: release and version info. This patch includes the product short name.
afaict, this patch makes a difference only on ovirt-node. It does not add a new 
"product short info" item to vdsm API, it reads a defferent value for an 
existing item.

I'd love to see a short explanation why the changes is needed.
Line 11: 
Line 12: Change-Id: Ifb620f0e0eedd325aad3bab2b5fe1f12f980daa5
Line 13: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=959152


....................................................
File vdsm/caps.py
Line 238:         if osname == OSName.RHEVH or osname == OSName.OVIRT:
Line 239:             d = _parseKeyVal(file('/etc/default/version'))
Line 240:             version = d.get('VERSION', '')
Line 241:             release = d.get('RELEASE', '')
Line 242:             osname  = d.get('PRODUCT_SHORT', '')
This is going to change the SMBIOS product name for guests. Is this 
intentional? Is it even acceptable?
Line 243:         elif osname == OSName.DEBIAN:
Line 244:             version = linecache.getline('/etc/debian_version', 
1).strip("\n")
Line 245:             release = ""  # Debian just has a version entry
Line 246:         else:


Line 250:                 release = er['release']
Line 251:     except:
Line 252:         logging.error('failed to find version/release', exc_info=True)
Line 253: 
Line 254:     return dict(release=release, version=version, 
name=osname.strip("'"))
this stripping of quotes should happen only when you expect the quotes to exist 
(line 242)
Line 255: 
Line 256: 
Line 257: def get():
Line 258:     caps = {}


-- 
To view, visit http://gerrit.ovirt.org/15431
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb620f0e0eedd325aad3bab2b5fe1f12f980daa5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to