yang: lint cleanup of test module

Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
Christian Hopps 2025-01-18 18:17:36 +00:00
parent 13838a87cf
commit 885c5c496c

View file

@ -7,13 +7,14 @@ module frr-test-module {
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-yang-types {
prefix yang;
}
import frr-interface { import frr-interface {
prefix frr-interface; prefix frr-interface;
} }
organization "placeholder for lint";
contact "placeholder for lint";
description description
"FRRouting internal testing module. "FRRouting internal testing module.
@ -45,41 +46,56 @@ module frr-test-module {
revision 2018-11-26 { revision 2018-11-26 {
description description
"Initial revision."; "Initial revision.";
reference "placeholder for lint";
} }
container frr-test-module { container frr-test-module {
config false; config false;
description "a container for test module data";
container vrfs { container vrfs {
description "a container of vrfs";
list vrf { list vrf {
key "name"; key "name";
description "a keyed vrf list object";
leaf name { leaf name {
type string; type string;
description "name of vrf";
} }
container interfaces { container interfaces {
description "container of leaf-list interfaces";
leaf-list interface { leaf-list interface {
type frr-interface:interface-ref; type frr-interface:interface-ref;
description "leaf list interface object";
} }
leaf-list interface-new { leaf-list interface-new {
type frr-interface:interface-ref; type frr-interface:interface-ref;
description "second leaf list interface object";
} }
} }
container routes { container routes {
description "container of key-less route objects";
list route { list route {
description "a key-less route object";
leaf prefix { leaf prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
description "prefix of the route object";
} }
leaf next-hop { leaf next-hop {
type inet:ipv4-address; type inet:ipv4-address;
description "nexthop of the route object";
} }
leaf interface { leaf interface {
type frr-interface:interface-ref; type frr-interface:interface-ref;
description "interface of the route object";
} }
leaf metric { leaf metric {
type uint8; type uint8;
description "metric of the route object";
} }
leaf active { leaf active {
type empty; type empty;
description "active status of the route object";
} }
} }
} }
@ -87,16 +103,19 @@ module frr-test-module {
input { input {
leaf data { leaf data {
type string; type string;
description "data input to ping action.";
} }
} }
output { output {
leaf vrf { leaf vrf {
type string; type string;
description "vrf returned from ping action.";
} }
// can't use the same name in input and output // can't use the same name in input and output
// because of a bug in libyang < 2.1.148 // because of a bug in libyang < 2.1.148
leaf data-out { leaf data-out {
type string; type string;
description "data return from ping action.";
} }
} }
} }