# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1222912864 25200
# Node ID b66e4ffc75b323c9b0e40c8ae99563bd97cb7065
# Parent 6927f0fc1112e53ef7b8f75885aff8e602eb03b7
[TEST] Modify ESD 01_forward.py to use new GetInstance() call.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 6927f0fc1112 -r b66e4ffc75b3
suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Wed Oct 01 19:01:04 2008
-0700
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Wed Oct 01 19:01:04 2008
-0700
@@ -49,7 +49,7 @@
import sys
from VirtLib import utils
-from XenKvmLib.enumclass import getInstance
+from XenKvmLib.enumclass import GetInstance
from XenKvmLib.assoc import Associators, compare_all_prop
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS
@@ -62,13 +62,13 @@
test_dom = "esd_dom"
vmac = "00:11:22:33:44:aa"
-def get_inst(ip, virt, cn, key):
+def get_inst(ip, cn, key):
inst = None
try:
key_list = {"InstanceID" : key }
- inst = getInstance(ip, cn, key_list, virt)
+ inst = GetInstance(ip, cn, key_list)
except Exception, details:
logger.error("Exception %s" % details)
@@ -143,7 +143,8 @@
inst_list = {}
for cn, k in keys.iteritems():
- inst_list[cn] = get_inst(options.ip, options.virt, cn, k)
+ classname = get_typed_class(options.virt, cn);
+ inst_list[cn] = get_inst(options.ip, classname, k)
if inst_list[cn] is None:
cxml.undefine(options.ip)
return FAIL