YumaPro control system message definition. Copyright (c) 2014 - 2023 YumaWorks, Inc. All rights reserved. Redistribution and u...
Version: 2023-08-04
module yumaworks-ycontrol { yang-version 1; namespace "http://yumaworks.com/ns/yumaworks-ycontrol"; prefix yctl; import ietf-yang-structure-ext { prefix sx; } import yuma-ncx { prefix ncx; } import yuma-types { prefix yt; } organization "YumaWorks, Inc."; contact "Support <support at yumaworks.com>"; description "YumaPro control system message definition. Copyright (c) 2014 - 2023 YumaWorks, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the BSD 3-Clause License http://opensource.org/licenses/BSD-3-Clause"; revision "2023-08-04" { description "22.10T-11: Change CLI container to sx:structure"; } revision "2014-11-19" { description "Support '*' as the service-id to indicate a server event message that is intended for the YControl layer itself, called ALL_SERVICES. Add shutdown-event message for ALL_SERVICES"; } revision "2014-04-08" { description "Initial version."; } sx:structure "ycontrol"; container ycontrol { ncx:abstract; ncx:hidden; leaf message-id { type uint32 { range "1 .. max"; } mandatory true; description "Message identifier. For server-response and subsys-response message types, this value is the same as the corresponding request message."; } leaf message-type { type enumeration { enum "server-event" { value 0; description "Message from server to sub-system. No response expected."; } enum "server-request" { value 1; description "Request message from server to sub-system. A response is expected."; } enum "server-response" { value 2; description "Response message from server to sub-system. Sent when subsys-req received. No response is expected"; } enum "subsys-event" { value 3; description "Message from sub-system to server. No response expected."; } enum "subsys-request" { value 4; description "Request message from sub-system to server. A response is expected."; } enum "subsys-response" { value 5; description "Response message from sub-system to server. Sent when server-req received. No response is expected"; } enum "ycontrol-error" { value 6; description "Response message from either sub-system or server. Sent when a recoverable YControl or service layer error occurs. If non-recoverable error, then session is dropped and no response is sent. Example error: message is for a service-id that does not exist. No response is expected"; } } mandatory true; description "Message type"; } leaf server-id { type union { type yt:NcxName; type string { length "0"; } } mandatory true; description "Server identifier or empty if not known by subsys"; } leaf subsys-id { type yt:NcxName; mandatory true; description "Subsystem identifier"; } leaf service-id { type union { type yt:NcxName; type string { pattern '\*'; } } mandatory true; description "Service identifier. The value '*' indicates a server-event message to all services. These messages are handled by the ycontrol library, not the individual service libraries."; } choice message-payload { mandatory true; container payload { description "This <payload> container is augmented with a service-specific container from other modules."; leaf shutdown-event { type empty; description "Message type: server-event; Purpose: The server is shutting down. Sent to all services (service-id = '*') Expected Response Message: none"; } container yp-gnmi { choice message-type { mandatory true; leaf config-request { type empty; description "Message type: subsys-request; Purpose: register the service with the server and request the service configuration from server. Expected Response Message: config-response"; } leaf register-request { type empty; description "Message type: subsys-request; Purpose: register the YP-gNMI subsystem Expected Response Message: ok or error"; } container config-response { description "Message type: server-reply; Purpose: server will send this element containing the requested sub-system configuration. Expected Response Message: none"; leaf-list module { type yt:NcModuleSpec; description "Module libraries to use to generate gNMI datastore. Generated datastore package contains definitions of structs which represent a YANG schema. The datastore representation written in go, this datastore let us convert/validate/parse YANG to XML/JSON to ProtoBuff"; } } // container config-response container capability-request { description "Message type: subsys-request; Purpose: The CapabilityRequest message is sent to the server to request capability information from the server. The CapabilityRequest message carries a single repeated extension field. Expected Response Message: capability-response"; leaf-list extension { type union { type enumeration { enum "EID_UNSET" { value 0; } enum "EID_EXPERIMENTAL" { value 1; description "An experimental extension that may be used during prototyping of a new extension."; } } type binary; } } } // container capability-request container capability-response { description "Message type: server-response; Purpose: message that includes its YP-gNMI service version, the versioned data models it supports, and the supported data encodings. This information is used in subsequent RPC messages from the client to indicate the set of models that the client will use (for Get, Subscribe, etc), and the encoding to be used for the data. Expected Response Message: none"; container supported-modules { list supported-modules { key "name"; description "A set of ModelData messages describing each of the models supported by the target"; leaf name { type string; description "Name of the model expressed as a string."; } leaf organization { type string; mandatory true; description "The organization publishing the model, expressed as a string."; } leaf version { type string; mandatory true; description "The supported (or requested) version of the model, expressed as a string which represents the semantic version of the catalog entry."; } } // list supported-modules } // container supported-modules leaf supported-encodings { type supported-encoding; default "json_val"; description "An enumeration field describing the data encodings supported by the target"; } leaf gNMI-version { type string; description "The semantic version of the gNMI service supported by the target, specified as a string."; } leaf-list extension { type union { type enumeration { enum "EID_UNSET" { value 0; } enum "EID_EXPERIMENTAL" { value 1; description "An experimental extension that may be used during prototyping of a new extension."; } } type binary; } } } // container capability-response container get-request { description "Message type: subsys-request; Purpose: Ask the main server to send the running configuration contents Expected Response Message: get-response"; leaf prefix { type string; description "Paths are represented according to gNMI Path Conventions, which defines a structured format for path elements, and any associated key values. In a number of messages, a prefix can be specified to reduce the lengths of path fields within the message. In this case, a prefix field is specified within a message - comprising of a valid path. In the case that a prefix is specified, the absolute path is comprised of the concatenation of the list of path elements representing the prefix and the list of path elements in the path field."; } leaf-list path { type string; description "A set of paths for which the client is requesting a data snapshot from the target. The path specified MAY utilize wildcards. In the case that the path specified is not valid, the target MUST return an RPC response indicating an error code of InvalidArgument and SHOULD provide information about the invalid path in the error message or details."; } leaf type { type enumeration { enum "config" { value 0; } enum "state" { value 1; } enum "oper" { value 2; } enum "all" { value 3; } } default "all"; description "The type of data that is requested from the target. The valid values for type are described below. The types of data currently defined are: - CONFIG - specified to be data that the target considers to be read/write. If the data schema is described in YANG, this corresponds to the 'config true' set of leaves on the target. - STATE - specified to be the read-only data on the target. If the data schema is described in YANG, STATE data is the 'config false' set of leaves on the target. - OPERATIONAL - specified to be the read-only data on the target that is related to software processes operating on the device, or external interactions of the device. If the type field is not specified, the target MUST return CONFIG, STATE and OPERATIONAL data fields in the tree resulting from the client's query."; } leaf encoding { type supported-encoding; default "json_val"; description "The encoding that the target should utilise to serialise the subtree of the data tree requested. If the Capabilities RPC has been utilised, the client SHOULD use an encoding advertised as supported by the target. If the encoding is not specified, JSON MUST be used. If the target does not support the specified encoding, the target MUST return an error of Unimplemented. The error message MUST indicate that the specified encoding is unsupported."; } container use-models { description "A set of ModelData messages indicating the schema definition modules that define the data elements that should be returned in response to the Get RPC call."; list supported-modules { key "name"; description "A set of ModelData messages describing each of the models supported by the target"; leaf name { type string; description "Name of the model expressed as a string."; } leaf organization { type string; mandatory true; description "The organization publishing the model, expressed as a string."; } leaf version { type string; mandatory true; description "The supported (or requested) version of the model, expressed as a string which represents the semantic version of the catalog entry."; } } // list supported-modules } // container use-models leaf-list extension { type union { type enumeration { enum "EID_UNSET" { value 0; } enum "EID_EXPERIMENTAL" { value 1; description "An experimental extension that may be used during prototyping of a new extension."; } } type binary; } } } // container get-request container get-response { description "Message type: server-response; Purpose: Provide the contents of the configuration contents. Expected Response Message: none"; container notifications { description "A set of Notification messages. The target MUST generate a Notification message for each path specified in the client's GetRequest, and hence MUST NOT collapse data from multiple paths into a single Notification within the response. The timestamp field of the Notification message MUST be set to the time at which the target's snapshot of the relevant path was taken."; list notification { key "timestamp"; leaf timestamp { type string; description "The time at which the data was collected by the device from the underlying source, or the time that the target generated the Notification message (in the case that the data does not reflect an underlying data source)."; } leaf prefix { type string; description "A prefix which is applied to all path fields included in the Notification message. The paths expressed within the message are formed by the concatenation of prefix + path. The prefix always precedes the path elements."; } leaf alias { type string; description "A string providing an alias for the prefix specified within the notification message."; } list update { key "path"; description "A list of update messages that indicate changes in the underlying data of the target. Both modification and creation of data is expressed through the update message."; leaf path { type string; description "Paths are represented according to gNMI Path Conventions, which defines a structured format for path elements, and any associated key values."; } leaf typed-value { type string; description "The value of a data node (or subtree) is encoded in a TypedValue message as a oneof field to allow selection of the data type by setting exactly one of the member fields. TypedValue is used to encode a value being sent between the client and target (originated by either entity). message TypedValue { One of the fields within the val oneof is populated with the value of the update. The type of the value being included in the Update determines which field should be populated. In the case that the encoding is a particular form of the base protobuf type, a specific field is used to store the value (e.g., json_val). oneof value { string string_val = 1; // String value. int64 int_val = 2; // Integer value. uint64 uint_val = 3; // Unsigned integer value. bool bool_val = 4; // Bool value. // Arbitrary byte sequence value. bytes bytes_val = 5; float float_val = 6; // Floating point value. Decimal64 decimal_val = 7; // Decimal64 encoded value. // Mixed type scalar array value. ScalarArray leaflist_val = 8; // protobuf.Any encoded bytes. google.protobuf.Any any_val = 9; bytes json_val = 10; // JSON-encoded text. // JSON-encoded text per RFC7951. bytes json_ietf_val = 11; string ascii_val = 12; // Arbitrary ASCII text. } } "; } leaf duplicates { type uint32; description "A counter value that indicates the number of coalesced duplicates. If a client is unable to keep up with the server, coalescion can occur on a per update (i.e., per path) basis such that the server can discard previous values for a given update and return only the latest. In this case the server SHOULD increment a count associated with the update such that a client can detect that transitions in the state of the path have occurred, but were suppressed due to its inability to keep up."; } } // list update leaf-list delete { type string; description "A list of paths that indicate the deletion of data nodes on the target."; } } // list notification } // container notifications leaf-list extension { type union { type enumeration { enum "EID_UNSET" { value 0; } enum "EID_EXPERIMENTAL" { value 1; description "An experimental extension that may be used during prototyping of a new extension."; } } type binary; } } } // container get-response container set-request { description "Message type: subsys-request; Purpose: Ask the main server to send the running configuration contents In response to a SetRequest, the target MUST respond with a SetResponse message. For each operation specified in the SetRequest message, an UpdateResult message MUST be included in the response field of the SetResponse. The order in which the operations are applied MUST be maintained such that UpdateResult messages can be correlated to the SetRequest operations. In the case of a failure of an operation, the status of the UpdateResult message MUST be populated with error information. In addition, the status of the SetResponse message MUST be populated with an error message indicating the success or failure of the set of operations within the SetRequest message."; leaf prefix { type string; description "The prefix specified is applied to all paths defined within other fields of the message."; } leaf-list delete { type string; description "A set of paths which are to be removed from the data tree. Where a path is contained within the delete field of the SetRequest message, it should be removed from the target's data tree. In the case that the path specified is to an element that has children, these children MUST be recursively deleted. If a wildcard path is utilised, the wildcards MUST be expanded by the target, and the corresponding elements of the data tree deleted. Such wildcards MUST support paths specifying a subset of attributes required to identify entries within a collection (list, array, or map) of the data schema. In the case that a path specifies an element within the data tree that does not exist, these deletes MUST be silently accepted."; } container replace { description "A set of Update messages indicating elements of the data tree whose content is to be replaced."; list update { key "path"; description "A list of update messages that indicate changes in the underlying data of the target. Both modification and creation of data is expressed through the update message."; leaf path { type string; description "Paths are represented according to gNMI Path Conventions, which defines a structured format for path elements, and any associated key values."; } leaf typed-value { type string; description "The value of a data node (or subtree) is encoded in a TypedValue message as a oneof field to allow selection of the data type by setting exactly one of the member fields. TypedValue is used to encode a value being sent between the client and target (originated by either entity). message TypedValue { One of the fields within the val oneof is populated with the value of the update. The type of the value being included in the Update determines which field should be populated. In the case that the encoding is a particular form of the base protobuf type, a specific field is used to store the value (e.g., json_val). oneof value { string string_val = 1; // String value. int64 int_val = 2; // Integer value. uint64 uint_val = 3; // Unsigned integer value. bool bool_val = 4; // Bool value. // Arbitrary byte sequence value. bytes bytes_val = 5; float float_val = 6; // Floating point value. Decimal64 decimal_val = 7; // Decimal64 encoded value. // Mixed type scalar array value. ScalarArray leaflist_val = 8; // protobuf.Any encoded bytes. google.protobuf.Any any_val = 9; bytes json_val = 10; // JSON-encoded text. // JSON-encoded text per RFC7951. bytes json_ietf_val = 11; string ascii_val = 12; // Arbitrary ASCII text. } } "; } leaf duplicates { type uint32; description "A counter value that indicates the number of coalesced duplicates. If a client is unable to keep up with the server, coalescion can occur on a per update (i.e., per path) basis such that the server can discard previous values for a given update and return only the latest. In this case the server SHOULD increment a count associated with the update such that a client can detect that transitions in the state of the path have occurred, but were suppressed due to its inability to keep up."; } } // list update } // container replace container update { description "A set of Update messages indicating elements of the data tree whose content is to be updated."; list update { key "path"; description "A list of update messages that indicate changes in the underlying data of the target. Both modification and creation of data is expressed through the update message."; leaf path { type string; description "Paths are represented according to gNMI Path Conventions, which defines a structured format for path elements, and any associated key values."; } leaf typed-value { type string; description "The value of a data node (or subtree) is encoded in a TypedValue message as a oneof field to allow selection of the data type by setting exactly one of the member fields. TypedValue is used to encode a value being sent between the client and target (originated by either entity). message TypedValue { One of the fields within the val oneof is populated with the value of the update. The type of the value being included in the Update determines which field should be populated. In the case that the encoding is a particular form of the base protobuf type, a specific field is used to store the value (e.g., json_val). oneof value { string string_val = 1; // String value. int64 int_val = 2; // Integer value. uint64 uint_val = 3; // Unsigned integer value. bool bool_val = 4; // Bool value. // Arbitrary byte sequence value. bytes bytes_val = 5; float float_val = 6; // Floating point value. Decimal64 decimal_val = 7; // Decimal64 encoded value. // Mixed type scalar array value. ScalarArray leaflist_val = 8; // protobuf.Any encoded bytes. google.protobuf.Any any_val = 9; bytes json_val = 10; // JSON-encoded text. // JSON-encoded text per RFC7951. bytes json_ietf_val = 11; string ascii_val = 12; // Arbitrary ASCII text. } } "; } leaf duplicates { type uint32; description "A counter value that indicates the number of coalesced duplicates. If a client is unable to keep up with the server, coalescion can occur on a per update (i.e., per path) basis such that the server can discard previous values for a given update and return only the latest. In this case the server SHOULD increment a count associated with the update such that a client can detect that transitions in the state of the path have occurred, but were suppressed due to its inability to keep up."; } } // list update } // container update leaf-list extension { type union { type enumeration { enum "EID_UNSET" { value 0; } enum "EID_EXPERIMENTAL" { value 1; description "An experimental extension that may be used during prototyping of a new extension."; } } type binary; } } } // container set-request container set-response { description "A set of Update messages indicating elements of the data tree whose content is to be replaced. Expected Response Message: none"; leaf prefix { type string; description "The prefix specified is applied to all paths defined within other fields of the message."; } leaf timestamp { type string; description "A timestamp at which the set request message was accepted by the system."; } list update-result { key "path op"; description "Containing a list of responses, one per operation specified within the SetRequest message. Each response consists of an UpdateResult message with the following fields"; leaf path { type string; description "The path specified within the SetRequest. In the case that a common prefix was not used within the SetRequest, the target MAY specify a prefix to reduce repetition of path elements within multiple UpdateResult messages in the request field."; } leaf op { type enumeration { enum "invalid" { value 0; } enum "delete" { value 1; } enum "replace" { value 2; } enum "update" { value 3; } } description "The operation corresponding to the path. This value MUST be one of DELETE, REPLACE, or UPDATE."; } container status { leaf code { type int32; description "code - a 32-bit integer value corresponding to the canonical gRPC error code. The Netconfd Internal error in this message."; } leaf message { type string; description "message - a human-readable string describing the error condition. This string is not expected to be machine-parsable, but rather provide contextual information which may be passed to upstream systems. In our case error-string."; } leaf details { type string; description "details - a repeated field of protobuf. Any messages that carry error details. In our case just error-info"; } } // container status } // list update-result leaf-list extension { type union { type enumeration { enum "EID_UNSET" { value 0; } enum "EID_EXPERIMENTAL" { value 1; description "An experimental extension that may be used during prototyping of a new extension."; } } type binary; } } } // container set-response } // choice message-type } // container yp-gnmi container yp-grpc { choice message-type { mandatory true; leaf register-request { type empty; description "Message type: subsys-request; Purpose: register the YP-gRPC subsystem Expected Response Message: ok or error"; } container capability-ad-event { description "Subsystem event to advertise all the gRPC available and active capabilities during the registration time. Type: subsys-event Expected Response Message: none"; leaf name { type yang:yang-identifier; mandatory true; description "Name of the gRCP server."; } leaf address { type inet:host; mandatory true; description "IP Address or host name for the gRPC server. The value returned is implementation specific (e.g., hostname, IPv4 address, IPv6 address)"; } leaf port { type inet:port-number; description "TCP port number for the gRPC server. If not present then the default port for the protocol will be used."; } leaf-list proto { type string; description "The list of proto files that gRPC server supports."; } list service { key "name"; description "List of gRPC Services supported by the gRPC server and related information."; leaf name { type string; description "Name of the gRCP Service associated with this list entry."; } list method { key "name"; description "The list of methods supported by the gRPC server and related information."; leaf name { type string; description "Name of the Service Method associated with this list entry."; } leaf client-streaming { type boolean; description "True if the client supports streaming for this method FALSE otherwise."; } leaf server-streaming { type boolean; description "True if the server supports streaming for this method. FALSE otherwise."; } } // list method } // list service } // container capability-ad-event container open-stream-event { description "Subsystem event to advertise a new gRPC server or client stream(s). Type: subsys-event Expected Response Message: none"; list server-stream { key "name"; description "Contains a list of open server gRPC streams."; leaf name { type string; description "Name of a gRCP server stream."; } leaf location { type inet:uri; mandatory true; description "Contains a URL that represents the RPC that uses this client stream."; } } // list server-stream list client-stream { key "name"; description "Contains a list of open client gRPC streams."; leaf name { type string; description "Name of a gRCP client stream."; } leaf location { type inet:uri; mandatory true; description "Contains a URL that represents the RPC that uses this server stream."; } } // list client-stream } // container open-stream-event container close-stream-event { description "Subsystem event to advertise that the gRPC server or client stream was closed. Type: subsys-event Expected Response Message: none"; leaf-list server-stream { type string; description "The list of closed server gRPC streams."; } leaf-list client-stream { type string; description "The list of closed client gRPC streams."; } } // container close-stream-event } // choice message-type } // container yp-grpc container yp-ha { description "YumaPro High Availability API Messages Server Role == HA Active Server Subsys Role == HA Standby Server YP-HA Protocol Initialization: Active Server Initialization: 1) server starts listening for YControl connections 2) YP-HA service listens for yp-ha messages Standby Server Connect: 1) subsys starts YControl session to server 2) subsys sends <register-request> 3) server sends <ok> or <error> Config Update: 1) server sends <config-update> event 3) subsys sends <upate-failed> event only to NACK Events: A) server sends <nvstore> event to support :startup B) server sends <module-update> if module set changes "; choice message-type { mandatory true; container register-request { description "Message type: subsys-request; Purpose: register the YP-HA standby server with the active server. The <subsys-id> field is used as the server-id and must match a server name configured in the ha-server list on the active server. Expected Response Message: ok or error"; leaf server-key { type string; mandatory true; description "Server pool key string configured for this server pool. Must match the value expected by the active server or the active server will reject the registration request."; } leaf config-id { type uint64; description "The running configuration ID string that the standby server thinks is the current config-id for the server pool. If not present then the standby server does not have a running config and is requesting a full copy of the running config."; } leaf config-stamp { type yang:date-and-time; description "The running last-changed timestamp that the standby server thinks is for the current config-id for the server pool. This timestamp is optional."; } } // container register-request container config-update { description "Message type: server-event; Purpose: The active server is sending a configuration load or update for the running datastore. This message contains either a <config> complete subtree or a YANG Patch where the Target Resource URI is hard-wired to the datastore root. Expected Response Message: none; Standby server will send an update-failed event if the config was not accepted for any reason."; leaf last-config-id { type uint64; description "The config-id ETag of the datastore before this edit was applied. If none because this is a load-config, then this leaf will not be present."; } leaf cur-config-id { type uint64; mandatory true; description "The config-id ETag of the datastore after this edit was applied."; } leaf cur-config-stamp { type yang:date-and-time; mandatory true; description "The config-id Last-Modified timestamp value after this edit was applied."; } leaf nvstore { type empty; description "This config update needs to be NV-stored. Do not NV-store unless this empty leaf is present."; } choice config-type { container config { ncx:root; ncx:metadata "string last-modified"; ncx:metadata "string etag"; description "The active server is sending a complete configuration to the standby server, not a patch update. Sent if the register-request from the standby server did not contain config-id and config-stamp objects."; } // container config container yang-patch { description "Represents a conceptual sequence of datastore edits, called a patch. Each patch is given a client-assigned patch identifier. Each edit MUST be applied in ascending order, and all edits MUST be applied. If any errors occur, then the target datastore MUST NOT be changed by the YANG Patch operation. It is possible for a datastore constraint violation to occur due to any node in the datastore, including nodes not included in the 'edit' list. Any validation errors MUST be reported in the reply message."; reference "RFC 7950, Section 8.3."; leaf patch-id { type string; mandatory true; description "An arbitrary string provided by the client to identify the entire patch. Error messages returned by the server that pertain to this patch will be identified by this 'patch-id' value. A client SHOULD attempt to generate unique 'patch-id' values to distinguish between transactions from multiple clients in any audit logs maintained by the server."; } leaf comment { type string; description "An arbitrary string provided by the client to describe the entire patch. This value SHOULD be present in any audit logging records generated by the server for the patch."; } list edit { key "edit-id"; ordered-by user; description "Represents one edit within the YANG Patch request message. The 'edit' list is applied in the following manner: - The first edit is conceptually applied to a copy of the existing target datastore, e.g., the running configuration datastore. - Each ascending edit is conceptually applied to the result of the previous edit(s). - After all edits have been successfully processed, the result is validated according to YANG constraints. - If successful, the server will attempt to apply the result to the target datastore."; leaf edit-id { type string; description "Arbitrary string index for the edit. Error messages returned by the server pertaining to a specific edit will be identified by this value."; } leaf operation { type enumeration { enum "create" { value 0; description "The target data node is created using the supplied value, only if it does not already exist. The 'target' leaf identifies the data node to be created, not the parent data node."; } enum "delete" { value 1; description "Delete the target node, only if the data resource currently exists; otherwise, return an error."; } enum "insert" { value 2; description "Insert the supplied value into a user-ordered list or leaf-list entry. The target node must represent a new data resource. If the 'where' parameter is set to 'before' or 'after', then the 'point' parameter identifies the insertion point for the target node."; } enum "merge" { value 3; description "The supplied value is merged with the target data node."; } enum "move" { value 4; description "Move the target node. Reorder a user-ordered list or leaf-list. The target node must represent an existing data resource. If the 'where' parameter is set to 'before' or 'after', then the 'point' parameter identifies the insertion point to move the target node."; } enum "replace" { value 5; description "The supplied value is used to replace the target data node."; } enum "remove" { value 6; description "Delete the target node if it currently exists."; } } mandatory true; description "The datastore operation requested for the associated 'edit' entry"; } leaf target { type target-resource-offset; mandatory true; description "Identifies the target data node for the edit operation. If the target has the value '/', then the target data node is the target resource. The target node MUST identify a data resource, not the datastore resource."; } leaf point { when "(../operation = 'insert' or ../operation = 'move') and (../where = 'before' or ../where = 'after')" { description "Point leaf only applies for 'insert' or 'move' operations, before or after an existing entry."; } type target-resource-offset; description "The absolute URL path for the data node that is being used as the insertion point or move point for the target of this 'edit' entry."; } leaf where { when "../operation = 'insert' or ../operation = 'move'" { description "Where leaf only applies for insert or move operations."; } type enumeration { enum "before" { value 0; description "Insert or move a data node before the data resource identified by the 'point' parameter."; } enum "after" { value 1; description "Insert or move a data node after the data resource identified by the 'point' parameter."; } enum "first" { value 2; description "Insert or move a data node so it becomes ordered as the first entry."; } enum "last" { value 3; description "Insert or move a data node so it becomes ordered as the last entry."; } } default "last"; description "Identifies where a data resource will be inserted or moved. YANG only allows these operations for list and leaf-list data nodes that are 'ordered-by user'."; } anydata value { when "../operation = 'create' or ../operation = 'merge' or ../operation = 'replace' or ../operation = 'insert'" { description "The anydata 'value' is only used for 'create', 'merge', 'replace', and 'insert' operations."; } description "Value used for this edit operation. The anydata 'value' contains the target resource associated with the 'target' leaf. For example, suppose the target node is a YANG container named foo: container foo { leaf a { type string; } leaf b { type int32; } } The 'value' node contains one instance of foo: <value> <foo xmlns='example-foo-namespace'> <a>some value</a> <b>42</b> </foo> </value> "; } } // list edit } // container yang-patch } // choice config-type } // container config-update leaf nvstore { type empty; description "Message type: server-event; Purpose: The active server has been told to save the :startup configuration to non-volatile storage. Expected Response: none"; } container module-update { description "Message type: server-event; Purpose: The module set has been updated on the active server. Expected Response: none"; leaf event-type { type enumeration { enum "load" { value 0; } enum "load-bundle" { value 1; } enum "unload" { value 2; } enum "unload-bundle" { value 3; } } mandatory true; description "Dynamic change to module set."; } leaf name { type string; mandatory true; description "Module or bundle name"; } leaf revision { type string; description "Module or bundle revision date"; } leaf-list deviation { type string; description "Deviation module for load or load-bundle"; } } // container module-update container update-failed { description "Message type: subsys-event; Purpose: The config-update failed Expected Response: none"; leaf config-id { type uint64; description "The config-id of the rejected update."; } } // container update-failed } // choice message-type } // container yp-ha container db-api { choice message-type { mandatory true; leaf register-request { type empty; description "Message type: subsys-request; Purpose: register the DB-API subsystem Expected Response Message: ok or error"; } container edit-request { description "Message type: subsys-request; Purpose: Ask the main server to accept an edit request to be added to the running configuration, and saved to NV-storage unless the :startup capability is supported. Expected Response Message: ok or error"; leaf target { type string; mandatory true; description "Identifies the target resource for the edit operation."; } leaf edit-type { type enumeration { enum "user" { value 0; description "A user edit with access control"; } enum "system" { value 1; description "A system edit without access control"; } } default "user"; description "Indicates whether this is a user edit or system edit. System edits will bypass all access control enforcement, including the ncx:user-write extension."; } leaf skip-sil { type boolean; default "true"; description "Skip the SIL and SIL-SA callbacks for this transaction. This is the normal mode since the DB-API edit is generated by the system, so the edits do not need to be applied again by the server."; } container yang-patch { description "Represents a conceptual sequence of datastore edits, called a patch. Each patch is given a client-assigned patch identifier. Each edit MUST be applied in ascending order, and all edits MUST be applied. If any errors occur, then the target datastore MUST NOT be changed by the YANG Patch operation. It is possible for a datastore constraint violation to occur due to any node in the datastore, including nodes not included in the 'edit' list. Any validation errors MUST be reported in the reply message."; reference "RFC 7950, Section 8.3."; leaf patch-id { type string; mandatory true; description "An arbitrary string provided by the client to identify the entire patch. Error messages returned by the server that pertain to this patch will be identified by this 'patch-id' value. A client SHOULD attempt to generate unique 'patch-id' values to distinguish between transactions from multiple clients in any audit logs maintained by the server."; } leaf comment { type string; description "An arbitrary string provided by the client to describe the entire patch. This value SHOULD be present in any audit logging records generated by the server for the patch."; } list edit { key "edit-id"; ordered-by user; description "Represents one edit within the YANG Patch request message. The 'edit' list is applied in the following manner: - The first edit is conceptually applied to a copy of the existing target datastore, e.g., the running configuration datastore. - Each ascending edit is conceptually applied to the result of the previous edit(s). - After all edits have been successfully processed, the result is validated according to YANG constraints. - If successful, the server will attempt to apply the result to the target datastore."; leaf edit-id { type string; description "Arbitrary string index for the edit. Error messages returned by the server pertaining to a specific edit will be identified by this value."; } leaf operation { type enumeration { enum "create" { value 0; description "The target data node is created using the supplied value, only if it does not already exist. The 'target' leaf identifies the data node to be created, not the parent data node."; } enum "delete" { value 1; description "Delete the target node, only if the data resource currently exists; otherwise, return an error."; } enum "insert" { value 2; description "Insert the supplied value into a user-ordered list or leaf-list entry. The target node must represent a new data resource. If the 'where' parameter is set to 'before' or 'after', then the 'point' parameter identifies the insertion point for the target node."; } enum "merge" { value 3; description "The supplied value is merged with the target data node."; } enum "move" { value 4; description "Move the target node. Reorder a user-ordered list or leaf-list. The target node must represent an existing data resource. If the 'where' parameter is set to 'before' or 'after', then the 'point' parameter identifies the insertion point to move the target node."; } enum "replace" { value 5; description "The supplied value is used to replace the target data node."; } enum "remove" { value 6; description "Delete the target node if it currently exists."; } } mandatory true; description "The datastore operation requested for the associated 'edit' entry"; } leaf target { type target-resource-offset; mandatory true; description "Identifies the target data node for the edit operation. If the target has the value '/', then the target data node is the target resource. The target node MUST identify a data resource, not the datastore resource."; } leaf point { when "(../operation = 'insert' or ../operation = 'move') and (../where = 'before' or ../where = 'after')" { description "Point leaf only applies for 'insert' or 'move' operations, before or after an existing entry."; } type target-resource-offset; description "The absolute URL path for the data node that is being used as the insertion point or move point for the target of this 'edit' entry."; } leaf where { when "../operation = 'insert' or ../operation = 'move'" { description "Where leaf only applies for insert or move operations."; } type enumeration { enum "before" { value 0; description "Insert or move a data node before the data resource identified by the 'point' parameter."; } enum "after" { value 1; description "Insert or move a data node after the data resource identified by the 'point' parameter."; } enum "first" { value 2; description "Insert or move a data node so it becomes ordered as the first entry."; } enum "last" { value 3; description "Insert or move a data node so it becomes ordered as the last entry."; } } default "last"; description "Identifies where a data resource will be inserted or moved. YANG only allows these operations for list and leaf-list data nodes that are 'ordered-by user'."; } anydata value { when "../operation = 'create' or ../operation = 'merge' or ../operation = 'replace' or ../operation = 'insert'" { description "The anydata 'value' is only used for 'create', 'merge', 'replace', and 'insert' operations."; } description "Value used for this edit operation. The anydata 'value' contains the target resource associated with the 'target' leaf. For example, suppose the target node is a YANG container named foo: container foo { leaf a { type string; } leaf b { type int32; } } The 'value' node contains one instance of foo: <value> <foo xmlns='example-foo-namespace'> <a>some value</a> <b>42</b> </foo> </value> "; } } // list edit } // container yang-patch } // container edit-request container yp-ha-mode { description "Message type: subsys-request; Purpose: send mode change request to the server Expected Response Message: ok or error"; choice action { mandatory true; leaf go-active { type empty; description "Become the YP-HA active server. All normal management operations are supported in this mode."; } container go-standby { description "Become a YP-HA standby server, and try to connect to the active server 'new-active'. Only the superuser can use management sesssions in this mode."; leaf new-active { type string; mandatory true; description "Server name of the active server to use"; } } // container go-standby leaf go-none { type empty; description "Leave current YP-HA role and wait new role. Only the superuser can use management sesssions in this mode."; } } // choice action } // container yp-ha-mode container getconfig { description "Message type: subsys-request; Purpose: Ask the main server to send the running configuration contents Expected Response Message: config"; leaf withdef { type boolean; default "false"; description "Include defaults (according to the server --default-style CLI parameter) if 'true'. Do not include defaults if 'false'."; } leaf with-state { type boolean; default "false"; description "Include operational data (like <get> operation)"; } leaf xpath-filter { type yang:xpath1.0; description "XPath filter to use for this retrieval operation"; } } // container getconfig container config { ncx:root; description "Message type: server-response; Purpose: Provide the contents of the running configuration contents Expected Response Message: none"; } // container config container enter-maintmode { description "Message type: subsys-request. Purpose: Enter maintenance mode. Expected Response Message: server-response The server will send ok or error."; leaf allowed { type bits { bit read { position 0; description "Allow client sessions for operations that read datastores or operational data."; } bit operation { position 1; description "Allow client sessions for general operations that do not access any datastores."; } } default ""; description "The client activity that is allowed during maintenance mode. By default client sessions are disabled during maintenance mode, and any existing sessions will get 'access-denied' errors for all operations started after maintenance mode is started."; } } // container enter-maintmode container exit-maintmode { description "Message type: subsys-request. Purpose: Exit maintenance mode. Expected Response Message: server-response The server will send ok or error."; } // container exit-maintmode container set-log-level { description "Message type: subsys-request. Purpose: Set the log-level parameter. Expected Response Message: server-response The server will send ok or error."; leaf log-level { type yt:NcDebugType; mandatory true; description "The new log level to set"; } } // container set-log-level container db-lock-init { description "Message type: subsys-request. Purpose: Establish the subsystem as the DB-Edit-Lock controller. This is done once after the db-api service is registered. Expected Response Message: server-response The server will send ok or error."; } // container db-lock-init container db-lock { description "Message type: server-request. Purpose: Request the system config write lock. Expected Response Message: subsys-response The subsystem will send db-lock-response or error."; leaf lock-id { type string { length "1 .. 64"; } mandatory true; description "The lock identifier sent by the server in the db-lock request. Used to prevent late replies from being interpreted as a reply to a new reuest."; } } // container db-lock container db-lock-response { description "Message type: subsys-response. Purpose: Response for the system config write lock. Expected Response Message: none"; leaf lock-id { type string { length "1 .. 64"; } mandatory true; description "The lock identifier sent by the server in the db-lock request. Used to prevent late replies from being interpreted as a reply to a new reuest."; } } // container db-lock-response container db-unlock { description "Message type: server-event. Purpose: Release the system config write lock. Expected Response Message: none"; leaf lock-id { type string { length "1 .. 64"; } mandatory true; description "The lock identifier sent by the server in the db-lock request. Used to prevent late replies from being interpreted as a reply to a new reuest."; } } // container db-unlock container subrpc-request { description "Message type: subsys-request; Purpose: Start an RPC transaction to the main server. This message requests that a new remote procedure call be validated and invoked on the server and possibly one or more SIL-SA subsystems. If not valid or if the operation cannot be performed, the server must return an error. Expected Response Message: subrpc-response"; leaf user-id { type string; description "Identifies the user that should be used for access control and logging purposes. If not present then the system user will be used and all access control will be skipped."; } leaf rpc-module { type yt:NcxName; description "Identifies the module name of the RPC definition. If not present then the server will use the first RPC method with the same name as 'rpc-name'."; } leaf rpc-name { type yt:NcxName; mandatory true; description "Identifies the name of the RPC definition."; } anyxml rpc-method { description "Contains the RPC method element and all child nodes representing the input parameters. This is structured exactly the same as the contents of an <rpc> element from RFC 6241. If not present then an empty method element will be constructed using 'rpc-module' and 'rpc-name' values."; } } // container subrpc-request container subrpc-response { description "Message type: server-response Purpose: Return <rpc-reply> message Expected Response Message: none"; leaf rpc-module { type yt:NcxName; mandatory true; description "Identifies the module name of the RPC definition."; } leaf rpc-name { type yt:NcxName; mandatory true; description "Identifies the name of the RPC definition."; } anyxml reply { mandatory true; description "Contains the RPC reply message for the subrpc-request."; } } // container subrpc-response container protocol-control { description "Message type: subsys-request Purpose: Enable or disable a client protocol Expected Response Message: ok or error Based on the <protocol-control> operation in the yumaworks-system.yang module. "; leaf action { type yt:NcxName; mandatory true; description "Protocol action. Supported actions are - enable - disable - status "; } leaf protocol { type yt:NcxName; mandatory true; description "Identifies the name of the protocol. Supported protocols are: - netconf - restconf - cli - gnmi - grpc "; } } // container protocol-control } // choice message-type } // container db-api container sil-sa { description "Server Instrumentation Library Sub-Agent API Messages SIL-SA Protocol Initialization: 1) subsys sends a <config-request> subsys-request msg 2) server replies with <config-response> server-response msg with the agt_profile data 3) subsys sends a <register-request> subsys-request msg with modules and object path-expressions to register. Any bundle and bundle-module info is also sent 4) server sends <ok> server-response 5) subsys sends a <trigger-replay> subsys-event; if any config for this subsystem, server will send a <start-transaction> server-request with a config-replay transaction SIL-SA Protocol Edit Operation: 1) the server sends a <start-transaction> server-request msg with the edit list 2) the subsys validates the request and sends an <ok> subsys-response (or error) 3) the server sends a <continue-transaction> for the apply phase 4) the subsys applies the request and sends an <ok> subsys-response (or error) 5) the server sends a <continue-transaction> for the commit phase 6) the subsys commits the request and sends an <ok> subsys-response (or error). If the server does not get to step (5) because of an error, a <continue-transaction> server-request msg will be sent for the rollback phase. If the server does not get to step (3) because of an error, it will send a <cancel-transaction> server-event msg so the subsystem can release any saved state. RPC Operation: 1) the server sends an <rpc-request> with the input parameters 2) the subsystem performs VALIDATE and INVOKE phases 3) the subsystem returns <rpc-ok> or <rpc-data>. YControl error is used for any errors ACTION Operation: 1) the server sends an <action-request> with the input parameters 2) the subsystem performs VALIDATE and INVOKE phases 3) the subsystem returns <action-ok> or <action-data>. YControl error is used for any errors HOOKS Support: Transaction Start Hooks: 1) the server send trans-start-hook request 2) the subsys validates the request, invoke callbacks, and sends an <ok> subsys-response (or error) Transaction Complete Hooks: 1) the server send trans-complete-hook event msg so subsystem can invoke Transaction Complete Callbacks "; choice message-type { mandatory true; leaf config-request { type empty; description "Message type: subsys-request; Purpose: register the service with the server and request the service configuration from server. Expected Response Message: config-response"; } container config-response { description "Message type: server-reply; Purpose: server will send this element containing the requested sub-system configuration. Expected Response Message: none"; leaf-list bundle { type yt:NcxName; description "Bundle SIL SA libraries to load"; } leaf-list module { type yt:NcModuleSpec; description "Module SIL SA libraries to load"; } leaf-list deviation { type yt:NcModuleSpec; description "Deviations and annotations to load"; } leaf modpath { type string; description "Server module search path setting"; } leaf datapath { type string; description "Server data search path setting"; } leaf runpath { type string; description "Server library search path setting"; } container schema-mount { list sm-config { key "mp-module mp-label"; description "Configuration for one mount point"; leaf mp-module { type yang:yang-identifier; description "The module name that defines the mount-label"; } leaf mp-label { type yang:yang-identifier; description "The label that matches the `mount-point` extension argument value"; } leaf mp-config { type boolean; default "true"; description "Set to false to force the mount-point to be read-only."; } container mp-cli { description "Contains the CLI configuration parameters for the Mount Point. The following parameters must be set: - module or bundle or loadpath TBD: complete list of supported VS parameters."; leaf-list annotation { type yt:NcModuleSpec; description "YANG deviation file representing model annotations. Processed the same as a deviation parameter except the module is not advertised to any client sessions. Only the deviation 'deviate add' operation can be used to transfer extension statements to another model. The annotations will be applied to a data definition statement, as if they were defined as sub-statements of the deviation target. --annotation=acme-dev1 Example object annotations (contents of acme-dev1) deviation /if:interfaces { deviate add { ncx:sil-delete-chilren-first; } } deviation /if:interfaces/if:interface { deviate add { ncx:sil-delete-chilren-first; acme:my-deviation1 'the deviation parm'; } } "; } leaf-list bundle { type nt:NcxName; description "Specifies the name of a SIL bundle to load into system at boot-time."; } leaf-list deviation { type yt:NcModuleSpec; description "YANG deviation file. This parameter identifies a YANG module that should only be checked for deviation statements for external modules. These will be collected and applied to the real module(s) being processed. Deviations are applied as patches to the target module. Since they are not identified in the target module at all (ala imports), they have to be specified explicitly, so they will be correctly processed. If this string represents a filespec, ending with the '.yang' or '.yin' extension, then only that file location will be checked. If this string represents a module name, then the module search path will be checked for a file with the module name and the '.yang' or '.yin' extension. If this string begins with a '~' character, then a username is expected to follow or a directory separator character. If it begins with a '$' character, then an environment variable name is expected to follow. ~/some/path ==> <my-home-dir>/some/path ~fred/some/path ==> <fred-home-dir>/some/path $workdir/some/path ==> <workdir-env-var>/some/path "; } leaf feature-enable-default { type boolean; default "true"; description "If true, then features will be enabled by default. If false, then features will be disabled by default."; } leaf-list feature-enable { type yt:FeatureSpec; description "Identifies a feature which should be considered enabled."; } leaf-list feature-disable { type yt:FeatureSpec; description "Identifies a feature which should be considered disabled."; } leaf loadpath { type yt:NcPathList; description "Directory load path for YANG or YIN modules. This will be checked before the modpath setting if present when finding modules. After all module and bundle parameters have been processed, this load path will be checked and the server will attempt to load any modules not already loaded. Overrides the YUMA_LOADPATH environment variable."; } leaf-list module { type yt:NcModuleSpec; description "YANG source module name to use."; } } // container mp-cli } // list sm-config } // container schema-mount } // container config-response container register-request { description "Message type: subsys-request; Purpose: register the SIL-SA callback functions for this sub-system. Expected Response Message: ok"; leaf-list bundle { type yt:NcxName; description "Bundle names that were loaded as a result of any bundle parameters."; } leaf-list bundle-module { type yt:NcModuleSpec; description "Module parameters that were loaded as a result of any bundle parameters. They will be returned in the form modname@revision-date."; } list register { key "module"; description "Specifies the path strings of all the objects in each module that is supported by the subsystem."; leaf module { type yt:NcxName; description "Module name for the target object."; } leaf revision { type string; description "Module revision identifier. Currently just a revision date."; } leaf-list path { type string; description "Path string for object for an EDIT callback"; } leaf-list edit2-path { type string; description "Path string for object for an EDIT2 callback"; } leaf-list edit3-path { type string; description "Path string for object for an EDIT3 callback"; } leaf-list get-path { type string; description "Path string for object for a GET callback"; } leaf-list rpc-name { type yt:NcxName; description "Name of the RPC operation callback"; } leaf-list action-path { type string; description "Path string for object for an ACTION callback"; } leaf-list post-sethook-path { type string; description "Path string for object for a Post Set Hook callback"; } list sethook-list { key "hook-path"; description "List for a Set Hook callbacks"; leaf hook-path { type string; description "Path string for object for Hook callbacks"; } leaf hook-format { type enumeration { enum "node" { value 0; } enum "subtree" { value 1; } } default "node"; description "Hook format; dictates specific hook functionality"; } leaf hook-type { type enumeration { enum "none" { value 0; } enum "set-hook" { value 1; } enum "post-set-hook" { value 2; } enum "transaction-hook" { value 3; } } description "Specifies Hook callback type"; } leaf added-edit { type boolean; description "Specifies whether the edit was added by Set Hook of Post Set Hook callbacks. Flag to prevent Set Hook looping; will not allow to call Set Hook family callbacks"; } } // list sethook-list list transaction-hook-list { key "hook-path"; description "List for a Transaction Hook callbacks"; leaf hook-path { type string; description "Path string for object for Hook callbacks"; } leaf hook-format { type enumeration { enum "node" { value 0; } enum "subtree" { value 1; } } default "node"; description "Hook format; dictates specific hook functionality"; } leaf hook-type { type enumeration { enum "none" { value 0; } enum "set-hook" { value 1; } enum "post-set-hook" { value 2; } enum "transaction-hook" { value 3; } } description "Specifies Hook callback type"; } leaf added-edit { type boolean; description "Specifies whether the edit was added by Set Hook of Post Set Hook callbacks. Flag to prevent Set Hook looping; will not allow to call Set Hook family callbacks"; } } // list transaction-hook-list container stream-callback { presence "Indicates a stream-callback is registered for the 'module' in the 'register' list entry with the 'register-request' message. If no child nodes then the registration is for the module name. Otherwise it is for one stream or all streams."; choice callback-type { leaf event-stream { type ywt:NcxNumName; description "Event stream name to use for the operation."; } leaf all-streams { type empty; description "Flag to register for all event-stream events"; } } // choice callback-type } // container stream-callback } // list register leaf transaction-start { type empty; description "The leaf specifies if there is a Transaction Start Callback to register"; } leaf transaction-complete { type empty; description "The leaf specifies if there is a Transaction Complete Callback to register"; } leaf validate-complete { type empty; description "The leaf specifies if there is a Validate Complete Callback to register"; } leaf apply-complete { type empty; description "The leaf specifies if there is an Apply Complete Callback to register"; } leaf commit-complete { type empty; description "The leaf specifies if there is a Commit Complete Callback to register"; } leaf rollback-complete { type empty; description "The leaf specifies if there is a Rollback Complete Callback to register"; } leaf edit-phase-complete { type empty; description "The leaf specifies if there is an Edit Phase Complete Callback to register"; } leaf glob-action { type empty; description "The leaf specifies if there is a Global ACTION Callback to register"; } leaf glob-edit2 { type empty; description "The leaf specifies if there is a Global EDIT2 Callback to register"; } leaf glob-edit3 { type empty; description "The leaf specifies if there is a Global EDIT3 Callback to register"; } leaf glob-get { type empty; description "The leaf specifies if there is a Global GET2 Callback to register"; } leaf glob-rpc { type empty; description "The leaf specifies if there is a Global RPC Callback to register"; } } // container register-request container start-transaction { description "Message type: server-request; Purpose: Start an edit transaction which may require the SIL-SA callback functions on the subsystem to be invoked. This message requests that a new edit transaction be started on the subsystem. Only 1 transaction can be in progress at a time. If this transaction is for a validate operation then there will not be any followup messages. Otherwise, the subsystem will retain this message until a cancel-transaction message has been received with the same transaction-id value, or a continue-transaction message has been received with the same transaction-id value for the 'rollback' or 'commit' phase. Expected Response Message: transaction-response or error"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf user-id { type string; mandatory true; description "Identifies the user that initiated this transaction."; } leaf client-addr { type string; description "Identifies the address of the client that initiated this transaction."; } leaf target { type string; mandatory true; description "Identifies the target datastore being edited. The values 'candidate' and 'running' are supported."; } leaf validate { type boolean; default "false"; description "If 'true' then this start-transaction is for a validate operation or edit that is not on the running configuration datastore, so there will not be any followup messages at all for this message. The subsystem will release this info instead of caching it, and not expect any more messages for the same value of 'transaction-id'. If 'false' then this is a normal edit operation and the apply and commit/rollback followup messages will be sent. The subsystem will cache this data until the transaction is cancelled or completed."; } leaf reverse-edit { type boolean; default "false"; description "If 'true' then this start-transaction is for a reverse-edit operation. All the phases should be invoked in sequence for the provided edit-list. The transaction can be discarded after sending a response, like the 'validate=true' flag. If 'false' then this is a normal edit operation."; } leaf load-config { type boolean; default "false"; description "If 'true' then this start-transaction is for a <trigger-replay> operation. If 'false' then this is a normal edit operation, probably caused by a client <edit-config> operation."; } leaf is-hook-load { type boolean; description "Specifies whether this is a LOAD operation or not"; } leaf is-hook-validate { type boolean; description "Specifies whether this is a Validate operation or not"; } list edit { key "id"; leaf id { type uint32; description "Arbitrary edit identifier."; } leaf operation { type enumeration { enum "merge" { value 0; } enum "replace" { value 1; } enum "create" { value 2; } enum "delete" { value 3; } enum "load" { value 4; } enum "commit" { value 5; } enum "remove" { value 6; } } mandatory true; description "Operation matching op_editop_t enumeration list."; } leaf path { type string; mandatory true; description "Object identifier string: * matches 'path' in the register-request message for an EDIT callback * matches 'get-path' in the register-request message for a GET2 callback * matches 'action-path' in the register-request message for an ACTION callback The path string is generated with YANG prefixes using the obj_gen_object_id_prefix function in ncx/obj.h "; } leaf hook-path { type string; description "Path string for object for Hook callbacks"; } leaf hook-format { type enumeration { enum "node" { value 0; } enum "subtree" { value 1; } } default "node"; description "Hook format; dictates specific hook functionality"; } leaf hook-type { type enumeration { enum "none" { value 0; } enum "set-hook" { value 1; } enum "post-set-hook" { value 2; } enum "transaction-hook" { value 3; } } description "Specifies Hook callback type"; } leaf added-edit { type boolean; description "Specifies whether the edit was added by Set Hook of Post Set Hook callbacks. Flag to prevent Set Hook looping; will not allow to call Set Hook family callbacks"; } container editvars { leaf insert-op { type enumeration { enum "none" { value 0; } enum "first" { value 1; } enum "last" { value 2; } enum "before" { value 3; } enum "after" { value 4; } } description "Specifies the YANG insert operation."; } leaf insert-str { type string; description "Identifies the saved string for value or key attr."; } leaf insert-mode { type enumeration { enum "none" { value 0; } enum "key" { value 1; } enum "value" { value 2; } enum "point" { value 3; } } description "Specifies the insert mode requested."; } anydata insert-val { description "Represents the insert value, if any. Should be present if the insert operation is 'before' or 'after'."; } leaf sil-priority { type uint8; description "Identifies the 2nd SIL priority for server."; } leaf operset { type empty; description "Specifies whether operation is set or not."; } leaf move { type empty; description "Specifies whether the insert is for MOVE operation or not."; } leaf skip-sil-partial { type empty; description "Specifies whether skip_sil_partial is needed or not."; } } // container editvars anydata newval { description "Represents the new value, if any. Should be present if operation is 'merge' 'replace', 'create', or 'load'."; } anydata curval { description "Represents the current value, if any. Should be present if operation is 'replace', 'delete', or 'commit'"; } anydata update { description "Represents the combination of a new value and a current value, if any. Used in EDIT3 callbacks. Should be present if operation is 'merge' 'replace', 'create', or 'load'."; } anydata keys { description "List of all ancestor or self key values for the object being edited, identified by the 'path' value. There will be one child leaf for each key in each list."; } container mpid { leaf mp-module { type yang:yang-identifier; description "The module name that defines the mount-label"; } leaf mp-label { type yang:yang-identifier; description "The label that matches the `mount-point` extension argument value"; } leaf objpath { type string; description "Mount point root object path."; } anydata keys { description "List of all ancestor key values for the Mount Point Instance, identified in the 'objpath' object. There will be one child leaf for each key in each list, starting from the mount point root object."; } } // container mpid list child-edit { description "List of EDIT2 children edits, only when the operation is MERGE"; leaf operation { type enumeration { enum "merge" { value 0; } enum "replace" { value 1; } enum "create" { value 2; } enum "delete" { value 3; } enum "load" { value 4; } enum "commit" { value 5; } enum "remove" { value 6; } } mandatory true; description "Operation matching op_editop_t enumeration list."; } container editvars { leaf insert-op { type enumeration { enum "none" { value 0; } enum "first" { value 1; } enum "last" { value 2; } enum "before" { value 3; } enum "after" { value 4; } } description "Specifies the YANG insert operation."; } leaf insert-str { type string; description "Identifies the saved string for value or key attr."; } leaf insert-mode { type enumeration { enum "none" { value 0; } enum "key" { value 1; } enum "value" { value 2; } enum "point" { value 3; } } description "Specifies the insert mode requested."; } anydata insert-val { description "Represents the insert value, if any. Should be present if the insert operation is 'before' or 'after'."; } leaf sil-priority { type uint8; description "Identifies the 2nd SIL priority for server."; } leaf operset { type empty; description "Specifies whether operation is set or not."; } leaf move { type empty; description "Specifies whether the insert is for MOVE operation or not."; } leaf skip-sil-partial { type empty; description "Specifies whether skip_sil_partial is needed or not."; } } // container editvars anydata newval { description "Represents the new child value, if any. Should be present if operation is 'merge' 'replace', 'create', or 'load'."; } anydata curval { description "Represents the current child value, if any. Should be present if operation is 'replace', 'delete', or 'commit'"; } } // list child-edit } // list edit } // container start-transaction container continue-transaction { description "Message type: server-request; Purpose: Invoke a callback phase for an edit transaction in progress. Expected Response Message: transaction-response or error"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf phase { type enumeration { enum "apply" { value 0; description "Apply the curent transaction. Resources can be reserved that will be used in the commit phase."; } enum "commit" { value 1; description "Commit the current transaction."; } enum "rollback" { value 2; description "Rollback the current transaction."; } } mandatory true; description "The SIL-SA callback phase in progress."; } } // container continue-transaction container transaction-response { description "Message type: subsys-response Purpose: - Set Hook: return added edits data or status - Post Set Hook: return added edits data or status - Transaction Hook: Expected Response Message: ok or error - If no Hook invoked: Expected Response Message: ok or error"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } list added-edit { leaf path { type string; mandatory true; description "Object identifier string: * matches 'path' in the register-request message for an EDIT callback * matches 'get-path' in the register-request message for a GET2 callback * matches 'action-path' in the register-request message for an ACTION callback The path string is generated with YANG prefixes using the obj_gen_object_id_prefix function in ncx/obj.h "; } leaf operation { type string; description "Operation matching yang_patch_op_t enumeration list. Specific for Set Hook add_edit() API"; } leaf where { type string; description "Specifies how a node should be inserted within a user-ordered list"; } leaf point { type string; description "Specifies an insertion point for a data resource that is being created or moved within a user ordered list or leaf-list."; } leaf skip-callback { type boolean; default "false"; description "Specifies whether the server should invoke callbacks for an added edit"; } anydata edit { description "Represents the added edits values, if any. There will be one child node for each added edit value."; } } // list added-edit } // container transaction-response container cancel-transaction { description "Message type: server-event; Purpose: Cancel an edit transaction in progress. Expected Response Message: none"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } } // container cancel-transaction leaf trigger-replay { type empty; description "Message type: subsys-event; Purpose: Trigger a configueration replay to load the running config data into the SIL-SA instrumentation. Expected Response Message: none; server will send a <start-transaction> if there is any config for the SIL-SA functions registered by the subsystem."; } container load-event { description "Message type: server-event; Purpose: A module or bundle has been loaded or unloaded at run-time. Subsys wil load SIL-SA code. and trigger a register event for any SIL calls registered. Expected Response Message: none"; leaf load { type boolean; default "true"; description "Set to 'true' if this is a load event. Set to 'false' if this is an unload event."; } leaf-list bundle { type yt:NcxName; description "Bundle SIL SA libraries to load"; } leaf-list module { type yt:NcModuleSpec; description "Module SIL SA libraries to load"; } leaf-list deviation { type yt:NcModuleSpec; description "Deviations and annotations to load"; } leaf modpath { type string; description "Server module search path setting"; } leaf datapath { type string; description "Server data search path setting"; } leaf runpath { type string; description "Server library search path setting"; } } // container load-event container bundle-load-event { description "Message type: subsys-event; Purpose: A SIL-SA bundle has been loaded with a load-event sent from the server. This has caused some modules to be loaded on the subsystem, that need to be reported back to the main server so the datastore validation, agt_state, and other system book-keeping can be done. Expected Response Message: none"; leaf-list bundle { type yt:NcxName; description "Bundle names that were loaded as a result of any bundle parameters."; } leaf-list bundle-module { type yt:NcModuleSpec; description "Module parameters that were loaded as a result of any bundle parameters. They will be returned in the form modname@revision-date."; } } // container bundle-load-event container get-request { description "Composite retrieval request to support NETCONF and RESTCONF get operations. Type: server-request Expected Response Message: subsys-response (get-response or error)"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf user-id { type string; description "Identifies the user that initiated this transaction."; } leaf client-addr { type string; description "Identifies the address of the client that initiated this transaction."; } leaf flags { type bits { bit keys { position 0; description "Return only the key values"; } bit config { position 1; description "Return config=true data nodes"; } bit oper { position 2; description "Return config=false data nodes"; } bit getnext { position 3; description "This is a get-next request instead of a get request"; } bit withdef { position 4; description "Return default values for missing nodes"; } bit select { position 5; description "Return only the select nodes and any key leafs. Ignore the config, oper, withdef flags if this bit is set."; } bit with-origin { position 6; description "This is a <get-data> operation and the with-origin parameter is selected."; } } default ""; description "Set of get request modifier flags"; } leaf max-entries { type uint32; description "Max number of entries requested. The default is '0' == all for leaf-list and '1' for all other node types."; } leaf path { type string; mandatory true; description "Object identifier string: * matches 'path' in the register-request message for an EDIT callback * matches 'get-path' in the register-request message for a GET2 callback * matches 'action-path' in the register-request message for an ACTION callback The path string is generated with YANG prefixes using the obj_gen_object_id_prefix function in ncx/obj.h "; } anydata keys { description "List of all ancestor or self key values for the object being retrieved, identified by the 'path' value. There will be one child leaf for each key in each list."; } anydata matches { description "Represents any content-match child leafs for the request. All leafs in this container must match the corresponding child nodes in an instance of the requested list or container, for that instance to be returned. Any content-match nodes must match in addition to any key leafs specified in the 'keys' container."; } container select-nodes { list select-node { key "objname"; description "Only requesting these nodes be returned. If no entries and the 'select' bit is set in the flags leaf, then no objects except list keys are returned."; leaf objname { type string; description "Object name of the select node"; } leaf modname { type string; description "Module name of the select node; If missing then use the module-name of the path target object."; } } // list select-node } // container select-nodes container mpid { leaf mp-module { type yang:yang-identifier; description "The module name that defines the mount-label"; } leaf mp-label { type yang:yang-identifier; description "The label that matches the `mount-point` extension argument value"; } leaf objpath { type string; description "Mount point root object path."; } anydata keys { description "List of all ancestor key values for the Mount Point Instance, identified in the 'objpath' object. There will be one child leaf for each key in each list, starting from the mount point root object."; } } // container mpid } // container get-request container get-response { description "Composite retrieval response to support NETCONF and RESTCONF get operations. Type: subsys-response Expected Response Message: none"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf more-data { type boolean; default "false"; description "Indicates if the GET callback has more data to send"; } leaf match-test-done { type boolean; default "false"; description "Indicates if the requested content-match tests have be performed. Ignored if the 'matches' parameter is missing or empty."; } leaf active-case-modname { type string; description "Module name of the active case if there is one. Only applies if the GET2 object callback is for a YANG choice-stmt."; } leaf active-case { type string; description "Name of the active case if there is one. Only applies if the GET2 object callback is for a YANG choice-stmt."; } leaf origin { type string; description "The NMDA origin value for this object. Only applies for config=true list and presence containers."; } choice return-choice { case return-one { description "For all objects except YANG list, one entry will be returned. This can also be used for YANG list, except in GETBULK mode."; anydata return-keys { description "List of all ancestor or self key values for the object being retrieved, identified by the 'path' value. There will be one child leaf for each key in each list."; } anydata values { description "Represents the retrieved values, if any. There will be one child node for each returned value."; } } // case return-one case return-getbulk { description "For YANG list GETBULK mode. There will be one entry for each list instance that met the search criteria. If the max_entries parameter was greater than zero, there the number of instances of 'entry' should not exceed this value."; list entry { anydata return-keys { description "List of all ancestor or self key values for the object being retrieved, identified by the 'path' value. There will be one child leaf for each key in each list."; } anydata values { description "Represents the retrieved values, if any. There will be one child node for each returned value."; } } // list entry } // case return-getbulk } // choice return-choice } // container get-response container notification { description "Subsystem generated YANG notification event for NETCONF and RESTCONF streams. Type: subsys-event Expected Response Message: none"; leaf module-name { type string; mandatory true; description "Module name containing the notification definition"; } leaf event-name { type string; mandatory true; description "Notification statement name"; } leaf event-path { type string; description "Path string for a nested notification object. Not present for top-level event types."; } leaf-list event-key { type string; ordered-by user; description "Value of an ancestor key for a nested notification. The keys must be in the proper order. Top-to-bottom and left to right. Not present for top-level event types, or if a nested event type has no ancestor keys."; } leaf event-time { type string; mandatory true; description "Notification creation timestamp"; } leaf stream-name { type yt:NcxName; default "NETCONF"; description "Stream name for this notification"; } container mpid { leaf mp-module { type yang:yang-identifier; description "The module name that defines the mount-label"; } leaf mp-label { type yang:yang-identifier; description "The label that matches the `mount-point` extension argument value"; } leaf objpath { type string; description "Mount point root object path."; } anydata keys { description "List of all ancestor key values for the Mount Point Instance, identified in the 'objpath' object. There will be one child leaf for each key in each list, starting from the mount point root object."; } } // container mpid anydata parms { description "List of all parameters that this notification is sending in the payload."; } } // container notification container rpc-request { description "Message type: server-request; Purpose: Start an RPC transaction which may require the SIL-SA callback functions on the subsystem to be invoked. This message requests that a new remote procedure call be validated and invoked on the subsystem. If there are input parameters the subsystem must validate them. If not valid or if the operation cannot be performed, the subsystem must return an error. Expected Response Message: rpc-response"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf user-id { type string; description "Identifies the user that initiated this transaction."; } leaf client-addr { type string; description "Identifies the address of the client that initiated this transaction."; } leaf rpc-module { type yt:NcxName; mandatory true; description "Identifies the module name of the RPC definition."; } leaf rpc-name { type yt:NcxName; mandatory true; description "Identifies the name of the RPC definition."; } container mpid { leaf mp-module { type yang:yang-identifier; description "The module name that defines the mount-label"; } leaf mp-label { type yang:yang-identifier; description "The label that matches the `mount-point` extension argument value"; } leaf objpath { type string; description "Mount point root object path."; } anydata keys { description "List of all ancestor key values for the Mount Point Instance, identified in the 'objpath' object. There will be one child leaf for each key in each list, starting from the mount point root object."; } } // container mpid anydata rpc-input { description "Contains the RPC input data (if any)."; } } // container rpc-request container rpc-response { description "Message type: subsys-response Purpose: Return RPC data or status Expected Response Message: none"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } choice response-type { leaf rpc-ok { type empty; description "RPC successfully invoked"; } anydata rpc-output { description "Contains the RPC output data (if any)."; } } // choice response-type } // container rpc-response container action-request { description "Message type: server-request; Purpose: Start an ACTION transaction which may require the SIL-SA callback functions on the subsystem to be invoked. This message requests that a new action call be validated and invoked on the subsystem. If there are input parameters the subsystem must validate them. If not valid or if the operation cannot be performed, the subsystem must return an error. Expected Response Message: action-response"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf user-id { type string; description "Identifies the user that initiated this transaction."; } leaf client-addr { type string; description "Identifies the address of the client that initiated this transaction."; } leaf path { type string; mandatory true; description "Object identifier string: * matches 'path' in the register-request message for an EDIT callback * matches 'get-path' in the register-request message for a GET2 callback * matches 'action-path' in the register-request message for an ACTION callback The path string is generated with YANG prefixes using the obj_gen_object_id_prefix function in ncx/obj.h "; } anydata keys { description "List of all ancestor key values for the action being invoked, identified by the 'path' value. There will be one child leaf for each key in each list."; } container mpid { leaf mp-module { type yang:yang-identifier; description "The module name that defines the mount-label"; } leaf mp-label { type yang:yang-identifier; description "The label that matches the `mount-point` extension argument value"; } leaf objpath { type string; description "Mount point root object path."; } anydata keys { description "List of all ancestor key values for the Mount Point Instance, identified in the 'objpath' object. There will be one child leaf for each key in each list, starting from the mount point root object."; } } // container mpid anydata action-input { description "Contains the ACTION input data (if any)."; } } // container action-request container action-response { description "Message type: subsys-response Purpose: Return ACTION data or status Expected Response Message: none"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } choice response-type { leaf action-ok { type empty; description "ACTION successfully invoked"; } anydata action-output { description "Contains the ACTION output data (if any)."; } } // choice response-type } // container action-response container trans-start-hook { description "Message type: server-request; Purpose: Send a request which may require the SIL-SA callback functions on the subsystem to be invoked; Expected Response Message: <ok> or <error>. This message requests that Transaction Start Hook callbacks should be invoked on the subsystem."; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf user-id { type string; description "Identifies the user that initiated this transaction."; } leaf client-addr { type string; description "Identifies the address of the client that initiated this transaction."; } leaf isvalidate { type boolean; description "Specifies whether this is a <validate> operation or not. TRUE if this is a validate operation transaction"; } leaf isrollback { type boolean; description "Specifies whether this is a confirmed commit timeout or a cancel-confirmed-commit operation. FALSE if this is some other type of transaction"; } leaf isrunning { type boolean; description "Specifies whether this is transaction for running datastore. TRUE if this is a running datastore transaction"; } } // container trans-start-hook container trans-complete-hook { description "Message type: server-event; Purpose: Send an event which may require the SIL-SA callback functions on the subsystem to be invoked; Expected Response Message: none"; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } } // container trans-complete-hook container hook-get-request { description "Message type: subsys-request; Purpose: Start a transaction which may require the server to run agt_val_get_data() API and return result. Get the val_value based on XPath of object instance This function will return value only if there is existing node in the datastore or there is defaults for the node. Expected Response Message: hook-get-response"; leaf path { type string; mandatory true; description "Object identifier string: * matches 'path' in the register-request message for an EDIT callback * matches 'get-path' in the register-request message for a GET2 callback * matches 'action-path' in the register-request message for an ACTION callback The path string is generated with YANG prefixes using the obj_gen_object_id_prefix function in ncx/obj.h "; } leaf isrunning { type boolean; description "Specifies whether to retrieve a value from the running datastore or candidate"; } } // container hook-get-request container hook-get-response { description "Message type: server-reply; Purpose: server will send this element containing the requested val_value based on XPath of object instance. Expected Response Message: none"; anydata value { description "Represents the the val_value based on XPath of object instance"; } } // container hook-get-response container stream-callback-event { description "Message type: server-event; Purpose: An event-stream callback on a SIL-SA platform needs to be invoked. One event will be generated for each remote subsystem entry found that needs to be invoked. E.g., if 3 modules register but all are mapped to the same stream, then 3 events would be sent to the subsystem. Expected Response Message: none"; leaf event-stream { type ywt:NcxNumName; description "Event stream name to use for the operation."; } leaf stream-subevent { type enumeration { enum "active" { value 0; description "Event stream is active"; } enum "inactive" { value 1; description "Event stream is inactive"; } } description "Event stream callback subevent types."; } leaf module-name { type yt:NcxName; description "Module name to use to identify callback."; } leaf all-streams { type empty; description "All streams flag to identify callback."; } } // container stream-callback-event container commit-completeness-hook { description "Message type: server-request; Purpose: Send a request which may require the SIL-SA callback functions on the subsystem to be invoked; This message requests that Commit Completeness callbacks should be invoked on the subsystem. Expected Response Message: <ok> or <error>."; leaf transaction-id { type string; mandatory true; description "Server specific transaction identifier."; } leaf user-id { type string; description "Identifies the user that initiated this transaction."; } leaf client-addr { type string; description "Identifies the address of the client that initiated this transaction."; } leaf commit-phase { type enumeration { enum "validate" { value 0; description "Invoke Validate Complete callback"; } enum "apply" { value 1; description "Invoke Apply Complete callback"; } enum "commit" { value 2; description "Invoke Commit Complete callback"; } enum "rollback" { value 3; description "Invoke Rollback Complete callback"; } } description "Specifies the Commit Completeness callback phase."; } leaf commit-type { type enumeration { enum "normal" { value 0; description "Commit operation was completed"; } enum "reply" { value 1; description "Replay-commit operation was completed"; } enum "none" { value 2; description "Type is not set"; } } description "Specifies the type of commit that was just completed. Used only for Commit Complete Callback."; } } // container commit-completeness-hook } // choice message-type } // container sil-sa } // container payload leaf ok { type empty; description "Sent when a request message is processed successfully and no data is needed in the response."; } container error { leaf error-number { type uint32; mandatory true; description "Internal error number"; } leaf transaction-id { type string; description "Server specific transaction identifier. Sent from subsystem to server in subsys-response. It identifies the transaction in case multiple transactions are in progress at once."; } leaf error-message { type string; description "Internal error message, if different from get_error_string(error-number)."; } leaf error-index { type uint32 { range "1 .. max"; } description "Internal edit index number from <start-transaction> message. Set only if an edit-specific error occurred."; } } // container error } // choice message-payload } // container ycontrol } // module yumaworks-ycontrol
© 2023 YumaWorks, Inc. All rights reserved.