3 * Copyright 2016-2017 RIFT.IO Inc
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
21 * @file rw-pkg-mgmt.yang
22 * @author Varun Prasad
24 * @brief Pacakage Management Yang
29 namespace "http://riftio.com/ns/riftware-1.0/rw-pkg-mgmt";
32 import ietf-yang-types {
68 import rw-project-mano {
69 prefix "rw-project-mano";
74 "Update model to support projects.";
93 typedef export-schema {
100 typedef export-grammar {
107 typedef export-format {
114 grouping external-url-data {
116 description "Url to download";
121 description "username if the url uses authentication";
126 description "password if the url uses authentication";
131 grouping package-identifer {
133 description "Type of the package";
134 type manotypes:package-type;
138 description "Id of the package";
143 grouping package-file-identifer {
144 uses package-identifer;
147 description "Relative path in the package";
152 grouping download-task-status {
154 description "The status of the download task";
160 description "Detailed download status message";
164 leaf progress-percent {
165 description "The download progress percentage (0-100)";
170 leaf bytes_downloaded {
171 description "The number of bytes downloaded";
177 description "The total number of bytes to write";
182 leaf bytes_per_second {
183 description "The total number of bytes written per second";
189 description "start time (unix epoch)";
194 description "stop time (unix epoch)";
199 augment "/rw-project:project" {
200 container download-jobs {
201 rwpb:msg-new DownloadJobs;
202 description "Download jobs";
206 rwpb:msg-new DownloadJob;
210 description "Unique UUID";
215 description "URL of the download";
219 uses package-file-identifer;
220 uses download-task-status;
225 rpc get-package-endpoint {
226 description "Retrieves the endpoint for the descriptor";
229 uses package-identifer;
230 uses manotypes:rpc-project-name;
235 description "Endpoint that contains all the package-related data";
241 rpc get-package-schema {
242 description "Retrieves the schema for the package type";
246 description "Type of the package";
247 type manotypes:package-type;
250 uses manotypes:rpc-project-name;
255 description "List of all top level directories for the package.";
262 description "Creates a new package";
265 uses package-identifer;
266 uses external-url-data;
267 uses manotypes:rpc-project-name;
271 leaf transaction-id {
272 description "Valid ID to track the status of the task";
275 uses manotypes:rpc-project-name;
280 description "Creates a new package";
283 uses package-identifer;
284 uses external-url-data;
285 uses manotypes:rpc-project-name;
289 leaf transaction-id {
290 description "Valid ID to track the status of the task";
293 uses manotypes:rpc-project-name;
298 description "Export a package";
301 uses package-identifer;
302 uses manotypes:rpc-project-name;
305 description "Schema to export";
310 leaf export-grammar {
311 description "Schema to export";
317 description "Format to export";
324 leaf transaction-id {
325 description "Valid ID to track the status of the task";
330 description "Valid ID to track the status of the task";
334 uses manotypes:rpc-project-name;
338 rpc package-file-add {
339 description "Retrieves the file from the URL and store it in the package";
342 uses package-file-identifer;
343 uses external-url-data;
344 uses manotypes:rpc-project-name;
349 description "Valid ID to track the status of the task";
352 uses manotypes:rpc-project-name;
356 rpc package-file-delete {
357 description "Retrieves the file from the URL and store it in the package";
360 uses package-file-identifer;
361 uses manotypes:rpc-project-name;
366 description "Status of the delte operation";
371 description "Trace in case of a failure";
375 uses manotypes:rpc-project-name;