Merge lp:~fcorrea/landscape-client/add-vminfo-to-computer-info-message into lp:~landscape/landscape-client/trunk
Proposed by
Fernando Correa Neto
Status: | Merged |
---|---|
Approved by: | Free Ekanayaka |
Approved revision: | 333 |
Merge reported by: | Thomas Herve |
Merged at revision: | not available |
Proposed branch: | lp:~fcorrea/landscape-client/add-vminfo-to-computer-info-message |
Merge into: | lp:~landscape/landscape-client/trunk |
Diff against target: |
291 lines (+211/-5) 3 files modified
landscape/message_schemas.py (+3/-2) landscape/monitor/computerinfo.py (+40/-1) landscape/monitor/tests/test_computerinfo.py (+168/-2) |
To merge this branch: | bzr merge lp:~fcorrea/landscape-client/add-vminfo-to-computer-info-message |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Free Ekanayaka (community) | Approve | ||
Thomas Herve (community) | Approve | ||
Landscape | Pending | ||
Review via email: mp+58332@code.launchpad.net |
Description of the change
This branch adds and extra optional field, vm-info, to computer info messages, so that the server knows if the computer running the client, is virtualized or not.
To post a comment you must log in.
[1] You don't have any specific tests for _get_vm_info? I thought that was the point of passing root_path.
[2]
+ xen_info = [u"proc/sys/xen", u"sys/bus/xen", u"proc/xen"]
There is no need to have unicode paths.
[3]
+ elif True in map(exists, xen_info):
It's slightly more explicit to me to do "elif filter(exists, xen_info):"
[4] path(u" proc/cpuinfo" )).read( ):
+ elif "QEMU Virtual CPU" in open(
+ join_root_
+ virt_info = "KVM"
You should close the open file explicitly.
[5]
+import os.path
You can import os directly.
Thanks!