Nokia YANG Data model for file actions on SR OS based routers. Copyright 2016 Nokia. All rights reserved. Reproduction of this ...
Version: 2016-01-01
module nokia-oper-file { yang-version 1.1; namespace "urn:nokia.com:sros:ns:yang:sr:oper-file"; prefix oper-file; import nokia-sros-yang-extensions { prefix sros-ext; } import nokia-types-operation { prefix types-operation; } import nokia-types-sros { prefix types-sros; } organization "Nokia"; contact "Nokia SR OS Support Web: <http://www.nokia.com>"; description "Nokia YANG Data model for file actions on SR OS based routers. Copyright 2016 Nokia. All rights reserved. Reproduction of this document is authorized on the condition that the foregoing copyright notice is included. This nokia-oper-file YANG module embodies Nokia's proprietary intellectual property. Nokia retains all title and ownership in the specification, including any revisions. Nokia grants all interested parties a non-exclusive license to use and distribute an unmodified copy of this specification in connection with management of Nokia products, and without fee, provided this copyright notice and license appear on all copies. This specification is supplied `as is', and Nokia makes no warranty, either express or implied, as to the use, operation, condition, or performance of the specification."; revision "2016-01-01"; sros-ext:sros-major-release "rel24"; container file { config false; description "Perform file operations"; action make-directory { description "Make a directory"; input { leaf url { type union { type types-sros:local-file-url; type types-sros:ftp-url; } mandatory true; description "Directory location"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc make-directory action format { description "Format a compact flash device"; input { leaf cflash-id { type types-sros:cflash-id; description "Compact flash ID"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc format action repair { description "Repair a compact flash file system"; input { leaf cflash-id { type types-sros:cflash-id; description "Compact flash ID"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } container results { description "Results of a request to repair a compact flash file system"; leaf errors-found { type boolean; description "Whether errors were found on the file system"; } leaf errors-repaired { type boolean; description "Whether all errors found on the file system were repaired"; } } // container results leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc repair action remove-directory { description "Remove directories"; input { leaf url { type union { type types-sros:local-file-url; type types-sros:ftp-url; } mandatory true; description "Directory URL"; } leaf force { type empty; description "Force removal without prompting"; } leaf recursive { type empty; description "Remove directory and contents recursively"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc remove-directory action permission { description "Show or set file permissions"; input { leaf url { type types-sros:local-file-url; description "File URL to set permissions"; } leaf attribute { type enumeration { enum "read-only" { value 0; } enum "read-write" { value 1; } } description "File permission"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc permission action enable { description "Enable compact flash devices"; input { choice option { default "cflash"; leaf cflash-id { type types-sros:cflash-id; description "Enable the compact flash device"; } leaf active { type empty; description "Enable all devices on the active CPM"; } leaf standby { type empty; description "Enable all devices on the standby CPM"; } } // choice option } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc enable action disable { description "Disable compact flash devices"; input { choice option { default "cflash"; leaf cflash-id { type types-sros:cflash-id; description "Disable the compact flash device"; } leaf active { type empty; description "Disable all devices on the active CPM"; } leaf standby { type empty; description "Disable all devices on the standby CPM"; } } // choice option } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc disable action copy { description "Copy files"; input { leaf source-url { type union { type types-sros:local-file-url; type types-sros:remote-file-url; } mandatory true; description "Source URL"; } leaf destination-url { type union { type types-sros:local-file-url; type types-sros:remote-file-url; type types-sros:scp-url; } mandatory true; description "Destination URL or '.' for the working directory"; } leaf force { type empty; description "Force copy without prompting before overwriting"; } leaf recursive { type empty; description "Copy sub-directories encountered at the source URL"; } leaf direct-http { type empty; description "Allow direct HTTP connection, do not follow redirects"; } leaf client-tls-profile { type string { length "1..32"; } description "Connect over HTTP with a client TLS profile"; } leaf proxy { type types-sros:http-url; description "Connect over HTTP with a proxy"; } leaf router-instance { type string; description "Router name or VPRN service name"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc copy action move { description "Move or rename files or directories"; input { leaf source-url { type union { type types-sros:local-file-url; type types-sros:ftp-url; type types-sros:http-url-loose; } mandatory true; description "Source URL"; } leaf destination-url { type union { type types-sros:local-file-url; type types-sros:ftp-url; type types-sros:http-url-loose; } mandatory true; description "Destination URL or '.' for the working directory"; } leaf force { type empty; description "Force move without prompting before overwriting"; } leaf direct-http { type empty; description "Allow direct HTTP connection, do not follow redirects"; } leaf client-tls-profile { type string { length "1..32"; } description "Connect over HTTP with a client TLS profile"; } leaf proxy { type types-sros:http-url; description "Connect over HTTP with a proxy"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc move action remove { description "Remove files"; input { leaf url { type union { type types-sros:local-file-url; type types-sros:ftp-url; type types-sros:http-url-loose; } mandatory true; description "File URL"; } leaf force { type empty; description "Force removal without prompting"; } leaf direct-http { type empty; description "Allow direct HTTP connection, do not follow redirects"; } leaf client-tls-profile { type string { length "1..32"; } description "Connect over HTTP with a client TLS profile"; } leaf proxy { type types-sros:http-url; description "Connect over HTTP with a proxy"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc remove action version { description "Display the version of an SR OS image file"; input { leaf url { type union { type types-sros:local-file-url; type types-sros:ftp-tftp-url; } mandatory true; description "File URL"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } container results { description "Enter the results context"; container version { description "Enter the version context"; leaf version-number { type types-sros:very-long-description-or-empty; description "Version number."; } leaf version-string { type types-sros:very-long-description-or-empty; description "Version string."; } } // container version } // container results leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc version action checksum { description "Compute and display checksums"; input { leaf type { type enumeration { enum "image" { value 1; } enum "md5" { value 2; } enum "sha256" { value 3; } } mandatory true; description "Checksum option type"; } leaf url { type union { type types-sros:local-file-url; type types-sros:ftp-tftp-url; } mandatory true; description "File URL"; } } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } container results { description "Results of a file checksum"; choice image-or-file { case image { leaf valid-sros-image { type boolean; description "Whether the image is valid"; } container version { description "Enter the version context"; leaf version-number { type types-sros:very-long-description-or-empty; description "Version number."; } leaf version-string { type types-sros:very-long-description-or-empty; description "Version string."; } } // container version } // case image leaf checksum-value { type string { length "0..256"; } description "Checksum value"; } } // choice image-or-file } // container results leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc checksum action unzip { description "Unzip files"; input { leaf source-url { type union { type types-sros:local-file-url; type types-sros:remote-file-url; } mandatory true; description "Source URL"; } leaf destination-url { type types-sros:local-file-url; description "Destination URL or '.' for the working directory"; } leaf create-destination { type empty; description "Create destination directory if it does not exist"; } choice option { leaf force { type empty; description "Force the unzip operation without prompting"; } case list { } // case list } // choice option } output { leaf operation-id { type types-operation:operation-id; description "ID assigned to the operation."; } leaf start-time { type types-operation:operation-timestamp; description "Time when the operation started its execution."; } leaf results-path { type types-operation:operation-path; description "Path to the results of the operation formatted as xpath."; } leaf status { type types-operation:operation-status; description "Status of the operation"; } leaf-list error-message { type types-operation:operation-message; description "Error messages reported during execution of the operation."; } leaf-list warning-message { type types-operation:operation-message; description "Warning messages reported during execution of the operation."; } leaf-list info-message { type types-operation:operation-message; description "Info messages reported during execution of the operation."; } leaf end-time { type types-operation:operation-timestamp; description "Time when the operation ended its execution."; } } } // rpc unzip } // container file } // module nokia-oper-file
© 2023 YumaWorks, Inc. All rights reserved.