[libvirt PATCH 12/16] tools: report deprecations for 'dominfo' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$ virsh dominfo demo
Id:             2
Name:           demo
UUID:           eadf8ef0-bf14-4c5f-9708-4a19bacf9e81
OS Type:        hvm
State:          running
CPU(s):         2
CPU time:       15.8s
Max memory:     1536000 KiB
Used memory:    1536000 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: selinux
Security DOI:   0
Security label: unconfined_u:unconfined_r:svirt_t:s0:c443,c956 (permissive)
Deprecations:   machine type 'pc-1.3'
                CPU model 'Icelake-Client'

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 tools/virsh-domain-monitor.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 5d0a03afa9..6b39b60339 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1291,6 +1291,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     char *str, uuid[VIR_UUID_STRING_BUFLEN];
     int has_managed_save = 0;
     virshControlPtr priv = ctl->privData;
+    char **deprecations = NULL;
 
     if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
         return false;
@@ -1391,6 +1392,18 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
             VIR_FREE(seclabel);
         }
     }
+
+    if (virDomainGetDeprecations(dom, &deprecations, 0) > 0) {
+        size_t i;
+        for (i = 0; deprecations[i] != NULL; i++) {
+            if (i == 0) {
+                vshPrint(ctl, "%-15s %s\n", _("Deprecations:"), deprecations[i]);
+            } else {
+                vshPrint(ctl, "%-15s %s\n", "", deprecations[i]);
+            }
+        }
+    }
+
     virshDomainFree(dom);
     return ret;
 }
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux