Ticket #863 (closed defect: invalid)
IMM returns success for deletion of an attribute value even if the value does not exist in the attribute.
| Reported by: | suresh | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | IMMSv | Version: | 4.0.B4 |
| Keywords: | Cc: | ||
| patch waiting for maintainer: | no |
Description
IMM returns success for deletion of an attribute value even if the value does not exist in the attribute. This was observed for both single-valued and multi-valued attributes in PLM objects.
SA_IMM_CCB_REGISTERED_OI flag was not set in ccbflags during saImmOmCcbInitialize(), so that IMM Service accepts changes on objects with no registered implementer which was PLM service. The attribute "saPlmHEDeactivationPolicy" of SaPlmDomain? object initially has the value 2. PLM service was stopped and invoked the OM API saImmOmCcbObjectModify_2() with modType set to SA_IMM_ATTR_VALUES_DELETE and attrValue to be deleted set to 1 for this attribute. As the registered object-implementer PLM service was not running, IMM processed the modify request and returned success/SA_AIS_OK to saImmOmCcbObjectModify_2() even though the value to be deleted in the attribute is not present. However the immlist command on this object displayed the attribute having its value as 2.
Similar behavior was observed with a multi-valued attribute "saPlmHetIdr" in SaPlmHEType object.
Is it not expected that IMM should check the presence of the given value in the attribute.?
Following are the definitions of the attributes in PLM classes in both UML and IMM.xml.
Single-valued-attribute
=======================
saPlmHEDeactivationPolicy : SaPlmHEDeactivationPolicyT [0..1] = 2 (SA_PLM_DP_VALIDATE){CONFIG, WRITABLE, SAUINT32T}
<attr>
<name>saPlmHEDeactivationPolicy</name>
<type>SA_UINT32_T</type>
<category>SA_CONFIG</category>
<flag>SA_WRITABLE</flag>
</attr>
Multi-valued-attribute
=======================
saPlmHetIdr : SaStringT [0..*]{CONFIG, WRITABLE}
<attr>
<name>saPlmHetIdr</name>
<type>SA_STRING_T</type>
<category>SA_CONFIG</category>
<flag>SA_WRITABLE</flag>
<flag>SA_MULTI_VALUE</flag>
</attr>
