Re: [PATCH v5 3/9] pvs: add functions to list domains and get info

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

 



On 05/02/2012 03:11 AM, Eric Blake wrote:
On 04/20/2012 10:01 AM, Dmitry Guryanov wrote:
PVS driver is 'stateless', like vmware or openvz drivers.
It collects information about domains during startup using
command-line utility prlctl. VMs in PVS identified by UUIDs

.....
+/*
+ * Must be called with privconn->lock held
+ */
+static int
+pvsLoadDomains(pvsConnPtr privconn, const char *domain_name)
+{
+    int count, i;
+    virJSONValuePtr jobj;
+    virJSONValuePtr jobj2;
+    virDomainObjPtr dom = NULL;
+    int ret = -1;
+
+    jobj = pvsParseOutput(PRLCTL, "list", "-j", "-a",
+                          "-i", "-H", domain_name, NULL);
I guess you can call this command with a domain name, to limit to one
output, or with no argument, to list all domains, given...

@@ -150,6 +371,9 @@ pvsOpenDefault(virConnectPtr conn)
      if (virDomainObjListInit(&privconn->domains)<  0)
          goto error;

+    if (pvsLoadDomains(privconn, NULL))
+        goto error;
this usage.



Yes, you're right, I have to add comment about it.

--
Dmitry Guryanov

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]