Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: yang defination for basic routing frr-routing #5530

Merged
merged 1 commit into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ nodist_lib_libfrr_la_SOURCES = \
yang/frr-interface.yang.c \
yang/frr-route-types.yang.c \
yang/frr-vrf.yang.c \
yang/frr-routing.yang.c \
yang/ietf/ietf-routing-types.yang.c \
yang/frr-module-translator.yang.c \
# end
Expand Down
135 changes: 135 additions & 0 deletions yang/frr-routing.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
module frr-routing {
yang-version "1.1";
namespace "http://frrouting.org/yang/routing";
prefix "rt";

import ietf-yang-types {
prefix "yang";
}

import frr-vrf {
prefix frr-vrf;
Spantik marked this conversation as resolved.
Show resolved Hide resolved
}

organization
"Free Range Routing";

contact
"FRR Users List: <mailto:frog@lists.frrouting.org>
FRR Development List: <mailto:dev@lists.frrouting.org>";

description
"This YANG module defines essential components for the management
of a routing subsystem.";

revision 2019-08-15 {
description
"Initial revision.";
}

/* Identities */

identity address-family {
description
"Base identity from which identities describing address
families are derived.";
}

identity ipv4 {
base address-family;
description
"This identity represents an IPv4 address family.";
}

identity ipv6 {
base address-family;
description
"This identity represents an 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.";
}

/* Type Definitions */

typedef administrative-distance {
type uint8 {
range "1..255";
}
description
"Admin distance associated with the route.";
}

/* 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 a 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";
}
}

/* Data nodes */

container routing {
description
"Configuration parameters for the routing subsystem.";
container control-plane-protocols {
description
"Support for control-plane protocol instances.";
list control-plane-protocol {
key "type name vrf";
description
"Each entry contains a control-plane protocol instance.";
leaf type {
type identityref {
base control-plane-protocol;
}
description
"Type of the control-plane protocol";
}
leaf name {
type string;
description
"An arbitrary name of the control-plane protocol
instance.";
}
leaf vrf {
type frr-vrf:vrf-ref;
description
"vrf for control-plane protocol";
}
}
}
}
}
1 change: 1 addition & 0 deletions yang/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dist_yangmodels_DATA += yang/frr-test-module.yang
dist_yangmodels_DATA += yang/frr-interface.yang
dist_yangmodels_DATA += yang/frr-vrf.yang
dist_yangmodels_DATA += yang/frr-route-types.yang
dist_yangmodels_DATA += yang/frr-routing.yang
dist_yangmodels_DATA += yang/ietf/ietf-routing-types.yang

if BFDD
Expand Down