|
From: <ba...@us...> - 2008-09-17 16:40:35
|
Revision: 1003
http://omc.svn.sourceforge.net/omc/?rev=1003&view=rev
Author: bartw
Date: 2008-09-17 16:40:43 +0000 (Wed, 17 Sep 2008)
Log Message:
-----------
some property list fixes
Modified Paths:
--------------
cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
cmpi-bindings/trunk/test/python/TestAtomProvider_Test.py
cmpi-bindings/trunk/test/python/test_assoc.py
Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
===================================================================
--- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-09-17 04:44:36 UTC (rev 1002)
+++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-09-17 16:40:43 UTC (rev 1003)
@@ -41,7 +41,7 @@
def SFCBUDSConnection():
return pywbem.WBEMConnection('/tmp/sfcbHttpSocket')
-class CIMInstanceNameIterator:
+class CIMInstanceNameIterator(object):
def __init__(self, proxy, enumeration):
self.enumeration = enumeration
self.proxy = proxy
@@ -58,7 +58,7 @@
raise StopIteration
yield self.proxy.cmpi2pywbem_instname(val)
-class CIMInstanceIterator:
+class CIMInstanceIterator(object):
def __init__(self, proxy, enumeration):
self.enumeration = enumeration
self.proxy = proxy
@@ -446,6 +446,8 @@
pcop = pywbem.CIMInstanceName(pinst.classname)
cop = self.pywbem2cmpi_instname(pcop)
cinst = self.broker.new_instance(cop)
+ if pinst.property_list is not None:
+ cinst.set_property_filter(pinst.property_list)
for prop in pinst.properties.values():
data, _type = self.pywbem2cmpi_value(prop.value, _type=prop.type)
ctype = _pywbem2cmpi_typemap[_type]
Modified: cmpi-bindings/trunk/test/python/TestAtomProvider_Test.py
===================================================================
--- cmpi-bindings/trunk/test/python/TestAtomProvider_Test.py 2008-09-17 04:44:36 UTC (rev 1002)
+++ cmpi-bindings/trunk/test/python/TestAtomProvider_Test.py 2008-09-17 16:40:43 UTC (rev 1003)
@@ -437,9 +437,8 @@
raise arg
for prop in inst.properties.keys():
- if prop not in propertylist:
- #self.fail("Property Not Found in PropertyList: %s" % prop)
- print "Property Not Found in PropertyList: %s" % prop
+ if prop not in inst.path and prop not in propertylist:
+ self.fail("Property Not Found in PropertyList: %s" % prop)
def test_6_modify_instance(self):
Modified: cmpi-bindings/trunk/test/python/test_assoc.py
===================================================================
--- cmpi-bindings/trunk/test/python/test_assoc.py 2008-09-17 04:44:36 UTC (rev 1002)
+++ cmpi-bindings/trunk/test/python/test_assoc.py 2008-09-17 16:40:43 UTC (rev 1003)
@@ -1143,8 +1143,9 @@
self.fail('KeyError caught trying to access properties that should exist.')
isValid=False
try:
- if usr['UserID'] is not None:
- self.fail('UserID property set when it should not be.')
+ # some CIMOMs always return keys .
+ #if usr['UserID'] is not None:
+ # self.fail('UserID property set when it should not be.')
if usr['HomeDirectory'] is not None:
self.fail('HomeDirectory property set when it should not be.')
isValid=True
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|