Merge "Bug 38 - SO:Add support for E1000 virtual interfaces"
[osm/SO.git] / rwlaunchpad / plugins / yang / rw-launchpad.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
22
23 /**
24  * @file rw-launchpad.yang
25  * @author Joshua Downer
26  * @date 2015/09/14
27  * @brief Launchpad Yang
28  */
29
30 module rw-launchpad
31 {
32   namespace "http://riftio.com/ns/riftware-1.0/rw-launchpad";
33   prefix "rw-launchpad";
34
35   import ietf-yang-types {
36     prefix "yang";
37   }
38
39   import rw-pb-ext {
40     prefix "rwpb";
41   }
42
43   import ietf-inet-types {
44     prefix "inet";
45   }
46
47
48   import rw-cli-ext {
49     prefix "rwcli";
50   }
51
52   import rw-yang-types {
53     prefix "rwt";
54   }
55
56   import rwcal {
57     prefix "rwcal";
58   }
59
60   import rw-vnfd {
61     prefix "rw-vnfd";
62   }
63
64   import vld {
65     prefix "vld";
66   }
67
68   import rw-nsd {
69     prefix "rw-nsd";
70   }
71
72   import rw-cloud {
73     prefix "rw-cloud";
74   }
75
76   import rw-nsr {
77     prefix "rw-nsr";
78   }
79
80   import rw-conman {
81     prefix "rw-conman";
82   }
83
84   import rw-config-agent {
85     prefix "rw-config-agent";
86   }
87
88   import rw-monitor {
89     prefix "rw-monitor";
90   }
91
92   import rw-image-mgmt {
93     prefix "rw-image-mgmt";
94   }
95
96   revision 2015-09-14 {
97     description
98       "Initial revision.";
99   }
100
101   container datacenters {
102     description "OpenMano data centers";
103
104     rwpb:msg-new DataCenters;
105     config false;
106
107     list ro-accounts {
108       description
109           "A list of OpenMano cloud accounts that have data centers associated
110           with them";
111
112       rwpb:msg-new ROAccount;
113       key "name";
114
115       leaf name {
116         description "The name of the cloud account";
117         type leafref {
118           path "/rw-launchpad:resource-orchestrator/rw-launchpad:name";
119         }
120       }
121
122       list datacenters {
123         rwpb:msg-new DataCenter;
124         leaf uuid {
125           description "The UUID of the data center";
126           type yang:uuid;
127         }
128
129         leaf name {
130           description "The name of the data center";
131           type string;
132         }
133       }
134     }
135   }
136
137   typedef resource-orchestrator-account-type {
138     description "RO account type";
139     type enumeration {
140       enum rift-ro;
141       enum openmano;
142     }
143   }
144
145   container resource-orchestrator {
146     rwpb:msg-new ResourceOrchestrator;
147
148     leaf name {
149        type string;
150     }
151
152     leaf account-type {
153       type resource-orchestrator-account-type;
154     }
155
156     choice resource-orchestrator {
157       description
158         "The resource orchestrator to use by the Launchpad";
159       default rift-ro;
160
161       case rift-ro {
162         description
163           "Use the RIFT.io resource orchestrator";
164
165         container rift-ro {
166           leaf rift-ro {
167             type empty;
168           }
169         }
170       }
171
172       case openmano {
173         description
174           "Use OpenMano as RO";
175
176         container openmano {
177           leaf host {
178             type string;
179             default "localhost";
180           }
181
182           leaf port {
183             type uint16;
184             default 9090;
185           }
186
187           leaf tenant-id {
188             type string {
189               length "36";
190             }
191             mandatory true;
192           }
193         }
194       }
195     }
196   }
197
198   container launchpad-config {
199     leaf public-ip {
200       description
201           "An IP address that can, at least, be reached by the host that the
202           launchpad is running on. This is not a mandatory but is required for
203           alarms to function correctly.";
204       type string;
205     }
206   }
207 }