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

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



# HG changeset patch
# User Kaitlin Rupert <karupert 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 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):


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