Junos RPC YANG module for file command(s)
Version: 2019-01-01
module junos-ex-rpc-file { yang-version 1; namespace "http://yang.juniper.net/junos-ex/rpc/file"; prefix file; import junos-common-types { prefix jt; revision-date "2019-01-01"; } organization "Juniper Networks, Inc."; contact "yang-support@juniper.net"; description "Junos RPC YANG module for file command(s)"; revision "2019-01-01" { description "Junos: 21.3R1.9"; } rpc get-checksum-information { description "Calculate MD5 checksum of a file"; input { leaf path { type string; mandatory true; description "Path to filename"; } leaf method { type enumeration { enum "md5" { value 0; description "Calculate MD5 checksum of a file"; } enum "sha1" { value 1; description "Calculate SHA1 checksum of a file"; } enum "sha-256" { value 2; description "Calculate SHA-256 checksum of a file"; } } } } output { choice output_c { leaf output { type string; } anyxml checksum-information { } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc get-checksum-information rpc get-sha1-checksum-information { description "Calculate SHA1 checksum of a file"; input { leaf path { type string; mandatory true; description "Path to filename"; } } output { choice output_c { leaf output { type string; } anyxml checksum-information { } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc get-sha1-checksum-information rpc get-sha256-checksum-information { description "Calculate SHA-256 checksum of a file"; input { leaf path { type string; mandatory true; description "Path to filename"; } } output { choice output_c { leaf output { type string; } anyxml checksum-information { } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc get-sha256-checksum-information rpc file-list { description "List file information"; input { leaf style { type enumeration { enum "detail" { value 0; description "Display detailed output (like 'ls -l')"; } enum "recursive" { value 1; description "Descend recursively through directory hierarchy"; } } } leaf path { type string; description "Path to list"; } } output { choice output_c { leaf output { type string; } anyxml directory-list { } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-list rpc file-delete { description "Delete files from the system"; input { leaf purge { type empty; description "Overwrite regular files before deleting them"; } leaf path { type string; mandatory true; description "Path to delete"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-delete rpc file-show { description "Show file contents"; input { leaf filename { type jt:filename; mandatory true; description "Filename to show"; } leaf encoding { type enumeration { enum "base64" { value 0; description "Encode file with base64 encoding"; } enum "raw" { value 1; description "Show raw text from file"; } } description "Encode file contents"; } } output { choice output_c { leaf output { type string; } anyxml file-content { } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-show rpc file-compare { description "Compare files"; input { leaf style { type enumeration { enum "context" { value 0; description "Context style output format"; } enum "unified" { value 1; description "Unified style output format"; } } } leaf ignore-white-space { type empty; description "Ignore changes in amount of white space"; } leaf from-file { type string; description "File to compare"; } leaf to-file { type string; description "File to compare against"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-compare rpc file-rename { description "Rename files"; input { leaf source { type string; mandatory true; description "Source URL"; } leaf destination { type string; mandatory true; description "Destination URL"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-rename rpc file-archive { description "Archives files from the system"; input { leaf compress { type empty; description "Compresses the archived file using GNU gzip (.tgz)"; } leaf destination { type string; mandatory true; description "Name of created archive (URL, local, remote, or floppy)"; } leaf source { type string; mandatory true; description "Path of directory to archive"; } leaf source-address { type string; description "Local address to use in originating the connection"; } leaf routing-instance { type string; description "Name of the routing-instance"; } leaf exclude { type string; description "File pattern to exclude"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-archive rpc extract-file { description "Extract a tar file"; input { leaf source { type string; mandatory true; description "Path of tar file to be extracted"; } leaf delete { type empty; description "Delete tar file after extracting it"; } leaf destination { type string; description "Path where files have to be extracted"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc extract-file rpc file-change-permission { description "Change permission of file"; input { leaf filename { type jt:filename; mandatory true; description "Filename to change mode"; } leaf permission { type string; mandatory true; description "File permission,either as symbolic(go+rw) or octal(642)"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-change-permission rpc file-change-owner { description "Change owner of file"; input { leaf filename { type jt:filename; mandatory true; description "Filename to change owner"; } leaf user { type string; description "New owner of the file"; } leaf group { type string; description "New group of the file"; } leaf to { type string; description "New owner:group of the file"; } leaf recurse { type empty; description "Operate recursively"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-change-owner rpc make-directory { description "Create a new directory"; input { leaf directory { type string; mandatory true; description "Path of the directory to be created"; } leaf with-path { type empty; description "Create parent directories if needed"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc make-directory rpc delete-directory { description "Delete a directory"; input { leaf directory { type string; mandatory true; description "Directory to be deleted"; } leaf recurse { type empty; description "Delete recursively"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc delete-directory rpc file-link { description "Create link between files"; input { leaf source { type string; mandatory true; description "Source file name"; } leaf destination { type string; mandatory true; description "Destination link name"; } leaf symbolic-link { type empty; description "Create a symbolic link"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-link rpc file-compress { description "Compress file"; input { leaf file { type string; mandatory true; description "File to compress"; } } output { choice output_c { leaf output { type string; } anyxml multi-routing-engine-results { } } // choice output_c } } // rpc file-compress } // module junos-ex-rpc-file
© 2023 YumaWorks, Inc. All rights reserved.