Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

yang-compliant (NETCONF)

Syntax

Hierarchy Level

Description

Require that the NETCONF server return YANG-compatible configuration data that is consistent with the device's YANG schema and RFC 6020, YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF).

Note:

You must configure the yang-compliant statement to enable OpenDaylight (ODL) controllers to manage devices running Junos OS.

When you configure the yang-compliant statement, the <get-config> and <get-configuration format="xml"> remote procedure calls (RPCs) include the following changes to their output:

  • Suppress unsupported configuration statements that are not defined in the YANG schema for that device (<undocumented> elements). This does not suppress deprecated statements.

  • Suppress configuration comments (<junos:comment> elements).

  • Serialize list keys according to the YANG schema for configuration statements that define choice-ident and choice-value as keys.

  • Emit YANG annotations encoded as per RFC 7952.

Table 1 illustrates the changes in the <get-config> and <get-configuration format="xml"> RPC output.

Table 1: yang-compliant Changes to Configuration Output
Change Default Output yang-compliant Output

Suppresses
unsupported
statements

<processes>
  <ntp>
    <undocumented>
      <enable/>
    </undocumented>
  </ntp>
</processes>
<processes>
  <ntp>
  </ntp>
</processes>

Suppresses
comments

<junos:comment>/* CustA */
</junos:comment>
<route>
  <name>198.51.100.1/24
  </name>
  <next-hop>10.1.1.254
  </next-hop>
  <retain/>
  <no-readvertise/>
</route>

<route>
  <name>198.51.100.1/24
  </name>
  <next-hop>10.1.1.254
  </next-hop>
  <retain/>
  <no-readvertise/>
</route>

Correctly serializes
list keys
that include
<choice-ident>
and
<choice-value>

<route-filter>
  <address>0.0.0.0/0
  </address>
  <prefix-length-range>/32-/32
  </prefix-length-range>
</route-filter>
<route-filter>
  <address>0.0.0.0/0
  </address>
  <choice-ident>prefix-length-range
  </choice-ident>
  <choice-value>/32-/32
  </choice-value>
</route-filter>

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 17.3.