summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-12-09 13:50:01 +0100
committerMarek Gradzki <mgradzki@cisco.com>2016-12-09 13:20:49 +0000
commit10ae85f84a55c5c1bf35d9d943c34df82ef18cae (patch)
treec79a00f8618066791c5e83776b995f4561cc05ee
parent14889dd50dc84954ca5ae8c2dc29d472a4549902 (diff)
Allow setting icmp code range for alc's
Change-Id: I712f25f70f1a6186b9fe888f7a560616cfd9aeb6 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
-rw-r--r--acl/acl-api/src/main/yang/vpp-acl.yang41
1 files changed, 25 insertions, 16 deletions
diff --git a/acl/acl-api/src/main/yang/vpp-acl.yang b/acl/acl-api/src/main/yang/vpp-acl.yang
index dad5e71a8..ff30d5ec5 100644
--- a/acl/acl-api/src/main/yang/vpp-acl.yang
+++ b/acl/acl-api/src/main/yang/vpp-acl.yang
@@ -51,6 +51,23 @@ module vpp-acl {
"ACL that contains only aces of vpp-macip-acl type.";
}
+ grouping value-range {
+ description "Defines value range with first and last value defined";
+
+ leaf first {
+ type uint8;
+ mandatory true;
+ description "Lower boundary for range";
+ }
+
+ leaf last {
+ type uint8;
+ mandatory true;
+ description "Upper boundary for range";
+ must "last >= first";
+ }
+ }
+
grouping acl-icmp-header-fields {
description
"ICMP header fields";
@@ -58,22 +75,14 @@ module vpp-acl {
presence "Enables setting icmp-type";
description
"Inclusive range representing icmp types to be used.";
- leaf first-icmp-type {
- type uint8;
- mandatory true;
- description
- "Lower boundary for icmp type.";
- }
- leaf last-icmp-type {
- type uint8;
- mandatory true;
- must ". >= ../lower-port" {
- error-message
- "The first-icmp-type must be greater than or equal to first-icmp-type";
- }
- description
- "Upper boundary for icmp type";
- }
+ uses value-range;
+ }
+
+ container icmp-code-range {
+ presence "Enables setting icmp-code";
+ description
+ "Inclusive range representing icmp codes to be used.";
+ uses value-range;
}
}