[Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Fixes to support the ReferencedConfiguration VSMS param

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri Aug 8 16:25:21 UTC 2008


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1216686405 25200
# Node ID 76bf5dc66e914b68807882983a827116909338b4
# Parent  d279e40c73d27e7fced47c2c63ba0fd2b0b56cf6
[TEST] #2 Fixes to support the ReferencedConfiguration VSMS param.

These changes are needed to create a test case that tests the ReferencedConfiguration VSMS parameter.

Fixes:
  -Add ref_config param to create_using_definesystem() - allows the caller to specify a reference for the ReferenceConfiguration param
  -Add enumerate_names() - Calls EnumerateInstanceNames() so the caller can get a list of CS references
  -Fix default_vssd_rasd_str() so that is a mac address is supplied to the function, it is used instead of one of the const.<> values.

Updates:
   -Add LXC network mac address

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

diff -r d279e40c73d2 -r 76bf5dc66e91 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py	Thu Aug 07 16:10:53 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py	Mon Jul 21 17:26:45 2008 -0700
@@ -65,8 +65,8 @@
 
     return (0, cs) 
 
-def create_using_definesystem(domain_name, ip, 
-                              params=None, exp_err=None, virt='Xen'):
+def create_using_definesystem(domain_name, ip, params=None, ref_config=' ', 
+                              exp_err=None, virt='Xen'):
     bug = "85673"
     try:
         class_vsms = eval('vsms.' + \
@@ -90,7 +90,7 @@
 
         service.DefineSystem(SystemSettings=vssd,
                              ResourceSettings=rasd,
-                             ReferenceConfiguration=' ')
+                             ReferenceConfiguration=ref_config)
     except pywbem.CIMError, (rc, desc):
         if rc == exp_rc and desc.find(exp_desc) >= 0:
             logger.info('Got expected rc code and error string.')
diff -r d279e40c73d2 -r 76bf5dc66e91 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py	Thu Aug 07 16:10:53 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py	Mon Jul 21 17:26:45 2008 -0700
@@ -268,10 +268,14 @@
         return vssd.mof(), [d.mof(), m.mof()]
     
     class_nasd = get_nasd_class(virt)
-    if virt == 'KVM':
+    if net_mac != const.Xen_default_mac:
+        pass
+    elif virt == 'KVM':
         net_mac= const.KVM_default_mac
     elif virt == 'XenFV':
         net_mac = const.XenFV_default_mac
+    elif virt == 'LXC':
+        net_mac = const.LXC_default_mac
     n = class_nasd(
                 type=net_type, 
                 mac=net_mac,




More information about the Libvirt-cim mailing list