Merge from OSM SO master
[osm/SO.git] / common / plugins / yang / rw-cloud.yang
1
2 /*
3  * 
4  *   Copyright 2016-2017 RIFT.IO Inc
5  *
6  *   Licensed under the Apache License, Version 2.0 (the "License");
7  *   you may not use this file except in compliance with the License.
8  *   You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *   Unless required by applicable law or agreed to in writing, software
13  *   distributed under the License is distributed on an "AS IS" BASIS,
14  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *   See the License for the specific language governing permissions and
16  *   limitations under the License.
17  *
18  *
19  */
20
21 module rw-cloud
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rw-cloud";
24   prefix "rw-cloud";
25
26
27   import rw-pb-ext {
28     prefix "rw-pb-ext";
29   }
30
31   import rwcal {
32     prefix "rwcal";
33   }
34
35   import rw-sdn {
36     prefix "rw-sdn";
37   }
38
39   import mano-types {
40     prefix "manotypes";
41   }
42
43   import rw-project {
44     prefix "rw-project";
45   }
46
47   revision 2017-02-08 {
48     description
49       "Update model to support projects.";
50   }
51
52   revision 2015-09-14 {
53     description
54       "Initial revision.";
55   }
56
57   augment "/rw-project:project" {
58     container cloud {
59       rw-pb-ext:msg-new CloudConfig;
60       list account {
61         rw-pb-ext:msg-new CloudAcc;
62         description "Configure Cloud Accounts";
63
64         max-elements 16;
65         key "name";
66
67         leaf name {
68           mandatory true;
69           type string {
70             length "1..255";
71           }
72         }
73
74         leaf sdn-account {
75           description "Configured SDN account associated with this cloud account";
76           type leafref {
77             path "../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
78           }
79         }
80
81         uses rwcal:provider-auth;
82         uses rwcal:connection-status;
83       }
84     }
85   }
86
87   rpc update-cloud-status {
88     description "Begin cloud account connection status";
89     input {
90       leaf cloud-account {
91         mandatory true;
92         description
93           "The cloud account name to update connection status for";
94         type string;
95       }
96
97       uses manotypes:rpc-project-name;
98     }
99   }
100
101   notification cloud-notif {
102     description "Notification for cloud account credentials";
103     leaf name {
104       description "Cloud account name";
105       type string;
106     }
107
108     leaf message {
109       description "Notification message";
110       type string;
111     }
112   }
113
114 }
115