RIFT OSM R1 Initial Submission
[osm/SO.git] / common / plugins / yang / rw-cloud.yang
1
2 /*
3  * 
4  *   Copyright 2016 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 "rwpb";
29   }
30
31   import rw-cli-ext {
32     prefix "rwcli";
33   }
34
35   import rw-yang-types {
36     prefix "rwt";
37   }
38
39   import rwcal {
40     prefix "rwcal";
41   }
42
43   import rw-sdn {
44     prefix "rw-sdn";
45   }
46
47   revision 2015-09-14 {
48     description
49       "Initial revision.";
50   }
51
52   container cloud {
53     rwpb:msg-new CloudConfig;
54     list account {
55       rwpb:msg-new CloudAccount;
56       description "Configure Cloud Accounts";
57
58       max-elements 16;
59       key "name";
60
61       leaf name {
62         mandatory true;
63         type string {
64             length "1..255";
65         }
66       }
67
68       leaf sdn-account {
69         description "Configured SDN account associated with this cloud account";
70         type leafref {
71           path "/rw-sdn:sdn-account/rw-sdn:name";
72         }
73       }
74
75       uses rwcal:provider-auth;
76       uses rwcal:connection-status;
77     }
78   }
79
80   rpc update-cloud-status {
81     description "Begin cloud account connection status";
82     input {
83       leaf cloud-account {
84         mandatory true;
85         description
86           "The cloud account name to update connection status for";
87         type string;
88       }
89     }
90   }
91
92   notification cloud-notif {
93     description "Notification for cloud account credentials";
94     leaf name {
95       description "Cloud account name";
96       type string;
97     }
98
99     leaf message {
100       description "Notification message";
101       type string;
102     }
103   }
104
105 }
106