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

[Xen-API] [PATCH] Fix fields in class host


  • To: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: Jim Fehlig <jfehlig@xxxxxxxxxx>
  • Date: Fri, 27 Oct 2006 17:36:29 -0600
  • Delivery-date: Fri, 27 Oct 2006 16:37:51 -0700
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

With this patch, I'm able to enumerate domains via CIM providers :-). I'm extracting domains from the resident_VMs field of xen_host_record. Would rather use host.get_resident_vms RPC but alas this is not yet implemented. I'll take a stab at it on Monday.

Jim
# HG changeset patch
# User jfehlig@xxxxxxxxxxxxxxxxxxxxxxxxx
# Date 1161991588 21600
# Node ID 7997dc20040820fa6125d46bbc2239c2d63fe1ec
# Parent  3923a7c48e1777692f7af8eb2caf06f9c35fe1b1
Fixed missing and incorrectly cased field names in class host.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>

diff -r 3923a7c48e17 -r 7997dc200408 tools/libxen/src/xen_host.c
--- a/tools/libxen/src/xen_host.c       Fri Oct 27 16:46:27 2006 +0100
+++ b/tools/libxen/src/xen_host.c       Fri Oct 27 17:26:28 2006 -0600
@@ -51,10 +51,10 @@ static const struct_member xen_host_reco
         { .key = "software_version",
           .type = &abstract_type_string_string_map,
           .offset = offsetof(xen_host_record, software_version) },
-        { .key = "resident_vms",
+        { .key = "resident_VMs",
           .type = &abstract_type_ref_set,
           .offset = offsetof(xen_host_record, resident_vms) },
-        { .key = "host_cpus",
+        { .key = "host_CPUs",
           .type = &abstract_type_ref_set,
           .offset = offsetof(xen_host_record, host_cpus) }
     };
diff -r 3923a7c48e17 -r 7997dc200408 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Fri Oct 27 16:46:27 2006 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Fri Oct 27 17:26:28 2006 -0600
@@ -430,7 +430,8 @@ class XendAPI:
     def host_get_record(self, session, host_ref):
         node = XendNode.instance()
         dom = XendDomain.instance()
-        record = {'name_label': node.name,
+        record = {'uuid': node.uuid,
+                  'name_label': node.name,
                   'name_description': '',
                   'software_version': node.xen_version(),
                   'resident_VMs': dom.get_domain_refs(),
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.