/*************************************************************************** * Description: YANG modelled actions * * © 2026 Nokia * Licensed under the Apache License 2.0 * SPDX-License-Identifier: Apache-2.0 ***************************************************************************/ syntax = "proto3"; package gnoi.yang_action.v1; import "gnoi/types/types.proto"; // YANGAction provides a generic RPC for executing YANG-modelled actions // (RFC 7950, Section 7.15) on a network element. // // This service is a model-driven complement to typed gNOI services. It // allows any YANG action statement — whether defined by the vendor or by // an operator-written NDK application — to be executed over gRPC without // requiring a new proto definition per operation. // // Errors are signalled using standard gRPC RPC status codes. Stream // completion is signalled by the gRPC stream close. No application-level // completion or error fields are used. service YANGAction { // ExecAction executes a YANG modelled action and streams the response. // // The server streams zero or more ActionResponse messages containing // structured output as it becomes available. The stream closes with // RPC status OK on success. On failure, the stream closes with a // non-OK RPC status and a human-readable status message describing // the failure. // // Actions with no output close the stream immediately with status OK // without sending any ActionResponse messages. rpc ExecAction(ActionRequest) returns (stream ActionResponse); } // ActionRequest is sent by the client to request execution of a // YANG modelled action. message ActionRequest { // Path to the YANG action node. // // The path points to the action statement itself. The input container // is intentionally omitted from the path (RFC 7950 Section 7.15). // // Example: // /network-instance[name=default]/protocols/bgp/ // neighbor[peer-address=1.1.1.1]/reset-peer types.Path action_path = 1; // JSON-IETF (RFC 7951) encoding of the action input, relative to // action_path. The input container element is omitted; this value // represents the direct contents of the input container. // // Must be empty if the action defines no input container. bytes input_json_ietf = 2; } // ActionResponse carries structured output from a YANG modelled action. // One or more messages may be streamed before the RPC completes. // Actions with no output send no ActionResponse messages. message ActionResponse { // JSON-IETF (RFC 7951) encoding of the action output for this stream // message, relative to the action path in the request. The output // container element is omitted; this value represents the contents // of the output container, or a partial subset for streaming actions. bytes output_json_ietf = 1; }