OcNOS-SP : OpenConfig Command Reference : Enable OpenConfig Translation
Enable OpenConfig Translation
The OpenConfig feature is disabled by default and must be enabled using the following CLI command on the OcNOS shell.
OcNOS# cml NETCONF translation (disable|openconfig)
Or the equivalent NETCONF RPC:
<NETCONF-translation xmlns="http://ipinfusion.com/ns/zebmcli">
    <status>disable|openconfig</status>
</NETCONF-translation>
Once enabled, the user is still able to get data in OcNOS format, by specifying the required namespace:
yangcli ocnos@localhost> sget-config /ipi-interface:interfaces source=running
This will generate the following RPC:
<get-config xmlns="urn:ietf:params:xml:ns:NETCONF:base:1.0">
<source>
<running/>
</source>
<filter type="subtree">
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface"/>
</filter>
</get-config>
To get OpenConfig data, the corresponding namespace must be given:
yangcli ocnos@localhost> sget-config /oc-if:interfaces source=running
 
<get-config xmlns="urn:ietf:params:xml:ns:NETCONF:base:1.0">
<source>
<running/>
</source>
<filter type="subtree">
<interfaces xmlns="http://openconfig.net/yang/interfaces"/>
</filter>
</get-config>
If no filter is provided and OpenConfig is enabled, all supported OpenConfig models will be retrieved in OpenConfig format. The OcNOS models for which no translation is supported will be retrieved in OcNOS format.
Last modified date: 05/31/2023