1 module org-openroadm-file-transfer {
2 namespace "http://org/openroadm/file-transfer";
3 prefix org-openroadm-file-txr;
5 import ietf-inet-types {
7 revision-date 2013-07-15;
9 import org-openroadm-common-types {
10 prefix org-openroadm-common-types;
11 revision-date 2020-05-29;
13 import ietf-yang-types {
14 prefix ietf-yang-types;
15 revision-date 2013-07-15;
23 "YANG definitions for file management related rpcs.
25 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
26 All other rights reserved.
28 Redistribution and use in source and binary forms, with or without modification,
29 are permitted provided that the following conditions are met:
31 * Redistributions of source code must retain the above copyright notice, this
32 list of conditions and the following disclaimer.
33 * Redistributions in binary form must reproduce the above copyright notice,
34 this list of conditions and the following disclaimer in the documentation and/or
35 other materials provided with the distribution.
36 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
37 contributors may be used to endorse or promote products derived from this software
38 without specific prior written permission.
40 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
41 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
43 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
44 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
46 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
47 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49 POSSIBILITY OF SUCH DAMAGE.";
97 "Version 2.0.1 - added revision-date to imports";
103 revision 2016-10-14 {
110 "File transfer using FTP/SFTP";
116 "Specify the upload action. The NE (SFTP/FTP client) sends
117 the file identified by the local-file-path
118 to the remote-file-path.";
122 "Specify the download action. The NE (SFTP/FTP client) retrieves
123 the file identified by the remote-file-path
124 to the local-file-path.";
129 "Type of action - download/upload.";
131 leaf local-file-path {
136 Ex: /var/shared/example.txt";
138 leaf remote-file-path {
143 A URI for the remote file path.
145 Format:sftp://user[:password]@host[:port]/path.
146 Ex: sftp://test:verify@[2001:db8:0:1::10]:22/home/user/sample";
150 uses org-openroadm-common-types:rpc-response-status;
156 "Show one or more files in the specified directory.";
164 "Specify file(s) to be listed (* is allowed as wild-card). ";
169 type org-openroadm-common-types:rpc-status;
174 leaf status-message {
195 type ietf-yang-types:date-and-time;
198 "output modified date";
206 "Delete one or more files in the specified directory.";
214 "Specify file(s) to be deleted (* is allowed as wild-card).";
218 uses org-openroadm-common-types:rpc-response-status;
222 notification transfer-notification {
224 "notification for transfer operation events.";
225 leaf local-file-path {
228 "Local file path used in transfer RPC.";
230 uses org-openroadm-common-types:extended-rpc-response-status;
232 when "current()/../status = 'In-progress'";
234 "progress status when response is in-progress";
235 leaf bytes-transferred {
238 "bytes transferred.";
240 leaf percentage-complete {
243 "percentage completed.";