}
}
+ typedef package-file-type {
+ type enumeration {
+ enum ICONS;
+ enum CHARMS;
+ enum SCRIPTS;
+ enum IMAGES;
+ enum CLOUD_INIT;
+ enum README;
+ }
+ }
+
+ typedef vnfd-file-type {
+ type enumeration {
+ enum ICONS;
+ enum CHARMS;
+ enum SCRIPTS;
+ enum IMAGES;
+ enum CLOUD_INIT;
+ enum README;
+ }
+ }
+
+ typedef nsd-file-type {
+ type enumeration {
+ enum VNF_CONFIG;
+ enum NS_CONFIG;
+ enum ICONS;
+ enum SCRIPTS;
+ }
+ }
+
typedef export-schema {
type enumeration {
enum RIFT;
}
}
+ grouping copy-task-status {
+ leaf status {
+ description "The status of the copy task";
+ type task-status;
+ default QUEUED;
+ }
+ }
+
container download-jobs {
rwpb:msg-new DownloadJobs;
description "Download jobs";
}
}
+ 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;
+ }
+ }
+
rpc get-package-endpoint {
description "Retrieves the endpoint for the descriptor";
}
}
+ 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;
+ }
+ }
+
+ 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";
input {
uses package-file-identifer;
uses external-url-data;
+
+ choice catalog-type {
+ mandatory true;
+ case VNFD {
+ leaf vnfd-file-type {
+ description "Type of vnfd file being added to the package";
+ type vnfd-file-type;
+ }
+ }
+ case NSD {
+ leaf nsd-file-type {
+ description "Type of nsd file being added to the package";
+ type nsd-file-type;
+ }
+ }
+ }
+
}
output {
input {
uses package-file-identifer;
+ choice catalog-type {
+ case VNFD {
+ leaf vnfd-file-type {
+ description "Type of file being removed from the vnfd package";
+ type vnfd-file-type;
+ }
+ }
+ case NSD {
+ leaf nsd-file-type {
+ description "Type of file being removed from the nsd package";
+ type nsd-file-type;
+ }
+ }
+ }
+
}
output {