My code is as follows.
1.
grouping policy-attributes {
container qospolicies {
list qospolicy {
key "uuid";
uses attrs:base-attributes;
uses qos-policy-attributes;
uses bandwidth-limit-attributes;
uses dscp-marking-attributes;
}
}
}
The grouping with the list
2.
grouping bandwidth-limit-rules-attributes {
list bandwidth-limit-rule{
leaf qos-rule-id {
type yang:uuid;
description "The rule id of the associated rule";
}
leaf max-kbps {
type uint64;
description "The maximum KBPS value";
}
leaf max-burst-kbps {
type uint64;
description "The burst over the maximum KBPS value";
}
leaf policy-id {
type yang:uuid;
description "The policy id to which the rule is associated";
}
}
}
3.
grouping dscp-marking-rules-attributes {
list dscp-marking-rule{
leaf qos-rule-id {
type yang:uuid;
description "The rule id of the associated rule";
}
leaf dscp-mark {
type uint8{
range "0 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38
| 40 | 46 | 48 | 56 ";}
description "the value of dscp mark";
}
leaf policy-id {
type yang:uuid;
description "the policy id to which the rule is associated";
}
}
}
The grouping bandwidth-limit-rules-attributes
has the list with leaves. Also the bandwidth-limit-rules-attributes
is used in the grouping policy-attributes
. I would like to know if it is valid to have the bandwidth-limit-rules-attributes
in policy-attributes
.