[Libvirt-cim] [PATCH 3/3] XenKvmLib: Remove check_sblim()

John Ferlan jferlan at redhat.com
Tue May 20 18:26:28 UTC 2014


Seeing as "some day" has never come - just remove the check_sblim()
function so as to not have unused code lying around to wonder about.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 suites/libvirt-cim/lib/XenKvmLib/common_util.py | 28 -------------------------
 1 file changed, 28 deletions(-)

diff --git a/suites/libvirt-cim/lib/XenKvmLib/common_util.py b/suites/libvirt-cim/lib/XenKvmLib/common_util.py
index 0e3f1d6..3b35167 100644
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py
@@ -154,13 +154,6 @@ def poll_for_state_change(server, virt, dom, exp_state, timeout=30):
 
 def get_host_info(server, virt):
     try:
-    # Commenting out sblim check as libvirt-cim is not supporting it anymore.
-    # Leaving them commented, in case we add support for sblim at later time.
-
-    #    status, linux_cs = check_sblim(server)
-    #    if status == PASS:
-    #        return status, linux_cs
-
         hs_class = get_typed_class(virt, 'HostSystem')
         host_info = enumclass.EnumInstances(server, hs_class)
         if len(host_info) == 1:
@@ -458,27 +451,6 @@ def libvirt_cached_data_poll(ip, virt, dom_name):
             
     return cs
 
-def check_sblim(server, virt='Xen'):
-    status = FAIL
-    prev_namespace = Globals.CIM_NS
-    Globals.CIM_NS = 'root/cimv2'
-    keys = ['Name', 'CreationClassName']
-    linux_cs = None
-    cs = 'Linux_ComputerSystem'
-    try:
-        linux = enumclass.EnumInstances(server, cs)
-        if len(linux) == 1:
-            status = PASS
-            linux_cs = linux[0]
-        else:
-            logger.info("Enumerate of Linux_ComputerSystem return NULL")
-    except Exception, detail:
-        logger.error(CIM_ERROR_ENUMERATE, 'Linux_ComputerSystem')
-        logger.error("Exception: %s", detail)
-
-    Globals.CIM_NS = prev_namespace 
-    return status, linux_cs 
-
 def parse_instance_id(instid):
     str_arr = instid.split("/")
     if len(str_arr) < 2:
-- 
1.9.0




More information about the Libvirt-cim mailing list