Created
August 6, 2018 13:29
-
-
Save rwestphal/64ba7f91949c17cb4a65d181d2a827e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /tmp/ietf-rip.json | |
{ | |
"ietf-interfaces:interfaces": { | |
"interface": [ | |
{ | |
"description": "Engineering", | |
"name": "eth0" | |
} | |
] | |
}, | |
"ietf-routing:routing": { | |
"control-plane-protocols": { | |
"control-plane-protocol": [ | |
{ | |
"ietf-rip:rip": { | |
"default-metric": "2", | |
"distance": "80", | |
"interfaces": { | |
"interface": [ | |
{ | |
"interface": "eth0", | |
"split-horizon": "poison-reverse" | |
} | |
] | |
}, | |
"originate-default-route": { | |
"enabled": "true" | |
}, | |
"timers": { | |
"flush-interval": "241", | |
"holddown-interval": "181", | |
"update-interval": "31" | |
} | |
}, | |
"name": "main", | |
"type": "ietf-rip:ripv2" | |
} | |
] | |
} | |
} | |
} | |
$ telnet :: ripd | |
Trying ::... | |
Connected to ::. | |
Escape character is '^]'. | |
Hello, this is FRRouting (version 5.1-dev-g599c199-dirty). | |
Copyright 1996-2005 Kunihiro Ishiguro, et al. | |
This is a git build of frr-5.1-dev-429-gb6599c199-dirty | |
Associated branch(es): | |
local:northbound-yang-v2 | |
User Access Verification | |
Password: | |
ripd> en | |
ripd# conf t | |
ripd(config)# yang module-translator load /tmp/frr-ietf-translator.json | |
% Module translator "ietf" loaded successfully. | |
ripd(config)# configuration load file json translate ietf /tmp/ietf-rip.json | |
ripd(config)# show configuration candidate json | |
{ | |
"frr-interface:lib": { | |
"interface": [ | |
{ | |
"name": "eth0", | |
"vrf": "Default-IP-Routing-Table", | |
"description": "Engineering", | |
"frr-ripd:rip": { | |
"split-horizon": "poison-reverse" | |
} | |
} | |
] | |
}, | |
"frr-ripd:ripd": { | |
"instance": { | |
"default-metric": 2, | |
"distance": { | |
"default": 80 | |
}, | |
"interface": [ | |
"eth0" | |
], | |
"default-information-originate": true, | |
"timers": { | |
"flush-interval": 241, | |
"holddown-interval": 181, | |
"update-interval": 31 | |
} | |
} | |
} | |
} | |
ripd(config)# show configuration candidate json translate ietf | |
{ | |
"ietf-interfaces:interfaces": { | |
"interface": [ | |
{ | |
"name": "eth0", | |
"description": "Engineering" | |
} | |
] | |
}, | |
"ietf-routing:routing": { | |
"control-plane-protocols": { | |
"control-plane-protocol": [ | |
{ | |
"type": "ietf-rip:ripv2", | |
"name": "main", | |
"ietf-rip:rip": { | |
"interfaces": { | |
"interface": [ | |
{ | |
"interface": "eth0", | |
"split-horizon": "poison-reverse" | |
} | |
] | |
}, | |
"default-metric": 2, | |
"distance": 80, | |
"originate-default-route": { | |
"enabled": true | |
}, | |
"timers": { | |
"flush-interval": 241, | |
"holddown-interval": 181, | |
"update-interval": 31 | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
ripd(config)# commit | |
% Configuration committed successfully. | |
ripd(config)# exit | |
ripd# show yang module-translator | |
Family Module Deviations Coverage (%) | |
----------------------------------------------------------------------- | |
ietf ietf-interfaces frr-deviations-ietf-interfaces 3.92 | |
ietf ietf-routing frr-deviations-ietf-routing 1.56 | |
ietf ietf-rip frr-deviations-ietf-rip 13.60 | |
ripd# | |
ripd# show yang module | |
Flags: I - Implemented, D - Deviated | |
Module Version Flags Namespace | |
------------------------------------------------------------------------------------ | |
ietf-yang-metadata 1.0 urn:ietf:params:xml:ns:yang:ietf-yang-metadata | |
yang 1.0 I urn:ietf:params:xml:ns:yang:1 | |
ietf-inet-types 1.0 urn:ietf:params:xml:ns:yang:ietf-inet-types | |
ietf-yang-types 1.0 urn:ietf:params:xml:ns:yang:ietf-yang-types | |
ietf-datastores 1.1 urn:ietf:params:xml:ns:yang:ietf-datastores | |
ietf-yang-library 1.1 I urn:ietf:params:xml:ns:yang:ietf-yang-library | |
frr-interface 1.1 I http://frrouting.org/yang/interface | |
frr-route-types 1.1 http://frrouting.org/yang/route-types | |
frr-ripd 1.1 I http://frrouting.org/yang/ripd | |
ripd# | |
ripd# show yang module module-translator ietf | |
Flags: I - Implemented, D - Deviated | |
Module Version Flags Namespace | |
---------------------------------------------------------------------------------------------------------- | |
ietf-yang-metadata 1.0 urn:ietf:params:xml:ns:yang:ietf-yang-metadata | |
yang 1.0 I urn:ietf:params:xml:ns:yang:1 | |
ietf-inet-types 1.0 urn:ietf:params:xml:ns:yang:ietf-inet-types | |
ietf-yang-types 1.0 urn:ietf:params:xml:ns:yang:ietf-yang-types | |
ietf-datastores 1.1 urn:ietf:params:xml:ns:yang:ietf-datastores | |
ietf-yang-library 1.1 I urn:ietf:params:xml:ns:yang:ietf-yang-library | |
ietf-interfaces 1.1 ID urn:ietf:params:xml:ns:yang:ietf-interfaces | |
frr-deviations-ietf-interfaces 1.1 I http://frrouting.org/yang/frr-deviations-ietf-interfaces | |
ietf-routing 1.1 ID urn:ietf:params:xml:ns:yang:ietf-routing | |
frr-deviations-ietf-routing 1.1 I http://frrouting.org/yang/frr-deviations-ietf-routing | |
ietf-ip 1.1 urn:ietf:params:xml:ns:yang:ietf-ip | |
ietf-netconf-acm 1.0 urn:ietf:params:xml:ns:yang:ietf-netconf-acm | |
ietf-key-chain 1.1 I urn:ietf:params:xml:ns:yang:ietf-key-chain | |
iana-bfd-types 1.1 urn:ietf:params:xml:ns:yang:iana-bfd-types | |
ietf-bfd-types 1.1 urn:ietf:params:xml:ns:yang:ietf-bfd-types | |
ietf-routing-types 1.0 urn:ietf:params:xml:ns:yang:ietf-routing-types | |
iana-routing-types 1.0 urn:ietf:params:xml:ns:yang:iana-routing-types | |
ietf-ospf 1.1 urn:ietf:params:xml:ns:yang:ietf-ospf | |
ietf-isis 1.0 urn:ietf:params:xml:ns:yang:ietf-isis | |
ietf-rip 1.1 ID urn:ietf:params:xml:ns:yang:ietf-rip | |
frr-deviations-ietf-rip 1.1 I http://frrouting.org/yang/frr-deviations-ietf-rip | |
ripd# show yang module frr-ripd ? | |
summary Display summary information about the module | |
tree Display module in the tree (RFC 8340) format | |
yang Display module in the YANG format | |
yin Display module in the YIN format | |
ripd# show yang module frr-ripd tree | |
module: frr-ripd | |
+--rw ripd | |
+--rw instance! | |
| +--rw allow-ecmp? boolean <false> | |
| +--rw default-information-originate? boolean <false> | |
| +--rw default-metric? uint8 <1> | |
| +--rw distance | |
| | +--rw default? uint8 <0> | |
| | +--rw source* [prefix] | |
| | +--rw prefix ietf-inet-types:ipv4-prefix | |
| | +--rw distance uint8 | |
| | +--rw access-list? string | |
| +--rw explicit-neighbor* ietf-inet-types:ipv4-address | |
| +--rw network* ietf-inet-types:ipv4-prefix | |
| +--rw interface* string | |
| +--rw offset-list* [interface direction] | |
| | +--rw interface string | |
| | +--rw direction enumeration | |
| | +--rw access-list string | |
| | +--rw metric uint8 | |
| +--rw passive-default? boolean <false> | |
| +--rw passive-interface* string | |
| +--rw non-passive-interface* string | |
| +--rw redistribute* [protocol] | |
| | +--rw protocol frr-route-types:frr-route-types-v4 | |
| | +--rw route-map? string | |
| | +--rw metric? uint8 | |
| +--rw static-route* ietf-inet-types:ipv4-prefix | |
| +--rw timers | |
| | +--rw flush-interval? uint32 <120> | |
| | +--rw holddown-interval? uint32 <180> | |
| | +--rw update-interval? uint32 <30> | |
| +--rw version | |
| +--rw receive? enumeration <1-2> | |
| +--rw send? enumeration <2> | |
+--ro state | |
+--ro neighbors | |
| +--ro neighbor* [address] | |
| +--ro address ietf-inet-types:ipv4-address | |
| +--ro last-update? ietf-yang-types:date-and-time | |
| +--ro bad-packets-rcvd? ietf-yang-types:counter32 | |
| +--ro bad-routes-rcvd? ietf-yang-types:counter32 | |
+--ro routes | |
+--ro route* [prefix] | |
+--ro prefix ietf-inet-types:ipv4-prefix | |
+--ro next-hop? ietf-inet-types:ipv4-address | |
+--ro interface? string | |
+--ro metric? uint8 | |
augment /frr-interface:lib/frr-interface:interface: | |
+--rw rip | |
+--rw split-horizon? enumeration <simple> | |
+--rw v2-broadcast? boolean <false> | |
+--rw version-receive? enumeration <unspecified> | |
+--rw version-send? enumeration <unspecified> | |
+--rw authentication-scheme | |
| +--rw mode? enumeration <none> | |
| +--rw md5-auth-length? enumeration <20> | |
+--rw (authentication-data)? | |
+--:(authentication-password) | |
| +--rw authentication-password? string | |
+--:(authentication-key-chain) | |
+--rw authentication-key-chain? string | |
rpcs: | |
+---x clear-rip-route | |
notifications: | |
+---n authentication-type-failure | |
| +--ro interface-name? string | |
| +--ro raw-pdu? binary | |
+---n authentication-failure | |
+--ro interface-name? string | |
+--ro raw-pdu? binary | |
ripd# show yang module module-translator ietf ietf-rip tree | |
module: ietf-rip | |
augment /ietf-routing:routing/ietf-routing:control-plane-protocols/ietf-routing:control-plane-protocol: | |
+--rw rip | |
+--rw originate-default-route | |
| +--rw enabled? boolean <false> | |
+--rw default-metric? uint8 <1> | |
+--rw distance? uint8 <0> | |
+--rw timers | |
| +--rw update-interval? uint16 <30> | |
| +--rw holddown-interval? uint16 <180> | |
| +--rw flush-interval? uint16 <120> | |
+--rw interfaces | |
| +--rw interface* [interface] | |
| +--rw interface ietf-interfaces:interface-ref | |
| +--rw split-horizon? enumeration <simple> | |
+--ro ipv4 | |
+--ro neighbors | |
| +--ro neighbor* [ipv4-address] | |
| +--ro ipv4-address ietf-inet-types:ipv4-address | |
| +--ro last-update? ietf-yang-types:date-and-time | |
| +--ro bad-packets-rcvd? ietf-yang-types:counter32 | |
| +--ro bad-routes-rcvd? ietf-yang-types:counter32 | |
+--ro routes | |
+--ro route* [ipv4-prefix] | |
+--ro ipv4-prefix ietf-inet-types:ipv4-prefix | |
+--ro next-hop? ietf-inet-types:ipv4-address | |
+--ro interface? ietf-interfaces:interface-ref | |
+--ro metric? uint8 | |
rpcs: | |
+---x clear-rip-route | |
+---- input |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment