mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-29 01:02:32 +00:00
chore: import external ietf modules
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I02ed156105736ab538e4d5708d38b497f9479658
This commit is contained in:
2241
gnpy/yang/ext/ietf-layer0-types.yang
Normal file
2241
gnpy/yang/ext/ietf-layer0-types.yang
Normal file
File diff suppressed because it is too large
Load Diff
2247
gnpy/yang/ext/ietf-layer0-types@2024-03-04.yang
Normal file
2247
gnpy/yang/ext/ietf-layer0-types@2024-03-04.yang
Normal file
File diff suppressed because it is too large
Load Diff
294
gnpy/yang/ext/ietf-network-topology@2018-02-26.yang
Normal file
294
gnpy/yang/ext/ietf-network-topology@2018-02-26.yang
Normal file
@@ -0,0 +1,294 @@
|
||||
module ietf-network-topology {
|
||||
yang-version 1.1;
|
||||
namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
|
||||
prefix nt;
|
||||
|
||||
import ietf-inet-types {
|
||||
prefix inet;
|
||||
reference
|
||||
"RFC 6991: Common YANG Data Types";
|
||||
}
|
||||
import ietf-network {
|
||||
prefix nw;
|
||||
reference
|
||||
"RFC 8345: A YANG Data Model for Network Topologies";
|
||||
}
|
||||
|
||||
organization
|
||||
"IETF I2RS (Interface to the Routing System) Working Group";
|
||||
|
||||
contact
|
||||
"WG Web: <https://datatracker.ietf.org/wg/i2rs/>
|
||||
WG List: <mailto:i2rs@ietf.org>
|
||||
|
||||
Editor: Alexander Clemm
|
||||
<mailto:ludwig@clemm.org>
|
||||
|
||||
Editor: Jan Medved
|
||||
<mailto:jmedved@cisco.com>
|
||||
|
||||
Editor: Robert Varga
|
||||
<mailto:robert.varga@pantheon.tech>
|
||||
|
||||
Editor: Nitin Bahadur
|
||||
<mailto:nitin_bahadur@yahoo.com>
|
||||
|
||||
Editor: Hariharan Ananthakrishnan
|
||||
<mailto:hari@packetdesign.com>
|
||||
|
||||
Editor: Xufeng Liu
|
||||
<mailto:xufeng.liu.ietf@gmail.com>";
|
||||
|
||||
description
|
||||
"This module defines a common base model for a network topology,
|
||||
augmenting the base network data model with links to connect
|
||||
nodes, as well as termination points to terminate links
|
||||
on nodes.
|
||||
|
||||
Copyright (c) 2018 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
|
||||
(https://trustee.ietf.org/license-info).
|
||||
|
||||
This version of this YANG module is part of RFC 8345;
|
||||
see the RFC itself for full legal notices.";
|
||||
|
||||
revision 2018-02-26 {
|
||||
description
|
||||
"Initial revision.";
|
||||
reference
|
||||
"RFC 8345: A YANG Data Model for Network Topologies";
|
||||
}
|
||||
|
||||
typedef link-id {
|
||||
type inet:uri;
|
||||
description
|
||||
"An identifier for a link in a topology. The precise
|
||||
structure of the link-id will be up to the implementation.
|
||||
The identifier SHOULD be chosen such that the same link in a
|
||||
real network topology will always be identified through the
|
||||
same identifier, even if the data model is instantiated in
|
||||
separate datastores. An implementation MAY choose to capture
|
||||
semantics in the identifier -- for example, to indicate the
|
||||
type of link and/or the type of topology of which the link is
|
||||
a part.";
|
||||
}
|
||||
|
||||
typedef tp-id {
|
||||
type inet:uri;
|
||||
description
|
||||
"An identifier for termination points on a node. The precise
|
||||
structure of the tp-id will be up to the implementation.
|
||||
The identifier SHOULD be chosen such that the same termination
|
||||
point in a real network topology will always be identified
|
||||
through the same identifier, even if the data model is
|
||||
instantiated in separate datastores. An implementation MAY
|
||||
choose to capture semantics in the identifier -- for example,
|
||||
to indicate the type of termination point and/or the type of
|
||||
node that contains the termination point.";
|
||||
}
|
||||
|
||||
grouping link-ref {
|
||||
description
|
||||
"This grouping can be used to reference a link in a specific
|
||||
network. Although it is not used in this module, it is
|
||||
defined here for the convenience of augmenting modules.";
|
||||
leaf link-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network[nw:network-id=current()/../"+
|
||||
"network-ref]/nt:link/nt:link-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"A type for an absolute reference to a link instance.
|
||||
(This type should not be used for relative references.
|
||||
In such a case, a relative path should be used instead.)";
|
||||
}
|
||||
uses nw:network-ref;
|
||||
}
|
||||
|
||||
grouping tp-ref {
|
||||
description
|
||||
"This grouping can be used to reference a termination point
|
||||
in a specific node. Although it is not used in this module,
|
||||
it is defined here for the convenience of augmenting
|
||||
modules.";
|
||||
leaf tp-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network[nw:network-id=current()/../"+
|
||||
"network-ref]/nw:node[nw:node-id=current()/../"+
|
||||
"node-ref]/nt:termination-point/nt:tp-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"A type for an absolute reference to a termination point.
|
||||
(This type should not be used for relative references.
|
||||
In such a case, a relative path should be used instead.)";
|
||||
}
|
||||
uses nw:node-ref;
|
||||
}
|
||||
|
||||
augment "/nw:networks/nw:network" {
|
||||
description
|
||||
"Add links to the network data model.";
|
||||
list link {
|
||||
key "link-id";
|
||||
description
|
||||
"A network link connects a local (source) node and
|
||||
a remote (destination) node via a set of the respective
|
||||
node's termination points. It is possible to have several
|
||||
links between the same source and destination nodes.
|
||||
Likewise, a link could potentially be re-homed between
|
||||
termination points. Therefore, in order to ensure that we
|
||||
would always know to distinguish between links, every link
|
||||
is identified by a dedicated link identifier. Note that a
|
||||
link models a point-to-point link, not a multipoint link.";
|
||||
leaf link-id {
|
||||
type link-id;
|
||||
description
|
||||
"The identifier of a link in the topology.
|
||||
A link is specific to a topology to which it belongs.";
|
||||
}
|
||||
container source {
|
||||
description
|
||||
"This container holds the logical source of a particular
|
||||
link.";
|
||||
leaf source-node {
|
||||
type leafref {
|
||||
path "../../../nw:node/nw:node-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"Source node identifier. Must be in the same topology.";
|
||||
}
|
||||
leaf source-tp {
|
||||
type leafref {
|
||||
path "../../../nw:node[nw:node-id=current()/../"+
|
||||
"source-node]/termination-point/tp-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"This termination point is located within the source node
|
||||
and terminates the link.";
|
||||
}
|
||||
}
|
||||
|
||||
container destination {
|
||||
description
|
||||
"This container holds the logical destination of a
|
||||
particular link.";
|
||||
leaf dest-node {
|
||||
type leafref {
|
||||
path "../../../nw:node/nw:node-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"Destination node identifier. Must be in the same
|
||||
network.";
|
||||
}
|
||||
leaf dest-tp {
|
||||
type leafref {
|
||||
path "../../../nw:node[nw:node-id=current()/../"+
|
||||
"dest-node]/termination-point/tp-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"This termination point is located within the
|
||||
destination node and terminates the link.";
|
||||
}
|
||||
}
|
||||
list supporting-link {
|
||||
key "network-ref link-ref";
|
||||
description
|
||||
"Identifies the link or links on which this link depends.";
|
||||
leaf network-ref {
|
||||
type leafref {
|
||||
path "../../../nw:supporting-network/nw:network-ref";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"This leaf identifies in which underlay topology
|
||||
the supporting link is present.";
|
||||
}
|
||||
|
||||
leaf link-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network[nw:network-id=current()/"+
|
||||
"../network-ref]/link/link-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"This leaf identifies a link that is a part
|
||||
of this link's underlay. Reference loops in which
|
||||
a link identifies itself as its underlay, either
|
||||
directly or transitively, are not allowed.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
augment "/nw:networks/nw:network/nw:node" {
|
||||
description
|
||||
"Augments termination points that terminate links.
|
||||
Termination points can ultimately be mapped to interfaces.";
|
||||
list termination-point {
|
||||
key "tp-id";
|
||||
description
|
||||
"A termination point can terminate a link.
|
||||
Depending on the type of topology, a termination point
|
||||
could, for example, refer to a port or an interface.";
|
||||
leaf tp-id {
|
||||
type tp-id;
|
||||
description
|
||||
"Termination point identifier.";
|
||||
}
|
||||
list supporting-termination-point {
|
||||
key "network-ref node-ref tp-ref";
|
||||
description
|
||||
"This list identifies any termination points on which a
|
||||
given termination point depends or onto which it maps.
|
||||
Those termination points will themselves be contained
|
||||
in a supporting node. This dependency information can be
|
||||
inferred from the dependencies between links. Therefore,
|
||||
this item is not separately configurable. Hence, no
|
||||
corresponding constraint needs to be articulated.
|
||||
The corresponding information is simply provided by the
|
||||
implementing system.";
|
||||
|
||||
leaf network-ref {
|
||||
type leafref {
|
||||
path "../../../nw:supporting-node/nw:network-ref";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"This leaf identifies in which topology the
|
||||
supporting termination point is present.";
|
||||
}
|
||||
leaf node-ref {
|
||||
type leafref {
|
||||
path "../../../nw:supporting-node/nw:node-ref";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"This leaf identifies in which node the supporting
|
||||
termination point is present.";
|
||||
}
|
||||
leaf tp-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network[nw:network-id=current()/"+
|
||||
"../network-ref]/nw:node[nw:node-id=current()/../"+
|
||||
"node-ref]/termination-point/tp-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"Reference to the underlay node (the underlay node must
|
||||
be in a different topology).";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
192
gnpy/yang/ext/ietf-network@2018-02-26.yang
Normal file
192
gnpy/yang/ext/ietf-network@2018-02-26.yang
Normal file
@@ -0,0 +1,192 @@
|
||||
module ietf-network {
|
||||
yang-version 1.1;
|
||||
namespace "urn:ietf:params:xml:ns:yang:ietf-network";
|
||||
prefix nw;
|
||||
|
||||
import ietf-inet-types {
|
||||
prefix inet;
|
||||
reference
|
||||
"RFC 6991: Common YANG Data Types";
|
||||
}
|
||||
|
||||
organization
|
||||
"IETF I2RS (Interface to the Routing System) Working Group";
|
||||
|
||||
contact
|
||||
"WG Web: <https://datatracker.ietf.org/wg/i2rs/>
|
||||
WG List: <mailto:i2rs@ietf.org>
|
||||
|
||||
Editor: Alexander Clemm
|
||||
<mailto:ludwig@clemm.org>
|
||||
|
||||
Editor: Jan Medved
|
||||
<mailto:jmedved@cisco.com>
|
||||
|
||||
Editor: Robert Varga
|
||||
<mailto:robert.varga@pantheon.tech>
|
||||
|
||||
Editor: Nitin Bahadur
|
||||
<mailto:nitin_bahadur@yahoo.com>
|
||||
|
||||
Editor: Hariharan Ananthakrishnan
|
||||
<mailto:hari@packetdesign.com>
|
||||
|
||||
Editor: Xufeng Liu
|
||||
<mailto:xufeng.liu.ietf@gmail.com>";
|
||||
description
|
||||
"This module defines a common base data model for a collection
|
||||
of nodes in a network. Node definitions are further used
|
||||
in network topologies and inventories.
|
||||
|
||||
Copyright (c) 2018 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
|
||||
(https://trustee.ietf.org/license-info).
|
||||
|
||||
This version of this YANG module is part of RFC 8345;
|
||||
see the RFC itself for full legal notices.";
|
||||
|
||||
revision 2018-02-26 {
|
||||
description
|
||||
"Initial revision.";
|
||||
reference
|
||||
"RFC 8345: A YANG Data Model for Network Topologies";
|
||||
}
|
||||
|
||||
typedef node-id {
|
||||
type inet:uri;
|
||||
description
|
||||
"Identifier for a node. The precise structure of the node-id
|
||||
will be up to the implementation. For example, some
|
||||
implementations MAY pick a URI that includes the network-id
|
||||
as part of the path. The identifier SHOULD be chosen
|
||||
such that the same node in a real network topology will
|
||||
always be identified through the same identifier, even if
|
||||
the data model is instantiated in separate datastores. An
|
||||
implementation MAY choose to capture semantics in the
|
||||
identifier -- for example, to indicate the type of node.";
|
||||
}
|
||||
|
||||
typedef network-id {
|
||||
type inet:uri;
|
||||
description
|
||||
"Identifier for a network. The precise structure of the
|
||||
network-id will be up to the implementation. The identifier
|
||||
SHOULD be chosen such that the same network will always be
|
||||
identified through the same identifier, even if the data model
|
||||
is instantiated in separate datastores. An implementation MAY
|
||||
choose to capture semantics in the identifier -- for example,
|
||||
to indicate the type of network.";
|
||||
}
|
||||
|
||||
grouping network-ref {
|
||||
description
|
||||
"Contains the information necessary to reference a network --
|
||||
for example, an underlay network.";
|
||||
leaf network-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network/nw:network-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"Used to reference a network -- for example, an underlay
|
||||
network.";
|
||||
}
|
||||
}
|
||||
|
||||
grouping node-ref {
|
||||
description
|
||||
"Contains the information necessary to reference a node.";
|
||||
leaf node-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network[nw:network-id=current()/../"+
|
||||
"network-ref]/nw:node/nw:node-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"Used to reference a node.
|
||||
Nodes are identified relative to the network that
|
||||
contains them.";
|
||||
}
|
||||
uses network-ref;
|
||||
}
|
||||
|
||||
container networks {
|
||||
description
|
||||
"Serves as a top-level container for a list of networks.";
|
||||
list network {
|
||||
key "network-id";
|
||||
description
|
||||
"Describes a network.
|
||||
A network typically contains an inventory of nodes,
|
||||
topological information (augmented through the
|
||||
network-topology data model), and layering information.";
|
||||
leaf network-id {
|
||||
type network-id;
|
||||
description
|
||||
"Identifies a network.";
|
||||
}
|
||||
container network-types {
|
||||
description
|
||||
"Serves as an augmentation target.
|
||||
The network type is indicated through corresponding
|
||||
presence containers augmented into this container.";
|
||||
}
|
||||
list supporting-network {
|
||||
key "network-ref";
|
||||
description
|
||||
"An underlay network, used to represent layered network
|
||||
topologies.";
|
||||
leaf network-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network/nw:network-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"References the underlay network.";
|
||||
}
|
||||
}
|
||||
|
||||
list node {
|
||||
key "node-id";
|
||||
description
|
||||
"The inventory of nodes of this network.";
|
||||
leaf node-id {
|
||||
type node-id;
|
||||
description
|
||||
"Uniquely identifies a node within the containing
|
||||
network.";
|
||||
}
|
||||
list supporting-node {
|
||||
key "network-ref node-ref";
|
||||
description
|
||||
"Represents another node that is in an underlay network
|
||||
and that supports this node. Used to represent layering
|
||||
structure.";
|
||||
leaf network-ref {
|
||||
type leafref {
|
||||
path "../../../nw:supporting-network/nw:network-ref";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"References the underlay network of which the
|
||||
underlay node is a part.";
|
||||
}
|
||||
leaf node-ref {
|
||||
type leafref {
|
||||
path "/nw:networks/nw:network/nw:node/nw:node-id";
|
||||
require-instance false;
|
||||
}
|
||||
description
|
||||
"References the underlay node itself.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1776
gnpy/yang/ext/ietf-optical-impairment-topology@2024-05-21.yang
Normal file
1776
gnpy/yang/ext/ietf-optical-impairment-topology@2024-05-21.yang
Normal file
File diff suppressed because it is too large
Load Diff
771
gnpy/yang/ext/ietf-routing-types@2017-12-04.yang
Normal file
771
gnpy/yang/ext/ietf-routing-types@2017-12-04.yang
Normal file
@@ -0,0 +1,771 @@
|
||||
module ietf-routing-types {
|
||||
namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types";
|
||||
prefix rt-types;
|
||||
|
||||
import ietf-yang-types {
|
||||
prefix yang;
|
||||
}
|
||||
import ietf-inet-types {
|
||||
prefix inet;
|
||||
}
|
||||
|
||||
organization
|
||||
"IETF RTGWG - Routing Area Working Group";
|
||||
contact
|
||||
"WG Web: <https://datatracker.ietf.org/wg/rtgwg/>
|
||||
WG List: <mailto:rtgwg@ietf.org>
|
||||
|
||||
Editors: Xufeng Liu
|
||||
<mailto:Xufeng_Liu@jabail.com>
|
||||
Yingzhen Qu
|
||||
<mailto:yingzhen.qu@huawei.com>
|
||||
Acee Lindem
|
||||
<mailto:acee@cisco.com>
|
||||
Christian Hopps
|
||||
<mailto:chopps@chopps.org>
|
||||
Lou Berger
|
||||
<mailto:lberger@labn.com>";
|
||||
|
||||
description
|
||||
"This module contains a collection of YANG data types
|
||||
considered generally useful for routing protocols.
|
||||
|
||||
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
|
||||
(https://trustee.ietf.org/license-info).
|
||||
|
||||
This version of this YANG module is part of RFC 8294; see
|
||||
the RFC itself for full legal notices.";
|
||||
revision 2017-12-04 {
|
||||
description "Initial revision.";
|
||||
reference
|
||||
"RFC 8294: Common YANG Data Types for the Routing Area.
|
||||
Section 3.";
|
||||
}
|
||||
|
||||
/*** Identities related to MPLS/GMPLS ***/
|
||||
|
||||
identity mpls-label-special-purpose-value {
|
||||
description
|
||||
"Base identity for deriving identities describing
|
||||
special-purpose Multiprotocol Label Switching (MPLS) label
|
||||
values.";
|
||||
reference
|
||||
"RFC 7274: Allocating and Retiring Special-Purpose MPLS
|
||||
Labels.";
|
||||
}
|
||||
|
||||
identity ipv4-explicit-null-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the IPv4 Explicit NULL Label.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding. Section 2.1.";
|
||||
}
|
||||
|
||||
identity router-alert-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the Router Alert Label.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding. Section 2.1.";
|
||||
}
|
||||
|
||||
identity ipv6-explicit-null-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the IPv6 Explicit NULL Label.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding. Section 2.1.";
|
||||
}
|
||||
|
||||
identity implicit-null-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the Implicit NULL Label.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding. Section 2.1.";
|
||||
}
|
||||
|
||||
identity entropy-label-indicator {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the Entropy Label Indicator.";
|
||||
reference
|
||||
"RFC 6790: The Use of Entropy Labels in MPLS Forwarding.
|
||||
Sections 3 and 10.1.";
|
||||
}
|
||||
|
||||
identity gal-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the Generic Associated Channel
|
||||
(G-ACh) Label (GAL).";
|
||||
reference
|
||||
"RFC 5586: MPLS Generic Associated Channel.
|
||||
Sections 4 and 10.";
|
||||
}
|
||||
|
||||
identity oam-alert-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the OAM Alert Label.";
|
||||
reference
|
||||
"RFC 3429: Assignment of the 'OAM Alert Label' for
|
||||
Multiprotocol Label Switching Architecture (MPLS)
|
||||
Operation and Maintenance (OAM) Functions.
|
||||
Sections 3 and 6.";
|
||||
}
|
||||
|
||||
identity extension-label {
|
||||
base mpls-label-special-purpose-value;
|
||||
description
|
||||
"This identity represents the Extension Label.";
|
||||
reference
|
||||
"RFC 7274: Allocating and Retiring Special-Purpose MPLS
|
||||
Labels. Sections 3.1 and 5.";
|
||||
}
|
||||
|
||||
/*** Collection of types related to routing ***/
|
||||
|
||||
typedef router-id {
|
||||
type yang:dotted-quad;
|
||||
description
|
||||
"A 32-bit number in the dotted-quad format assigned to each
|
||||
router. This number uniquely identifies the router within
|
||||
an Autonomous System.";
|
||||
}
|
||||
|
||||
/*** Collection of types related to VPNs ***/
|
||||
|
||||
typedef route-target {
|
||||
type string {
|
||||
pattern
|
||||
'(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
|
||||
+ '42949672[0-8][0-9]|'
|
||||
+ '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
|
||||
+ '42949[0-5][0-9]{4}|'
|
||||
+ '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
|
||||
+ '42[0-8][0-9]{7}|4[01][0-9]{8}|'
|
||||
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
|
||||
+ '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
|
||||
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
|
||||
+ '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
|
||||
+ '655[0-2][0-9]|'
|
||||
+ '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
|
||||
+ '(2:(429496729[0-5]|42949672[0-8][0-9]|'
|
||||
+ '4294967[01][0-9]{2}|'
|
||||
+ '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
|
||||
+ '4294[0-8][0-9]{5}|'
|
||||
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
|
||||
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
|
||||
+ '(6(:[a-fA-F0-9]{2}){6})|'
|
||||
+ '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
|
||||
+ '[0-9a-fA-F]{1,12})';
|
||||
}
|
||||
|
||||
description
|
||||
"A Route Target is an 8-octet BGP extended community
|
||||
initially identifying a set of sites in a BGP VPN
|
||||
(RFC 4364). However, it has since taken on a more general
|
||||
role in BGP route filtering. A Route Target consists of two
|
||||
or three fields: a 2-octet Type field, an administrator
|
||||
field, and, optionally, an assigned number field.
|
||||
|
||||
According to the data formats for types 0, 1, 2, and 6 as
|
||||
defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
|
||||
pattern is defined as:
|
||||
|
||||
0:2-octet-asn:4-octet-number
|
||||
1:4-octet-ipv4addr:2-octet-number
|
||||
2:4-octet-asn:2-octet-number
|
||||
6:6-octet-mac-address
|
||||
|
||||
Additionally, a generic pattern is defined for future
|
||||
Route Target types:
|
||||
|
||||
2-octet-other-hex-number:6-octet-hex-number
|
||||
|
||||
Some valid examples are 0:100:100, 1:1.1.1.1:100,
|
||||
2:1234567890:203, and 6:26:00:08:92:78:00.";
|
||||
reference
|
||||
"RFC 4360: BGP Extended Communities Attribute.
|
||||
RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
|
||||
RFC 5668: 4-Octet AS Specific BGP Extended Community.
|
||||
RFC 7432: BGP MPLS-Based Ethernet VPN.";
|
||||
}
|
||||
|
||||
typedef ipv6-route-target {
|
||||
type string {
|
||||
pattern
|
||||
'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
|
||||
+ '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
|
||||
+ '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}'
|
||||
+ '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))'
|
||||
+ ':'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
|
||||
pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
|
||||
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))'
|
||||
+ ':'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
|
||||
}
|
||||
description
|
||||
"An IPv6 Route Target is a 20-octet BGP IPv6 Address
|
||||
Specific Extended Community serving the same function
|
||||
as a standard 8-octet Route Target, except that it only
|
||||
allows an IPv6 address as the global administrator.
|
||||
The format is <ipv6-address:2-octet-number>.
|
||||
|
||||
Two valid examples are 2001:db8::1:6544 and
|
||||
2001:db8::5eb1:791:6b37:17958.";
|
||||
reference
|
||||
"RFC 5701: IPv6 Address Specific BGP Extended Community
|
||||
Attribute.";
|
||||
}
|
||||
|
||||
typedef route-target-type {
|
||||
type enumeration {
|
||||
enum import {
|
||||
value 0;
|
||||
description
|
||||
"The Route Target applies to route import.";
|
||||
}
|
||||
enum export {
|
||||
value 1;
|
||||
description
|
||||
"The Route Target applies to route export.";
|
||||
}
|
||||
|
||||
enum both {
|
||||
value 2;
|
||||
description
|
||||
"The Route Target applies to both route import and
|
||||
route export.";
|
||||
}
|
||||
}
|
||||
description
|
||||
"Indicates the role a Route Target takes in route filtering.";
|
||||
reference
|
||||
"RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).";
|
||||
}
|
||||
|
||||
typedef route-distinguisher {
|
||||
type string {
|
||||
pattern
|
||||
'(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
|
||||
+ '42949672[0-8][0-9]|'
|
||||
+ '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
|
||||
+ '42949[0-5][0-9]{4}|'
|
||||
+ '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
|
||||
+ '42[0-8][0-9]{7}|4[01][0-9]{8}|'
|
||||
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
|
||||
+ '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
|
||||
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
|
||||
+ '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
|
||||
+ '655[0-2][0-9]|'
|
||||
+ '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
|
||||
+ '(2:(429496729[0-5]|42949672[0-8][0-9]|'
|
||||
+ '4294967[01][0-9]{2}|'
|
||||
+ '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
|
||||
+ '4294[0-8][0-9]{5}|'
|
||||
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
|
||||
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
|
||||
+ '(6(:[a-fA-F0-9]{2}){6})|'
|
||||
+ '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
|
||||
+ '[0-9a-fA-F]{1,12})';
|
||||
}
|
||||
|
||||
description
|
||||
"A Route Distinguisher is an 8-octet value used to
|
||||
distinguish routes from different BGP VPNs (RFC 4364).
|
||||
A Route Distinguisher will have the same format as a
|
||||
Route Target as per RFC 4360 and will consist of
|
||||
two or three fields: a 2-octet Type field, an administrator
|
||||
field, and, optionally, an assigned number field.
|
||||
|
||||
According to the data formats for types 0, 1, 2, and 6 as
|
||||
defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
|
||||
pattern is defined as:
|
||||
|
||||
0:2-octet-asn:4-octet-number
|
||||
1:4-octet-ipv4addr:2-octet-number
|
||||
2:4-octet-asn:2-octet-number
|
||||
6:6-octet-mac-address
|
||||
|
||||
Additionally, a generic pattern is defined for future
|
||||
route discriminator types:
|
||||
|
||||
2-octet-other-hex-number:6-octet-hex-number
|
||||
|
||||
Some valid examples are 0:100:100, 1:1.1.1.1:100,
|
||||
2:1234567890:203, and 6:26:00:08:92:78:00.";
|
||||
reference
|
||||
"RFC 4360: BGP Extended Communities Attribute.
|
||||
RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
|
||||
RFC 5668: 4-Octet AS Specific BGP Extended Community.
|
||||
RFC 7432: BGP MPLS-Based Ethernet VPN.";
|
||||
}
|
||||
|
||||
typedef route-origin {
|
||||
type string {
|
||||
pattern
|
||||
'(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
|
||||
+ '42949672[0-8][0-9]|'
|
||||
+ '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
|
||||
+ '42949[0-5][0-9]{4}|'
|
||||
+ '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
|
||||
+ '42[0-8][0-9]{7}|4[01][0-9]{8}|'
|
||||
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
|
||||
+ '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
|
||||
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
|
||||
+ '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
|
||||
+ '655[0-2][0-9]|'
|
||||
+ '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
|
||||
+ '(2:(429496729[0-5]|42949672[0-8][0-9]|'
|
||||
+ '4294967[01][0-9]{2}|'
|
||||
+ '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
|
||||
+ '4294[0-8][0-9]{5}|'
|
||||
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
|
||||
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
|
||||
+ '(6(:[a-fA-F0-9]{2}){6})|'
|
||||
+ '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
|
||||
+ '[0-9a-fA-F]{1,12})';
|
||||
}
|
||||
description
|
||||
"A Route Origin is an 8-octet BGP extended community
|
||||
identifying the set of sites where the BGP route
|
||||
originated (RFC 4364). A Route Origin will have the same
|
||||
format as a Route Target as per RFC 4360 and will consist
|
||||
of two or three fields: a 2-octet Type field, an
|
||||
administrator field, and, optionally, an assigned number
|
||||
field.
|
||||
|
||||
According to the data formats for types 0, 1, 2, and 6 as
|
||||
defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
|
||||
pattern is defined as:
|
||||
|
||||
0:2-octet-asn:4-octet-number
|
||||
1:4-octet-ipv4addr:2-octet-number
|
||||
2:4-octet-asn:2-octet-number
|
||||
6:6-octet-mac-address
|
||||
Additionally, a generic pattern is defined for future
|
||||
Route Origin types:
|
||||
|
||||
2-octet-other-hex-number:6-octet-hex-number
|
||||
|
||||
Some valid examples are 0:100:100, 1:1.1.1.1:100,
|
||||
2:1234567890:203, and 6:26:00:08:92:78:00.";
|
||||
reference
|
||||
"RFC 4360: BGP Extended Communities Attribute.
|
||||
RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
|
||||
RFC 5668: 4-Octet AS Specific BGP Extended Community.
|
||||
RFC 7432: BGP MPLS-Based Ethernet VPN.";
|
||||
}
|
||||
|
||||
typedef ipv6-route-origin {
|
||||
type string {
|
||||
pattern
|
||||
'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
|
||||
+ '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
|
||||
+ '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}'
|
||||
+ '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))'
|
||||
+ ':'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
|
||||
pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
|
||||
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))'
|
||||
+ ':'
|
||||
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
|
||||
+ '6[0-4][0-9]{3}|'
|
||||
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
|
||||
}
|
||||
description
|
||||
"An IPv6 Route Origin is a 20-octet BGP IPv6 Address
|
||||
Specific Extended Community serving the same function
|
||||
as a standard 8-octet route, except that it only allows
|
||||
an IPv6 address as the global administrator. The format
|
||||
is <ipv6-address:2-octet-number>.
|
||||
|
||||
Two valid examples are 2001:db8::1:6544 and
|
||||
2001:db8::5eb1:791:6b37:17958.";
|
||||
reference
|
||||
"RFC 5701: IPv6 Address Specific BGP Extended Community
|
||||
Attribute.";
|
||||
}
|
||||
|
||||
/*** Collection of types common to multicast ***/
|
||||
|
||||
typedef ipv4-multicast-group-address {
|
||||
type inet:ipv4-address {
|
||||
pattern '(2((2[4-9])|(3[0-9]))\.).*';
|
||||
}
|
||||
description
|
||||
"This type represents an IPv4 multicast group address,
|
||||
which is in the range of 224.0.0.0 to 239.255.255.255.";
|
||||
reference
|
||||
"RFC 1112: Host Extensions for IP Multicasting.";
|
||||
}
|
||||
|
||||
typedef ipv6-multicast-group-address {
|
||||
type inet:ipv6-address {
|
||||
pattern '(([fF]{2}[0-9a-fA-F]{2}):).*';
|
||||
}
|
||||
description
|
||||
"This type represents an IPv6 multicast group address,
|
||||
which is in the range of ff00::/8.";
|
||||
reference
|
||||
"RFC 4291: IP Version 6 Addressing Architecture. Section 2.7.
|
||||
RFC 7346: IPv6 Multicast Address Scopes.";
|
||||
}
|
||||
|
||||
typedef ip-multicast-group-address {
|
||||
type union {
|
||||
type ipv4-multicast-group-address;
|
||||
type ipv6-multicast-group-address;
|
||||
}
|
||||
description
|
||||
"This type represents a version-neutral IP multicast group
|
||||
address. The format of the textual representation implies
|
||||
the IP version.";
|
||||
}
|
||||
|
||||
typedef ipv4-multicast-source-address {
|
||||
type union {
|
||||
type enumeration {
|
||||
enum * {
|
||||
description
|
||||
"Any source address.";
|
||||
}
|
||||
}
|
||||
type inet:ipv4-address;
|
||||
}
|
||||
description
|
||||
"Multicast source IPv4 address type.";
|
||||
}
|
||||
|
||||
typedef ipv6-multicast-source-address {
|
||||
type union {
|
||||
type enumeration {
|
||||
enum * {
|
||||
description
|
||||
"Any source address.";
|
||||
}
|
||||
}
|
||||
type inet:ipv6-address;
|
||||
}
|
||||
description
|
||||
"Multicast source IPv6 address type.";
|
||||
}
|
||||
|
||||
/*** Collection of types common to protocols ***/
|
||||
|
||||
typedef bandwidth-ieee-float32 {
|
||||
type string {
|
||||
pattern
|
||||
'0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|'
|
||||
+ '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|'
|
||||
+ '1[01][0-9]|0?[0-9]?[0-9])?)';
|
||||
}
|
||||
description
|
||||
"Bandwidth in IEEE 754 floating-point 32-bit binary format:
|
||||
(-1)**(S) * 2**(Exponent-127) * (1 + Fraction),
|
||||
where Exponent uses 8 bits and Fraction uses 23 bits.
|
||||
The units are octets per second.
|
||||
The encoding format is the external hexadecimal-significant
|
||||
character sequences specified in IEEE 754 and ISO/IEC C99.
|
||||
The format is restricted to be normalized, non-negative, and
|
||||
non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0,
|
||||
where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are
|
||||
integers in the range of [0..127].
|
||||
When six hexadecimal digits are used for 'hhhhhh' or
|
||||
'HHHHHH', the least significant digit must be an even
|
||||
number. 'x' and 'X' indicate hexadecimal; 'p' and 'P'
|
||||
indicate a power of two. Some examples are 0x0p0, 0x1p10,
|
||||
and 0x1.abcde2p+20.";
|
||||
reference
|
||||
"IEEE Std 754-2008: IEEE Standard for Floating-Point
|
||||
Arithmetic.
|
||||
ISO/IEC C99: Information technology - Programming
|
||||
Languages - C.";
|
||||
}
|
||||
|
||||
typedef link-access-type {
|
||||
type enumeration {
|
||||
enum broadcast {
|
||||
description
|
||||
"Specify broadcast multi-access network.";
|
||||
}
|
||||
enum non-broadcast-multiaccess {
|
||||
description
|
||||
"Specify Non-Broadcast Multi-Access (NBMA) network.";
|
||||
}
|
||||
enum point-to-multipoint {
|
||||
description
|
||||
"Specify point-to-multipoint network.";
|
||||
}
|
||||
enum point-to-point {
|
||||
description
|
||||
"Specify point-to-point network.";
|
||||
}
|
||||
}
|
||||
description
|
||||
"Link access type.";
|
||||
}
|
||||
|
||||
typedef timer-multiplier {
|
||||
type uint8;
|
||||
description
|
||||
"The number of timer value intervals that should be
|
||||
interpreted as a failure.";
|
||||
}
|
||||
|
||||
typedef timer-value-seconds16 {
|
||||
type union {
|
||||
type uint16 {
|
||||
range "1..65535";
|
||||
}
|
||||
type enumeration {
|
||||
enum infinity {
|
||||
description
|
||||
"The timer is set to infinity.";
|
||||
}
|
||||
enum not-set {
|
||||
description
|
||||
"The timer is not set.";
|
||||
}
|
||||
}
|
||||
}
|
||||
units "seconds";
|
||||
description
|
||||
"Timer value type, in seconds (16-bit range).";
|
||||
}
|
||||
|
||||
typedef timer-value-seconds32 {
|
||||
type union {
|
||||
type uint32 {
|
||||
range "1..4294967295";
|
||||
}
|
||||
type enumeration {
|
||||
enum infinity {
|
||||
description
|
||||
"The timer is set to infinity.";
|
||||
}
|
||||
enum not-set {
|
||||
description
|
||||
"The timer is not set.";
|
||||
}
|
||||
}
|
||||
}
|
||||
units "seconds";
|
||||
description
|
||||
"Timer value type, in seconds (32-bit range).";
|
||||
}
|
||||
|
||||
typedef timer-value-milliseconds {
|
||||
type union {
|
||||
type uint32 {
|
||||
range "1..4294967295";
|
||||
}
|
||||
type enumeration {
|
||||
enum infinity {
|
||||
description
|
||||
"The timer is set to infinity.";
|
||||
}
|
||||
enum not-set {
|
||||
description
|
||||
"The timer is not set.";
|
||||
}
|
||||
}
|
||||
}
|
||||
units "milliseconds";
|
||||
description
|
||||
"Timer value type, in milliseconds.";
|
||||
}
|
||||
|
||||
typedef percentage {
|
||||
type uint8 {
|
||||
range "0..100";
|
||||
}
|
||||
description
|
||||
"Integer indicating a percentage value.";
|
||||
}
|
||||
|
||||
typedef timeticks64 {
|
||||
type uint64;
|
||||
description
|
||||
"This type is based on the timeticks type defined in
|
||||
RFC 6991, but with 64-bit width. It represents the time,
|
||||
modulo 2^64, in hundredths of a second between two epochs.";
|
||||
reference
|
||||
"RFC 6991: Common YANG Data Types.";
|
||||
}
|
||||
|
||||
typedef uint24 {
|
||||
type uint32 {
|
||||
range "0..16777215";
|
||||
}
|
||||
description
|
||||
"24-bit unsigned integer.";
|
||||
}
|
||||
|
||||
/*** Collection of types related to MPLS/GMPLS ***/
|
||||
|
||||
typedef generalized-label {
|
||||
type binary;
|
||||
description
|
||||
"Generalized Label. Nodes sending and receiving the
|
||||
Generalized Label are aware of the link-specific
|
||||
label context and type.";
|
||||
reference
|
||||
"RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS)
|
||||
Signaling Functional Description. Section 3.2.";
|
||||
}
|
||||
|
||||
typedef mpls-label-special-purpose {
|
||||
type identityref {
|
||||
base mpls-label-special-purpose-value;
|
||||
}
|
||||
description
|
||||
"This type represents the special-purpose MPLS label values.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding.
|
||||
RFC 7274: Allocating and Retiring Special-Purpose MPLS
|
||||
Labels.";
|
||||
}
|
||||
|
||||
typedef mpls-label-general-use {
|
||||
type uint32 {
|
||||
range "16..1048575";
|
||||
}
|
||||
description
|
||||
"The 20-bit label value in an MPLS label stack as specified
|
||||
in RFC 3032. This label value does not include the
|
||||
encodings of Traffic Class and TTL (Time to Live).
|
||||
The label range specified by this type is for general use,
|
||||
with special-purpose MPLS label values excluded.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding.";
|
||||
}
|
||||
|
||||
typedef mpls-label {
|
||||
type union {
|
||||
type mpls-label-special-purpose;
|
||||
type mpls-label-general-use;
|
||||
}
|
||||
description
|
||||
"The 20-bit label value in an MPLS label stack as specified
|
||||
in RFC 3032. This label value does not include the
|
||||
encodings of Traffic Class and TTL.";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding.";
|
||||
}
|
||||
|
||||
/*** Groupings **/
|
||||
|
||||
grouping mpls-label-stack {
|
||||
description
|
||||
"This grouping specifies an MPLS label stack. The label
|
||||
stack is encoded as a list of label stack entries. The
|
||||
list key is an identifier that indicates the relative
|
||||
ordering of each entry, with the lowest-value identifier
|
||||
corresponding to the top of the label stack.";
|
||||
container mpls-label-stack {
|
||||
description
|
||||
"Container for a list of MPLS label stack entries.";
|
||||
list entry {
|
||||
key "id";
|
||||
description
|
||||
"List of MPLS label stack entries.";
|
||||
leaf id {
|
||||
type uint8;
|
||||
description
|
||||
"Identifies the entry in a sequence of MPLS label
|
||||
stack entries. An entry with a smaller identifier
|
||||
value precedes an entry with a larger identifier
|
||||
value in the label stack. The value of this ID has
|
||||
no semantic meaning other than relative ordering
|
||||
and referencing the entry.";
|
||||
}
|
||||
leaf label {
|
||||
type rt-types:mpls-label;
|
||||
description
|
||||
"Label value.";
|
||||
}
|
||||
|
||||
leaf ttl {
|
||||
type uint8;
|
||||
description
|
||||
"Time to Live (TTL).";
|
||||
reference
|
||||
"RFC 3032: MPLS Label Stack Encoding.";
|
||||
}
|
||||
leaf traffic-class {
|
||||
type uint8 {
|
||||
range "0..7";
|
||||
}
|
||||
description
|
||||
"Traffic Class (TC).";
|
||||
reference
|
||||
"RFC 5462: Multiprotocol Label Switching (MPLS) Label
|
||||
Stack Entry: 'EXP' Field Renamed to 'Traffic Class'
|
||||
Field.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grouping vpn-route-targets {
|
||||
description
|
||||
"A grouping that specifies Route Target import-export rules
|
||||
used in BGP-enabled VPNs.";
|
||||
reference
|
||||
"RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
|
||||
RFC 4664: Framework for Layer 2 Virtual Private Networks
|
||||
(L2VPNs).";
|
||||
list vpn-target {
|
||||
key "route-target";
|
||||
description
|
||||
"List of Route Targets.";
|
||||
leaf route-target {
|
||||
type rt-types:route-target;
|
||||
description
|
||||
"Route Target value.";
|
||||
}
|
||||
leaf route-target-type {
|
||||
type rt-types:route-target-type;
|
||||
mandatory true;
|
||||
description
|
||||
"Import/export type of the Route Target.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1952
gnpy/yang/ext/ietf-te-topology@2020-08-06.yang
Normal file
1952
gnpy/yang/ext/ietf-te-topology@2020-08-06.yang
Normal file
File diff suppressed because it is too large
Load Diff
3458
gnpy/yang/ext/ietf-te-types@2022-10-21.yang
Normal file
3458
gnpy/yang/ext/ietf-te-types@2022-10-21.yang
Normal file
File diff suppressed because it is too large
Load Diff
474
gnpy/yang/ext/ietf-yang-types@2013-07-15.yang
Normal file
474
gnpy/yang/ext/ietf-yang-types@2013-07-15.yang
Normal file
@@ -0,0 +1,474 @@
|
||||
module ietf-yang-types {
|
||||
|
||||
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
|
||||
prefix "yang";
|
||||
|
||||
organization
|
||||
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
|
||||
|
||||
contact
|
||||
"WG Web: <http://tools.ietf.org/wg/netmod/>
|
||||
WG List: <mailto:netmod@ietf.org>
|
||||
|
||||
WG Chair: David Kessens
|
||||
<mailto:david.kessens@nsn.com>
|
||||
|
||||
WG Chair: Juergen Schoenwaelder
|
||||
<mailto:j.schoenwaelder@jacobs-university.de>
|
||||
|
||||
Editor: Juergen Schoenwaelder
|
||||
<mailto:j.schoenwaelder@jacobs-university.de>";
|
||||
|
||||
description
|
||||
"This module contains a collection of generally useful derived
|
||||
YANG data types.
|
||||
|
||||
Copyright (c) 2013 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 6991; see
|
||||
the RFC itself for full legal notices.";
|
||||
|
||||
revision 2013-07-15 {
|
||||
description
|
||||
"This revision adds the following new data types:
|
||||
- yang-identifier
|
||||
- hex-string
|
||||
- uuid
|
||||
- dotted-quad";
|
||||
reference
|
||||
"RFC 6991: Common YANG Data Types";
|
||||
}
|
||||
|
||||
revision 2010-09-24 {
|
||||
description
|
||||
"Initial revision.";
|
||||
reference
|
||||
"RFC 6021: Common YANG Data Types";
|
||||
}
|
||||
|
||||
/*** collection of counter and gauge types ***/
|
||||
|
||||
typedef counter32 {
|
||||
type uint32;
|
||||
description
|
||||
"The counter32 type represents a non-negative integer
|
||||
that monotonically increases until it reaches a
|
||||
maximum value of 2^32-1 (4294967295 decimal), when it
|
||||
wraps around and starts increasing again from zero.
|
||||
|
||||
Counters have no defined 'initial' value, and thus, a
|
||||
single value of a counter has (in general) no information
|
||||
content. Discontinuities in the monotonically increasing
|
||||
value normally occur at re-initialization of the
|
||||
management system, and at other times as specified in the
|
||||
description of a schema node using this type. If such
|
||||
other times can occur, for example, the creation of
|
||||
a schema node of type counter32 at times other than
|
||||
re-initialization, then a corresponding schema node
|
||||
should be defined, with an appropriate type, to indicate
|
||||
the last discontinuity.
|
||||
|
||||
The counter32 type should not be used for configuration
|
||||
schema nodes. A default statement SHOULD NOT be used in
|
||||
combination with the type counter32.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the Counter32 type of the SMIv2.";
|
||||
reference
|
||||
"RFC 2578: Structure of Management Information Version 2
|
||||
(SMIv2)";
|
||||
}
|
||||
|
||||
typedef zero-based-counter32 {
|
||||
type yang:counter32;
|
||||
default "0";
|
||||
description
|
||||
"The zero-based-counter32 type represents a counter32
|
||||
that has the defined 'initial' value zero.
|
||||
|
||||
A schema node of this type will be set to zero (0) on creation
|
||||
and will thereafter increase monotonically until it reaches
|
||||
a maximum value of 2^32-1 (4294967295 decimal), when it
|
||||
wraps around and starts increasing again from zero.
|
||||
|
||||
Provided that an application discovers a new schema node
|
||||
of this type within the minimum time to wrap, it can use the
|
||||
'initial' value as a delta. It is important for a management
|
||||
station to be aware of this minimum time and the actual time
|
||||
between polls, and to discard data if the actual time is too
|
||||
long or there is no defined minimum time.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the ZeroBasedCounter32 textual convention of the SMIv2.";
|
||||
reference
|
||||
"RFC 4502: Remote Network Monitoring Management Information
|
||||
Base Version 2";
|
||||
}
|
||||
|
||||
typedef counter64 {
|
||||
type uint64;
|
||||
description
|
||||
"The counter64 type represents a non-negative integer
|
||||
that monotonically increases until it reaches a
|
||||
maximum value of 2^64-1 (18446744073709551615 decimal),
|
||||
when it wraps around and starts increasing again from zero.
|
||||
|
||||
Counters have no defined 'initial' value, and thus, a
|
||||
single value of a counter has (in general) no information
|
||||
content. Discontinuities in the monotonically increasing
|
||||
value normally occur at re-initialization of the
|
||||
management system, and at other times as specified in the
|
||||
description of a schema node using this type. If such
|
||||
other times can occur, for example, the creation of
|
||||
a schema node of type counter64 at times other than
|
||||
re-initialization, then a corresponding schema node
|
||||
should be defined, with an appropriate type, to indicate
|
||||
the last discontinuity.
|
||||
|
||||
The counter64 type should not be used for configuration
|
||||
schema nodes. A default statement SHOULD NOT be used in
|
||||
combination with the type counter64.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the Counter64 type of the SMIv2.";
|
||||
reference
|
||||
"RFC 2578: Structure of Management Information Version 2
|
||||
(SMIv2)";
|
||||
}
|
||||
|
||||
typedef zero-based-counter64 {
|
||||
type yang:counter64;
|
||||
default "0";
|
||||
description
|
||||
"The zero-based-counter64 type represents a counter64 that
|
||||
has the defined 'initial' value zero.
|
||||
|
||||
A schema node of this type will be set to zero (0) on creation
|
||||
and will thereafter increase monotonically until it reaches
|
||||
a maximum value of 2^64-1 (18446744073709551615 decimal),
|
||||
when it wraps around and starts increasing again from zero.
|
||||
|
||||
Provided that an application discovers a new schema node
|
||||
of this type within the minimum time to wrap, it can use the
|
||||
'initial' value as a delta. It is important for a management
|
||||
station to be aware of this minimum time and the actual time
|
||||
between polls, and to discard data if the actual time is too
|
||||
long or there is no defined minimum time.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the ZeroBasedCounter64 textual convention of the SMIv2.";
|
||||
reference
|
||||
"RFC 2856: Textual Conventions for Additional High Capacity
|
||||
Data Types";
|
||||
}
|
||||
|
||||
typedef gauge32 {
|
||||
type uint32;
|
||||
description
|
||||
"The gauge32 type represents a non-negative integer, which
|
||||
may increase or decrease, but shall never exceed a maximum
|
||||
value, nor fall below a minimum value. The maximum value
|
||||
cannot be greater than 2^32-1 (4294967295 decimal), and
|
||||
the minimum value cannot be smaller than 0. The value of
|
||||
a gauge32 has its maximum value whenever the information
|
||||
being modeled is greater than or equal to its maximum
|
||||
value, and has its minimum value whenever the information
|
||||
being modeled is smaller than or equal to its minimum value.
|
||||
If the information being modeled subsequently decreases
|
||||
below (increases above) the maximum (minimum) value, the
|
||||
gauge32 also decreases (increases).
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the Gauge32 type of the SMIv2.";
|
||||
reference
|
||||
"RFC 2578: Structure of Management Information Version 2
|
||||
(SMIv2)";
|
||||
}
|
||||
|
||||
typedef gauge64 {
|
||||
type uint64;
|
||||
description
|
||||
"The gauge64 type represents a non-negative integer, which
|
||||
may increase or decrease, but shall never exceed a maximum
|
||||
value, nor fall below a minimum value. The maximum value
|
||||
cannot be greater than 2^64-1 (18446744073709551615), and
|
||||
the minimum value cannot be smaller than 0. The value of
|
||||
a gauge64 has its maximum value whenever the information
|
||||
being modeled is greater than or equal to its maximum
|
||||
value, and has its minimum value whenever the information
|
||||
being modeled is smaller than or equal to its minimum value.
|
||||
If the information being modeled subsequently decreases
|
||||
below (increases above) the maximum (minimum) value, the
|
||||
gauge64 also decreases (increases).
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the CounterBasedGauge64 SMIv2 textual convention defined
|
||||
in RFC 2856";
|
||||
reference
|
||||
"RFC 2856: Textual Conventions for Additional High Capacity
|
||||
Data Types";
|
||||
}
|
||||
|
||||
/*** collection of identifier-related types ***/
|
||||
|
||||
typedef object-identifier {
|
||||
type string {
|
||||
pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))'
|
||||
+ '(\.(0|([1-9]\d*)))*';
|
||||
}
|
||||
description
|
||||
"The object-identifier type represents administratively
|
||||
assigned names in a registration-hierarchical-name tree.
|
||||
|
||||
Values of this type are denoted as a sequence of numerical
|
||||
non-negative sub-identifier values. Each sub-identifier
|
||||
value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers
|
||||
are separated by single dots and without any intermediate
|
||||
whitespace.
|
||||
|
||||
The ASN.1 standard restricts the value space of the first
|
||||
sub-identifier to 0, 1, or 2. Furthermore, the value space
|
||||
of the second sub-identifier is restricted to the range
|
||||
0 to 39 if the first sub-identifier is 0 or 1. Finally,
|
||||
the ASN.1 standard requires that an object identifier
|
||||
has always at least two sub-identifiers. The pattern
|
||||
captures these restrictions.
|
||||
|
||||
Although the number of sub-identifiers is not limited,
|
||||
module designers should realize that there may be
|
||||
implementations that stick with the SMIv2 limit of 128
|
||||
sub-identifiers.
|
||||
|
||||
This type is a superset of the SMIv2 OBJECT IDENTIFIER type
|
||||
since it is not restricted to 128 sub-identifiers. Hence,
|
||||
this type SHOULD NOT be used to represent the SMIv2 OBJECT
|
||||
IDENTIFIER type; the object-identifier-128 type SHOULD be
|
||||
used instead.";
|
||||
reference
|
||||
"ISO9834-1: Information technology -- Open Systems
|
||||
Interconnection -- Procedures for the operation of OSI
|
||||
Registration Authorities: General procedures and top
|
||||
arcs of the ASN.1 Object Identifier tree";
|
||||
}
|
||||
|
||||
typedef object-identifier-128 {
|
||||
type object-identifier {
|
||||
pattern '\d*(\.\d*){1,127}';
|
||||
}
|
||||
description
|
||||
"This type represents object-identifiers restricted to 128
|
||||
sub-identifiers.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the OBJECT IDENTIFIER type of the SMIv2.";
|
||||
reference
|
||||
"RFC 2578: Structure of Management Information Version 2
|
||||
(SMIv2)";
|
||||
}
|
||||
|
||||
typedef yang-identifier {
|
||||
type string {
|
||||
length "1..max";
|
||||
pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*';
|
||||
pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*';
|
||||
}
|
||||
description
|
||||
"A YANG identifier string as defined by the 'identifier'
|
||||
rule in Section 12 of RFC 6020. An identifier must
|
||||
start with an alphabetic character or an underscore
|
||||
followed by an arbitrary sequence of alphabetic or
|
||||
numeric characters, underscores, hyphens, or dots.
|
||||
|
||||
A YANG identifier MUST NOT start with any possible
|
||||
combination of the lowercase or uppercase character
|
||||
sequence 'xml'.";
|
||||
reference
|
||||
"RFC 6020: YANG - A Data Modeling Language for the Network
|
||||
Configuration Protocol (NETCONF)";
|
||||
}
|
||||
|
||||
/*** collection of types related to date and time***/
|
||||
|
||||
typedef date-and-time {
|
||||
type string {
|
||||
pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
|
||||
+ '(Z|[\+\-]\d{2}:\d{2})';
|
||||
}
|
||||
description
|
||||
"The date-and-time type is a profile of the ISO 8601
|
||||
standard for representation of dates and times using the
|
||||
Gregorian calendar. The profile is defined by the
|
||||
date-time production in Section 5.6 of RFC 3339.
|
||||
|
||||
The date-and-time type is compatible with the dateTime XML
|
||||
schema type with the following notable exceptions:
|
||||
|
||||
(a) The date-and-time type does not allow negative years.
|
||||
|
||||
(b) The date-and-time time-offset -00:00 indicates an unknown
|
||||
time zone (see RFC 3339) while -00:00 and +00:00 and Z
|
||||
all represent the same time zone in dateTime.
|
||||
|
||||
(c) The canonical format (see below) of data-and-time values
|
||||
differs from the canonical format used by the dateTime XML
|
||||
schema type, which requires all times to be in UTC using
|
||||
the time-offset 'Z'.
|
||||
|
||||
This type is not equivalent to the DateAndTime textual
|
||||
convention of the SMIv2 since RFC 3339 uses a different
|
||||
separator between full-date and full-time and provides
|
||||
higher resolution of time-secfrac.
|
||||
|
||||
The canonical format for date-and-time values with a known time
|
||||
zone uses a numeric time zone offset that is calculated using
|
||||
the device's configured known offset to UTC time. A change of
|
||||
the device's offset to UTC time will cause date-and-time values
|
||||
to change accordingly. Such changes might happen periodically
|
||||
in case a server follows automatically daylight saving time
|
||||
(DST) time zone offset changes. The canonical format for
|
||||
date-and-time values with an unknown time zone (usually
|
||||
referring to the notion of local time) uses the time-offset
|
||||
-00:00.";
|
||||
reference
|
||||
"RFC 3339: Date and Time on the Internet: Timestamps
|
||||
RFC 2579: Textual Conventions for SMIv2
|
||||
XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
|
||||
}
|
||||
|
||||
typedef timeticks {
|
||||
type uint32;
|
||||
description
|
||||
"The timeticks type represents a non-negative integer that
|
||||
represents the time, modulo 2^32 (4294967296 decimal), in
|
||||
hundredths of a second between two epochs. When a schema
|
||||
node is defined that uses this type, the description of
|
||||
the schema node identifies both of the reference epochs.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the TimeTicks type of the SMIv2.";
|
||||
reference
|
||||
"RFC 2578: Structure of Management Information Version 2
|
||||
(SMIv2)";
|
||||
}
|
||||
|
||||
typedef timestamp {
|
||||
type yang:timeticks;
|
||||
description
|
||||
"The timestamp type represents the value of an associated
|
||||
timeticks schema node at which a specific occurrence
|
||||
happened. The specific occurrence must be defined in the
|
||||
description of any schema node defined using this type. When
|
||||
the specific occurrence occurred prior to the last time the
|
||||
associated timeticks attribute was zero, then the timestamp
|
||||
value is zero. Note that this requires all timestamp values
|
||||
to be reset to zero when the value of the associated timeticks
|
||||
attribute reaches 497+ days and wraps around to zero.
|
||||
|
||||
The associated timeticks schema node must be specified
|
||||
in the description of any schema node using this type.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the TimeStamp textual convention of the SMIv2.";
|
||||
reference
|
||||
"RFC 2579: Textual Conventions for SMIv2";
|
||||
}
|
||||
|
||||
/*** collection of generic address types ***/
|
||||
|
||||
typedef phys-address {
|
||||
type string {
|
||||
pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
|
||||
}
|
||||
|
||||
description
|
||||
"Represents media- or physical-level addresses represented
|
||||
as a sequence octets, each octet represented by two hexadecimal
|
||||
numbers. Octets are separated by colons. The canonical
|
||||
representation uses lowercase characters.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the PhysAddress textual convention of the SMIv2.";
|
||||
reference
|
||||
"RFC 2579: Textual Conventions for SMIv2";
|
||||
}
|
||||
|
||||
typedef mac-address {
|
||||
type string {
|
||||
pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
|
||||
}
|
||||
description
|
||||
"The mac-address type represents an IEEE 802 MAC address.
|
||||
The canonical representation uses lowercase characters.
|
||||
|
||||
In the value set and its semantics, this type is equivalent
|
||||
to the MacAddress textual convention of the SMIv2.";
|
||||
reference
|
||||
"IEEE 802: IEEE Standard for Local and Metropolitan Area
|
||||
Networks: Overview and Architecture
|
||||
RFC 2579: Textual Conventions for SMIv2";
|
||||
}
|
||||
|
||||
/*** collection of XML-specific types ***/
|
||||
|
||||
typedef xpath1.0 {
|
||||
type string;
|
||||
description
|
||||
"This type represents an XPATH 1.0 expression.
|
||||
|
||||
When a schema node is defined that uses this type, the
|
||||
description of the schema node MUST specify the XPath
|
||||
context in which the XPath expression is evaluated.";
|
||||
reference
|
||||
"XPATH: XML Path Language (XPath) Version 1.0";
|
||||
}
|
||||
|
||||
/*** collection of string types ***/
|
||||
|
||||
typedef hex-string {
|
||||
type string {
|
||||
pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
|
||||
}
|
||||
description
|
||||
"A hexadecimal string with octets represented as hex digits
|
||||
separated by colons. The canonical representation uses
|
||||
lowercase characters.";
|
||||
}
|
||||
|
||||
typedef uuid {
|
||||
type string {
|
||||
pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-'
|
||||
+ '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}';
|
||||
}
|
||||
description
|
||||
"A Universally Unique IDentifier in the string representation
|
||||
defined in RFC 4122. The canonical representation uses
|
||||
lowercase characters.
|
||||
|
||||
The following is an example of a UUID in string representation:
|
||||
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
|
||||
";
|
||||
reference
|
||||
"RFC 4122: A Universally Unique IDentifier (UUID) URN
|
||||
Namespace";
|
||||
}
|
||||
|
||||
typedef dotted-quad {
|
||||
type string {
|
||||
pattern
|
||||
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
|
||||
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
|
||||
}
|
||||
description
|
||||
"An unsigned 32-bit number expressed in the dotted-quad
|
||||
notation, i.e., four octets written as decimal numbers
|
||||
and separated with the '.' (full stop) character.";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user