version 1.102, 2003/11/14 16:26:35
|
version 1.103, 2003/11/28 17:08:45
|
|
|
13 November 2003 to keep the code installed but not change | 13 November 2003 to keep the code installed but not change |
current client behavior pending architecture team decison. | current client behavior pending architecture team decison. |
KS, 13 Sept 2003 Note that there is also a flag in | KS, 13 Sept 2003 Note that there is also a flag in |
tests/cimrepository2.cpp */ |
tests/cimrepository2.cpp. Note that this was extended to |
#define PEGASUS_NO_ENUMERATEINSTANCE_FILTER |
include get instance (at least the property filtering pending |
|
conclusion of the questions around bug. Set this flag |
|
PEGASUS_ENABLE_INSTANCE_FILTER to stop the filtering |
|
NOTE: We did not make these env variable params because |
|
the test suite must be changed also.*/ |
|
|
|
// comment this to disable filters #define PEGASUS_ENABLE_INSTANCE_FILTER |
|
|
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
} | } |
} | } |
| |
/* remove the properties from an instance based on attributes |
/* remove the properties from an instance based on attributes. |
@param Instance from which properties will be removed. | @param Instance from which properties will be removed. |
@param propertyList PropertyList is used in the removal algorithm | @param propertyList PropertyList is used in the removal algorithm |
@param localOnly - Boolean used in the removal. | @param localOnly - Boolean used in the removal. |
|
|
cimInstance.getProperty(i).setClassOrigin(CIMName()); | cimInstance.getProperty(i).setClassOrigin(CIMName()); |
} | } |
| |
/* Filters the properties and classorigin out of a single instance. |
/* Filters the properties, qualifiers, and classorigin out of a single instance. |
Based on the parameters provided for localOnly, includeQualifiers, | Based on the parameters provided for localOnly, includeQualifiers, |
and includeClassOrigin, this function simply filters the properties | and includeClassOrigin, this function simply filters the properties |
qualifiers, and classOrigins out of a single instance. This function | qualifiers, and classOrigins out of a single instance. This function |
|
|
void _filterInstance(CIMInstance& cimInstance, | void _filterInstance(CIMInstance& cimInstance, |
const CIMPropertyList& propertyList, | const CIMPropertyList& propertyList, |
Boolean localOnly, | Boolean localOnly, |
|
|
Boolean includeQualifiers, | Boolean includeQualifiers, |
Boolean includeClassOrigin) | Boolean includeClassOrigin) |
{ | { |
|
// Remove properties based on propertylist and localOnly flag |
// Remove properties based on propertylist and localOnly flag (Bug 565) |
#ifdef PEGASUS_ENABLE_INSTANCE_FILTER |
|
|
_removeProperties(cimInstance, propertyList, localOnly); | _removeProperties(cimInstance, propertyList, localOnly); |
|
#endif |
// If includequalifiers false, remove all qualifiers from | // If includequalifiers false, remove all qualifiers from |
// properties. | // properties. |
| |
|
|
{ | { |
_removeAllQualifiers(cimInstance); | _removeAllQualifiers(cimInstance); |
} | } |
// if ClassOrigin Flag false, remove classOrigin info from class object |
// if ClassOrigin Flag false, remove classOrigin info from Instance object |
// by setting the property to Null. |
// by setting the classOrigin to Null. |
if (!includeClassOrigin) | if (!includeClassOrigin) |
{ | { |
_removeClassOrigins(cimInstance); | _removeClassOrigins(cimInstance); |
|
|
// Do any required filtering of properties, qualifiers, classorigin | // Do any required filtering of properties, qualifiers, classorigin |
// on the returned instances. | // on the returned instances. |
// Turn off this function for the moment since it changes client behavior | // Turn off this function for the moment since it changes client behavior |
#ifndef PEGASUS_NO_ENUMERATEINSTANCE_FILTER |
#ifdef PEGASUS_ENABLE_INSTANCE_FILTER |
for (Uint32 i = 0 ; i < namedInstances.size(); i++) | for (Uint32 i = 0 ; i < namedInstances.size(); i++) |
{ | { |
_filterInstance(namedInstances[i], | _filterInstance(namedInstances[i], |