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 2018-10-19;
19 "YANG definitions for file management related rpcs.
21 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
22 AT&T Intellectual Property. All other rights reserved.
24 Redistribution and use in source and binary forms, with or without modification,
25 are permitted provided that the following conditions are met:
27 * Redistributions of source code must retain the above copyright notice, this
28 list of conditions and the following disclaimer.
29 * Redistributions in binary form must reproduce the above copyright notice,
30 this list of conditions and the following disclaimer in the documentation and/or
31 other materials provided with the distribution.
32 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
33 contributors may be used to endorse or promote products derived from this software
34 without specific prior written permission.
36 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
37 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
40 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
42 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45 POSSIBILITY OF SUCH DAMAGE.";
61 "Version 2.0.1 - added revision-date to imports";
74 "File transfer using FTP/SFTP";
80 "Specify the upload action. The NE (SFTP/FTP client) sends
81 the file identified by the local-file-path
82 to the remote-file-path.";
86 "Specify the download action. The NE (SFTP/FTP client) retrieves
87 the file identified by the remote-file-path
88 to the local-file-path.";
93 "Type of action - download/upload.";
95 leaf local-file-path {
100 Ex: /var/shared/example.txt";
102 leaf remote-file-path {
107 A URI for the remote file path.
109 Format:sftp://user[:password]@host[:port]/path.
110 Ex: sftp://test:verify@[2001:db8:0:1::10]:22/home/user/sample";
114 uses org-openroadm-common-types:rpc-response-status;
119 "Show one or more files in the specified directory.";
127 "Specify file(s) to be listed (* is allowed as wild-card). ";
142 "Successful or Failed";
144 leaf-list status-message {
147 "Gives a more detailed reason for success / failure";
153 "Delete one or more files in the specified directory.";
161 "Specify file(s) to be deleted (* is allowed as wild-card).";
165 uses org-openroadm-common-types:rpc-response-status;
168 notification transfer-notification {
170 "notification for transfer operation events.";
171 leaf local-file-path {
174 "Local file path used in transfer RPC.";
176 uses org-openroadm-common-types:extended-rpc-response-status;
178 when "current()/../status = 'In-progress'";
180 "progress status when response is in-progress";
181 leaf bytes-transferred {
184 "bytes transferred.";
186 leaf percentage-complete {
189 "percentage completed.";