Bug 1247066
| Summary: | Suggest to put "uuid" ahead of "guests" when print the host/guests association in JSON format to stdout | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Liushihui <shihliu> |
| Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
| Status: | CLOSED ERRATA | QA Contact: | xingge <gxing> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | gxing, hsun, ldai, ovasik, sgao |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | virt-who-0.14-3.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 11:57:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Fixed in virt-who-0.14-3.el7. Verified it on virt-who-0.14-3.el7.noarch since "guestId" and "state" have been put ahead of the "guests"
Verified version
virt-who-0.14-3.el7.noarch
subscription-manager-1.15.9-2.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64
Satellite 6.1.0-20150731.0
Verified process:
1.Register system to satellite
2.Print the host/guests association in JSON format to stdout.
[root@hp-z220-07 ~]# virt-who --esx --esx-owner=ACME_Corporation --esx-env=Library --esx-server=10.66.78.97 --esx-username=Administrator --esx-password=qwer1234P! -p -d > /root/ddd
2015-08-11 14:05:48,254 DEBUG: Using config named 'test-esx1'
2015-08-11 14:05:48,254 INFO: Using configuration "test-esx1" ("esx" mode)
2015-08-11 14:05:48,255 INFO: Using configuration "env/cmdline" ("esx" mode)
2015-08-11 14:05:48,285 DEBUG: Log into ESX
2015-08-11 14:05:48,286 DEBUG: Log into ESX
2015-08-11 14:05:48,484 DEBUG: Creating ESX event filter
2015-08-11 14:05:48,484 DEBUG: Creating ESX event filter
2015-08-11 14:05:48,549 DEBUG: Association for config env/cmdline gathered
2015-08-11 14:05:48,552 DEBUG: Association for config test-esx1 gathered
2015-08-11 14:05:48,553 DEBUG: Associations found: {
"hypervisors": [
{
"uuid": "86b2bd00-8bad-11e2-87f4-6c3be514699d",
"guests": [
{
"guestId": "42390187-0ca7-6139-dadb-549a990f34e3",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
},
{
"guestId": "564d1d17-06d9-46c3-beea-fed130d564e7",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
},
{
"guestId": "4239d107-b6b3-ec67-3317-678288dafe5a",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
}
]
},
{
"uuid": "86b2bd00-8bad-11e2-87f4-6c3be514699d",
"guests": [
{
"guestId": "42390187-0ca7-6139-dadb-549a990f34e3",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
},
{
"guestId": "564d1d17-06d9-46c3-beea-fed130d564e7",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
},
{
"guestId": "4239d107-b6b3-ec67-3317-678288dafe5a",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
}
]
}
]
}
Result:
Host's "uuid" has been ahead of the "guests", Therefore,verify it .
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2370.html |
Description of problem: When print the host/guests association in JSON format to stdout(virt-who -p), I suggest to put host's "uuid" ahead of "guests" since it's the key attribute. Version-Release number of selected component (if applicable): virt-who-0.14-2.el7.noarch subscription-manager-1.15.6-1.el7.x86_64 python-rhsm-1.15.3-1.el7.x86_64 Satellite-6.1.0-RHEL-7-20150721.7 How reproducible: Always Steps to Reproduce: 1.Register system to satellite 2.Print the host/guests association in JSON format to stdout. [root@hp-z220-06 virt-who.d]# virt-who --esx --esx-owner=ACME_Corporation --esx-env=Library --esx-server=10.66.79.57 --esx-username=Administrator --esx-password=qwer1234P! -p -d > /root/ddd 2015-07-27 15:27:39,998 INFO: Using configuration "env/cmdline" ("esx" mode) 2015-07-27 15:27:40,028 DEBUG: Log into ESX 2015-07-27 15:27:40,661 DEBUG: Creating ESX event filter 2015-07-27 15:27:40,747 DEBUG: Association for config env/cmdline gathered 2015-07-27 15:27:40,748 DEBUG: Associations found: { "hypervisors": [ { "guests": [ { "attributes": { "active": 0, "virtWhoType": "esx" }, "guestId": "564dab7d-3b72-51a1-eeda-586036106892", "state": 5 }, ], "uuid": "aee4ff00-8c33-11e2-994a-6c3be51d959a" }, ] } Actual results: Host's "uuid" behind of the "guests" since host uuid is the key attribute. Expected results: Host's "uuid" should ahead of the "guests" since host uuid is the key attribute. Additional info: