Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix path #73

Merged
merged 7 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 20 additions & 54 deletions yang/enh-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ module: ietf-acl-enh
| | +--rw (port)?
| | +--:(port-range-or-operator)
| | +--rw port-range-or-operator
| | +--rw (port-range-or-operator)?
| | +--:(range)
| | | +--rw lower-port inet:port-number
| | | +--rw upper-port inet:port-number
| | +--:(operator)
| | +--rw operator? operator
| | +--rw port inet:port-number
| | +---u packet-fields:port-range-or-operator
| +--rw protocol-sets
| | +--rw protocol-set* [name]
| | +--rw name string
Expand All @@ -33,48 +27,29 @@ module: ietf-acl-enh
| | +--rw icmpv4-type-set* [name]
| | +--rw name string
| | +--rw types* [type]
| | +--rw type iana-icmpv4-types:icmpv4-type
| | +--rw code? uint8
| | +--rw rest-of-header? binary
| | +---u icmpv4-header-fields
| +--rw icmpv6-type-sets
| +--rw icmpv6-type-set* [name]
| +--rw name string
| +--rw types* [type]
| +--rw type iana-icmpv6-types:icmpv6-type
| +--rw code? uint8
| +--rw rest-of-header? binary
| +---u icmpv6-header-fields
+--rw aliases
+--rw alias* [name]
+--rw name string
+--rw vlan* uint16
+--rw prefix* inet:ip-prefix
+--rw port-range* [lower-port]
| +--rw lower-port inet:port-number
| +--rw upper-port? inet:port-number
+--rw protocol* uint8
+--rw fqdn* inet:domain-name
+--rw uri* inet:uri
+--rw name string
+---u alias

augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches:
+--rw (payload)?
| +--:(prefix-pattern)
| +--rw prefix-pattern {match-on-payload}?
| +--rw offset? identityref
| +--rw offset-end? uint64
| +--rw operator? operator
| +--rw prefix? binary
| +---u payload
+--rw (alias)?
| +--:(alias-name)
| +--rw alias-name* alias-ref
+--rw (mpls)?
+--:(mpls-values)
+--rw mpls-values {match-on-mpls}?
+--rw traffic-class? uint8
+--rw label-position? identityref
+--rw upper-label-range? rt-types:mpls-label
+--rw lower-label-range? rt-types:mpls-label
+--rw label-block-name? string
+--rw ttl-value? uint8
+---u mpls-match-parameters-config
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l2:
+--rw vlan-filter {match-on-vlan-filter}?
| +--rw frame-type? string
Expand All @@ -94,44 +69,35 @@ module: ietf-acl-enh
+--rw operator? packet-fields:operator
+--rw isid* uint16
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l3
/acl:ipv4/acl:ipv4:
/acl:ipv4/acl:ipv4:
+--rw ipv4-fragment
| +--rw operator? operator
| +--rw type? fragment-type
| +---u fragment-fields
+--rw source-ipv4-prefix-list? ipv4-prefix-set-ref
+--rw destination-ipv4-prefix-list? ipv4-prefix-set-ref
+--rw next-header-set? protocol-set-ref
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l3
/acl:ipv6/acl:ipv6:
/acl:ipv6/acl:ipv6:
+--rw ipv6-fragment
| +--rw operator? operator
| +--rw type? fragment-type
| +---u fragment-fields
+--rw source-ipv6-prefix-list? ipv6-prefix-set-ref
+--rw destination-ipv6-prefix-list? ipv6-prefix-set-ref
+--rw protocol-set? protocol-set-ref
+--rw extension-header?
iana-ipv6-ext-types:ipv6-extension-header-type
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l4/acl:tcp:
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l4
/acl:tcp/acl:tcp:
+--rw flags-bitmask
| +--rw (mode)?
| +--:(explicit)
| | +--rw operator? operator
| | +--rw explicit-tcp-flag* identityref
| +--:(builtin)
| +--rw bitmask? uint16
| +---u tcp-flags
+--rw source-tcp-port-set? port-set-ref
+--rw destination-tcp-port-set? port-set-ref
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l4/acl:udp:
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l4
/acl:udp/acl:udp:
+--rw source-udp-port-set? port-set-ref
+--rw destination-udp-port-set? port-set-ref
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l4/acl:icmp:
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches/acl:l4
/acl:icmp/acl:icmp:
+--rw icmpv4-set? icmpv4-type-set-ref
+--rw icmpv6-set? icmpv6-type-set-ref
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:actions:
+--rw log-action
| +--rw log-type? identityref
| +--rw log-id? string
+--rw counter-action
| +--rw counter-type? identityref
| +--rw counter-name* string
+--rw rate-limit? decimal64
+---u acl-complementary-actions
+--rw rate-limit? decimal64
46 changes: 46 additions & 0 deletions yang/groupings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
grouping tcp-flags:
+-- (mode)?
+--:(explicit)
| +-- operator? operator
| +-- explicit-tcp-flag* identityref
+--:(builtin)
+-- bitmask? uint16
grouping fragment-fields:
+-- operator? operator
+-- type? fragment-type
grouping mpls-match-parameters-config:
+-- traffic-class? uint8
+-- label-position? identityref
+-- upper-label-range? rt-types:mpls-label
+-- lower-label-range? rt-types:mpls-label
+-- label-block-name? string
+-- ttl-value? uint8
grouping payload:
+-- offset? identityref
+-- offset-end? uint64
+-- operator? operator
+-- prefix? binary
grouping alias:
+-- vlan* uint16
+-- prefix* inet:ip-prefix
+-- port-range* [lower-port]
| +-- lower-port inet:port-number
| +-- upper-port? inet:port-number
+-- protocol* uint8
+-- fqdn* inet:domain-name
+-- uri* inet:uri
grouping icmpv4-header-fields:
+-- type? iana-icmpv4-types:icmpv4-type
+-- code? uint8
+-- rest-of-header? binary
grouping icmpv6-header-fields:
+-- type? iana-icmpv6-types:icmpv6-type
+-- code? uint8
+-- rest-of-header? binary
grouping acl-complementary-actions:
+-- log-action
| +-- log-type? identityref
| +-- log-id? string
+-- counter-action
+-- counter-type? identityref
+-- counter-name* string
12 changes: 5 additions & 7 deletions yang/ietf-acl-enh.yang
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,7 @@ grouping mpls-match-parameters-config {
description
"Handle non-initial and initial fragments for IPv4 packets.";
container ipv4-fragment {
must "not(/acl:acls/acl:acl/acl:aces"
+ "/acl:ace/acl:matches/acl:l3/acl:ipv4/acl:flags)" {
must "not(../acl:flags)" {
error-message
"Either flags or fragment should be provided, but not
both.";
Expand Down Expand Up @@ -896,12 +895,11 @@ grouping mpls-match-parameters-config {
}

augment "/acl:acls/acl:acl/acl:aces"
+ "/acl:ace/acl:matches/acl:l4/acl:tcp" {
+ "/acl:ace/acl:matches/acl:l4/acl:tcp/acl:tcp" {
description
"Handles TCP flags and port sets.";
container flags-bitmask {
must "not(/acl:acls/acl:acl/acl:aces/acl:ace/acl:matches"
+ "/acl:l4/acl:tcp/acl:flags)" {
must "not(../acl:flags)" {
error-message
"Either flags or flags-bitmask should be provided, but not
both.";
Expand All @@ -923,7 +921,7 @@ grouping mpls-match-parameters-config {
}

augment "/acl:acls/acl:acl/acl:aces"
+ "/acl:ace/acl:matches/acl:l4/acl:udp" {
+ "/acl:ace/acl:matches/acl:l4/acl:udp/acl:udp" {
description
"Handle UDP port sets.";
leaf source-udp-port-set {
Expand All @@ -939,7 +937,7 @@ grouping mpls-match-parameters-config {
}

augment "/acl:acls/acl:acl/acl:aces"
+ "/acl:ace/acl:matches/acl:l4/acl:icmp" {
+ "/acl:ace/acl:matches/acl:l4/acl:icmp/acl:icmp" {
description
"Handle ICMP type sets.";
leaf icmpv4-set {
Expand Down
Loading