SAI
SAI copied to clipboard
mandatory on create + condition
According to my understanding, when an AttrA is marked MANDATORY_ON_CREATE, and in addition there is a condition AttrB=X or AttrB=Y, this means that a value must be supplied for AttrA on object create if AttrB=X or Y. There is no limitation on the validity of AttrA for other values of AttrB. For example, if AttrB=Z, then AttrA is still valid and a value can be provided on create, but it's not mandatory to do so @kcudnik can you please comment on this, this question was raised today during SAI meeting, thanks
if you have condition, then AttrA is mandatory only when = X or = Y, not Z, even if AttrA value is valid. Currently in sonic/sairedis metadata validation does not allow to pass AttrA if condition is not met, even in AttrA have valid value. is that answering your question ?