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 2017-12-15;
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.";
57 "Version 2.0.1 - added revision-date to imports";
70 "File transfer using FTP/SFTP";
76 "Specify the upload action. The NE (SFTP/FTP client) sends
77 the file identified by the local-file-path
78 to the remote-file-path.";
82 "Specify the download action. The NE (SFTP/FTP client) retrieves
83 the file identified by the remote-file-path
84 to the local-file-path.";
89 "Type of action - download/upload.";
91 leaf local-file-path {
96 Ex: /var/shared/example.txt";
98 leaf remote-file-path {
103 A URI for the remote file path.
105 Format:sftp://user[:password]@host[:port]/path.
106 Ex: sftp://test:verify@[2001:db8:0:1::10]:22/home/user/sample";
110 uses org-openroadm-common-types:rpc-response-status;
115 "Show one or more files in the specified directory.";
123 "Specify file(s) to be listed (* is allowed as wild-card). ";
138 "Successful or Failed";
140 leaf-list status-message {
143 "Gives a more detailed reason for success / failure";
149 "Delete one or more files in the specified directory.";
157 "Specify file(s) to be deleted (* is allowed as wild-card).";
161 uses org-openroadm-common-types:rpc-response-status;
164 notification transfer-notification {
166 "notification for transfer operation events.";
167 leaf local-file-path {
170 "Local file path used in transfer RPC.";
172 uses org-openroadm-common-types:extended-rpc-response-status;
174 when "current()/../status = 'In-progress'";
176 "progress status when response is in-progress";
177 leaf bytes-transferred {
180 "bytes transferred.";
182 leaf percentage-complete {
185 "percentage completed.";