YANG data models can be represented in a hierarchical, tree-based structure with nodes, which makes them more easily understandable.
YANG defines four nodes types. Each node has a name, and depending on the node type, the node might either define a value
or contain a set of child nodes. The nodes types (for data modeling) are:
-
leaf node—Contains a single value of a specific type
-
list node—Contains a sequence of list entries, each of which is uniquely identified by one or more keys leafs
-
leaf-list node—Contains a sequence of leaf nodes
-
container node—Contains a grouping of related nodes containing only child nodes, which can be any of the four node types
The following is the tree structure of the openconfig-optical-amplifier model.
Note
|
Cisco NCS 1010 supports only the leaves that are highlighted as bold in the following open configuration models.
|
+--rw optical-amplifier
+--rw amplifiers
| +--rw amplifier* [name]
| +--rw name -> ../config/name
| +--rw config
| | +--rw name? string
| | +--rw type? identityref
| | +--rw target-gain? decimal64
| | +--rw min-gain? decimal64
| | +--rw max-gain? decimal64
| | +--rw target-gain-tilt? decimal64
| | +--rw gain-range? identityref
| | +--rw amp-mode? identityref
| | +--rw target-output-power? decimal64
| | +--rw max-output-power? decimal64
| | +--rw enabled? boolean
| | +--rw fiber-type-profile? identityref
| +--ro state
| +--ro name? string
| +--ro type? identityref
| +--ro target-gain? decimal64
| +--ro min-gain? decimal64
| +--ro max-gain? decimal64
| +--ro target-gain-tilt? decimal64
| +--ro gain-range? identityref
| +--ro amp-mode? identityref
| +--ro target-output-power? decimal64
| +--ro max-output-power? decimal64
| +--ro enabled? boolean
| +--ro fiber-type-profile? identityref
| +--ro component? -> /oc-platform:components/component/name
| +--ro ingress-port? -> /oc-platform:components/component/name
| +--ro egress-port? -> /oc-platform:components/component/name
| +--ro actual-gain
| +--ro actual-gain-tilt
| +--ro input-power-total
| +--ro input-power-c-band
| +--ro input-power-l-band
| +--ro output-power-total
| +--ro output-power-c-band
| +--ro output-power-l-band
| +--ro laser-bias-current
| +--ro optical-return-loss
+--rw supervisory-channels
+--rw supervisory-channel* [interface]
+--rw interface -> ../config/interface
The following is a tree structure of the openconfig-optical-attenuator model.
+--rw optical-attenuator
+--rw attenuators
+--rw attenuator* [name]
+--rw name -> ../config/name
+--rw config
| +--rw name? string
| +--rw attenuation-mode?
| +--rw target-output-power? decimal64
| +--rw attenuation? decimal64
| +--rw enabled? boolean
+--ro state
+--ro name? string
+--ro attenuation-mode? identityref
+--ro target-output-power? decimal64
+--ro attenuation? decimal64
+--ro enabled? boolean
+--ro component? -> /oc-platform:components/component/name
+--ro ingress-port? -> /oc-platform:components/component/name
+--ro egress-port? -> /oc-platform:components/component/name
+--ro actual-attenuation
+--ro output-power-total
+--ro optical-return-loss
The following is a sample tree structure of Cisco-IOS-XR-controller-ots-oper model.
+--ro ots-oper
+--ro ots-ports
+--ro ots-port* [name]
+--ro ots-info
| +--ro raman-tx-power
| | +--ro raman-tx-power*
| | +--ro raman-tx-power-instance? uint32
| | +--ro raman-tx-power-value? uint32
| | +--ro raman-tx-wavelength? uint32
| +--ro transmit-n-power
| | +--ro transmit-power*
| | +--ro instance? uint32
| | +--ro value? int32
| +--ro receive-n-power
| | +--ro receive-power*
| | +--ro instance? uint32
| | +--ro value? int32
| +--ro ingress-channel-slice-attenuation
| | +--ro ingress-channel-slice*
| | +--ro ingress-channel-slice? uint32
| | +--ro ingress-channel-slice-attenuation? int32
| +--ro egress-channel-slice-attenuation
| | +--ro egress-channel-slice*
| | +--ro egress-channel-slice? uint32
| | +--ro egress-channel-slice-attenuation? int32
| +--ro raman-tx-power-config
| | +--ro raman-tx-power*
| | +--ro raman-tx-power-instance? uint32
| | +--ro raman-tx-power-value? uint32
| +--ro ingress-channel-slice-attenuation-configured
| | +--ro ingress-channel-slice*
| | +--ro ingress-channel-slice? uint32
| | +--ro ingress-channel-slice-attenuation? int32
| +--ro egress-channel-slice-attenuation-configured
| | +--ro egress-channel-slice*
| | +--ro egress-channel-slice? uint32
| | +--ro egress-channel-slice-attenuation? int32
| +--ro channel-attenuation-info
| | +--ro total-channel-attenuation-slice-count? uint32
| | +--ro channel-attenuation-slice-spacing? uint32
| | +--ro channel-attenuation-first-slice-wavelength? uint32
| | +--ro channel-attenuation-first-slice-frequency? uint32
| | +--ro ingress-channel-attenuation-info*
| | | +--ro slice-num? uint32
| | | +--ro ingress-attenuation? uint32
| | +--ro egress-channel-attenuation-info*
| | +--ro slice-num? uint32
| | +--ro egress-attenuation? uint32
| +--ro otdr-info-rx
| | +--ro scan-status? Otdr-scan-status
| | +--ro tracepoint-file? string
| | +--ro total-events? uint32
| | +--ro scan-timestamp? string
| | +--ro event-info*
| | +--ro event-number? uint32
| | +--ro detected-event? uint32
| | +--ro location? int64
| | +--ro accuracy? int64
| | +--ro magnitude? int64
| | +--ro attenuation? int64
| +--ro otdr-info-tx
| | +--ro scan-status? Otdr-scan-status
| | +--ro tracepoint-file? string
| | +--ro total-events? uint32
| | +--ro scan-timestamp? string
| | +--ro event-info*
| | +--ro event-number? uint32
| | +--ro detected-event? uint32
| | +--ro location? int64
| | +--ro accuracy? int64
| | +--ro magnitude? int64
| | +--ro attenuation? int64
| +--ro rx-los-p
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro rx-loc
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro tx-power-fail-low
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro ingress-auto-laser-shut
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro ingress-auto-pow-red
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro ingress-ampli-gain-low
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro ingress-ampli-gain-high
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro egress-auto-laser-shut
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro egress-auto-pow-red
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro egress-ampli-gain-low
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro egress-ampli-gain-high
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro high-tx-br-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro high-rx-br-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro span-too-short-tx
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro span-too-short-rx
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman-auto-pow-red
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman1-low-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman2-low-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman3-low-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman4-low-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman5-low-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman1-high-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman2-high-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman3-high-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman4-high-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro raman5-high-pwr
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro ots-och-alamr-info
| | +--ro rx-los-p
| | | +--ro is-detected? boolean
| | | +--ro counter? uint32
| | +--ro tx-power-fail-low
| | +--ro is-detected? boolean
| | +--ro counter? uint32
| +--ro ots-tone-info
| | +--ro tone-freq? string
| | +--ro tone-rate? uint32
| | +--ro pattern? string
| | +--ro pattern-expected? string
| | +--ro dectected-oob? uint32
| | +--ro state? Conn-verfcn-state
| | +--ro pattern-received? string
| +--ro transport-admin-state? Ots-tas
| +--ro rx-pow-low-threshold? int32
| +--ro rx-pow-high-threshold? int32
| +--ro tx-pow-low-threshold? int32
| +--ro tx-pow-high-threshold? int32
| +--ro pm-enable? uint32
| +--ro controller-state? Ots-controller-state
| +--ro rx-voa-attenuation? int32
| +--ro tx-voa-attenuation? int32
| +--ro channel-width? uint32
| +--ro central-frequncy? uint32
| +--ro add-drop-channel? string
| +--ro line-channel? string
| +--ro ingress-ampli-gain? int32
| +--ro ingress-ampli-tilt? int32
| +--ro ingress-amp-gain-deg-thres-low? uint32
| +--ro ingress-amp-gain-deg-thres-high? uint32
| +--ro ingress-ampli-gain-range? Ots-amplifier-gain-range
| +--ro egress-ampli-gain? int32
| +--ro egress-ampli-tilt? int32
| +--ro egress-amp-gain-deg-thres-low? uint32
| +--ro egress-amp-gain-deg-thres-high? uint32
| +--ro egress-ampli-gain-range? Ots-amplifier-gain-range
| +--ro composite-raman-power? uint32
| +--ro wavelength? uint32
| +--ro transmit-power? int32
| +--ro receive-power? int32
| +--ro total-cl-tx-power? int32
| +--ro total-cl-rx-power? int32
| +--ro receive-signal-power? int32
| +--ro transmit-signal-power? int32
| +--ro ingress-ampli-osri? boolean
| +--ro egress-ampli-osri? boolean
| +--ro ingress-ampli-force-apr? boolean
| +--ro egress-ampli-force-apr? boolean
| +--ro ingress-ampli-safety-control-mode? Ots-amplifier-safety-control-mode
| +--ro egress-ampli-safety-control-mode? Ots-amplifier-safety-control-mode
| +--ro ingress-ampli-safety-control-mode-configured? Ots-amplifier-safety-control-mode
| +--ro egress-ampli-safety-control-mode-configured? Ots-amplifier-safety-control-mode
| +--ro ingress-ampli-osri-configured? boolean
| +--ro egress-ampli-osri-configured? boolean
| +--ro ingress-ampli-force-apr-configured? boolean
| +--ro egress-ampli-force-apr-configured? boolean
| +--ro raman-safety-control-mode? Ots-amplifier-safety-control-mode
| +--ro raman-safety-control-mode-configured? Ots-amplifier-safety-control-mode
| +--ro raman-osri? boolean
| +--ro raman-force-apr? boolean
| +--ro raman-osri-configured? boolean
| +--ro raman-force-apr-configured? boolean
| +--ro rx-pow-low-warning-threshold? int32
| +--ro rx-pow-high-warning-threshold? int32
| +--ro tx-pow-low-warning-threshold? int32
| +--ro tx-pow-high-warning-threshold? int32
| +--ro description? string
| +--ro channel-attenuation? int32
| +--ro rx-voa-attenuation-config-val? int32
| +--ro tx-voa-attenuation-config-val? int32
| +--ro ampli-control-mode-config-val? Ots-amplifier-control-mode
| +--ro rx-low-th-psd-config-val? int32
| +--ro total-rx-power? int32
| +--ro total-tx-power? int32
| +--ro ingress-ampli-gain-range-config-val? Ots-amplifier-gain-range
| +--ro ingress-ampli-gain-config? uint32
| +--ro ingress-ampli-tilt-config? int32
| +--ro ingress-ampli-thr-deg-low-config? uint32
| +--ro ingress-ampli-thr-deg-high-config? uint32
| +--ro egress-ampli-gain-range-config-val? Ots-amplifier-gain-range
| +--ro egress-ampli-gain-config? uint32
| +--ro egress-ampli-tilt-config? int32
| +--ro egress-ampli-gain-thr-deg-low-config? uint32
| +--ro egress-ampli-gain-thr-deg-high-config? uint32
| +--ro channel-attenuation-configured? int32
| +--ro br-power? int32
| +--ro raman-br-power? int32
| +--ro led-state? Led-state
+--ro ots-spectrum-info
| +--ro spectrum-info
| +--ro total-spectrum-slice-count? uint32
| +--ro spectrum-slice-spacing? uint32
| +--ro first-slice-wavelength? uint32
| +--ro first-slice-frequency? uint32
| +--ro spectrum-slice-power-info*
| +--ro slice-num? uint32
| +--ro rx-power? int16
| +--ro tx-power? int16
+--ro name xr:Interface-name
The following is a sample tree structure of Cisco-IOS-XR-controller-ots-cfg model.
augment /a1:interface-configurations/a1:interface-configuration:
+--rw ots
+--rw ingress-channel-slice-attns
| +--rw ingress-channel-slice-attn* [ingress-channel-slice-attn]
| +--rw ingress-channel-slice-attn uint32
| +--rw ingress-channel-slice-attnvalue uint32
+--rw raman-tx-power-disables
| +--rw raman-tx-power-disable* [raman-tx-power-disable-instance]
| +--rw raman-tx-power-disable-instance uint32
+--rw raman-tx-powers
| +--rw raman-tx-power* [raman-tx-power-instance]
| +--rw raman-tx-power-instance uint32
| +--rw raman-tx-power-value uint32
+--rw ots-otdr
| +--rw ots-otdr-rx
| | +--rw ots-otdr-rx-expert
| | | +--rw ots-otdr-rx-capture-start? uint32
| | | +--rw ots-otdr-rx-scan-duration? uint32
| | | +--rw ots-otdr-rx-pulse-width? uint32
| | | +--rw ots-otdr-rx-capture-end? uint32
| | +--rw ots-otdr-rx-auto
| | | +--rw ots-otdr-rx-excess-reflection-threshold? int32
| | | +--rw ots-otdr-rx-splice-loss-threshold? uint32
| | | +--rw ots-otdr-rx-raman-setpoint? uint32
| | | +--rw ots-otdr-rx-reflectance-threshold? int32
| | +--rw ots-otdr-rx-back-scattering? int32
| | +--rw ots-otdr-rx-refractive-index? uint32
| +--rw ots-otdr-scan-mode
| | +--rw ots-otdr-scan-mode-expert? empty
| +--rw ots-otdr-tx
| +--rw ots-otdr-tx-expert
| | +--rw ots-otdr-tx-capture-end? uint32
| | +--rw ots-otdr-tx-scan-duration? uint32
| | +--rw ots-otdr-tx-capture-start? uint32
| | +--rw ots-otdr-tx-pulse-width? uint32
| +--rw ots-otdr-tx-auto
| | +--rw ots-otdr-tx-splice-loss-threshold? uint32
| | +--rw ots-otdr-tx-excess-reflection-threshold? int32
| | +--rw ots-otdr-tx-raman-setpoint? uint32
| | +--rw ots-otdr-tx-reflectance-threshold? int32
| +--rw ots-otdr-tx-refractive-index? uint32
| +--rw ots-otdr-tx-back-scattering? int32
+--rw egress-channel-slice-attns
| +--rw egress-channel-slice-attn* [egress-channel-slice-attn]
| +--rw egress-channel-slice-attn uint32
| +--rw egress-channel-slice-attnvalue uint32
+--rw ots-egress-safety-control-mode? Ots-safety-control-mode
+--rw ots-ingress-amplifier-gain? uint32
+--rw ots-tone-pattern-expected? string
+--rw ots-ingress-osri? boolean
+--rw ots-ingress-amplifier-gain-degrade-high-threshold? uint32
+--rw ots-tx-voa-attenuation? uint32
+--rw ots-ingress-safety-control-mode? Ots-safety-control-mode
+--rw ots-tone-detect-oob? empty
+--rw ots-ingress-force-apr? boolean
+--rw ots-raman-force-apr? boolean
+--rw ots-egress-amplifier-gain-degrade-low-threshold? uint32
+--rw ots-ingress-amplifier-gain-degrade-low-threshold? uint32
+--rw ots-egress-amplifier-tilt? int32
+--rw ots-raman-safety-control-mode? Ots-safety-control-mode
+--rw ots-tone-frequency? string
+--rw ots-egress-amplifier-gain? uint32
+--rw ots-tone-pattern? string
+--rw ots-egress-amplifier-gain-degrade-high-threshold? uint32
+--rw ots-raman-osri? boolean
+--rw ots-egress-osri? boolean
+--rw ots-egress-amplifier-gain-range? Ots-ingress-egress-ampli-gain-range
+--rw ots-ingress-amplifier-gain-range? Ots-ingress-egress-ampli-gain-range
+--rw ots-ingress-amplifier-tilt? int32
+--rw ots-tone-rate? uint32
+--rw ots-egress-force-apr? boolean