diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-12-15 13:40:57 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-12-16 08:42:57 +0000 |
commit | b621f6220c14f5d6373c662e00d07f58f72346e0 (patch) | |
tree | cb4f67391ae82b4167271122d2316a7066312f59 /acl/acl-api/src/main/yang/vpp-acl.yang | |
parent | ce6b6c8c20db7c56b6b97835852d6d4cb3807c13 (diff) |
HONEYCOMB-321 - Acl model fix to not break yang specification
Prevents breaking 7.9.2. The choice's case Statement from Yang RFC
Change-Id: I1895afbdd6c2209262575925463dcfde7d2c649d
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'acl/acl-api/src/main/yang/vpp-acl.yang')
-rw-r--r-- | acl/acl-api/src/main/yang/vpp-acl.yang | 68 |
1 files changed, 41 insertions, 27 deletions
diff --git a/acl/acl-api/src/main/yang/vpp-acl.yang b/acl/acl-api/src/main/yang/vpp-acl.yang index a81516a90..79dac9322 100644 --- a/acl/acl-api/src/main/yang/vpp-acl.yang +++ b/acl/acl-api/src/main/yang/vpp-acl.yang @@ -120,20 +120,30 @@ module vpp-acl { "Defines header fields for TCP/UDP or ICMP protocols"; choice ip-protocol { case icmp { - uses acl-icmp-header-fields; + container icmp-nodes { + uses acl-icmp-header-fields; + } } case icmp-v6 { - uses acl-icmp-header-fields; + container icmp-v6-nodes { + uses acl-icmp-header-fields; + } } case udp { - uses packet-fields:acl-transport-header-fields; + container udp-nodes { + uses packet-fields:acl-transport-header-fields; + } } case tcp { - uses packet-fields:acl-transport-header-fields; - uses acl-tcp-header-fields; + container tcp-nodes { + uses packet-fields:acl-transport-header-fields; + uses acl-tcp-header-fields; + } } case other { - uses acl-other-protocol-fields; + container other-nodes { + uses acl-other-protocol-fields; + } } } } @@ -149,18 +159,20 @@ module vpp-acl { * ICMP (type range) * UDP (port range) * TCP (port range, flags mask, flags value)"; - choice ace-ip-version { - description - "IP version used in this Access List Entry."; - mandatory true; - case ace-ipv4 { - uses packet-fields:acl-ipv4-header-fields; - } - case ace-ipv6 { - uses packet-fields:acl-ipv6-header-fields; + container vpp-ace-nodes { + choice ace-ip-version { + description + "IP version used in this Access List Entry."; + mandatory true; + case ace-ipv4 { + uses packet-fields:acl-ipv4-header-fields; + } + case ace-ipv6 { + uses packet-fields:acl-ipv6-header-fields; + } } + uses acl-ip-protocol-header-fields; } - uses acl-ip-protocol-header-fields; } } @@ -212,18 +224,20 @@ module vpp-acl { - src MAC address mask - src MAC address value - can be used only for static ACLs."; - choice ace-ip-version { - description - "IP version used in this Access List Entry."; - mandatory true; - case ace-ipv4 { - uses vpp-macip-ace-ipv4-header-fields; - } - case ace-ipv6 { - uses vpp-macip-ace-ipv6-header-fields; - } + container vpp-macip-ace-nodes { + choice ace-ip-version { + description + "IP version used in this Access List Entry."; + mandatory true; + case ace-ipv4 { + uses vpp-macip-ace-ipv4-header-fields; + } + case ace-ipv6 { + uses vpp-macip-ace-ipv6-header-fields; + } + } + uses vpp-macip-ace-eth-header-fields; } - uses vpp-macip-ace-eth-header-fields; } } }
\ No newline at end of file |