From 639509ad42f8bd6baf9b6f5b668a9bbfb05108d4 Mon Sep 17 00:00:00 2001 From: Andrej Kozemcak Date: Thu, 20 Dec 2018 17:49:33 +0100 Subject: Add Openconfig YANG modules. Change-Id: I7e98bf1ca7196cff042a35b8bf096d2ea9d80028 Signed-off-by: Andrej Kozemcak --- .../yang/openconfig/openconfig-if-tunnel.yang | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 src/plugins/yang/openconfig/openconfig-if-tunnel.yang (limited to 'src/plugins/yang/openconfig/openconfig-if-tunnel.yang') diff --git a/src/plugins/yang/openconfig/openconfig-if-tunnel.yang b/src/plugins/yang/openconfig/openconfig-if-tunnel.yang new file mode 100644 index 0000000..4efff64 --- /dev/null +++ b/src/plugins/yang/openconfig/openconfig-if-tunnel.yang @@ -0,0 +1,109 @@ +module openconfig-if-tunnel { + yang-version "1"; + + namespace "http://openconfig.net/yang/interfaces/tunnel"; + + prefix "oc-tun"; + + import openconfig-interfaces { prefix oc-if; } + import openconfig-extensions { prefix oc-ext; } + import openconfig-inet-types { prefix oc-inet; } + import openconfig-if-ip { prefix oc-ip; } + + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This model adds extensions to the OpenConfig interfaces + model to configure tunnel interfaces on a network + device."; + + oc-ext:openconfig-version "0.1.0"; + + revision "2018-01-05" { + description + "Initial tunnel model"; + reference "0.1.0"; + } + + grouping tunnel-top { + description + "Top-level grouping for parameters related to + a tunnel interface."; + + container tunnel { + description + "In the case that the interface is logical tunnel + interface, the parameters for the tunnel are + specified within this subtree. Tunnel interfaces + have only a single logical subinterface associated + with them."; + + container config { + description + "Configuration parameters associated with the + tunnel interface"; + uses tunnel-config; + } + + container state { + config false; + description + "Operational state parameters associated with + the tunnel interface."; + uses tunnel-config; + } + + uses oc-ip:ipv4-top; + uses oc-ip:ipv6-top; + } + } + + grouping tunnel-config { + description + "Configuraton parameters relating to a tunnel + interface."; + + leaf src { + type oc-inet:ip-address; + description + "The source address that should be used for the + tunnel."; + } + + leaf dst { + type oc-inet:ip-address; + description + "The destination address for the tunnel."; + } + + leaf ttl { + type uint8 { + range "1..255"; + } + description + "The time-to-live (or hop limit) that should be utilised + for the IP packets used for the tunnel transport."; + } + + leaf gre-key { + type uint32; + description + "The GRE key to be specified for the tunnel. The + key is used to identify a traffic flow within + a tunnel."; + reference + "RFC2890: Key and Sequence Number Extensions to GRE"; + } + } + + augment "/oc-if:interfaces/oc-if:interface" { + description + "Augment to add tunnel configuration to interfaces"; + uses tunnel-top; + } +} -- cgit 1.2.3-korg