WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

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

To: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] Fix fields in class host
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Fri, 27 Oct 2006 17:36:29 -0600
Delivery-date: Fri, 27 Oct 2006 16:37:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060909)
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] Fix fields in class host, Jim Fehlig <=