Hi,
I’m using yang model which uses NACM rule-list.
access-operation of rule list can have 5 values (c,r,u,d,e).
Is it possible that based on some leaf value in the yang model, I can limit options of access-operation.
eg. lets say I’ve a leaf /feature/name – value of name could be v1,v2, v3 etc.
Access operation for each feature as below
<feature>
<name>v1
<access_operation>create read update delete exec</access_operation?
</feature>
<feature>
<name>v2</name>
<access_operation>create read update delete</access_operation>
</feature>
<feature>
<name>v3</name>
<access_operation>create read update </access_operation>
access_operation in above yang model is also of type nacm:access-operations-type.
Now I’ve another yang model, that has feature and access_operation
leaf feature {
type leafref {
path " point to above feature name";
}
leaf access {
type nacm:access-operations-type;
}
}
Is it possible that above leaf access only takes values to what is defined above for each feature name.
if feature name is v1, access can have values as c r u d e
if feature name is v2, access can have values as c r u d
if feature name is v3, access can have values as c r u
Is this possible?