-
Notifications
You must be signed in to change notification settings - Fork 11
07. Pyang (Python program for Yang)
This is a python program. You can use it to:
- Validate YANG modules against YANG RFCs
- Convert YANG modules into equivalent YIN module (XML).
- Generate a tree representation of YANG models for quick visualization.
pyang installation from pypi:
$ sudo pip install pyang
Created a directory $HOME/yang/modules. Put all the yang modules into this directory. It is used by pyang to search the imported modules.
Example to validate the module openconfig-bgp.yang
The YANG module openconfig-bgp.yang imports other YANG modules: so make sure pyang can find all these yang modules (otherwise pyang wont be able to validate the module openconfig-bgp.yang)
$ pyang openconfig-bgp.yang
A YANG module can be translated into an XML syntax called YIN. The translated module is called a YIN module. The YANG and YIN formats contain equivalent information using different notations: YIN is YANG in XML. A YANG module can be translated into YIN syntax without losing any information. Example (openconfig-bgp.yin is the YIN equivalent of openconfig-bgp.yang)
$ pyang openconfig-bgp.yang -f yin -o openconfig-bgp.yin
$ ls
Example with the module openconfig-bgp.yang
$ pyang openconfig-bgp.yang -f tree --tree-path=/bgp/neighbors/neighbor/state --tree-depth=5
module: openconfig-bgp
+--rw bgp
+--rw neighbors
+--rw neighbor* [neighbor-address]
+--ro state
+--ro peer-group? -> ../../../../peer-groups/peer-group/peer-group-name
+--ro neighbor-address? oc-inet:ip-address
+--ro enabled? boolean
+--ro peer-as? oc-inet:as-number
+--ro local-as? oc-inet:as-number
+--ro peer-type? oc-bgp-types:peer-type
+--ro auth-password? oc-types:routing-password
+--ro remove-private-as? oc-bgp-types:remove-private-as-option
+--ro route-flap-damping? boolean
+--ro send-community? oc-bgp-types:community-type
+--ro description? string
+--ro session-state? enumeration
+--ro last-established? oc-types:timeticks64
+--ro established-transitions? oc-yang:counter64
+--ro supported-capabilities* identityref
+--ro messages
| ...
+--ro queues
| ...
+--ro dynamically-configured? boolean
$ pyang -f tree openconfig-bgp.yang
module: openconfig-bgp
+--rw bgp!
+--rw global
| +--rw config
| | +--rw as inet:as-number
| | +--rw router-id? yang:dotted-quad
| +--ro state
| | +--ro as inet:as-number
| | +--ro router-id? yang:dotted-quad
| | +--ro total-paths? uint32
| | +--ro total-prefixes? uint32
| +--rw route-selection-options
| | +--rw config
| | | +--rw always-compare-med? boolean
| | | +--rw ignore-as-path-length? boolean
| | | +--rw external-compare-router-id? boolean
| | | +--rw advertise-inactive-routes? boolean
| | | +--rw enable-aigp? boolean
| | | +--rw ignore-next-hop-igp-metric? boolean
| | +--ro state
| | +--ro always-compare-med? boolean
| | +--ro ignore-as-path-length? boolean
| | +--ro external-compare-router-id? boolean
| | +--ro advertise-inactive-routes? boolean
| | +--ro enable-aigp? boolean
| | +--ro ignore-next-hop-igp-metric? boolean
| +--rw default-route-distance
| | +--rw config
| | | +--rw external-route-distance? uint8
| | | +--rw internal-route-distance? uint8
| | +--ro state
| | +--ro external-route-distance? uint8
| | +--ro internal-route-distance? uint8
| +--rw confederation
| | +--rw config
| | | +--rw enabled? boolean
| | | +--rw identifier? inet:as-number
| | | +--rw member-as* inet:as-number
| | +--ro state
| | +--ro enabled? boolean
| | +--ro identifier? inet:as-number
| | +--ro member-as* inet:as-number
| +--rw use-multiple-paths
| | +--rw config
| | | +--rw enabled? boolean
| | +--ro state
| | | +--ro enabled? boolean
| | +--rw ebgp
| | | +--rw config
| | | | +--rw allow-multiple-as? boolean
| | | | +--rw maximum-paths? uint32
| | | +--ro state
| | | +--ro allow-multiple-as? boolean
| | | +--ro maximum-paths? uint32
| | +--rw ibgp
| | +--rw config
| | | +--rw maximum-paths? uint32
| | +--ro state
| | +--ro maximum-paths? uint32
| +--rw graceful-restart
| | +--rw config
| | | +--rw enabled? boolean
| | | +--rw restart-time? uint16
| | | +--rw stale-routes-time? decimal64
| | | +--rw helper-only? boolean
| | +--ro state
| | +--ro enabled? boolean
| | +--ro restart-time? uint16
| | +--ro stale-routes-time? decimal64
| | +--ro helper-only? boolean
| +--rw afi-safis
| | +--rw afi-safi* [afi-safi-name]
| | +--rw afi-safi-name -> ../config/afi-safi-name
| | +--rw graceful-restart
| | | +--rw config
| | | | +--rw enabled? boolean
| | | +--ro state
| | | +--ro enabled? boolean
| | +--rw config
| | | +--rw afi-safi-name? identityref
| | | +--rw enabled? boolean
| | +--ro state
| | | +--ro afi-safi-name? identityref
| | | +--ro enabled? boolean
| | | +--ro total-paths? uint32
| | | +--ro total-prefixes? uint32
| | +--rw apply-policy
| | | +--rw config
| | | | +--rw import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | | +--rw default-import-policy? default-policy-type
| | | | +--rw export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | | +--rw default-export-policy? default-policy-type
| | | +--ro state
| | | +--ro import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--ro default-import-policy? default-policy-type
| | | +--ro export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--ro default-export-policy? default-policy-type
| | +--rw ipv4-unicast
| | | +--rw prefix-limit
| | | | +--rw config
| | | | | +--rw max-prefixes? uint32
| | | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | | +--rw restart-timer? decimal64
| | | | +--ro state
| | | | +--ro max-prefixes? uint32
| | | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | | +--ro restart-timer? decimal64
| | | +--rw config
| | | | +--rw send-default-route? boolean
| | | +--ro state
| | | +--ro send-default-route? boolean
| | +--rw ipv6-unicast
| | | +--rw prefix-limit
| | | | +--rw config
| | | | | +--rw max-prefixes? uint32
| | | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | | +--rw restart-timer? decimal64
| | | | +--ro state
| | | | +--ro max-prefixes? uint32
| | | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | | +--ro restart-timer? decimal64
| | | +--rw config
| | | | +--rw send-default-route? boolean
| | | +--ro state
| | | +--ro send-default-route? boolean
| | +--rw ipv4-labeled-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw ipv6-labeled-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv4-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv6-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv4-multicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv6-multicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l2vpn-vpls
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l2vpn-evpn
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw route-selection-options
| | | +--rw config
| | | | +--rw always-compare-med? boolean
| | | | +--rw ignore-as-path-length? boolean
| | | | +--rw external-compare-router-id? boolean
| | | | +--rw advertise-inactive-routes? boolean
| | | | +--rw enable-aigp? boolean
| | | | +--rw ignore-next-hop-igp-metric? boolean
| | | +--ro state
| | | +--ro always-compare-med? boolean
| | | +--ro ignore-as-path-length? boolean
| | | +--ro external-compare-router-id? boolean
| | | +--ro advertise-inactive-routes? boolean
| | | +--ro enable-aigp? boolean
| | | +--ro ignore-next-hop-igp-metric? boolean
| | +--rw use-multiple-paths
| | +--rw config
| | | +--rw enabled? boolean
| | +--ro state
| | | +--ro enabled? boolean
| | +--rw ebgp
| | | +--rw config
| | | | +--rw allow-multiple-as? boolean
| | | | +--rw maximum-paths? uint32
| | | +--ro state
| | | +--ro allow-multiple-as? boolean
| | | +--ro maximum-paths? uint32
| | +--rw ibgp
| | +--rw config
| | | +--rw maximum-paths? uint32
| | +--ro state
| | +--ro maximum-paths? uint32
| +--rw apply-policy
| +--rw config
| | +--rw import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--rw default-import-policy? default-policy-type
| | +--rw export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--rw default-export-policy? default-policy-type
| +--ro state
| +--ro import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| +--ro default-import-policy? default-policy-type
| +--ro export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| +--ro default-export-policy? default-policy-type
+--rw neighbors
| +--rw neighbor* [neighbor-address]
| +--rw neighbor-address -> ../config/neighbor-address
| +--rw config
| | +--rw peer-as? inet:as-number
| | +--rw local-as? inet:as-number
| | +--rw peer-type? oc-bgp-types:peer-type
| | +--rw auth-password? string
| | +--rw remove-private-as? oc-bgp-types:remove-private-as-option
| | +--rw route-flap-damping? boolean
| | +--rw send-community? oc-bgp-types:community-type
| | +--rw description? string
| | +--rw peer-group? -> /bgp/peer-groups/peer-group/peer-group-name
| | +--rw neighbor-address? inet:ip-address
| | +--rw enabled? boolean
| +--ro state
| | +--ro peer-as? inet:as-number
| | +--ro local-as? inet:as-number
| | +--ro peer-type? oc-bgp-types:peer-type
| | +--ro auth-password? string
| | +--ro remove-private-as? oc-bgp-types:remove-private-as-option
| | +--ro route-flap-damping? boolean
| | +--ro send-community? oc-bgp-types:community-type
| | +--ro description? string
| | +--ro peer-group? -> /bgp/peer-groups/peer-group/peer-group-name
| | +--ro neighbor-address? inet:ip-address
| | +--ro enabled? boolean
| | +--ro session-state? enumeration
| | +--ro supported-capabilities* identityref
| | +--ro messages
| | | +--ro sent
| | | | +--ro UPDATE? uint64
| | | | +--ro NOTIFICATION? uint64
| | | +--ro received
| | | +--ro UPDATE? uint64
| | | +--ro NOTIFICATION? uint64
| | +--ro queues
| | +--ro input? uint32
| | +--ro output? uint32
| +--rw timers
| | +--rw config
| | | +--rw connect-retry? decimal64
| | | +--rw hold-time? decimal64
| | | +--rw keepalive-interval? decimal64
| | | +--rw minimum-advertisement-interval? decimal64
| | +--ro state
| | +--ro connect-retry? decimal64
| | +--ro hold-time? decimal64
| | +--ro keepalive-interval? decimal64
| | +--ro minimum-advertisement-interval? decimal64
| | +--ro uptime? yang:timeticks
| | +--ro negotiated-hold-time? decimal64
| +--rw transport
| | +--rw config
| | | +--rw tcp-mss? uint16
| | | +--rw mtu-discovery? boolean
| | | +--rw passive-mode? boolean
| | | +--rw local-address? union
| | +--ro state
| | +--ro tcp-mss? uint16
| | +--ro mtu-discovery? boolean
| | +--ro passive-mode? boolean
| | +--ro local-address? union
| | +--ro local-port? inet:port-number
| | +--ro remote-address? inet:ip-address
| | +--ro remote-port? inet:port-number
| +--rw error-handling
| | +--rw config
| | | +--rw treat-as-withdraw? boolean
| | +--ro state
| | +--ro treat-as-withdraw? boolean
| | +--ro erroneous-update-messages? uint32
| +--rw logging-options
| | +--rw config
| | | +--rw log-neighbor-state-changes? boolean
| | +--ro state
| | +--ro log-neighbor-state-changes? boolean
| +--rw ebgp-multihop
| | +--rw config
| | | +--rw enabled? boolean
| | | +--rw multihop-ttl? uint8
| | +--ro state
| | +--ro enabled? boolean
| | +--ro multihop-ttl? uint8
| +--rw route-reflector
| | +--rw config
| | | +--rw route-reflector-cluster-id? oc-bgp-types:rr-cluster-id-type
| | | +--rw route-reflector-client? boolean
| | +--ro state
| | +--ro route-reflector-cluster-id? oc-bgp-types:rr-cluster-id-type
| | +--ro route-reflector-client? boolean
| +--rw as-path-options
| | +--rw config
| | | +--rw allow-own-as? uint8
| | | +--rw replace-peer-as? boolean
| | +--ro state
| | +--ro allow-own-as? uint8
| | +--ro replace-peer-as? boolean
| +--rw add-paths
| | +--rw config
| | | +--rw receive? boolean
| | | +--rw send-max? uint8
| | +--ro state
| | +--ro receive? boolean
| | +--ro send-max? uint8
| +--rw afi-safis
| | +--rw afi-safi* [afi-safi-name]
| | +--rw afi-safi-name -> ../config/afi-safi-name
| | +--rw graceful-restart
| | | +--rw config
| | | | +--rw enabled? boolean
| | | +--ro state
| | | +--ro enabled? boolean
| | | +--ro received? boolean
| | | +--ro advertised? boolean
| | +--rw config
| | | +--rw afi-safi-name? identityref
| | | +--rw enabled? boolean
| | +--ro state
| | | +--ro afi-safi-name? identityref
| | | +--ro enabled? boolean
| | | +--ro active? boolean
| | | +--ro prefixes
| | | +--ro received? uint32
| | | +--ro sent? uint32
| | | +--ro installed? uint32
| | +--rw apply-policy
| | | +--rw config
| | | | +--rw import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | | +--rw default-import-policy? default-policy-type
| | | | +--rw export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | | +--rw default-export-policy? default-policy-type
| | | +--ro state
| | | +--ro import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--ro default-import-policy? default-policy-type
| | | +--ro export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--ro default-export-policy? default-policy-type
| | +--rw ipv4-unicast
| | | +--rw prefix-limit
| | | | +--rw config
| | | | | +--rw max-prefixes? uint32
| | | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | | +--rw restart-timer? decimal64
| | | | +--ro state
| | | | +--ro max-prefixes? uint32
| | | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | | +--ro restart-timer? decimal64
| | | +--rw config
| | | | +--rw send-default-route? boolean
| | | +--ro state
| | | +--ro send-default-route? boolean
| | +--rw ipv6-unicast
| | | +--rw prefix-limit
| | | | +--rw config
| | | | | +--rw max-prefixes? uint32
| | | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | | +--rw restart-timer? decimal64
| | | | +--ro state
| | | | +--ro max-prefixes? uint32
| | | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | | +--ro restart-timer? decimal64
| | | +--rw config
| | | | +--rw send-default-route? boolean
| | | +--ro state
| | | +--ro send-default-route? boolean
| | +--rw ipv4-labeled-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw ipv6-labeled-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv4-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv6-unicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv4-multicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l3vpn-ipv6-multicast
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l2vpn-vpls
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw l2vpn-evpn
| | | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw use-multiple-paths
| | +--rw config
| | | +--rw enabled? boolean
| | +--ro state
| | | +--ro enabled? boolean
| | +--rw ebgp
| | +--rw config
| | | +--rw allow-multiple-as? boolean
| | +--ro state
| | +--ro allow-multiple-as? boolean
| +--rw graceful-restart
| | +--rw config
| | | +--rw enabled? boolean
| | | +--rw restart-time? uint16
| | | +--rw stale-routes-time? decimal64
| | | +--rw helper-only? boolean
| | +--ro state
| | +--ro enabled? boolean
| | +--ro restart-time? uint16
| | +--ro stale-routes-time? decimal64
| | +--ro helper-only? boolean
| | +--ro peer-restart-time? uint16
| | +--ro peer-restarting? boolean
| | +--ro local-restarting? boolean
| | +--ro mode? enumeration
| +--rw apply-policy
| | +--rw config
| | | +--rw import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--rw default-import-policy? default-policy-type
| | | +--rw export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--rw default-export-policy? default-policy-type
| | +--ro state
| | +--ro import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--ro default-import-policy? default-policy-type
| | +--ro export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--ro default-export-policy? default-policy-type
| +--rw use-multiple-paths
| +--rw config
| | +--rw enabled? boolean
| +--ro state
| | +--ro enabled? boolean
| +--rw ebgp
| +--rw config
| | +--rw allow-multiple-as? boolean
| +--ro state
| +--ro allow-multiple-as? boolean
+--rw peer-groups
+--rw peer-group* [peer-group-name]
+--rw peer-group-name -> ../config/peer-group-name
+--rw config
| +--rw peer-as? inet:as-number
| +--rw local-as? inet:as-number
| +--rw peer-type? oc-bgp-types:peer-type
| +--rw auth-password? string
| +--rw remove-private-as? oc-bgp-types:remove-private-as-option
| +--rw route-flap-damping? boolean
| +--rw send-community? oc-bgp-types:community-type
| +--rw description? string
| +--rw peer-group-name? string
+--ro state
| +--ro peer-as? inet:as-number
| +--ro local-as? inet:as-number
| +--ro peer-type? oc-bgp-types:peer-type
| +--ro auth-password? string
| +--ro remove-private-as? oc-bgp-types:remove-private-as-option
| +--ro route-flap-damping? boolean
| +--ro send-community? oc-bgp-types:community-type
| +--ro description? string
| +--ro peer-group-name? string
| +--ro total-paths? uint32
| +--ro total-prefixes? uint32
+--rw timers
| +--rw config
| | +--rw connect-retry? decimal64
| | +--rw hold-time? decimal64
| | +--rw keepalive-interval? decimal64
| | +--rw minimum-advertisement-interval? decimal64
| +--ro state
| +--ro connect-retry? decimal64
| +--ro hold-time? decimal64
| +--ro keepalive-interval? decimal64
| +--ro minimum-advertisement-interval? decimal64
+--rw transport
| +--rw config
| | +--rw tcp-mss? uint16
| | +--rw mtu-discovery? boolean
| | +--rw passive-mode? boolean
| | +--rw local-address? union
| +--ro state
| +--ro tcp-mss? uint16
| +--ro mtu-discovery? boolean
| +--ro passive-mode? boolean
| +--ro local-address? union
+--rw error-handling
| +--rw config
| | +--rw treat-as-withdraw? boolean
| +--ro state
| +--ro treat-as-withdraw? boolean
+--rw logging-options
| +--rw config
| | +--rw log-neighbor-state-changes? boolean
| +--ro state
| +--ro log-neighbor-state-changes? boolean
+--rw ebgp-multihop
| +--rw config
| | +--rw enabled? boolean
| | +--rw multihop-ttl? uint8
| +--ro state
| +--ro enabled? boolean
| +--ro multihop-ttl? uint8
+--rw route-reflector
| +--rw config
| | +--rw route-reflector-cluster-id? oc-bgp-types:rr-cluster-id-type
| | +--rw route-reflector-client? boolean
| +--ro state
| +--ro route-reflector-cluster-id? oc-bgp-types:rr-cluster-id-type
| +--ro route-reflector-client? boolean
+--rw as-path-options
| +--rw config
| | +--rw allow-own-as? uint8
| | +--rw replace-peer-as? boolean
| +--ro state
| +--ro allow-own-as? uint8
| +--ro replace-peer-as? boolean
+--rw add-paths
| +--rw config
| | +--rw receive? boolean
| | +--rw send-max? uint8
| +--ro state
| +--ro receive? boolean
| +--ro send-max? uint8
+--rw afi-safis
| +--rw afi-safi* [afi-safi-name]
| +--rw afi-safi-name -> ../config/afi-safi-name
| +--rw graceful-restart
| | +--rw config
| | | +--rw enabled? boolean
| | +--ro state
| | +--ro enabled? boolean
| +--rw config
| | +--rw afi-safi-name? identityref
| | +--rw enabled? boolean
| +--ro state
| | +--ro afi-safi-name? identityref
| | +--ro enabled? boolean
| +--rw apply-policy
| | +--rw config
| | | +--rw import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--rw default-import-policy? default-policy-type
| | | +--rw export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | | +--rw default-export-policy? default-policy-type
| | +--ro state
| | +--ro import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--ro default-import-policy? default-policy-type
| | +--ro export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--ro default-export-policy? default-policy-type
| +--rw ipv4-unicast
| | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw config
| | | +--rw send-default-route? boolean
| | +--ro state
| | +--ro send-default-route? boolean
| +--rw ipv6-unicast
| | +--rw prefix-limit
| | | +--rw config
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | | +--rw restart-timer? decimal64
| | | +--ro state
| | | +--ro max-prefixes? uint32
| | | +--ro shutdown-threshold-pct? oc-types:percentage
| | | +--ro restart-timer? decimal64
| | +--rw config
| | | +--rw send-default-route? boolean
| | +--ro state
| | +--ro send-default-route? boolean
| +--rw ipv4-labeled-unicast
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw ipv6-labeled-unicast
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw l3vpn-ipv4-unicast
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw l3vpn-ipv6-unicast
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw l3vpn-ipv4-multicast
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw l3vpn-ipv6-multicast
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw l2vpn-vpls
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw l2vpn-evpn
| | +--rw prefix-limit
| | +--rw config
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct? oc-types:percentage
| | | +--rw restart-timer? decimal64
| | +--ro state
| | +--ro max-prefixes? uint32
| | +--ro shutdown-threshold-pct? oc-types:percentage
| | +--ro restart-timer? decimal64
| +--rw use-multiple-paths
| | +--rw config
| | | +--rw enabled? boolean
| | +--ro state
| | | +--ro enabled? boolean
| | +--rw ebgp
| | | +--rw config
| | | | +--rw allow-multiple-as? boolean
| | | | +--rw maximum-paths? uint32
| | | +--ro state
| | | +--ro allow-multiple-as? boolean
| | | +--ro maximum-paths? uint32
| | +--rw ibgp
| | +--rw config
| | | +--rw maximum-paths? uint32
| | +--ro state
| | +--ro maximum-paths? uint32
| +--rw route-selection-options
| +--rw config
| | +--rw always-compare-med? boolean
| | +--rw ignore-as-path-length? boolean
| | +--rw external-compare-router-id? boolean
| | +--rw advertise-inactive-routes? boolean
| | +--rw enable-aigp? boolean
| | +--rw ignore-next-hop-igp-metric? boolean
| +--ro state
| +--ro always-compare-med? boolean
| +--ro ignore-as-path-length? boolean
| +--ro external-compare-router-id? boolean
| +--ro advertise-inactive-routes? boolean
| +--ro enable-aigp? boolean
| +--ro ignore-next-hop-igp-metric? boolean
+--rw graceful-restart
| +--rw config
| | +--rw enabled? boolean
| | +--rw restart-time? uint16
| | +--rw stale-routes-time? decimal64
| | +--rw helper-only? boolean
| +--ro state
| +--ro enabled? boolean
| +--ro restart-time? uint16
| +--ro stale-routes-time? decimal64
| +--ro helper-only? boolean
+--rw apply-policy
| +--rw config
| | +--rw import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--rw default-import-policy? default-policy-type
| | +--rw export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| | +--rw default-export-policy? default-policy-type
| +--ro state
| +--ro import-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| +--ro default-import-policy? default-policy-type
| +--ro export-policy* -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
| +--ro default-export-policy? default-policy-type
+--rw use-multiple-paths
+--rw config
| +--rw enabled? boolean
+--ro state
| +--ro enabled? boolean
+--rw ebgp
| +--rw config
| | +--rw allow-multiple-as? boolean
| | +--rw maximum-paths? uint32
| +--ro state
| +--ro allow-multiple-as? boolean
| +--ro maximum-paths? uint32
+--rw ibgp
+--rw config
| +--rw maximum-paths? uint32
+--ro state
+--ro maximum-paths? uint32