update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[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   import rwcal {
27     prefix "rwcal";
28   }
29
30   import rw-sdn {
31     prefix "rw-sdn";
32   }
33
34   import mano-types {
35     prefix "manotypes";
36   }
37
38   import rw-project {
39     prefix "rw-project";
40   }
41
42   revision 2017-02-08 {
43     description
44       "Update model to support projects.";
45   }
46
47   revision 2015-09-14 {
48     description
49       "Initial revision.";
50   }
51
52   augment "/rw-project:project" {
53     container cloud {
54       list account {
55         description "Configure Cloud Accounts";
56
57         max-elements 16;
58         key "name";
59
60         leaf name {
61           mandatory true;
62           type string {
63             length "1..255";
64           }
65         }
66
67         leaf sdn-account {
68           description "Configured SDN account associated with this cloud account";
69           type leafref {
70             path "../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
71           }
72         }
73
74         uses rwcal:provider-auth;
75         uses rwcal:connection-status;
76         uses rwcal:instance-timeout;
77       }
78     }
79   }
80
81   rpc update-cloud-status {
82     description "Begin cloud account connection status";
83     input {
84       leaf cloud-account {
85         mandatory true;
86         description
87           "The cloud account name to update connection status for";
88         type string;
89       }
90
91       uses manotypes:rpc-project-name;
92     }
93   }
94
95   notification cloud-notif {
96     description "Notification for cloud account credentials";
97     leaf name {
98       description "Cloud account name";
99       type string;
100     }
101
102     leaf message {
103       description "Notification message";
104       type string;
105     }
106   }
107
108 }
109