0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

fixup! split show_protocols_all to submodules, show memory and status updates

This commit is contained in:
Katerina Kubecova 2023-11-16 16:40:33 +01:00
parent 6d73b93be8
commit cebae02023
2 changed files with 21 additions and 47 deletions

View File

@ -4,47 +4,15 @@ module show_protocols_all {
prefix "protocols_all";
import ietf-yang-types {
prefix yang;
}
include "show_protocols_bgp";
include "show_protocols_rpki";
description "cli show protocols all format";
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})';
}
}
typedef ip-address {
type union {
type ipv4-address;
type ipv6-address;
}
}
typedef ipv4-address {
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])'
+ '(%[\p{N}\p{L}]+)?';
}
}
typedef ipv6-address {
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]|[01]?[0-9]?[0-9])\.){3}'
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ '(%[\p{N}\p{L}]+)?';
pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ '(%.+)?';
}
}
typedef status {
type enumeration {
@ -125,7 +93,7 @@ module show_protocols_all {
type state;
}
leaf since {
type date-and-time;
type yang:date-and-time;
}
leaf info {
type string;

View File

@ -3,6 +3,12 @@ submodule show_protocols_bgp {
belongs-to show_protocols_all {
prefix "show_protocols_all";
}
import ietf-yang-types {
prefix yang;
}
import ietf-inet-types {
prefix inet;
}
description "cli show bgp";
@ -102,12 +108,12 @@ submodule show_protocols_bgp {
choice is_dynamic {
case dynamic {
leaf neighbor_range {
type ip-address;
type inet:ip-address;
}
}
case nondinamic {
leaf neighbor_address {
type ip-address;
type inet:ip-address;
}
}
}
@ -128,7 +134,7 @@ submodule show_protocols_bgp {
case start_state {
container error_wait {
leaf remains {
type date-and-time;
type yang:date-and-time;
}
leaf delay {
type uint32;
@ -136,7 +142,7 @@ submodule show_protocols_bgp {
}
container bs_active {
leaf remains {
type date-and-time;
type yang:date-and-time;
}
leaf delay {
type uint32;
@ -144,7 +150,7 @@ submodule show_protocols_bgp {
}
container restart {
leaf restart_timer{
type date-and-time;
type yang:date-and-time;
}
}
}
@ -179,7 +185,7 @@ submodule show_protocols_bgp {
}
}
leaf source_address {
type ip-address;
type inet:ip-address;
}
container hold_timer {
uses timer;
@ -201,14 +207,14 @@ submodule show_protocols_bgp {
type string;
}
leaf ll_stale_timer {
type date-and-time;
type yang:date-and-time;
}
container ipa_zero {
leaf next_hop_addr {
type ip-address;
type inet:ip-address;
}
leaf link_addr {
type ip-address;
type inet:ip-address;
}
}
leaf ipv4_table {
@ -224,7 +230,7 @@ submodule show_protocols_bgp {
}
}
leaf bgp_next_hop {
type ip-address;
type inet:ip-address;
}
}
}