X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fplugins%2Fyang%2Frw-pkg-mgmt.yang;h=ee3b7d18ad1309017c122cf034c64200b2a284e4;hb=a3bb91f092d378448cb870eccd45d43865de143c;hp=de56e554b714c1e7bb5a159158277b8ea4636a7e;hpb=9eae504f9fffaa02255241b1d93f6dc4b072926f;p=osm%2FSO.git diff --git a/rwlaunchpad/plugins/yang/rw-pkg-mgmt.yang b/rwlaunchpad/plugins/yang/rw-pkg-mgmt.yang index de56e554..ee3b7d18 100644 --- a/rwlaunchpad/plugins/yang/rw-pkg-mgmt.yang +++ b/rwlaunchpad/plugins/yang/rw-pkg-mgmt.yang @@ -1,6 +1,6 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,10 +56,24 @@ module rw-pkg-mgmt import rw-vnfd { prefix "rwvnfd"; } + import rw-nsd { prefix "rwnsd"; } + import rw-project { + prefix "rw-project"; + } + + import rw-project-mano { + prefix "rw-project-mano"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; + } + revision 2016-06-01 { description "Initial revision."; @@ -182,27 +196,55 @@ module rw-pkg-mgmt } } - container download-jobs { - rwpb:msg-new DownloadJobs; - description "Download jobs"; - config false; + grouping copy-task-status { + leaf status { + description "The status of the copy task"; + type task-status; + default QUEUED; + } + } - list job { - rwpb:msg-new DownloadJob; - key "download-id"; + augment "/rw-project:project" { + container download-jobs { + rwpb:msg-new DownloadJobs; + description "Download jobs"; + config false; - leaf download-id { - description "Unique UUID"; - type string; - } + list job { + rwpb:msg-new DownloadJob; + key "download-id"; - leaf url { - description "URL of the download"; - type string; + leaf download-id { + description "Unique UUID"; + type string; + } + + leaf url { + description "URL of the download"; + type string; + } + + uses package-file-identifer; + uses download-task-status; } + } - uses package-file-identifer; - uses download-task-status; + container copy-jobs { + rwpb:msg-new CopyJobs; + description "Copy jobs"; + config false; + + list job { + rwpb:msg-new CopyJob; + key "transaction-id"; + + leaf transaction-id { + description "Unique UUID"; + type string; + } + + uses copy-task-status; + } } } @@ -211,6 +253,7 @@ module rw-pkg-mgmt input { uses package-identifer; + uses manotypes:rpc-project-name; } output { @@ -221,6 +264,30 @@ module rw-pkg-mgmt } } + rpc package-copy { + description "Copies the package specified in input and returns the copied package id"; + + input { + uses package-identifer; + + leaf package-name { + description "Name of destination package"; + type string; + } + + uses manotypes:rpc-project-name; + } + + output { + leaf transaction-id { + description "Valid ID to track the status of the task"; + type string; + } + + uses package-identifer; + } + } + rpc get-package-schema { description "Retrieves the schema for the package type"; @@ -229,6 +296,8 @@ module rw-pkg-mgmt description "Type of the package"; type manotypes:package-type; } + + uses manotypes:rpc-project-name; } output { @@ -245,6 +314,7 @@ module rw-pkg-mgmt input { uses package-identifer; uses external-url-data; + uses manotypes:rpc-project-name; } output { @@ -252,6 +322,7 @@ module rw-pkg-mgmt description "Valid ID to track the status of the task"; type string; } + uses manotypes:rpc-project-name; } } @@ -261,6 +332,7 @@ module rw-pkg-mgmt input { uses package-identifer; uses external-url-data; + uses manotypes:rpc-project-name; } output { @@ -268,6 +340,7 @@ module rw-pkg-mgmt description "Valid ID to track the status of the task"; type string; } + uses manotypes:rpc-project-name; } } @@ -276,6 +349,7 @@ module rw-pkg-mgmt input { uses package-identifer; + uses manotypes:rpc-project-name; leaf export-schema { description "Schema to export"; @@ -294,7 +368,6 @@ module rw-pkg-mgmt type export-format; default YAML; } - } output { @@ -307,6 +380,8 @@ module rw-pkg-mgmt description "Valid ID to track the status of the task"; type string; } + + uses manotypes:rpc-project-name; } } @@ -316,6 +391,7 @@ module rw-pkg-mgmt input { uses package-file-identifer; uses external-url-data; + uses manotypes:rpc-project-name; } output { @@ -323,6 +399,7 @@ module rw-pkg-mgmt description "Valid ID to track the status of the task"; type string; } + uses manotypes:rpc-project-name; } } @@ -331,6 +408,7 @@ module rw-pkg-mgmt input { uses package-file-identifer; + uses manotypes:rpc-project-name; } output { @@ -344,6 +422,7 @@ module rw-pkg-mgmt type string; } + uses manotypes:rpc-project-name; } }