YANG-modeled operations

In addition to YANG-based configuration and state, the SR OS also supports YANG-based operations (for example, admin reboot, file remove).

The SR OS YANG-modeled operations infrastructure applies to MD-CLI and NETCONF interfaces and is supported in any management interface configuration mode (classic, mixed, or model-driven). It is not applicable to operations requested in classic CLI, SNMP, or gRPC interfaces.

YANG-based operations are allocated an operation ID. Configure the state system management-interface operations operation operation-id command to use the operation ID as an index into the global operations table to examine the details of an operation, including the following information:

Example: Contents of the global operations table when a file remove-directory command is in progress

[/]
A:admin@router-a23# info state system management-interface operations
    oldest-operation-id 4
    newest-operation-id 4
    operation 4 {
        asynchronous false
        status in-progress
        start-time 2021-04-13T16:13:18.1+00:00
        request-path "/file/remove-directory"
        session-id 13
        user "admin"
    }

Configure and use the operation ID to remove an operation using the admin system management-interface operations delete-operation command. In the case where the global operations table is full, the delete-operation command can optionally be requested with the op-table-bypass option to avoid allocating an operation-id and requiring an empty entry in the table.