OcNOS-SP : OpenConfig Command Reference : System OpenConfig Translation
System OpenConfig Translation
Host
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
Use this command to set the network name for the device. OcNOS uses this name in system prompts and default configuration filenames.
Setting a hostname using this command also sets the hostname in the kernel.
OpenConfig NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<config>
<hostname>host123</hostname>
</config>
</system>
OcNOS CLI command
OcNOS#conf t
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#hostname host123
OcNOS(config)#commit
OcNOS NETCONF Payload
<system-info xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-system">
<config>
<hostname>host123</hostname>
</config>
</system-info>
Validation
Get OpenConfig Payload
<system xmlns="http://openconfig.net/yang/system">
<config/>
<state/>
</system>
Get OpenConfig Return
<system xmlns="http://openconfig.net/yang/system">
<config>
<hostname>host123</hostname>
</config>
<state>
<hostname>host123</hostname>
<current-datetime>2021-11-18T12:36:44Z</current-datetime>
</state>
</system>
Unconfiguration
Use operation='delete' to unconfigure. In this case, the hostname came back to the default name “OcNOS”.
OpenConfig NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<config>
<hostname operation="delete" />
</config>
</system>
Restriction
Network name for a system. Per RFC 952 and RFC 1123, a hostname string can contain
only the special characters period (“.”) and hyphen (“-”). These special characters cannot
be at the start or end of a hostname. The hostname is limited to between 1 and 63 characters.
TimeZone Clock
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
Use this command to set the system time zone.
OpenConfig NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<clock>
<config>
<timezone-name>Pacific</timezone-name>
</config>
</clock>
</system>
OcNOS CLI command
OcNOS#conf t
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#clock timezone Pacific
OcNOS(config)#commit
OcNOS NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<clock>
<config>
<timezone-name>Pacific</timezone-name>
</config>
</clock>
</system>
Validation
Get OpenConfig Payload
<system xmlns="http://openconfig.net/yang/system">
<clock/>
</system>
Get OpenConfig Return
<system xmlns="http://openconfig.net/yang/system">
<clock>
<config>
<timezone-name>Pacific</timezone-name>
</config>
<state>
<timezone-name>Pacific</timezone-name>
</state>
</clock>
</system>
Restrictions
Allowed words in the time zone name can be queried with the cli show timezone <macro region> command.
There is currently no way to query this list through OpenConfig.
Rsyslog
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
Use this command to change the VRF of Rsyslog.
OpenConfig NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
</remote-servers>
</logging>
</system>
OcNOS CLI command
OcNOS#conf t
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#feature rsyslog vrf management
OcNOS(config)#commit
OcNOS NETCONF Payload
<logging xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-logging">
<rsyslog>
<vrf>management</vrf>
<config>
<vrf>management</vrf>
</config>
</rsyslog>
</logging>
Validation
Get OpenConfig Payload
<system xmlns="http://openconfig.net/yang/system">
<logging/>
</system>
Get OpenConfig Return
<system xmlns="http://openconfig.net/yang/system">
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
<state xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</state>
</remote-servers>
</logging>
</system>
Restrictions
The leaf system/logging/remote-servers/config/vrf accepts only default or management.
Logging Remote Server
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
Use this command to set a syslog server.
OcNOS supports logging messages to a syslog server in addition to logging to a file or the console (local or ssh/telnet console). Messages can be logged to a local syslog server (the machine on which OcNOS executes) as well as to one or more remote syslog servers.
OpenConfig NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
<remote-server>
<host>2.2.2.3</host>
<config>
<host>2.2.2.3</host>
</config>
<selectors>
<selector>
<severity>DEBUG</severity>
<config>
<severity>DEBUG</severity>
</config>
</selector>
</selectors>
</remote-server>
</remote-servers>
</logging>
</system>
OcNOS CLI command
OcNOS#conf t
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#logging remote server 2.2.2.3 7 vrf management
OcNOS(config)#commit
OcNOS NETCONF Payload
<logging xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-logging">
<rsyslog>
<vrf>management</vrf>
<remote-servers>
<remote-server>
<address>2.2.2.3</address>
<config>
<address>2.2.2.3</address>
<severity>7</severity>
</config>
</remote-server>
</remote-servers>
<config>
<vrf>management</vrf>
<vrf>default</vrf>
<enable-rsyslog>rsyslog</enable-rsyslog>
</config>
</rsyslog>
</logging>
Validation
Get Openconfig Payload
<system xmlns="http://openconfig.net/yang/system">
<logging/>
</system>
Get OpenConfig Return
<system xmlns="http://openconfig.net/yang/system">
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
<state xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</state>
<remote-server>
<host>2.2.2.3</host>
<config>
<host>2.2.2.3</host>
</config>
<selectors>
<selector>
<severity>DEBUG</severity>
<config>
<severity>DEBUG</severity>
</config>
<state>
<severity>DEBUG</severity>
</state>
</selector>
</selectors>
<state>
<host>2.2.2.3</host>
</state>
</remote-server>
</remote-servers>
</logging>
</system>
Restrictions
When configure /system/logging/remote-servers/remote-server/selectors/selector/config/facility leaf, this is mapped on IPI datamodel as /logging/global/config/remote-server-facility leaf, which is a single and global configuration. To avoid issues when configure it, the value of Open Config facility leaf must be the same on all facility leaves indicated on payload, otherwise the IPI will choose one facility value among all the values present on payload to perform the configuration for all facility leaves.
When the delete operation is set on Open Config /system/logging/remote-servers path, it will trigger the delete of IPI datamodel /logging/global/config/remote-server-facility leaf.
When all Open Config objects/system/logging/remote-servers/remote-serverare deleted individually, this will not trigger the of IPI datamodel /logging/global/config/remote-server-facility leaf. In this case, this leaf will not be shown on NETCONF get output, but will be shown on CLI show running-config.
Logging Remote Facility
Release
This configuration was introduced in OcNOS version 5.0
Configuration
This command is used to set a syslog servers facility.
OcNOS supports logging messages to one or more remote syslog servers, but the same facility is used for all the servers.
No form of this command is used to apply the default facility value, which is local7.
OpenConfig NETCONF Payload
<system xmlns="http://openconfig.net/yang/system">
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
<remote-server>
<host>2.2.2.3</host>
<config>
<host>2.2.2.3</host>
</config>
<selectors>
<selector>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
<config>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
</config>
</selector>
</selectors>
</remote-server>
</remote-servers>
</logging>
</system>
OcNOS CLI command
OcNOS#conf t
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#logging remote facility local5
OcNOS(config)#commit
OcNOS NETCONF Payload
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
<remote-server>
<host>2.2.2.3</host>
<config>
<host>2.2.2.3</host>
</config>
<selectors>
<selector>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
<config>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
</config>
</selector>
</selectors>
</remote-server>
</remote-servers>
</logging>
Validation
Get OpenConfig Payload
<system xmlns="http://openconfig.net/yang/system">
<logging/>
</system>
Get OpenConfig Return
<system xmlns="http://openconfig.net/yang/system">
<logging>
<remote-servers>
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</config>
<state xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">
<vrf>management</vrf>
</state>
<remote-server>
<host>2.2.2.3</host>
<config>
<host>2.2.2.3</host>
</config>
<selectors>
<selector>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
<config>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
</config>
<state>
<facility>oc-log:LOCAL5</facility>
<severity>DEBUG</severity>
</state>
</selector>
</selectors>
<state>
<host>2.2.2.3</host>
</state>
</remote-server>
</remote-servers>
</logging>
</system>
Restrictions
The facilityleaf only can be added via OpenConfig to a configured remote server, as it is part of the object’s key on /system/logging/remote-servers/remote-server/selectors/selector path.
When configure /system/logging/remote-servers/remote-server/selectors/selector/config/facility leaf, this is mapped on IPI datamodel as /logging/global/config/remote-server-facility leaf, which is a single and global configuration. To avoid issues when configure it, the value of Open Config facility leaf must be the same on all facility leaves indicated on payload, otherwise the IPI will choose one facility value among all the values present on payload to perform the configuration for all facility leaves.
When the delete operation is set on Open Config /system/logging/remote-servers path, it will trigger the delete of IPI datamodel /logging/global/config/remote-server-facility leaf.
When all Open Config objects/system/logging/remote-servers/remote-serverare deleted individually, this will not trigger the of IPI datamodel /logging/global/config/remote-server-facility leaf. In this case, this leaf will not be shown on NETCONF get output, but will be shown on CLI show running-config.
Alarms
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
There is no configuration via OpenConfig. The alarm is a runtime attribute. When some event triggers the alarm, It can be viewed via OpenConfig.
However, to enable it is necessary the following command via CLI:
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#fault-management enable
OcNOS(config)#commit
To enable the Alarm clearing is necessary to change the all logging level to four or more. For this, use the following command via CLI:
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#logging level all 4
OcNOS(config)#commit
Get OpenConfig Payload
<system xmlns="http://openconfig.net/yang/system">
<alarms/>
</system>
Get OpenConfig Return
<system xmlns="http://openconfig.net/yang/system">
<alarms>
<alarm>
<id>IFMGR_IF_DOWN:ce2/1</id>
<state>
<id>IFMGR_IF_DOWN:ce2/1</id>
<type-id>EQPT</type-id>
<severity xmlns:oc-alarm-types="http://openconfig.net/yang/alarms/types">oc-alarm-types:MAJOR</severity>
<alarm-reported-timestamp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-sys-deviations">Thu Dec 16 2021 20:31:28 UTC</alarm-reported-timestamp>
<time-created>1639686688</time-created>
<text>OcNOS [IFMGR_IF_DOWN] Interface ce2/1 changed state to down</text>
<resource>ce2/1</resource>
</state>
</alarm>
</alarms>
</system>
OcNOS CLI show command
OcNOS#show alarm active
Active Alarms received:-
Active Alarm Count: 2
Severity Status Alarm Description
MAJOR Active OcNOS [IFMGR_IF_DOWN] Interface ce2/1 changed state to down
Restrictions
The alarms will be generated just for some events, the list of which can be found in