[Libvirt-cim] [PATCH] [TEST] Use full_hostname() instead of hostname()

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Tue Dec 2 21:29:04 UTC 2008


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1228253331 28800
# Node ID ec1b901cf22d440a8461abfe633e8a634ee112ce
# Parent  70ecd9e8867cc277b31f4703e73b5dba7ad53128
[TEST] Use full_hostname() instead of hostname()

This mirrors what the providers use to get the hostname of the system.

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

diff -r 70ecd9e8867c -r ec1b901cf22d suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py	Mon Dec 01 22:15:38 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py	Tue Dec 02 13:28:51 2008 -0800
@@ -80,7 +80,8 @@
 
 import sys
 import pywbem
-from VirtLib import utils, live
+from VirtLib import utils
+from VirtLib.live import full_hostname
 from XenKvmLib import assoc
 from XenKvmLib import vxml
 from XenKvmLib.classes import get_typed_class 
@@ -146,7 +147,7 @@
 
     hs = get_typed_class(options.virt, "HostSystem")
     cs = get_typed_class(options.virt, "ComputerSystem")
-    host_name = live.hostname(options.ip)
+    host_name = full_hostname(options.ip)
     host_name_val = [
                         'CreationClassName', hs, \
                         'Name',              host_name
diff -r 70ecd9e8867c -r ec1b901cf22d suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py	Mon Dec 01 22:15:38 2008 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py	Tue Dec 02 13:28:51 2008 -0800
@@ -28,7 +28,7 @@
 import sys
 from XenKvmLib import enumclass
 from XenKvmLib.classes import get_typed_class
-from VirtLib import live
+from VirtLib.live import full_hostname 
 from VirtLib import utils
 from XenKvmLib.common_util import check_sblim
 from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
@@ -40,7 +40,7 @@
 @do_main(SUPPORTED_TYPES)
 def main():
     options = main.options
-    host = live.hostname(options.ip) 
+    host = full_hostname(options.ip) 
    
     status = FAIL
     keys = ['Name', 'CreationClassName']
diff -r 70ecd9e8867c -r ec1b901cf22d suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py	Mon Dec 01 22:15:38 2008 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py	Tue Dec 02 13:28:51 2008 -0800
@@ -40,7 +40,7 @@
 # Feb 13 2008
 
 import sys
-from VirtLib import live 
+from VirtLib.live import full_hostname 
 from XenKvmLib.common_util import get_host_info
 from XenKvmLib.assoc import Associators
 from XenKvmLib.vxml import XenXML, KVMXML, get_class
@@ -98,7 +98,7 @@
 
 def get_hostsys(server, virt="Xen"):
     status = PASS 
-    host = live.hostname(server)
+    host = full_hostname(server)
 
     try:
         status, host_inst = get_host_info(server, virt)




More information about the Libvirt-cim mailing list