[Libvirt-cim] [PATCH] [TEST] Update get_vssd_mof() to include a bootloader param

Guo Lian Yun yunguol at cn.ibm.com
Thu Oct 30 06:59:09 UTC 2008


+1 from me.

Best,
Regards

Daisy (运国莲)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol at cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203




Kaitlin Rupert <kaitlin at linux.vnet.ibm.com> 
Sent by: libvirt-cim-bounces at redhat.com
2008-10-22 00:42
Please respond to
List for discussion and development of libvirt CIM 
<libvirt-cim at redhat.com>


To
libvirt-cim at redhat.com
cc

Subject
[Libvirt-cim] [PATCH] [TEST] Update get_vssd_mof() to include a bootloader 
param






# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1224607344 25200
# Node ID 912c63b6033764917aa5a5438e2e12ce1d12ea99
# Parent  f35b3e65944d83f758656717a903eee38b7d5b19
[TEST] Update get_vssd_mof() to include a bootloader param.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r f35b3e65944d -r 912c63b60337 
suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py           Sun Oct 19 
19:28:33 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py           Tue Oct 21 
09:42:24 2008 -0700
@@ -89,7 +89,7 @@
 
 # classes to define VSSD parameters
 class CIM_VirtualSystemSettingData(CIMClassMOF):
-    def __init__(self, name, virt):
+    def __init__(self, name, virt, bldr=None):
         type = get_class_type(self.__class__.__name__)
         self.InstanceID = '%s:%s' % (type, name)
         self.Caption = self.Description = 'Virtual System'
@@ -107,6 +107,9 @@
         else:
             self.Kernel = const.Xen_kernel_path
             self.Ramdisk = const.Xen_init_path
+
+        if bldr is not None:
+            self.Bootloader = bldr
 
 class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
     pass
@@ -117,9 +120,9 @@
 class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
     pass
 
-def get_vssd_mof(virt, dom_name):
+def get_vssd_mof(virt, dom_name, bldr=None):
     vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData"))
-    vssd = vssd_cn(dom_name, virt)
+    vssd = vssd_cn(dom_name, virt, bldr)
     return vssd.mof()
 
 # classes to define RASD parameters
diff -r f35b3e65944d -r 912c63b60337 
suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py           Sun Oct 19 
19:28:33 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py           Tue Oct 21 
09:42:24 2008 -0700
@@ -564,7 +564,7 @@
     def set_bootloader(self, ip, gtype=0):
         bldr = live.bootloader(ip, gtype)
         self.add_sub_node('/domain', 'bootloader', bldr)
-        self.vssd.Bootloader = bldr
+        self.vssd = vsms.get_vssd_mof(self.virt, self.domain_name, bldr)
         return bldr
 
     def set_bridge(self, ip):

_______________________________________________
Libvirt-cim mailing list
Libvirt-cim at redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20081030/2fdafef4/attachment.htm>


More information about the Libvirt-cim mailing list