immcfg -c claa -a attr="one" -a attr="two" rdn=0
By specifying same attribute twice, will create the multiple values for multi attribute.
Presently, this is not supported. Because, the attributes are not sent as multiple values, but sent as individual attributes with same name. This needs to be corrected.
The ticket, will support multi ple values for mulit attributes at creation of object.
Last edit: Neelakanta Reddy 2016-01-19
Is there any problems that stop us from supporting modification for multi valued attributes?
Or are we going to do it in a separate ticket?
Only one modifiy operation is supported for the attribute.
Yes, only one SaImmAttrModificationT_2 is allowed for each attribute for saImmOmCcbObjectModify_2.
But that AttrModification may involve multiple values (attrValuesNumber > 1).
For example:
immcfg -a attr1=1 -a attr1=2 test=1
should be interpreted as
modType = SA_IMM_ATTR_VALUES_REPLACE
attrValuesNumber = 2
attrValues = {1, 2}
immcfg -a attr1+=1 -a attr1+=2 test=1
should be interpreted as
modType = SA_IMM_ATTR_VALUES_ADD
attrValuesNumber = 2
attrValues = {1, 2}
Of course mixed modType is not allowed
immcfg -a attr1+=1 -a attr1-=2 test=1
this must be rejected
From the above example
immcfg -a attr1=1 -a attr1=2 test=1
Here, there may be more confusion whether the final value is 1 or 2
similarly for mixed mod type.
We are talking about atrributes defined as MULTI_VALUE so there's no such final value.
We will add both '1' and '2' to the attribute, multi-valued attributes can have more than one attribute.
Of course, those examples above are only for attributes defined as MULTI_VALUE, any attemp to do that on single-valued attributes should be rejected.
Mixed ModType is not allowed (I already said that before).
Intial thought of enhancement is to support both create and modify.
Later thought that modify may confuse the user.
It is good to have, will add support for modify operation also.
changeset: 7263:3a4f014ad432
tag: tip
user: Neelakanta Reddy
date: Thu Jan 28 12:46:05 2016 +0600
summary: immtool: immcfg allows creation and modification of multiple values for multi value attributes[#1626]
Related
Tickets:
#1626