Junos RPC YANG module for file command(s)
Version: 2019-01-01
module junos-rpc-file { yang-version 1; namespace "http://yang.juniper.net/junos/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 grouping command-forwarding { choice chassis-selector { leaf all-chassis { type empty; description "All chassis"; } leaf all-lcc { type empty; description "All LCC chassis"; } leaf scc { type empty; description "SCC"; } leaf sfc { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "SFC"; } leaf lcc { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Specific LCC"; } leaf node { type string; description "Specific node"; } leaf bsys { type empty; description "Base system"; } leaf gnf { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 10"; } } description "Specific guest network function"; } leaf all-gnfs { type empty; description "All guest network functions"; } leaf all-system { type empty; description "All system (BSYS and GNFs)"; } leaf server { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1"; } } description "Specific server slot"; } leaf all-servers { type empty; description "All servers"; } leaf vnf { type string; description "Specific virtual-network-function"; } leaf all-vnfs { type empty; description "All virtual-network-functions"; } } // choice chassis-selector choice re-selector { leaf re0 { type empty; description "RE0"; } leaf re1 { type empty; description "RE1"; } leaf routing-engine { type enumeration { enum "local" { value 0; description "Local routing engine"; } enum "other" { value 1; description "Other routing engine"; } enum "master" { value 2; description "Master routing engine"; } enum "backup" { value 3; description "Backup routing engine"; } enum "both" { value 4; description "Both routing engines"; } } description "Specific routing engine"; } } // choice re-selector choice lr-selector { leaf logical-system { type string; description "Name of logical system, or 'all'"; } } // choice lr-selector choice tenant-selector { leaf tenant { type string; description "Name of tenant, or 'all'"; } } // choice tenant-selector choice vc-selector { leaf local { type empty; description "Local virtual chassis member"; } leaf all-members { type empty; description "All virtual chassis members"; } leaf member { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Specific virtual chassis member"; } } // choice vc-selector } // grouping command-forwarding } // module junos-rpc-file
© 2023 YumaWorks, Inc. All rights reserved.