OpenConfig YANG models are available in model-driven interfaces, including the MD-CLI, gNMI, and NETCONF when enabled with the configure system management-interface yang-modules openconfig-modules command. Access to the OpenConfig models is different depending on the model-driven interface.
MD-CLI
OpenConfig configuration statements are located in the configure openconfig context.
OpenConfig state information is located in the state openconfig context.
When a configuration is validated or committed, the system verifies that openconfig-modules is set to true. If openconfig-modules is set to false and there are OpenConfig configuration statements in the candidate, the action fails with an error indicating that the OpenConfig module cannot be disabled when OpenConfig configuration elements exist.
The operator must set openconfig-modules to true and perform the validate or commit action again. Assuming the configuration is complete and there are no other errors, the transaction succeeds.
The system checks openconfig-modules to determine whether OpenConfig state elements can be accessed.
gNMI and NETCONF
The system checks openconfig-modules to determine whether OpenConfig models can be advertised and whether the system can accept or send OpenConfig configuration or state elements.
If openconfig-modules is set to false, the system blocks OpenConfig edits, requests, and responses from being sent or accepted at the gNMI or NETCONF level. A <get> operation from the root without a declared namespace or branch succeeds but does not include any OpenConfig data. However, a <get> operation that explicitly requests data from the OpenConfig namespace generates an error.
AAA rules for OpenConfig are different in the MD-CLI, NETCONF and gNMI
A configure openconfig AAA profile entry applies to configure openconfig commands in the MD-CLI, and to config and state elements in NETCONF and gNMI.
A state openconfig AAA profile entry only applies to state openconfig information in the MD-CLI. AAA entries for NETCONF and gNMI state elements are not supported.