diff --git a/standard/ietf/RFC/ietf-ipv4-unicast-routing@2016-11-04.yang b/standard/ietf/RFC/ietf-ipv4-unicast-routing@2016-11-04.yang
new file mode 100644
index 000000000..6ba659a05
--- /dev/null
+++ b/standard/ietf/RFC/ietf-ipv4-unicast-routing@2016-11-04.yang
@@ -0,0 +1,249 @@
+module ietf-ipv4-unicast-routing {
+
+ yang-version "1.1";
+
+ namespace "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing";
+
+ prefix "v4ur";
+
+ import ietf-routing {
+ prefix "rt";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+ organization
+ "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+ contact
+ "WG Web:
+ WG List:
+
+ WG Chair: Lou Berger
+
+
+ WG Chair: Kent Watsen
+
+
+ Editor: Ladislav Lhotka
+
+
+ Editor: Acee Lindem
+ ";
+
+ description
+ "This YANG module augments the 'ietf-routing' module with basic
+ configuration and state data for IPv4 unicast routing.
+
+ Copyright (c) 2016 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject to
+ the license terms contained in, the Simplified BSD License set
+ forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+ NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
+ 'OPTIONAL' in the module text are to be interpreted as described
+ in RFC 2119.
+
+ This version of this YANG module is part of RFC 8022;
+ see the RFC itself for full legal notices.";
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ /* Identities */
+
+ identity ipv4-unicast {
+ base rt:ipv4;
+ description
+ "This identity represents the IPv4 unicast address family.";
+ }
+
+ /* State data */
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "This leaf augments an IPv4 unicast route.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "Augment 'simple-next-hop' case in IPv4 unicast routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/"
+ + "rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "This leaf augments the 'next-hop-list' case of IPv4 unicast
+ routes.";
+ leaf address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next-hop.";
+ }
+ }
+
+ augment
+ "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/rt:input" {
+ when "derived-from-or-self(../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast RIBs.";
+ }
+ description
+ "This augment adds the input parameter of the 'active-route'
+ action.";
+ leaf destination-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 destination address.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "This augment adds the destination prefix to the reply of the
+ 'active-route' action.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "Augment 'simple-next-hop' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "Augment 'next-hop-list' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+
+ /* Configuration data */
+
+ augment "/rt:routing/rt:control-plane-protocols/"
+ + "rt:control-plane-protocol/rt:static-routes" {
+ description
+ "This augment defines the configuration of the 'static'
+ pseudo-protocol with data specific to IPv4 unicast.";
+ container ipv4 {
+ description
+ "Configuration of a 'static' pseudo-protocol instance
+ consists of a list of routes.";
+ list route {
+ key "destination-prefix";
+ description
+ "A list of static routes.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ mandatory "true";
+ description
+ "IPv4 destination prefix.";
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the route.";
+ }
+ container next-hop {
+ description
+ "Configuration of next-hop.";
+ uses rt:next-hop-content {
+ augment "next-hop-options/simple-next-hop" {
+ description
+ "Augment 'simple-next-hop' case in IPv4 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ augment "next-hop-options/next-hop-list/next-hop-list/"
+ + "next-hop" {
+ description
+ "Augment 'next-hop-list' case in IPv4 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/standard/ietf/RFC/ietf-ipv6-router-advertisements@2016-11-04.yang b/standard/ietf/RFC/ietf-ipv6-router-advertisements@2016-11-04.yang
new file mode 100644
index 000000000..4f9b8774b
--- /dev/null
+++ b/standard/ietf/RFC/ietf-ipv6-router-advertisements@2016-11-04.yang
@@ -0,0 +1,469 @@
+submodule ietf-ipv6-router-advertisements {
+
+ yang-version "1.1";
+
+ belongs-to ietf-ipv6-unicast-routing {
+ prefix "v6ur";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+
+ import ietf-interfaces {
+ prefix "if";
+ }
+
+ import ietf-ip {
+ prefix "ip";
+ }
+
+ organization
+ "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+ contact
+ "WG Web:
+ WG List:
+
+ WG Chair: Lou Berger
+
+
+ WG Chair: Kent Watsen
+
+
+ Editor: Ladislav Lhotka
+
+
+ Editor: Acee Lindem
+ ";
+
+ description
+ "This YANG module augments the 'ietf-ip' module with
+ configuration and state data of IPv6 router advertisements.
+
+ Copyright (c) 2016 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject to
+ the license terms contained in, the Simplified BSD License set
+ forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+ NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
+ 'OPTIONAL' in the module text are to be interpreted as described
+ in RFC 2119.
+
+ This version of this YANG module is part of RFC 8022;
+ see the RFC itself for full legal notices.";
+
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6).";
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ /* State data */
+
+ augment "/if:interfaces-state/if:interface/ip:ipv6" {
+ description
+ "Augment interface state data with parameters of IPv6 router
+ advertisements.";
+ container ipv6-router-advertisements {
+ description
+ "Parameters of IPv6 Router Advertisements.";
+ leaf send-advertisements {
+ type boolean;
+ description
+ "A flag indicating whether or not the router sends periodic
+ Router Advertisements and responds to Router
+ Solicitations.";
+ }
+ leaf max-rtr-adv-interval {
+ type uint16 {
+ range "4..1800";
+ }
+ units "seconds";
+ description
+ "The maximum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.";
+ }
+ leaf min-rtr-adv-interval {
+ type uint16 {
+ range "3..1350";
+ }
+ units "seconds";
+ description
+ "The minimum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.";
+ }
+ leaf managed-flag {
+ type boolean;
+ description
+ "The value that is placed in the 'Managed address
+ configuration' flag field in the Router Advertisement.";
+ }
+ leaf other-config-flag {
+ type boolean;
+ description
+ "The value that is placed in the 'Other configuration' flag
+ field in the Router Advertisement.";
+ }
+ leaf link-mtu {
+ type uint32;
+ description
+ "The value that is placed in MTU options sent by the
+ router. A value of zero indicates that no MTU options are
+ sent.";
+ }
+ leaf reachable-time {
+ type uint32 {
+ range "0..3600000";
+ }
+ units "milliseconds";
+ description
+ "The value that is placed in the Reachable Time field in
+ the Router Advertisement messages sent by the router. A
+ value of zero means unspecified (by this router).";
+ }
+ leaf retrans-timer {
+ type uint32;
+ units "milliseconds";
+ description
+ "The value that is placed in the Retrans Timer field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).";
+ }
+
+ leaf cur-hop-limit {
+ type uint8;
+ description
+ "The value that is placed in the Cur Hop Limit field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).";
+ }
+ leaf default-lifetime {
+ type uint16 {
+ range "0..9000";
+ }
+ units "seconds";
+ description
+ "The value that is placed in the Router Lifetime field of
+ Router Advertisements sent from the interface, in seconds.
+ A value of zero indicates that the router is not to be
+ used as a default router.";
+ }
+ container prefix-list {
+ description
+ "A list of prefixes that are placed in Prefix Information
+ options in Router Advertisement messages sent from the
+ interface.
+
+ By default, these are all prefixes that the router
+ advertises via routing protocols as being on-link for the
+ interface from which the advertisement is sent.";
+ list prefix {
+ key "prefix-spec";
+ description
+ "Advertised prefix entry and its parameters.";
+ leaf prefix-spec {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 address prefix.";
+ }
+ leaf valid-lifetime {
+ type uint32;
+ units "seconds";
+ description
+ "The value that is placed in the Valid Lifetime in the
+ Prefix Information option. The designated value of
+ all 1's (0xffffffff) represents infinity.
+
+ An implementation SHOULD keep this value constant in
+ consecutive advertisements except when it is
+ explicitly changed in configuration.";
+ }
+ leaf on-link-flag {
+ type boolean;
+ description
+ "The value that is placed in the on-link flag ('L-bit')
+ field in the Prefix Information option.";
+ }
+ leaf preferred-lifetime {
+ type uint32;
+ units "seconds";
+ description
+ "The value that is placed in the Preferred Lifetime in
+ the Prefix Information option, in seconds. The
+ designated value of all 1's (0xffffffff) represents
+ infinity.
+
+ An implementation SHOULD keep this value constant in
+ consecutive advertisements except when it is
+ explicitly changed in configuration.";
+ }
+ leaf autonomous-flag {
+ type boolean;
+ description
+ "The value that is placed in the Autonomous Flag field
+ in the Prefix Information option.";
+ }
+ }
+ }
+ }
+ }
+
+ /* Configuration data */
+
+ augment "/if:interfaces/if:interface/ip:ipv6" {
+ description
+ "Augment interface configuration with parameters of IPv6 router
+ advertisements.";
+ container ipv6-router-advertisements {
+ description
+ "Configuration of IPv6 Router Advertisements.";
+ leaf send-advertisements {
+ type boolean;
+ default "false";
+ description
+ "A flag indicating whether or not the router sends periodic
+ Router Advertisements and responds to Router
+ Solicitations.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvSendAdvertisements.";
+ }
+ leaf max-rtr-adv-interval {
+ type uint16 {
+ range "4..1800";
+ }
+ units "seconds";
+ default "600";
+ description
+ "The maximum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ MaxRtrAdvInterval.";
+ }
+ leaf min-rtr-adv-interval {
+ type uint16 {
+ range "3..1350";
+ }
+ units "seconds";
+ must ". <= 0.75 * ../max-rtr-adv-interval" {
+ description
+ "The value MUST NOT be greater than 75% of
+ 'max-rtr-adv-interval'.";
+ }
+ description
+ "The minimum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.
+
+ The default value to be used operationally if this leaf is
+ not configured is determined as follows:
+
+ - if max-rtr-adv-interval >= 9 seconds, the default
+ value is 0.33 * max-rtr-adv-interval;
+
+ - otherwise, it is 0.75 * max-rtr-adv-interval.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ MinRtrAdvInterval.";
+ }
+ leaf managed-flag {
+ type boolean;
+ default "false";
+ description
+ "The value to be placed in the 'Managed address
+ configuration' flag field in the Router Advertisement.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvManagedFlag.";
+ }
+ leaf other-config-flag {
+ type boolean;
+ default "false";
+ description
+ "The value to be placed in the 'Other configuration' flag
+ field in the Router Advertisement.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvOtherConfigFlag.";
+ }
+ leaf link-mtu {
+ type uint32;
+ default "0";
+ description
+ "The value to be placed in MTU options sent by the router.
+ A value of zero indicates that no MTU options are sent.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvLinkMTU.";
+ }
+ leaf reachable-time {
+ type uint32 {
+ range "0..3600000";
+ }
+ units "milliseconds";
+ default "0";
+ description
+ "The value to be placed in the Reachable Time field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvReachableTime.";
+ }
+ leaf retrans-timer {
+ type uint32;
+ units "milliseconds";
+ default "0";
+ description
+ "The value to be placed in the Retrans Timer field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvRetransTimer.";
+ }
+ leaf cur-hop-limit {
+ type uint8;
+ description
+ "The value to be placed in the Cur Hop Limit field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).
+
+ If this parameter is not configured, the device SHOULD use
+ the value specified in IANA Assigned Numbers that was in
+ effect at the time of implementation.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvCurHopLimit.
+
+ IANA: IP Parameters,
+ http://www.iana.org/assignments/ip-parameters";
+ }
+ leaf default-lifetime {
+ type uint16 {
+ range "0..9000";
+ }
+ units "seconds";
+ description
+ "The value to be placed in the Router Lifetime field of
+ Router Advertisements sent from the interface, in seconds.
+ It MUST be either zero or between max-rtr-adv-interval and
+ 9000 seconds. A value of zero indicates that the router
+ is not to be used as a default router. These limits may
+ be overridden by specific documents that describe how IPv6
+ operates over different link layers.
+
+ If this parameter is not configured, the device SHOULD use
+ a value of 3 * max-rtr-adv-interval.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvDefaultLifeTime.";
+ }
+ container prefix-list {
+ description
+ "Configuration of prefixes to be placed in Prefix
+ Information options in Router Advertisement messages sent
+ from the interface.
+
+ Prefixes that are advertised by default but do not have
+ their entries in the child 'prefix' list are advertised
+ with the default values of all parameters.
+
+ The link-local prefix SHOULD NOT be included in the list
+ of advertised prefixes.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
+ AdvPrefixList.";
+ list prefix {
+ key "prefix-spec";
+ description
+ "Configuration of an advertised prefix entry.";
+ leaf prefix-spec {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 address prefix.";
+ }
+ choice control-adv-prefixes {
+ default "advertise";
+ description
+ "Either the prefix is explicitly removed from the
+ set of advertised prefixes, or the parameters with
+ which it is advertised are specified (default case).";
+ leaf no-advertise {
+ type empty;
+ description
+ "The prefix will not be advertised.
+
+ This can be used for removing the prefix from the
+ default set of advertised prefixes.";
+ }
+ case advertise {
+ leaf valid-lifetime {
+ type uint32;
+ units "seconds";
+ default "2592000";
+ description
+ "The value to be placed in the Valid Lifetime in
+ the Prefix Information option. The designated
+ value of all 1's (0xffffffff) represents
+ infinity.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvValidLifetime.";
+ }
+ leaf on-link-flag {
+ type boolean;
+ default "true";
+ description
+ "The value to be placed in the on-link flag
+ ('L-bit') field in the Prefix Information
+ option.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvOnLinkFlag.";
+ }
+ leaf preferred-lifetime {
+ type uint32;
+ units "seconds";
+ must ". <= ../valid-lifetime" {
+ description
+ "This value MUST NOT be greater than
+ valid-lifetime.";
+ }
+ default "604800";
+ description
+ "The value to be placed in the Preferred Lifetime
+ in the Prefix Information option. The designated
+ value of all 1's (0xffffffff) represents
+ infinity.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvPreferredLifetime.";
+ }
+ leaf autonomous-flag {
+ type boolean;
+ default "true";
+ description
+ "The value to be placed in the Autonomous Flag
+ field in the Prefix Information option.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvAutonomousFlag.";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/standard/ietf/RFC/ietf-ipv6-unicast-routing@2016-11-04.yang b/standard/ietf/RFC/ietf-ipv6-unicast-routing@2016-11-04.yang
new file mode 100644
index 000000000..f7e258ef1
--- /dev/null
+++ b/standard/ietf/RFC/ietf-ipv6-unicast-routing@2016-11-04.yang
@@ -0,0 +1,254 @@
+module ietf-ipv6-unicast-routing {
+
+ yang-version "1.1";
+
+ namespace "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing";
+
+ prefix "v6ur";
+
+ import ietf-routing {
+ prefix "rt";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+
+ include ietf-ipv6-router-advertisements {
+ revision-date 2016-11-04;
+ }
+
+ organization
+ "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+ contact
+ "WG Web:
+ WG List:
+
+ WG Chair: Lou Berger
+
+
+ WG Chair: Kent Watsen
+
+
+ Editor: Ladislav Lhotka
+
+
+ Editor: Acee Lindem
+ ";
+
+ description
+ "This YANG module augments the 'ietf-routing' module with basic
+ configuration and state data for IPv6 unicast routing.
+
+ Copyright (c) 2016 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject to
+ the license terms contained in, the Simplified BSD License set
+ forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+ NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
+ 'OPTIONAL' in the module text are to be interpreted as described
+ in RFC 2119.
+
+ This version of this YANG module is part of RFC 8022;
+ see the RFC itself for full legal notices.";
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ /* Identities */
+
+ identity ipv6-unicast {
+ base rt:ipv6;
+ description
+ "This identity represents the IPv6 unicast address family.";
+ }
+
+ /* State data */
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "This leaf augments an IPv6 unicast route.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "Augment 'simple-next-hop' case in IPv6 unicast routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/"
+ + "rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "This leaf augments the 'next-hop-list' case of IPv6 unicast
+ routes.";
+ leaf address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+
+ augment
+ "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/rt:input" {
+ when "derived-from-or-self(../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast RIBs.";
+ }
+ description
+ "This augment adds the input parameter of the 'active-route'
+ action.";
+ leaf destination-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 destination address.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "This augment adds the destination prefix to the reply of the
+ 'active-route' action.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "Augment 'simple-next-hop' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "Augment 'next-hop-list' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+
+ /* Configuration data */
+
+ augment "/rt:routing/rt:control-plane-protocols/"
+ + "rt:control-plane-protocol/rt:static-routes" {
+ description
+ "This augment defines the configuration of the 'static'
+ pseudo-protocol with data specific to IPv6 unicast.";
+ container ipv6 {
+ description
+ "Configuration of a 'static' pseudo-protocol instance
+ consists of a list of routes.";
+ list route {
+ key "destination-prefix";
+ description
+ "A list of static routes.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ mandatory "true";
+ description
+ "IPv6 destination prefix.";
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the route.";
+ }
+ container next-hop {
+ description
+ "Configuration of next-hop.";
+ uses rt:next-hop-content {
+ augment "next-hop-options/simple-next-hop" {
+ description
+ "Augment 'simple-next-hop' case in IPv6 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ augment "next-hop-options/next-hop-list/next-hop-list/"
+ + "next-hop" {
+ description
+ "Augment 'next-hop-list' case in IPv6 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/standard/ietf/RFC/ietf-l3vpn-svc.yang b/standard/ietf/RFC/ietf-l3vpn-svc.yang
new file mode 100644
index 000000000..1e86f485e
--- /dev/null
+++ b/standard/ietf/RFC/ietf-l3vpn-svc.yang
@@ -0,0 +1,2401 @@
+module ietf-l3vpn-svc {
+ namespace "urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc";
+
+ prefix l3vpn-svc;
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+
+ organization
+ "IETF L3SM Working Group";
+
+ contact
+ "WG List:
+
+ Editor:
+ L3SM WG
+
+ Chairs:
+ Adrian Farrel, Qin Wu
+ ";
+
+ description
+ "This YANG module defines a generic service configuration
+ model for Layer 3 VPNs. This model is common across all
+ vendor implementations.";
+
+ revision 2017-01-27 {
+ description
+ "Initial document.";
+ reference
+ "RFC 8049.";
+ }
+
+ /* Features */
+
+ feature cloud-access {
+ description
+ "Allows the VPN to connect to a CSP.";
+ }
+ feature multicast {
+ description
+ "Enables multicast capabilities in a VPN.";
+ }
+ feature ipv4 {
+ description
+ "Enables IPv4 support in a VPN.";
+ }
+ feature ipv6 {
+ description
+ "Enables IPv6 support in a VPN.";
+ }
+ feature carrierscarrier {
+ description
+ "Enables support of CsC.";
+ }
+ feature extranet-vpn {
+ description
+ "Enables support of extranet VPNs.";
+ }
+ feature site-diversity {
+ description
+ "Enables support of site diversity constraints.";
+ }
+ feature encryption {
+ description
+ "Enables support of encryption.";
+ }
+ feature qos {
+ description
+ "Enables support of classes of services.";
+ }
+ feature qos-custom {
+ description
+ "Enables support of the custom QoS profile.";
+ }
+ feature rtg-bgp {
+ description
+ "Enables support of the BGP routing protocol.";
+ }
+
+ feature rtg-rip {
+ description
+ "Enables support of the RIP routing protocol.";
+ }
+ feature rtg-ospf {
+ description
+ "Enables support of the OSPF routing protocol.";
+ }
+ feature rtg-ospf-sham-link {
+ description
+ "Enables support of OSPF sham links.";
+ }
+ feature rtg-vrrp {
+ description
+ "Enables support of the VRRP routing protocol.";
+ }
+ feature fast-reroute {
+ description
+ "Enables support of Fast Reroute.";
+ }
+ feature bfd {
+ description
+ "Enables support of BFD.";
+ }
+ feature always-on {
+ description
+ "Enables support of the 'always-on' access constraint.";
+ }
+ feature requested-type {
+ description
+ "Enables support of the 'requested-type' access constraint.";
+ }
+ feature bearer-reference {
+ description
+ "Enables support of the 'bearer-reference' access constraint.";
+ }
+
+ /* Typedefs */
+
+ typedef svc-id {
+ type string;
+ description
+ "Defines a type of service component identifier.";
+ }
+
+ typedef template-id {
+ type string;
+ description
+ "Defines a type of service template identifier.";
+ }
+
+ typedef address-family {
+ type enumeration {
+ enum ipv4 {
+ description
+ "IPv4 address family.";
+ }
+ enum ipv6 {
+ description
+ "IPv6 address family.";
+ }
+ }
+ description
+ "Defines a type for the address family.";
+ }
+
+ /* Identities */
+
+ identity site-network-access-type {
+ description
+ "Base identity for site-network-access type.";
+ }
+ identity point-to-point {
+ base site-network-access-type;
+ description
+ "Identity for point-to-point connection.";
+ }
+ identity multipoint {
+ base site-network-access-type;
+ description
+ "Identity for multipoint connection.
+ Example: Ethernet broadcast segment.";
+ }
+ identity placement-diversity {
+ description
+ "Base identity for site placement constraints.";
+ }
+ identity bearer-diverse {
+ base placement-diversity;
+ description
+ "Identity for bearer diversity.
+ The bearers should not use common elements.";
+ }
+ identity pe-diverse {
+ base placement-diversity;
+ description
+ "Identity for PE diversity.";
+ }
+ identity pop-diverse {
+ base placement-diversity;
+ description
+ "Identity for POP diversity.";
+ }
+ identity linecard-diverse {
+ base placement-diversity;
+ description
+ "Identity for linecard diversity.";
+ }
+ identity same-pe {
+ base placement-diversity;
+ description
+ "Identity for having sites connected on the same PE.";
+ }
+ identity same-bearer {
+ base placement-diversity;
+ description
+ "Identity for having sites connected using the same bearer.";
+ }
+ identity customer-application {
+ description
+ "Base identity for customer application.";
+ }
+ identity web {
+ base customer-application;
+ description
+ "Identity for Web application (e.g., HTTP, HTTPS).";
+ }
+ identity mail {
+ base customer-application;
+ description
+ "Identity for mail application.";
+ }
+ identity file-transfer {
+ base customer-application;
+ description
+ "Identity for file transfer application (e.g., FTP, SFTP).";
+ }
+
+ identity database {
+ base customer-application;
+ description
+ "Identity for database application.";
+ }
+ identity social {
+ base customer-application;
+ description
+ "Identity for social-network application.";
+ }
+ identity games {
+ base customer-application;
+ description
+ "Identity for gaming application.";
+ }
+ identity p2p {
+ base customer-application;
+ description
+ "Identity for peer-to-peer application.";
+ }
+ identity network-management {
+ base customer-application;
+ description
+ "Identity for management application
+ (e.g., Telnet, syslog, SNMP).";
+ }
+ identity voice {
+ base customer-application;
+ description
+ "Identity for voice application.";
+ }
+ identity video {
+ base customer-application;
+ description
+ "Identity for video conference application.";
+ }
+ identity site-vpn-flavor {
+ description
+ "Base identity for the site VPN service flavor.";
+ }
+ identity site-vpn-flavor-single {
+ base site-vpn-flavor;
+ description
+ "Base identity for the site VPN service flavor.
+ Used when the site belongs to only one VPN.";
+ }
+
+ identity site-vpn-flavor-multi {
+ base site-vpn-flavor;
+ description
+ "Base identity for the site VPN service flavor.
+ Used when a logical connection of a site
+ belongs to multiple VPNs.";
+ }
+ identity site-vpn-flavor-sub {
+ base site-vpn-flavor;
+ description
+ "Base identity for the site VPN service flavor.
+ Used when a site has multiple logical connections.
+ Each connection may belong to different multiple VPNs.";
+ }
+ identity site-vpn-flavor-nni {
+ base site-vpn-flavor;
+ description
+ "Base identity for the site VPN service flavor.
+ Used to describe an NNI option A connection.";
+ }
+ identity management {
+ description
+ "Base identity for site management scheme.";
+ }
+ identity co-managed {
+ base management;
+ description
+ "Base identity for co-managed site.";
+ }
+ identity customer-managed {
+ base management;
+ description
+ "Base identity for customer-managed site.";
+ }
+ identity provider-managed {
+ base management;
+ description
+ "Base identity for provider-managed site.";
+ }
+ identity address-allocation-type {
+ description
+ "Base identity for address-allocation-type for PE-CE link.";
+ }
+ identity provider-dhcp {
+ base address-allocation-type;
+ description
+ "Provider network provides DHCP service to customer.";
+ }
+ identity provider-dhcp-relay {
+ base address-allocation-type;
+ description
+ "Provider network provides DHCP relay service to customer.";
+ }
+ identity provider-dhcp-slaac {
+ base address-allocation-type;
+ description
+ "Provider network provides DHCP service to customer,
+ as well as SLAAC.";
+ }
+ identity static-address {
+ base address-allocation-type;
+ description
+ "Provider-to-customer addressing is static.";
+ }
+ identity slaac {
+ base address-allocation-type;
+ description
+ "Use IPv6 SLAAC.";
+ }
+
+ identity site-role {
+ description
+ "Base identity for site type.";
+ }
+ identity any-to-any-role {
+ base site-role;
+ description
+ "Site in an any-to-any IP VPN.";
+ }
+ identity spoke-role {
+ base site-role;
+ description
+ "Spoke site in a Hub-and-Spoke IP VPN.";
+ }
+ identity hub-role {
+ base site-role;
+ description
+ "Hub site in a Hub-and-Spoke IP VPN.";
+ }
+
+ identity vpn-topology {
+ description
+ "Base identity for VPN topology.";
+ }
+ identity any-to-any {
+ base vpn-topology;
+ description
+ "Identity for any-to-any VPN topology.";
+ }
+ identity hub-spoke {
+ base vpn-topology;
+ description
+ "Identity for Hub-and-Spoke VPN topology.";
+ }
+ identity hub-spoke-disjoint {
+ base vpn-topology;
+ description
+ "Identity for Hub-and-Spoke VPN topology
+ where Hubs cannot communicate with each other.";
+ }
+
+ identity multicast-tree-type {
+ description
+ "Base identity for multicast tree type.";
+ }
+ identity ssm-tree-type {
+ base multicast-tree-type;
+ description
+ "Identity for SSM tree type.";
+ }
+ identity asm-tree-type {
+ base multicast-tree-type;
+ description
+ "Identity for ASM tree type.";
+ }
+ identity bidir-tree-type {
+ base multicast-tree-type;
+ description
+ "Identity for bidirectional tree type.";
+ }
+
+ identity multicast-rp-discovery-type {
+ description
+ "Base identity for RP discovery type.";
+ }
+
+ identity auto-rp {
+ base multicast-rp-discovery-type;
+ description
+ "Base identity for Auto-RP discovery type.";
+ }
+ identity static-rp {
+ base multicast-rp-discovery-type;
+ description
+ "Base identity for static type.";
+ }
+ identity bsr-rp {
+ base multicast-rp-discovery-type;
+ description
+ "Base identity for BSR discovery type.";
+ }
+
+ identity routing-protocol-type {
+ description
+ "Base identity for routing protocol type.";
+ }
+ identity ospf {
+ base routing-protocol-type;
+ description
+ "Identity for OSPF protocol type.";
+ }
+ identity bgp {
+ base routing-protocol-type;
+ description
+ "Identity for BGP protocol type.";
+ }
+ identity static {
+ base routing-protocol-type;
+ description
+ "Identity for static routing protocol type.";
+ }
+ identity rip {
+ base routing-protocol-type;
+ description
+ "Identity for RIP protocol type.";
+ }
+ identity vrrp {
+ base routing-protocol-type;
+ description
+ "Identity for VRRP protocol type.
+ This is to be used when LANs are directly connected
+ to PE routers.";
+ }
+
+ identity direct {
+ base routing-protocol-type;
+ description
+ "Identity for direct protocol type.";
+ }
+
+ identity protocol-type {
+ description
+ "Base identity for protocol field type.";
+ }
+ identity tcp {
+ base protocol-type;
+ description
+ "TCP protocol type.";
+ }
+ identity udp {
+ base protocol-type;
+ description
+ "UDP protocol type.";
+ }
+ identity icmp {
+ base protocol-type;
+ description
+ "ICMP protocol type.";
+ }
+ identity icmp6 {
+ base protocol-type;
+ description
+ "ICMPv6 protocol type.";
+ }
+ identity gre {
+ base protocol-type;
+ description
+ "GRE protocol type.";
+ }
+ identity ipip {
+ base protocol-type;
+ description
+ "IP-in-IP protocol type.";
+ }
+ identity hop-by-hop {
+ base protocol-type;
+ description
+ "Hop-by-Hop IPv6 header type.";
+ }
+
+ identity routing {
+ base protocol-type;
+ description
+ "Routing IPv6 header type.";
+ }
+ identity esp {
+ base protocol-type;
+ description
+ "ESP header type.";
+ }
+ identity ah {
+ base protocol-type;
+ description
+ "AH header type.";
+ }
+
+ /* Groupings */
+
+ grouping vpn-service-cloud-access {
+ container cloud-accesses {
+ if-feature cloud-access;
+ list cloud-access {
+
+ key cloud-identifier;
+
+ leaf cloud-identifier {
+ type string;
+ description
+ "Identification of cloud service.
+ Local administration meaning.";
+ }
+ choice list-flavor {
+ case permit-any {
+ leaf permit-any {
+ type empty;
+ description
+ "Allows all sites.";
+ }
+ }
+ case deny-any-except {
+ leaf-list permit-site {
+ type leafref {
+ path "/l3vpn-svc/sites/site/site-id";
+ }
+ description
+ "Site ID to be authorized.";
+ }
+ }
+ case permit-any-except {
+ leaf-list deny-site {
+ type leafref {
+ path "/l3vpn-svc/sites/site/site-id";
+ }
+ description
+ "Site ID to be denied.";
+ }
+ }
+ description
+ "Choice for cloud access policy.";
+ }
+ container authorized-sites {
+ list authorized-site {
+ key site-id;
+
+ leaf site-id {
+ type leafref {
+ path "/l3vpn-svc/sites/site/site-id";
+ }
+ description
+ "Site ID.";
+ }
+ description
+ "List of authorized sites.";
+ }
+ description
+ "Configuration of authorized sites.";
+ }
+ container denied-sites {
+ list denied-site {
+ key site-id;
+
+ leaf site-id {
+ type leafref {
+ path "/l3vpn-svc/sites/site/site-id";
+ }
+ description
+ "Site ID.";
+ }
+ description
+ "List of denied sites.";
+ }
+ description
+ "Configuration of denied sites.";
+ }
+
+ container address-translation {
+ container nat44 {
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "Controls whether or not address translation is required.";
+ }
+ leaf nat44-customer-address {
+ type inet:ipv4-address;
+ must "../enabled = 'true'" {
+ description
+ "Applicable only if address translation is enabled.";
+ }
+ description
+ "Address to be used for translation.
+ This is to be used if the customer is
+ providing the address.";
+ }
+ description
+ "IPv4-to-IPv4 translation.";
+ }
+ description
+ "Container for NAT.";
+ }
+ description
+ "Cloud access configuration.";
+ }
+ description
+ "Container for cloud access configurations.";
+ }
+ description
+ "Grouping for VPN cloud definition.";
+ }
+
+ grouping multicast-rp-group-cfg {
+ choice group-format {
+ case startend {
+ leaf group-start {
+ type inet:ip-address;
+ description
+ "First group address.";
+ }
+ leaf group-end {
+ type inet:ip-address;
+ description
+ "Last group address.";
+ }
+ }
+ case singleaddress {
+ leaf group-address {
+ type inet:ip-address;
+ description
+ "Group address.";
+ }
+ }
+ description
+ "Choice for group format.";
+ }
+ description
+ "Definition of groups for RP-to-group mapping.";
+ }
+
+ grouping vpn-service-multicast {
+ container multicast {
+ if-feature multicast;
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "Enables multicast.";
+ }
+ container customer-tree-flavors {
+ leaf-list tree-flavor {
+ type identityref {
+ base multicast-tree-type;
+ }
+ description
+ "Type of tree to be used.";
+ }
+ description
+ "Type of trees used by customer.";
+ }
+ container rp {
+ container rp-group-mappings {
+ list rp-group-mapping {
+ key id;
+
+ leaf id {
+ type uint16;
+ description
+ "Unique identifier for the mapping.";
+ }
+ container provider-managed {
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "Set to true if the RP must be a provider-managed node.
+ Set to false if it is a customer-managed node.";
+ }
+ leaf rp-redundancy {
+ when "../enabled = 'true'" {
+ description
+ "Relevant when the RP is provider-managed.";
+ }
+ type boolean;
+ default false;
+ description
+ "If true, a redundancy mechanism for the RP is required.";
+ }
+ leaf optimal-traffic-delivery {
+ when "../enabled = 'true'" {
+ description
+ "Relevant when the RP is provider-managed.";
+ }
+ type boolean;
+ default false;
+ description
+ "If true, the SP must ensure that
+ traffic uses an optimal path.";
+ }
+ description
+ "Parameters for a provider-managed RP.";
+ }
+
+ leaf rp-address {
+ when "../provider-managed/enabled = 'false'" {
+ description
+ "Relevant when the RP is provider-managed.";
+ }
+ type inet:ip-address;
+ description
+ "Defines the address of the RP.
+ Used if the RP is customer-managed.";
+ }
+
+ container groups {
+ list group {
+ key id;
+
+ leaf id {
+ type uint16;
+ description
+ "Identifier for the group.";
+ }
+ uses multicast-rp-group-cfg;
+ description
+ "List of groups.";
+ }
+
+ description
+ "Multicast groups associated with the RP.";
+ }
+
+ description
+ "List of RP-to-group mappings.";
+ }
+ description
+ "RP-to-group mappings.";
+ }
+ container rp-discovery {
+ leaf rp-discovery-type {
+ type identityref {
+ base multicast-rp-discovery-type;
+ }
+ default static-rp;
+ description
+ "Type of RP discovery used.";
+ }
+
+ container bsr-candidates {
+ when "../rp-discovery-type = 'bsr-rp'" {
+ description
+ "Only applicable if discovery type is BSR-RP.";
+ }
+ leaf-list bsr-candidate-address {
+ type inet:ip-address;
+ description
+ "Address of BSR candidate.";
+ }
+ description
+ "Customer BSR candidate's address.";
+ }
+ description
+ "RP discovery parameters.";
+ }
+
+ description
+ "RP parameters.";
+ }
+ description
+ "Multicast global parameters for the VPN service.";
+ }
+ description
+ "Grouping for multicast VPN definition.";
+ }
+
+ grouping vpn-service-mpls {
+ leaf carrierscarrier {
+ if-feature carrierscarrier;
+ type boolean;
+ default false;
+ description
+ "The VPN is using CsC, and so MPLS is required.";
+ }
+ description
+ "Grouping for MPLS CsC definition.";
+ }
+
+ grouping customer-location-info {
+ container locations {
+ list location {
+ key location-id;
+
+ leaf location-id {
+ type svc-id;
+ description
+ "Identifier for a particular location.";
+ }
+ leaf address {
+ type string;
+ description
+ "Address (number and street) of the site.";
+ }
+ leaf postal-code {
+ type string;
+ description
+ "Postal code of the site.";
+ }
+ leaf state {
+ type string;
+ description
+ "State of the site. This leaf can also be used to describe
+ a region for a country that does not have states.";
+ }
+ leaf city {
+ type string;
+ description
+ "City of the site.";
+ }
+ leaf country-code {
+ type string {
+ pattern '[A-Z]{2}';
+ }
+ description
+ "Country of the site.
+ Expressed as ISO ALPHA-2 code.";
+ }
+ description
+ "Location of the site.";
+ }
+ description
+ "List of locations for the site.";
+ }
+ description
+ "This grouping defines customer location parameters.";
+ }
+ grouping site-group {
+ container groups {
+ list group {
+ key group-id;
+
+ leaf group-id {
+ type string;
+ description
+ "Group-id the site belongs to.";
+ }
+ description
+ "List of group-ids.";
+ }
+ description
+ "Groups the site or site-network-access belongs to.";
+ }
+ description
+ "Grouping definition to assign
+ group-ids to site or site-network-access.";
+ }
+ grouping site-diversity {
+ container site-diversity {
+ if-feature site-diversity;
+
+ uses site-group;
+
+ description
+ "Diversity constraint type.
+ All site-network-accesses will inherit the group values
+ defined here.";
+ }
+ description
+ "This grouping defines site diversity parameters.";
+ }
+ grouping access-diversity {
+ container access-diversity {
+ if-feature site-diversity;
+
+ uses site-group;
+
+ container constraints {
+ list constraint {
+ key constraint-type;
+
+ leaf constraint-type {
+ type identityref {
+ base placement-diversity;
+ }
+ description
+ "Diversity constraint type.";
+ }
+ container target {
+ choice target-flavor {
+ case id {
+ list group {
+ key group-id;
+
+ leaf group-id {
+ type string;
+ description
+ "The constraint will be applied against
+ this particular group-id.";
+ }
+ description
+ "List of groups.";
+ }
+ }
+ case all-accesses {
+ leaf all-other-accesses {
+ type empty;
+ description
+ "The constraint will be applied against
+ all other site network accesses of this site.";
+ }
+ }
+ case all-groups {
+ leaf all-other-groups {
+ type empty;
+ description
+ "The constraint will be applied against
+ all other groups managed by the customer.";
+ }
+ }
+ description
+ "Choice for the group definition.";
+ }
+
+ description
+ "The constraint will be applied against
+ this list of groups.";
+ }
+ description
+ "List of constraints.";
+ }
+ description
+ "Placement constraints for this site network access.";
+ }
+
+ description
+ "Diversity parameters.";
+ }
+ description
+ "This grouping defines access diversity parameters.";
+ }
+
+ grouping operational-requirements {
+ leaf requested-site-start {
+ type yang:date-and-time;
+ description
+ "Optional leaf indicating requested date and time when the
+ service at a particular site is expected to start.";
+ }
+
+ leaf requested-site-stop {
+ type yang:date-and-time;
+ description
+ "Optional leaf indicating requested date and time when the
+ service at a particular site is expected to stop.";
+ }
+ description
+ "This grouping defines some operational parameters.";
+ }
+
+ grouping operational-requirements-ops {
+ leaf actual-site-start {
+ type yang:date-and-time;
+ config false;
+ description
+ "Optional leaf indicating actual date and time when the
+ service at a particular site actually started.";
+ }
+ leaf actual-site-stop {
+ type yang:date-and-time;
+ config false;
+ description
+ "Optional leaf indicating actual date and time when the
+ service at a particular site actually stopped.";
+ }
+ description
+ "This grouping defines some operational parameters.";
+ }
+
+ grouping flow-definition {
+ container match-flow {
+ leaf dscp {
+ type inet:dscp;
+ description
+ "DSCP value.";
+ }
+ leaf dot1p {
+ type uint8 {
+ range "0..7";
+ }
+ description
+ "802.1p matching.";
+ }
+ leaf ipv4-src-prefix {
+ type inet:ipv4-prefix;
+ description
+ "Match on IPv4 src address.";
+ }
+ leaf ipv6-src-prefix {
+ type inet:ipv6-prefix;
+ description
+ "Match on IPv6 src address.";
+ }
+ leaf ipv4-dst-prefix {
+ type inet:ipv4-prefix;
+ description
+ "Match on IPv4 dst address.";
+ }
+ leaf ipv6-dst-prefix {
+ type inet:ipv6-prefix;
+ description
+ "Match on IPv6 dst address.";
+ }
+ leaf l4-src-port {
+ type inet:port-number;
+ description
+ "Match on Layer 4 src port.";
+ }
+ leaf-list target-sites {
+ type svc-id;
+ description
+ "Identify a site as traffic destination.";
+ }
+ container l4-src-port-range {
+ leaf lower-port {
+ type inet:port-number;
+ description
+ "Lower boundary for port.";
+ }
+ leaf upper-port {
+ type inet:port-number;
+ must ". >= ../lower-port" {
+ description
+ "Upper boundary must be higher than lower boundary.";
+ }
+ description
+ "Upper boundary for port.";
+ }
+ description
+ "Match on Layer 4 src port range.";
+ }
+ leaf l4-dst-port {
+ type inet:port-number;
+ description
+ "Match on Layer 4 dst port.";
+ }
+ container l4-dst-port-range {
+ leaf lower-port {
+ type inet:port-number;
+ description
+ "Lower boundary for port.";
+ }
+
+ leaf upper-port {
+ type inet:port-number;
+ must ". >= ../lower-port" {
+ description
+ "Upper boundary must be higher than lower boundary.";
+ }
+ description
+ "Upper boundary for port.";
+ }
+ description
+ "Match on Layer 4 dst port range.";
+ }
+ leaf protocol-field {
+ type union {
+ type uint8;
+ type identityref {
+ base protocol-type;
+ }
+ }
+ description
+ "Match on IPv4 protocol or IPv6 Next Header field.";
+ }
+
+ description
+ "Describes flow-matching criteria.";
+ }
+ description
+ "Flow definition based on criteria.";
+ }
+ grouping site-service-basic {
+ leaf svc-input-bandwidth {
+ type uint32;
+ units bps;
+ description
+ "From the PE's perspective, the service input
+ bandwidth of the connection.";
+ }
+ leaf svc-output-bandwidth {
+ type uint32;
+ units bps;
+ description
+ "From the PE's perspective, the service output
+ bandwidth of the connection.";
+ }
+
+ leaf svc-mtu {
+ type uint16;
+ units bytes;
+ description
+ "MTU at service level. If the service is IP,
+ it refers to the IP MTU.";
+ }
+ description
+ "Defines basic service parameters for a site.";
+ }
+ grouping site-protection {
+ container traffic-protection {
+ if-feature fast-reroute;
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "Enables traffic protection of access link.";
+ }
+ description
+ "Fast Reroute service parameters for the site.";
+ }
+ description
+ "Defines protection service parameters for a site.";
+ }
+ grouping site-service-mpls {
+ container carrierscarrier {
+ if-feature carrierscarrier;
+ leaf signalling-type {
+ type enumeration {
+ enum "ldp" {
+ description
+ "Use LDP as the signalling protocol
+ between the PE and the CE.";
+ }
+ enum "bgp" {
+ description
+ "Use BGP (as per RFC 3107) as the signalling protocol
+ between the PE and the CE.
+ In this case, BGP must also be configured as
+ the routing protocol.";
+ }
+ }
+ description
+ "MPLS signalling type.";
+ }
+
+ description
+ "This container is used when the customer provides
+ MPLS-based services. This is used in the case of CsC.";
+ }
+ description
+ "Defines MPLS service parameters for a site.";
+ }
+ grouping site-service-qos-profile {
+ container qos {
+ if-feature qos;
+ container qos-classification-policy {
+ list rule {
+ key id;
+ ordered-by user;
+
+ leaf id {
+ type uint16;
+ description
+ "ID of the rule.";
+ }
+
+ choice match-type {
+ case match-flow {
+ uses flow-definition;
+ }
+ case match-application {
+ leaf match-application {
+ type identityref {
+ base customer-application;
+ }
+ description
+ "Defines the application to match.";
+ }
+ }
+ description
+ "Choice for classification.";
+ }
+
+ leaf target-class-id {
+ type string;
+ description
+ "Identification of the class of service.
+ This identifier is internal to the administration.";
+ }
+
+ description
+ "List of marking rules.";
+ }
+ description
+ "Configuration of the traffic classification policy.";
+ }
+ container qos-profile {
+
+ choice qos-profile {
+ description
+ "Choice for QoS profile.
+ Can be standard profile or custom.";
+ case standard {
+ leaf profile {
+ type string;
+ description
+ "QoS profile to be used.";
+ }
+ }
+ case custom {
+ container classes {
+ if-feature qos-custom;
+ list class {
+ key class-id;
+
+ leaf class-id {
+ type string;
+ description
+ "Identification of the class of service.
+ This identifier is internal to the administration.";
+ }
+ leaf rate-limit {
+ type uint8;
+ units percent;
+ description
+ "To be used if the class must be rate-limited.
+ Expressed as percentage of the service bandwidth.";
+ }
+ container latency {
+ choice flavor {
+ case lowest {
+ leaf use-lowest-latency {
+ type empty;
+ description
+ "The traffic class should use the path with the
+ lowest latency.";
+ }
+ }
+
+ case boundary {
+ leaf latency-boundary {
+ type uint16;
+ units msec;
+ description
+ "The traffic class should use a path with a
+ defined maximum latency.";
+ }
+ }
+ description
+ "Latency constraint on the traffic class.";
+ }
+ description
+ "Latency constraint on the traffic class.";
+ }
+ container jitter {
+ choice flavor {
+ case lowest {
+ leaf use-lowest-jitter {
+ type empty;
+ description
+ "The traffic class should use the path with the
+ lowest jitter.";
+ }
+ }
+ case boundary {
+ leaf latency-boundary {
+ type uint32;
+ units usec;
+ description
+ "The traffic class should use a path with a
+ defined maximum jitter.";
+ }
+ }
+ description
+ "Jitter constraint on the traffic class.";
+ }
+ description
+ "Jitter constraint on the traffic class.";
+ }
+ container bandwidth {
+ leaf guaranteed-bw-percent {
+ type uint8;
+ units percent;
+ description
+ "To be used to define the guaranteed bandwidth
+ as a percentage of the available service bandwidth.";
+ }
+ leaf end-to-end {
+ type empty;
+ description
+ "Used if the bandwidth reservation
+ must be done on the MPLS network too.";
+ }
+ description
+ "Bandwidth constraint on the traffic class.";
+ }
+ description
+ "List of classes of services.";
+ }
+ description
+ "Container for list of classes of services.";
+ }
+
+ }
+
+ }
+ description
+ "QoS profile configuration.";
+ }
+ description
+ "QoS configuration.";
+ }
+ description
+ "This grouping defines QoS parameters for a site.";
+ }
+
+ grouping site-security-authentication {
+ container authentication {
+ description
+ "Authentication parameters.";
+ }
+ description
+ "This grouping defines authentication parameters for a site.";
+
+ }
+ grouping site-security-encryption {
+ container encryption {
+ if-feature encryption;
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "If true, access encryption is required.";
+ }
+
+ leaf layer {
+ type enumeration {
+ enum layer2 {
+ description
+ "Encryption will occur at Layer 2.";
+ }
+ enum layer3 {
+ description
+ "Encryption will occur at Layer 3.
+ For example, IPsec may be used.";
+ }
+ }
+ mandatory true;
+ description
+ "Layer on which encryption is applied.";
+ }
+ container encryption-profile {
+ choice profile {
+ case provider-profile {
+ leaf profile-name {
+ type string;
+ description
+ "Name of the SP profile to be applied.";
+ }
+ }
+ case customer-profile {
+ leaf algorithm {
+ type string;
+ description
+ "Encryption algorithm to be used.";
+ }
+ choice key-type {
+ case psk {
+ leaf preshared-key {
+ type string;
+ description
+ "Key coming from customer.";
+ }
+ }
+ case pki {
+
+ }
+ description
+ "Type of keys to be used.";
+ }
+ }
+
+ description
+ "Choice of profile.";
+ }
+ description
+ "Profile of encryption to be applied.";
+ }
+ description
+ "Encryption parameters.";
+ }
+ description
+ "This grouping defines encryption parameters for a site.";
+ }
+
+ grouping site-attachment-bearer {
+ container bearer {
+ container requested-type {
+ if-feature requested-type;
+ leaf requested-type {
+ type string;
+ description
+ "Type of requested bearer: Ethernet, DSL,
+ Wireless, etc. Operator specific.";
+ }
+ leaf strict {
+ type boolean;
+ default false;
+ description
+ "Defines whether requested-type is a preference
+ or a strict requirement.";
+ }
+ description
+ "Container for requested-type.";
+ }
+ leaf always-on {
+ if-feature always-on;
+ type boolean;
+ default true;
+ description
+ "Request for an always-on access type.
+ For example, this could mean no dial access type.";
+ }
+ leaf bearer-reference {
+ if-feature bearer-reference;
+ type string;
+ description
+ "This is an internal reference for the SP.";
+ }
+
+ description
+ "Bearer-specific parameters.
+ To be augmented.";
+ }
+ description
+ "Defines physical properties of a site attachment.";
+ }
+
+ grouping site-routing {
+ container routing-protocols {
+ list routing-protocol {
+ key type;
+
+ leaf type {
+ type identityref {
+ base routing-protocol-type;
+ }
+ description
+ "Type of routing protocol.";
+ }
+
+ container ospf {
+ when "../type = 'ospf'" {
+ description
+ "Only applies when protocol is OSPF.";
+ }
+ if-feature rtg-ospf;
+ leaf-list address-family {
+ type address-family;
+
+ description
+ "Address family to be activated.";
+ }
+ leaf area-address {
+ type yang:dotted-quad;
+ description
+ "Area address.";
+ }
+ leaf metric {
+ type uint16;
+ description
+ "Metric of the PE-CE link.";
+ }
+
+ container sham-links {
+ if-feature rtg-ospf-sham-link;
+ list sham-link {
+ key target-site;
+
+ leaf target-site {
+ type svc-id;
+ description
+ "Target site for the sham link connection.
+ The site is referred to by its ID.";
+ }
+ leaf metric {
+ type uint16;
+ description
+ "Metric of the sham link.";
+ }
+ description
+ "Creates a sham link with another site.";
+ }
+ description
+ "List of sham links.";
+ }
+ description
+ "OSPF-specific configuration.";
+ }
+
+ container bgp {
+
+ when "../type = 'bgp'" {
+ description
+ "Only applies when protocol is BGP.";
+ }
+ if-feature rtg-bgp;
+ leaf autonomous-system {
+ type uint32;
+ description
+ "AS number.";
+ }
+ leaf-list address-family {
+ type address-family;
+
+ description
+ "Address family to be activated.";
+ }
+ description
+ "BGP-specific configuration.";
+ }
+
+ container static {
+ when "../type = 'static'" {
+ description
+ "Only applies when protocol is static.";
+ }
+
+ container cascaded-lan-prefixes {
+ list ipv4-lan-prefixes {
+ if-feature ipv4;
+ key "lan next-hop";
+
+ leaf lan {
+ type inet:ipv4-prefix;
+ description
+ "LAN prefixes.";
+ }
+ leaf lan-tag {
+ type string;
+ description
+ "Internal tag to be used in VPN policies.";
+ }
+ leaf next-hop {
+ type inet:ipv4-address;
+ description
+ "Next-hop address to use on the customer side.";
+ }
+ description
+ "List of LAN prefixes for the site.";
+ }
+ list ipv6-lan-prefixes {
+ if-feature ipv6;
+ key "lan next-hop";
+
+ leaf lan {
+ type inet:ipv6-prefix;
+ description
+ "LAN prefixes.";
+ }
+ leaf lan-tag {
+ type string;
+ description
+ "Internal tag to be used in VPN policies.";
+ }
+ leaf next-hop {
+ type inet:ipv6-address;
+ description
+ "Next-hop address to use on the customer side.";
+ }
+ description
+ "List of LAN prefixes for the site.";
+ }
+ description
+ "LAN prefixes from the customer.";
+ }
+ description
+ "Configuration specific to static routing.";
+ }
+ container rip {
+
+ when "../type = 'rip'" {
+ description
+ "Only applies when protocol is RIP.";
+ }
+ if-feature rtg-rip;
+ leaf-list address-family {
+ type address-family;
+
+ description
+ "Address family to be activated.";
+ }
+
+ description
+ "Configuration specific to RIP routing.";
+ }
+
+ container vrrp {
+
+ when "../type = 'vrrp'" {
+ description
+ "Only applies when protocol is VRRP.";
+ }
+ if-feature rtg-vrrp;
+ leaf-list address-family {
+ type address-family;
+
+ description
+ "Address family to be activated.";
+ }
+ description
+ "Configuration specific to VRRP routing.";
+ }
+
+ description
+ "List of routing protocols used on
+ the site. This list can be augmented.";
+ }
+ description
+ "Defines routing protocols.";
+ }
+ description
+ "Grouping for routing protocols.";
+ }
+
+ grouping site-attachment-ip-connection {
+ container ip-connection {
+ container ipv4 {
+ if-feature ipv4;
+ leaf address-allocation-type {
+ type identityref {
+ base address-allocation-type;
+ }
+ default "static-address";
+ description
+ "Defines how addresses are allocated.";
+ }
+
+ leaf number-of-dynamic-address {
+ when "../address-allocation-type = 'provider-dhcp'" {
+ description
+ "Only applies when addresses are allocated by DHCP.";
+ }
+ type uint8;
+ default 1;
+ description
+ "Describes the number of IP addresses the customer requires.";
+ }
+ container dhcp-relay {
+ when "../address-allocation-type = 'provider-dhcp-relay'" {
+ description
+ "Only applies when provider is required to implement
+ DHCP relay function.";
+ }
+ container customer-dhcp-servers {
+ leaf-list server-ip-address {
+ type inet:ipv4-address;
+ description
+ "IP address of customer DHCP server.";
+ }
+ description
+ "Container for list of customer DHCP servers.";
+ }
+ description
+ "DHCP relay provided by operator.";
+ }
+ container addresses {
+ when "../address-allocation-type = 'static-address'" {
+ description
+ "Only applies when protocol allocation type is static.";
+ }
+ leaf provider-address {
+ type inet:ipv4-address;
+ description
+ "Address of provider side.";
+ }
+ leaf customer-address {
+ type inet:ipv4-address;
+ description
+ "Address of customer side.";
+ }
+ leaf mask {
+ type uint8 {
+ range "0..31";
+ }
+ description
+ "Subnet mask expressed in bits.";
+ }
+ description
+ "Describes IP addresses used.";
+ }
+
+ description
+ "IPv4-specific parameters.";
+
+ }
+ container ipv6 {
+ if-feature ipv6;
+ leaf address-allocation-type {
+ type identityref {
+ base address-allocation-type;
+ }
+ default "static-address";
+ description
+ "Defines how addresses are allocated.";
+ }
+ leaf number-of-dynamic-address {
+ when
+ "../address-allocation-type = 'provider-dhcp' "+
+ "or ../address-allocation-type "+
+ "= 'provider-dhcp-slaac'" {
+ description
+ "Only applies when addresses are allocated by DHCP.";
+ }
+ type uint8;
+ default 1;
+ description
+ "Describes the number of IP addresses the customer requires.";
+ }
+ container dhcp-relay {
+ when "../address-allocation-type = 'provider-dhcp-relay'" {
+ description
+ "Only applies when provider is required to implement
+ DHCP relay function.";
+ }
+ container customer-dhcp-servers {
+ leaf-list server-ip-address {
+ type inet:ipv6-address;
+ description
+ "IP address of customer DHCP server.";
+ }
+ description
+ "Container for list of customer DHCP servers.";
+ }
+ description
+ "DHCP relay provided by operator.";
+ }
+ container addresses {
+ when "../address-allocation-type = 'static-address'" {
+ description
+ "Only applies when protocol allocation type is static.";
+ }
+ leaf provider-address {
+ type inet:ipv6-address;
+ description
+ "Address of provider side.";
+ }
+ leaf customer-address {
+ type inet:ipv6-address;
+ description
+ "Address of customer side.";
+ }
+ leaf mask {
+ type uint8 {
+ range "0..127";
+ }
+ description
+ "Subnet mask expressed in bits.";
+ }
+ description
+ "Describes IP addresses used.";
+ }
+ description
+ "IPv6-specific parameters.";
+
+ }
+ container oam {
+ container bfd {
+ if-feature bfd;
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "BFD activation.";
+ }
+
+ choice holdtime {
+ case profile {
+ leaf profile-name {
+ type string;
+ description
+ "Well-known SP profile.";
+ }
+ description
+ "Well-known SP profile.";
+ }
+ case fixed {
+ leaf fixed-value {
+ type uint32;
+ units msec;
+ description
+ "Expected holdtime expressed in msec.";
+ }
+ }
+ description
+ "Choice for holdtime flavor.";
+ }
+ description
+ "Container for BFD.";
+ }
+ description
+ "Defines the OAM mechanisms used on the connection.";
+ }
+ description
+ "Defines connection parameters.";
+ }
+ description
+ "This grouping defines IP connection parameters.";
+ }
+
+ grouping site-service-multicast {
+ container multicast {
+ if-feature multicast;
+ leaf multicast-site-type {
+ type enumeration {
+ enum receiver-only {
+ description
+ "The site only has receivers.";
+ }
+ enum source-only {
+ description
+ "The site only has sources.";
+ }
+ enum source-receiver {
+ description
+ "The site has both sources and receivers.";
+ }
+ }
+ default "source-receiver";
+ description
+ "Type of multicast site.";
+ }
+ container multicast-address-family {
+ leaf ipv4 {
+ if-feature ipv4;
+ type boolean;
+ default true;
+ description
+ "Enables IPv4 multicast.";
+ }
+ leaf ipv6 {
+ if-feature ipv6;
+ type boolean;
+ default false;
+ description
+ "Enables IPv6 multicast.";
+ }
+ description
+ "Defines protocol to carry multicast.";
+ }
+ leaf protocol-type {
+ type enumeration {
+ enum host {
+ description
+ "Hosts are directly connected to the provider network.
+ Host protocols such as IGMP or MLD are required.";
+ }
+
+ enum router {
+ description
+ "Hosts are behind a customer router.
+ PIM will be implemented.";
+ }
+ enum both {
+ description
+ "Some hosts are behind a customer router, and some others
+ are directly connected to the provider network.
+ Both host and routing protocols must be used.
+ Typically, IGMP and PIM will be implemented.";
+ }
+ }
+ default "both";
+ description
+ "Multicast protocol type to be used with the customer site.";
+ }
+
+ description
+ "Multicast parameters for the site.";
+ }
+ description
+ "Multicast parameters for the site.";
+ }
+
+ grouping site-management {
+ container management {
+ leaf type {
+ type identityref {
+ base management;
+ }
+ description
+ "Management type of the connection.";
+ }
+ description
+ "Management configuration.";
+ }
+ description
+ "Management parameters for the site.";
+ }
+
+ grouping site-devices {
+ container devices {
+ must "/l3vpn-svc/sites/site/management/type = "+
+ "'provider-managed' or "+
+ "/l3vpn-svc/sites/site/management/type = "+
+ "'co-managed'" {
+ description
+ "Applicable only for provider-managed or co-managed device.";
+ }
+ list device {
+ key device-id;
+
+ leaf device-id {
+ type svc-id;
+ description
+ "Identifier for the device.";
+ }
+ leaf location {
+ type leafref {
+ path "/l3vpn-svc/sites/site/locations/"+
+ "location/location-id";
+ }
+ description
+ "Location of the device.";
+ }
+ container management {
+ must "/l3vpn-svc/sites/site/management/type"+
+ "= 'co-managed'" {
+ description
+ "Applicable only for co-managed device.";
+ }
+ leaf address-family {
+ type address-family;
+
+ description
+ "Address family used for management.";
+ }
+ leaf address {
+ type inet:ip-address;
+ description
+ "Management address.";
+ }
+ description
+ "Management configuration. Applicable only for
+ co-managed device.";
+ }
+
+ description
+ "Device configuration.";
+ }
+ description
+ "List of devices requested by customer.";
+ }
+ description
+ "Grouping for device allocation.";
+ }
+ grouping site-vpn-flavor {
+ leaf site-vpn-flavor {
+ type identityref {
+ base site-vpn-flavor;
+ }
+ default site-vpn-flavor-single;
+ description
+ "Defines whether the site is, for example,
+ a single VPN site or a multiVPN.";
+ }
+ description
+ "Grouping for site VPN flavor.";
+ }
+
+ grouping site-vpn-policy {
+ container vpn-policies {
+ list vpn-policy {
+ key vpn-policy-id;
+
+ leaf vpn-policy-id {
+ type svc-id;
+ description
+ "Unique identifier for the VPN policy.";
+ }
+
+ list entries {
+ key id;
+
+ leaf id {
+ type svc-id;
+ description
+ "Unique identifier for the policy entry.";
+ }
+
+ container filter {
+ choice lan {
+ case prefixes {
+ leaf-list ipv4-lan-prefix {
+ if-feature ipv4;
+ type inet:ipv4-prefix;
+ description
+ "List of IPv4 prefixes to be matched.";
+ }
+ leaf-list ipv6-lan-prefix {
+ if-feature ipv6;
+ type inet:ipv6-prefix;
+ description
+ "List of IPv6 prefixes to be matched.";
+ }
+ }
+ case lan-tag {
+ leaf-list lan-tag {
+ type string;
+ description
+ "List of 'lan-tag' items to be matched.";
+ }
+ }
+ description
+ "Choice of ways to do LAN matching.";
+ }
+ description
+ "If used, it permits the splitting of
+ site LANs among multiple VPNs.
+ If no filter is used, all the LANs will be
+ part of the same VPNs with the same role.";
+ }
+ container vpn {
+ leaf vpn-id {
+ type leafref {
+ path "/l3vpn-svc/vpn-services/"+
+ "vpn-service/vpn-id";
+ }
+ mandatory true;
+ description
+ "Reference to an IP VPN.";
+ }
+
+ leaf site-role {
+ type identityref {
+ base site-role;
+ }
+ default any-to-any-role;
+ description
+ "Role of the site in the IP VPN.";
+ }
+ description
+ "List of VPNs the LAN is associated with.";
+ }
+ description
+ "List of entries for export policy.";
+ }
+ description
+ "List of VPN policies.";
+ }
+ description
+ "VPN policy.";
+ }
+ description
+ "VPN policy parameters for the site.";
+ }
+
+ grouping site-maximum-routes {
+ container maximum-routes {
+ list address-family {
+ key af;
+
+ leaf af {
+ type address-family;
+
+ description
+ "Address family.";
+ }
+ leaf maximum-routes {
+ type uint32;
+ description
+ "Maximum prefixes the VRF can accept for this address family.";
+ }
+ description
+ "List of address families.";
+ }
+
+ description
+ "Defines 'maximum-routes' for the VRF.";
+ }
+
+ description
+ "Defines 'maximum-routes' for the site.";
+ }
+
+ grouping site-security {
+ container security {
+ uses site-security-authentication;
+ uses site-security-encryption;
+
+ description
+ "Site-specific security parameters.";
+ }
+ description
+ "Grouping for security parameters.";
+ }
+
+ grouping site-service {
+ container service {
+ uses site-service-qos-profile;
+ uses site-service-mpls;
+ uses site-service-multicast;
+
+ description
+ "Service parameters on the attachment.";
+ }
+ description
+ "Grouping for service parameters.";
+ }
+
+ grouping site-network-access-service {
+ container service {
+ uses site-service-basic;
+ uses site-service-qos-profile;
+ uses site-service-mpls;
+ uses site-service-multicast;
+
+ description
+ "Service parameters on the attachment.";
+ }
+ description
+ "Grouping for service parameters.";
+ }
+
+ grouping vpn-extranet {
+ container extranet-vpns {
+ if-feature extranet-vpn;
+ list extranet-vpn {
+ key vpn-id;
+
+ leaf vpn-id {
+ type svc-id;
+ description
+ "Identifies the target VPN.";
+ }
+ leaf local-sites-role {
+ type identityref {
+ base site-role;
+
+ }
+ default any-to-any-role;
+ description
+ "This describes the role of the
+ local sites in the target VPN topology.";
+ }
+ description
+ "List of extranet VPNs the local VPN is attached to.";
+ }
+ description
+ "Container for extranet VPN configuration.";
+ }
+ description
+ "Grouping for extranet VPN configuration.
+ This provides an easy way to interconnect
+ all sites from two VPNs.";
+ }
+
+ grouping site-attachment-availability {
+ container availability {
+ leaf access-priority {
+ type uint32;
+ default 1;
+ description
+ "Defines the priority for the access.
+ The higher the access-priority value,
+ the higher the preference of the access will be.";
+ }
+ description
+ "Availability parameters (used for multihoming).";
+ }
+
+ description
+ "Defines availability parameters for a site.";
+ }
+
+ grouping access-vpn-policy {
+ container vpn-attachment {
+
+ choice attachment-flavor {
+ case vpn-policy-id {
+ leaf vpn-policy-id {
+ type leafref {
+ path "/l3vpn-svc/sites/site/"+
+ "vpn-policies/vpn-policy/"+
+ "vpn-policy-id";
+ }
+ description
+ "Reference to a VPN policy.";
+ }
+ }
+ case vpn-id {
+ leaf vpn-id {
+ type leafref {
+ path "/l3vpn-svc/vpn-services"+
+ "/vpn-service/vpn-id";
+ }
+ description
+ "Reference to a VPN.";
+ }
+ leaf site-role {
+ type identityref {
+ base site-role;
+ }
+ default any-to-any-role;
+ description
+ "Role of the site in the IP VPN.";
+ }
+ }
+ mandatory true;
+ description
+ "Choice for VPN attachment flavor.";
+ }
+ description
+ "Defines VPN attachment of a site.";
+ }
+ description
+ "Defines the VPN attachment rules for a site's logical access.";
+ }
+
+ grouping vpn-svc-cfg {
+ leaf vpn-id {
+ type svc-id;
+ description
+ "VPN identifier. Local administration meaning.";
+ }
+ leaf customer-name {
+ type string;
+ description
+ "Name of the customer.";
+ }
+ leaf vpn-service-topology {
+ type identityref {
+ base vpn-topology;
+ }
+ default "any-to-any";
+ description
+ "VPN service topology.";
+ }
+
+ uses vpn-service-cloud-access;
+ uses vpn-service-multicast;
+ uses vpn-service-mpls;
+ uses vpn-extranet;
+
+ description
+ "Grouping for VPN service configuration.";
+ }
+
+ grouping site-top-level-cfg {
+ uses operational-requirements;
+ uses customer-location-info;
+ uses site-devices;
+ uses site-diversity;
+ uses site-management;
+ uses site-vpn-policy;
+ uses site-vpn-flavor;
+ uses site-maximum-routes;
+ uses site-security;
+ uses site-service;
+ uses site-protection;
+ uses site-routing;
+
+ description
+ "Grouping for site top-level configuration.";
+ }
+
+ grouping site-network-access-top-level-cfg {
+ leaf site-network-access-type {
+ type identityref {
+ base site-network-access-type;
+ }
+ default "point-to-point";
+ description
+ "Describes the type of connection, e.g.,
+ point-to-point or multipoint.";
+ }
+
+ choice location-flavor {
+ case location {
+ when "/l3vpn-svc/sites/site/management/type = "+
+ "'customer-managed'" {
+ description
+ "Applicable only for customer-managed device.";
+ }
+ leaf location-reference {
+ type leafref {
+ path "/l3vpn-svc/sites/site/locations/"+
+ "location/location-id";
+ }
+ description
+ "Location of the site-network-access.";
+ }
+ }
+ case device {
+ when "/l3vpn-svc/sites/site/management/type = "+
+ "'provider-managed' or "+
+ "/l3vpn-svc/sites/site/management/type = "+
+ "'co-managed'" {
+ description
+ "Applicable only for provider-managed or co-managed device.";
+ }
+ leaf device-reference {
+ type leafref {
+ path "/l3vpn-svc/sites/site/devices/"+
+ "device/device-id";
+ }
+ description
+ "Identifier of CE to use.";
+ }
+ }
+ mandatory true;
+ description
+ "Choice of how to describe the site's location.";
+ }
+ uses access-diversity;
+ uses site-attachment-bearer;
+ uses site-attachment-ip-connection;
+ uses site-security;
+ uses site-network-access-service;
+ uses site-routing;
+ uses site-attachment-availability;
+ uses access-vpn-policy;
+
+ description
+ "Grouping for site network access top-level configuration.";
+ }
+
+ /* Main blocks */
+
+ container l3vpn-svc {
+ container vpn-services {
+ list vpn-service {
+ key vpn-id;
+
+ uses vpn-svc-cfg;
+
+ description
+ "List of VPN services.";
+ }
+ description
+ "Top-level container for the VPN services.";
+ }
+
+ container sites {
+ list site {
+ key site-id;
+
+ leaf site-id {
+ type svc-id;
+ description
+ "Identifier of the site.";
+ }
+
+ uses site-top-level-cfg;
+ uses operational-requirements-ops;
+
+ container site-network-accesses {
+ list site-network-access {
+ key site-network-access-id;
+
+ leaf site-network-access-id {
+ type svc-id;
+ description
+ "Identifier for the access.";
+ }
+ uses site-network-access-top-level-cfg;
+
+ description
+ "List of accesses for a site.";
+ }
+ description
+ "List of accesses for a site.";
+ }
+
+ description
+ "List of sites.";
+ }
+ description
+ "Container for sites.";
+ }
+
+ description
+ "Main container for L3VPN service configuration.";
+ }
+
+}
diff --git a/standard/ietf/RFC/ietf-routing@2016-11-04.yang b/standard/ietf/RFC/ietf-routing@2016-11-04.yang
new file mode 100644
index 000000000..c7f061e65
--- /dev/null
+++ b/standard/ietf/RFC/ietf-routing@2016-11-04.yang
@@ -0,0 +1,576 @@
+module ietf-routing {
+
+ yang-version "1.1";
+
+ namespace "urn:ietf:params:xml:ns:yang:ietf-routing";
+
+ prefix "rt";
+
+ import ietf-yang-types {
+ prefix "yang";
+ }
+
+ import ietf-interfaces {
+ prefix "if";
+ }
+
+ organization
+ "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+ contact
+ "WG Web:
+ WG List:
+
+ WG Chair: Lou Berger
+
+
+ WG Chair: Kent Watsen
+
+
+ Editor: Ladislav Lhotka
+
+
+ Editor: Acee Lindem
+ ";
+
+ description
+ "This YANG module defines essential components for the management
+ of a routing subsystem.
+
+ Copyright (c) 2016 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject to
+ the license terms contained in, the Simplified BSD License set
+ forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+ NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
+ 'OPTIONAL' in the module text are to be interpreted as described
+ in RFC 2119.
+
+ This version of this YANG module is part of RFC 8022;
+ see the RFC itself for full legal notices.";
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ /* Features */
+
+ feature multiple-ribs {
+ description
+ "This feature indicates that the server supports user-defined
+ RIBs.
+
+ Servers that do not advertise this feature SHOULD provide
+ exactly one system-controlled RIB per supported address family
+ and make it also the default RIB. This RIB then appears as an
+ entry of the list /routing-state/ribs/rib.";
+ }
+
+ feature router-id {
+ description
+ "This feature indicates that the server supports configuration
+ of an explicit 32-bit router ID that is used by some routing
+ protocols.
+
+ Servers that do not advertise this feature set a router ID
+ algorithmically, usually to one of the configured IPv4
+ addresses. However, this algorithm is implementation
+ specific.";
+ }
+
+ /* Identities */
+
+ identity address-family {
+ description
+ "Base identity from which identities describing address
+ families are derived.";
+ }
+
+ identity ipv4 {
+ base address-family;
+ description
+ "This identity represents IPv4 address family.";
+ }
+
+ identity ipv6 {
+ base address-family;
+ description
+ "This identity represents IPv6 address family.";
+ }
+
+ identity control-plane-protocol {
+ description
+ "Base identity from which control-plane protocol identities are
+ derived.";
+ }
+
+ identity routing-protocol {
+ base control-plane-protocol;
+ description
+ "Identity from which Layer 3 routing protocol identities are
+ derived.";
+ }
+
+ identity direct {
+ base routing-protocol;
+ description
+ "Routing pseudo-protocol that provides routes to directly
+ connected networks.";
+ }
+
+ identity static {
+ base routing-protocol;
+ description
+ "Static routing pseudo-protocol.";
+ }
+
+ /* Type Definitions */
+
+ typedef route-preference {
+ type uint32;
+ description
+ "This type is used for route preferences.";
+ }
+
+ /* Groupings */
+
+ grouping address-family {
+ description
+ "This grouping provides a leaf identifying an address
+ family.";
+ leaf address-family {
+ type identityref {
+ base address-family;
+ }
+ mandatory "true";
+ description
+ "Address family.";
+ }
+ }
+
+ grouping router-id {
+ description
+ "This grouping provides router ID.";
+ leaf router-id {
+ type yang:dotted-quad;
+ description
+ "A 32-bit number in the form of a dotted quad that is used by
+ some routing protocols identifying a router.";
+ reference
+ "RFC 2328: OSPF Version 2.";
+ }
+ }
+
+ grouping special-next-hop {
+ description
+ "This grouping provides a leaf with an enumeration of special
+ next hops.";
+ leaf special-next-hop {
+ type enumeration {
+ enum blackhole {
+ description
+ "Silently discard the packet.";
+ }
+ enum unreachable {
+ description
+ "Discard the packet and notify the sender with an error
+ message indicating that the destination host is
+ unreachable.";
+ }
+ enum prohibit {
+ description
+ "Discard the packet and notify the sender with an error
+ message indicating that the communication is
+ administratively prohibited.";
+ }
+ enum receive {
+ description
+ "The packet will be received by the local system.";
+ }
+ }
+ description
+ "Options for special next hops.";
+ }
+ }
+
+ grouping next-hop-content {
+ description
+ "Generic parameters of next hops in static routes.";
+ choice next-hop-options {
+ mandatory "true";
+ description
+ "Options for next hops in static routes.
+
+ It is expected that further cases will be added through
+ augments from other modules.";
+ case simple-next-hop {
+ description
+ "This case represents a simple next hop consisting of the
+ next-hop address and/or outgoing interface.
+
+ Modules for address families MUST augment this case with a
+ leaf containing a next-hop address of that address
+ family.";
+ leaf outgoing-interface {
+ type if:interface-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ case special-next-hop {
+ uses special-next-hop;
+ }
+ case next-hop-list {
+ container next-hop-list {
+ description
+ "Container for multiple next-hops.";
+ list next-hop {
+ key "index";
+ description
+ "An entry of a next-hop list.
+
+ Modules for address families MUST augment this list
+ with a leaf containing a next-hop address of that
+ address family.";
+ leaf index {
+ type string;
+ description
+ "A user-specified identifier utilized to uniquely
+ reference the next-hop entry in the next-hop list.
+ The value of this index has no semantic meaning
+ other than for referencing the entry.";
+ }
+ leaf outgoing-interface {
+ type if:interface-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping next-hop-state-content {
+ description
+ "Generic parameters of next hops in state data.";
+ choice next-hop-options {
+ mandatory "true";
+ description
+ "Options for next hops in state data.
+
+ It is expected that further cases will be added through
+ augments from other modules, e.g., for recursive
+ next hops.";
+ case simple-next-hop {
+ description
+ "This case represents a simple next hop consisting of the
+ next-hop address and/or outgoing interface.
+
+ Modules for address families MUST augment this case with a
+ leaf containing a next-hop address of that address
+ family.";
+ leaf outgoing-interface {
+ type if:interface-state-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ case special-next-hop {
+ uses special-next-hop;
+ }
+ case next-hop-list {
+ container next-hop-list {
+ description
+ "Container for multiple next hops.";
+ list next-hop {
+ description
+ "An entry of a next-hop list.
+
+ Modules for address families MUST augment this list
+ with a leaf containing a next-hop address of that
+ address family.";
+ leaf outgoing-interface {
+ type if:interface-state-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping route-metadata {
+ description
+ "Common route metadata.";
+ leaf source-protocol {
+ type identityref {
+ base routing-protocol;
+ }
+ mandatory "true";
+ description
+ "Type of the routing protocol from which the route
+ originated.";
+ }
+ leaf active {
+ type empty;
+ description
+ "Presence of this leaf indicates that the route is preferred
+ among all routes in the same RIB that have the same
+ destination prefix.";
+ }
+ leaf last-updated {
+ type yang:date-and-time;
+ description
+ "Time stamp of the last modification of the route. If the
+ route was never modified, it is the time when the route was
+ inserted into the RIB.";
+ }
+ }
+
+ /* State data */
+
+ container routing-state {
+ config "false";
+ description
+ "State data of the routing subsystem.";
+ uses router-id {
+ description
+ "Global router ID.
+
+ It may be either configured or assigned algorithmically by
+ the implementation.";
+ }
+ container interfaces {
+ description
+ "Network-layer interfaces used for routing.";
+ leaf-list interface {
+ type if:interface-state-ref;
+ description
+ "Each entry is a reference to the name of a configured
+ network-layer interface.";
+ }
+ }
+ container control-plane-protocols {
+ description
+ "Container for the list of routing protocol instances.";
+ list control-plane-protocol {
+ key "type name";
+ description
+ "State data of a control-plane protocol instance.
+
+ An implementation MUST provide exactly one
+ system-controlled instance of the 'direct'
+ pseudo-protocol. Instances of other control-plane
+ protocols MAY be created by configuration.";
+ leaf type {
+ type identityref {
+ base control-plane-protocol;
+ }
+ description
+ "Type of the control-plane protocol.";
+ }
+ leaf name {
+ type string;
+ description
+ "The name of the control-plane protocol instance.
+
+ For system-controlled instances this name is persistent,
+ i.e., it SHOULD NOT change across reboots.";
+ }
+ }
+ }
+ container ribs {
+ description
+ "Container for RIBs.";
+ list rib {
+ key "name";
+ min-elements "1";
+ description
+ "Each entry represents a RIB identified by the 'name' key.
+ All routes in a RIB MUST belong to the same address
+ family.
+
+ An implementation SHOULD provide one system-controlled
+ default RIB for each supported address family.";
+ leaf name {
+ type string;
+ description
+ "The name of the RIB.";
+ }
+ uses address-family;
+ leaf default-rib {
+ if-feature "multiple-ribs";
+ type boolean;
+ default "true";
+ description
+ "This flag has the value of 'true' if and only if the RIB
+ is the default RIB for the given address family.
+
+ By default, control-plane protocols place their routes
+ in the default RIBs.";
+ }
+ container routes {
+ description
+ "Current content of the RIB.";
+ list route {
+ description
+ "A RIB route entry. This data node MUST be augmented
+ with information specific for routes of each address
+ family.";
+ leaf route-preference {
+ type route-preference;
+ description
+ "This route attribute, also known as administrative
+ distance, allows for selecting the preferred route
+ among routes with the same destination prefix. A
+ smaller value means a more preferred route.";
+ }
+ container next-hop {
+ description
+ "Route's next-hop attribute.";
+ uses next-hop-state-content;
+ }
+ uses route-metadata;
+ }
+ }
+ action active-route {
+ description
+ "Return the active RIB route that is used for the
+ destination address.
+
+ Address-family-specific modules MUST augment input
+ parameters with a leaf named 'destination-address'.";
+ output {
+ container route {
+ description
+ "The active RIB route for the specified destination.
+
+ If no route exists in the RIB for the destination
+ address, no output is returned.
+
+ Address-family-specific modules MUST augment this
+ container with appropriate route contents.";
+ container next-hop {
+ description
+ "Route's next-hop attribute.";
+ uses next-hop-state-content;
+ }
+ uses route-metadata;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* Configuration Data */
+
+ container routing {
+ description
+ "Configuration parameters for the routing subsystem.";
+ uses router-id {
+ if-feature "router-id";
+ description
+ "Configuration of the global router ID. Routing protocols
+ that use router ID can use this parameter or override it
+ with another value.";
+ }
+ container control-plane-protocols {
+ description
+ "Configuration of control-plane protocol instances.";
+ list control-plane-protocol {
+ key "type name";
+ description
+ "Each entry contains configuration of a control-plane
+ protocol instance.";
+ leaf type {
+ type identityref {
+ base control-plane-protocol;
+ }
+ description
+ "Type of the control-plane protocol - an identity derived
+ from the 'control-plane-protocol' base identity.";
+ }
+ leaf name {
+ type string;
+ description
+ "An arbitrary name of the control-plane protocol
+ instance.";
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the control-plane protocol
+ instance.";
+ }
+ container static-routes {
+ when "derived-from-or-self(../type, 'rt:static')" {
+ description
+ "This container is only valid for the 'static' routing
+ protocol.";
+ }
+ description
+ "Configuration of the 'static' pseudo-protocol.
+
+ Address-family-specific modules augment this node with
+ their lists of routes.";
+ }
+ }
+ }
+ container ribs {
+ description
+ "Configuration of RIBs.";
+ list rib {
+ key "name";
+ description
+ "Each entry contains configuration for a RIB identified by
+ the 'name' key.
+
+ Entries having the same key as a system-controlled entry
+ of the list /routing-state/ribs/rib are used for
+ configuring parameters of that entry. Other entries
+ define additional user-controlled RIBs.";
+ leaf name {
+ type string;
+ description
+ "The name of the RIB.
+
+ For system-controlled entries, the value of this leaf
+ must be the same as the name of the corresponding entry
+ in state data.
+
+ For user-controlled entries, an arbitrary name can be
+ used.";
+ }
+ uses address-family {
+ description
+ "Address family of the RIB.
+
+ It is mandatory for user-controlled RIBs. For
+ system-controlled RIBs it can be omitted; otherwise, it
+ must match the address family of the corresponding state
+ entry.";
+ refine "address-family" {
+ mandatory "false";
+ }
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the RIB.";
+ }
+ }
+ }
+ }
+}
diff --git a/standard/ietf/RFC/ietf-yang-patch.yang b/standard/ietf/RFC/ietf-yang-patch.yang
new file mode 100644
index 000000000..d0029ed21
--- /dev/null
+++ b/standard/ietf/RFC/ietf-yang-patch.yang
@@ -0,0 +1,390 @@
+module ietf-yang-patch {
+ yang-version 1.1;
+ namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch";
+ prefix "ypatch";
+
+ import ietf-restconf { prefix rc; }
+
+ organization
+ "IETF NETCONF (Network Configuration) Working Group";
+
+ contact
+ "WG Web:
+ WG List:
+
+ Author: Andy Bierman
+
+
+ Author: Martin Bjorklund
+
+
+ Author: Kent Watsen
+ ";
+
+ description
+ "This module contains conceptual YANG specifications
+ for the YANG Patch and YANG Patch Status data structures.
+
+ Note that the YANG definitions within this module do not
+ represent configuration data of any kind.
+ The YANG grouping statements provide a normative syntax
+ for XML and JSON message-encoding purposes.
+
+ Copyright (c) 2017 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject
+ to the license terms contained in, the Simplified BSD License
+ set forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ This version of this YANG module is part of RFC 8072; see
+ the RFC itself for full legal notices.";
+
+ revision 2017-02-22 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8072: YANG Patch Media Type.";
+ }
+
+ typedef target-resource-offset {
+ type string;
+ description
+ "Contains a data resource identifier string representing
+ a sub-resource within the target resource.
+ The document root for this expression is the
+ target resource that is specified in the
+ protocol operation (e.g., the URI for the PATCH request).
+
+ This string is encoded according to the same rules as those
+ for a data resource identifier in a RESTCONF request URI.";
+ reference
+ "RFC 8040, Section 3.5.3.";
+ }
+
+ rc:yang-data "yang-patch" {
+ uses yang-patch;
+ }
+
+ rc:yang-data "yang-patch-status" {
+ uses yang-patch-status;
+ }
+
+ grouping yang-patch {
+
+ description
+ "A grouping that contains a YANG container representing the
+ syntax and semantics of a YANG Patch edit request message.";
+
+ container yang-patch {
+ description
+ "Represents a conceptual sequence of datastore edits,
+ called a patch. Each patch is given a client-assigned
+ patch identifier. Each edit MUST be applied
+ in ascending order, and all edits MUST be applied.
+ If any errors occur, then the target datastore MUST NOT
+ be changed by the YANG Patch operation.
+
+ It is possible for a datastore constraint violation to occur
+ due to any node in the datastore, including nodes not
+ included in the 'edit' list. Any validation errors MUST
+ be reported in the reply message.";
+
+ reference
+ "RFC 7950, Section 8.3.";
+
+ leaf patch-id {
+ type string;
+ mandatory true;
+ description
+ "An arbitrary string provided by the client to identify
+ the entire patch. Error messages returned by the server
+ that pertain to this patch will be identified by this
+ 'patch-id' value. A client SHOULD attempt to generate
+ unique 'patch-id' values to distinguish between
+ transactions from multiple clients in any audit logs
+ maintained by the server.";
+ }
+
+ leaf comment {
+ type string;
+ description
+ "An arbitrary string provided by the client to describe
+ the entire patch. This value SHOULD be present in any
+ audit logging records generated by the server for the
+ patch.";
+ }
+
+ list edit {
+ key edit-id;
+ ordered-by user;
+
+ description
+ "Represents one edit within the YANG Patch request message.
+ The 'edit' list is applied in the following manner:
+
+ - The first edit is conceptually applied to a copy
+ of the existing target datastore, e.g., the
+ running configuration datastore.
+ - Each ascending edit is conceptually applied to
+ the result of the previous edit(s).
+ - After all edits have been successfully processed,
+ the result is validated according to YANG constraints.
+ - If successful, the server will attempt to apply
+ the result to the target datastore.";
+
+ leaf edit-id {
+ type string;
+ description
+ "Arbitrary string index for the edit.
+ Error messages returned by the server that pertain
+ to a specific edit will be identified by this value.";
+ }
+
+ leaf operation {
+ type enumeration {
+ enum create {
+ description
+ "The target data node is created using the supplied
+ value, only if it does not already exist. The
+ 'target' leaf identifies the data node to be
+ created, not the parent data node.";
+ }
+ enum delete {
+ description
+ "Delete the target node, only if the data resource
+ currently exists; otherwise, return an error.";
+ }
+
+ enum insert {
+ description
+ "Insert the supplied value into a user-ordered
+ list or leaf-list entry. The target node must
+ represent a new data resource. If the 'where'
+ parameter is set to 'before' or 'after', then
+ the 'point' parameter identifies the insertion
+ point for the target node.";
+ }
+ enum merge {
+ description
+ "The supplied value is merged with the target data
+ node.";
+ }
+ enum move {
+ description
+ "Move the target node. Reorder a user-ordered
+ list or leaf-list. The target node must represent
+ an existing data resource. If the 'where' parameter
+ is set to 'before' or 'after', then the 'point'
+ parameter identifies the insertion point to move
+ the target node.";
+ }
+ enum replace {
+ description
+ "The supplied value is used to replace the target
+ data node.";
+ }
+ enum remove {
+ description
+ "Delete the target node if it currently exists.";
+ }
+ }
+ mandatory true;
+ description
+ "The datastore operation requested for the associated
+ 'edit' entry.";
+ }
+
+ leaf target {
+ type target-resource-offset;
+ mandatory true;
+ description
+ "Identifies the target data node for the edit
+ operation. If the target has the value '/', then
+ the target data node is the target resource.
+ The target node MUST identify a data resource,
+ not the datastore resource.";
+ }
+
+ leaf point {
+ when "(../operation = 'insert' or ../operation = 'move')"
+ + "and (../where = 'before' or ../where = 'after')" {
+ description
+ "This leaf only applies for 'insert' or 'move'
+ operations, before or after an existing entry.";
+ }
+ type target-resource-offset;
+ description
+ "The absolute URL path for the data node that is being
+ used as the insertion point or move point for the
+ target of this 'edit' entry.";
+ }
+
+ leaf where {
+ when "../operation = 'insert' or ../operation = 'move'" {
+ description
+ "This leaf only applies for 'insert' or 'move'
+ operations.";
+ }
+ type enumeration {
+ enum before {
+ description
+ "Insert or move a data node before the data resource
+ identified by the 'point' parameter.";
+ }
+ enum after {
+ description
+ "Insert or move a data node after the data resource
+ identified by the 'point' parameter.";
+ }
+
+ enum first {
+ description
+ "Insert or move a data node so it becomes ordered
+ as the first entry.";
+ }
+ enum last {
+ description
+ "Insert or move a data node so it becomes ordered
+ as the last entry.";
+ }
+ }
+ default last;
+ description
+ "Identifies where a data resource will be inserted
+ or moved. YANG only allows these operations for
+ list and leaf-list data nodes that are
+ 'ordered-by user'.";
+ }
+
+ anydata value {
+ when "../operation = 'create' "
+ + "or ../operation = 'merge' "
+ + "or ../operation = 'replace' "
+ + "or ../operation = 'insert'" {
+ description
+ "The anydata 'value' is only used for 'create',
+ 'merge', 'replace', and 'insert' operations.";
+ }
+ description
+ "Value used for this edit operation. The anydata 'value'
+ contains the target resource associated with the
+ 'target' leaf.
+
+ For example, suppose the target node is a YANG container
+ named foo:
+
+ container foo {
+ leaf a { type string; }
+ leaf b { type int32; }
+ }
+
+ The 'value' node contains one instance of foo:
+
+
+
+ some value
+ 42
+
+
+ ";
+ }
+ }
+ }
+
+ } // grouping yang-patch
+
+ grouping yang-patch-status {
+
+ description
+ "A grouping that contains a YANG container representing the
+ syntax and semantics of a YANG Patch Status response
+ message.";
+
+ container yang-patch-status {
+ description
+ "A container representing the response message sent by the
+ server after a YANG Patch edit request message has been
+ processed.";
+
+ leaf patch-id {
+ type string;
+ mandatory true;
+ description
+ "The 'patch-id' value used in the request.";
+ }
+
+ choice global-status {
+ description
+ "Report global errors or complete success.
+ If there is no case selected, then errors
+ are reported in the 'edit-status' container.";
+
+ case global-errors {
+ uses rc:errors;
+ description
+ "This container will be present if global errors that
+ are unrelated to a specific edit occurred.";
+ }
+ leaf ok {
+ type empty;
+ description
+ "This leaf will be present if the request succeeded
+ and there are no errors reported in the 'edit-status'
+ container.";
+ }
+ }
+
+ container edit-status {
+ description
+ "This container will be present if there are
+ edit-specific status responses to report.
+ If all edits succeeded and the 'global-status'
+ returned is 'ok', then a server MAY omit this
+ container.";
+
+ list edit {
+ key edit-id;
+
+ description
+ "Represents a list of status responses,
+ corresponding to edits in the YANG Patch
+ request message. If an 'edit' entry was
+ skipped or not reached by the server,
+ then this list will not contain a corresponding
+ entry for that edit.";
+
+ leaf edit-id {
+ type string;
+ description
+ "Response status is for the 'edit' list entry
+ with this 'edit-id' value.";
+ }
+
+ choice edit-status-choice {
+ description
+ "A choice between different types of status
+ responses for each 'edit' entry.";
+ leaf ok {
+ type empty;
+ description
+ "This 'edit' entry was invoked without any
+ errors detected by the server associated
+ with this edit.";
+ }
+ case errors {
+ uses rc:errors;
+ description
+ "The server detected errors associated with the
+ edit identified by the same 'edit-id' value.";
+ }
+ }
+ }
+ }
+ }
+ } // grouping yang-patch-status
+
+}