/*
*
- * 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.
prefix "yang";
}
- import rw-pb-ext {
- prefix "rwpb";
- }
-
import rw-cli-ext {
prefix "rwcli";
}
import rw-vnfd {
prefix "rwvnfd";
}
+
import rw-nsd {
prefix "rwnsd";
}
+ import rw-project-vnfd {
+ prefix "rw-project-vnfd";
+ }
+
+ import rw-project-nsd {
+ prefix "rw-project-nsd";
+ }
+
+ 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.";
}
}
+ 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;
+ enum DOC;
+ enum TEST;
+ }
+ }
+
+ typedef nsd-file-type {
+ type enumeration {
+ enum VNF_CONFIG;
+ enum NS_CONFIG;
+ enum ICONS;
+ enum SCRIPTS;
+ }
+ }
+
typedef export-schema {
type enumeration {
enum RIFT;
}
}
- 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 {
+ description "Download jobs";
+ config false;
- leaf download-id {
- description "Unique UUID";
- type string;
+ list job {
+ key "download-id";
+
+ 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;
}
+ }
- leaf url {
- description "URL of the download";
- type string;
+ container copy-jobs {
+ description "Copy jobs";
+ config false;
+
+ list job {
+ key "transaction-id";
+
+ leaf transaction-id {
+ description "Unique UUID";
+ type string;
+ }
+
+ uses copy-task-status;
}
+ }
- uses package-file-identifer;
- uses download-task-status;
+ container create-jobs {
+ description "Create jobs";
+ config false;
+
+ list job {
+ key "transaction-id";
+
+ leaf transaction-id {
+ description "Unique UUID";
+ type string;
+ }
+
+ uses copy-task-status;
+ }
+ }
+
+ container update-jobs {
+ description "Update jobs";
+ config false;
+
+ list job {
+ 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";
input {
uses package-identifer;
+ uses manotypes:rpc-project-name;
}
output {
}
}
+ 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";
description "Type of the package";
type manotypes:package-type;
}
+
+ uses manotypes:rpc-project-name;
}
output {
input {
uses package-identifer;
uses external-url-data;
+ uses manotypes:rpc-project-name;
}
output {
description "Valid ID to track the status of the task";
type string;
}
+ uses manotypes:rpc-project-name;
}
}
input {
uses package-identifer;
uses external-url-data;
+ uses manotypes:rpc-project-name;
}
output {
description "Valid ID to track the status of the task";
type string;
}
+ uses manotypes:rpc-project-name;
}
}
input {
uses package-identifer;
+ uses manotypes:rpc-project-name;
leaf export-schema {
description "Schema to export";
type export-format;
default YAML;
}
-
}
output {
description "Valid ID to track the status of the task";
type string;
}
+
+ uses manotypes:rpc-project-name;
}
}
input {
uses package-file-identifer;
uses external-url-data;
+ uses manotypes:rpc-project-name;
+
+ 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 {
description "Valid ID to track the status of the task";
type string;
}
+ uses manotypes:rpc-project-name;
}
}
input {
uses package-file-identifer;
+ uses manotypes:rpc-project-name;
+
+ 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 {
type string;
}
+ uses manotypes:rpc-project-name;
}
}