Revert "BUG-410 -- update RIFT platform"
[osm/UI.git] / skyquake / plugins / composer / src / schemas / yang / rw-nsr.yang.src
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-nsr
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rw-nsr";
24   prefix "rw-nsr";
25
26   import mano-types {
27     prefix "manotypes";
28   }
29
30   import nsr {
31     prefix "nsr";
32   }
33
34   import nsd {
35     prefix "nsd";
36   }
37
38   import rw-cloud {
39     prefix "rw-cloud";
40   }
41
42   import ietf-yang-types {
43     prefix "yang";
44   }
45
46   revision 2015-09-10 {
47     description
48       "Initial revision. This YANG file augments
49        the base MANO VNFD";
50     reference
51       "Derived from earlier versions of base YANG files";
52   }
53
54   grouping operational-events {
55     list operational-events {
56       key "id";
57       description
58         "Recent operational events for this network service.
59         Though the model does not impose any restrictions on the numbe of events, 
60         the max operational events will be limited to the most recent 10"; 
61
62       leaf id {
63         description "The id of the instance";
64         type uint64;
65       }
66
67       leaf timestamp {
68         description
69           "The timestamp of this event expressed as seconds since
70           unix epoch - 1970-01-01T00:00:00Z";
71         type uint32;
72       }
73       leaf event {
74         description "Short description of the event";
75         type string;
76       }
77       leaf description {
78         description
79           "The description of this event";
80         type string;
81       }
82     }
83   }
84
85   grouping nsd-ref-count {
86     list nsd-ref-count {
87       key "nsd-id-ref";
88       description "This table maintains the number of NSRs used by each NSD";
89
90       leaf nsd-id-ref {
91         description "Reference to NSD";
92         type leafref {
93           path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
94         }
95       }
96       leaf instance-ref-count {
97         description
98           "Reference count for the number of NSRs refering this NSD.
99            Every NS record instantiated using this descriptor takes
100            a reference on the NSD and releases the reference when the
101            network service is terminated. This desciptor cannot be
102            deleted when this counter is non zero";
103         type uint64;
104       }
105     }
106   }
107
108   augment /nsr:ns-instance-config/nsr:nsr {
109     leaf cloud-account {
110       description
111         "The configured cloud account which the NSR is instantiated within.
112          All VDU's, Virtual Links, and provider networks will be requested
113          using the cloud-account's associated CAL instance";
114       type leafref {
115         path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
116       }
117     }
118
119     leaf om-datacenter {
120       description
121         "Openmano datacenter name to use when instantiating
122          the network service.  This is only used when openmano
123          is selected as the cloud account.  This should be superceded
124          by multiple cloud accounts when that becomes available.";
125       type string;
126     }
127   }
128
129   augment /nsr:ns-instance-opdata/nsr:nsr {
130     uses manotypes:action-param;
131     uses manotypes:control-param;
132
133     leaf cloud-account {
134       description
135         "The configured cloud account which the NSR is instantiated within.
136          All VDU's, Virtual Links, and provider networks will be requested
137          using the cloud-account's associated CAL instance";
138       type leafref {
139         path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
140       }
141     }
142
143     container nfvi-metrics {
144       container vm {
145         leaf label {
146           description
147             "Label to show in UI";
148           type string;
149           default "VM";
150         }
151
152         leaf active-vm {
153           description
154             "The number of active VMs.";
155           type uint64;
156         }
157
158         leaf inactive-vm {
159           description
160             "The number of inactive VMs.";
161           type uint64;
162         }
163       }
164
165       uses manotypes:nfvi-metrics;
166     }
167
168     container epa-param {
169       container ovs-acceleration {
170         leaf label {
171           description
172             "Label to show in UI for the param";
173           type string;
174           default "OVS ACCELERATION";
175         }
176
177         leaf vm {
178           description
179             "Number of VMs with the EPA attribute";
180           type uint64;
181         }
182
183         leaf unit {
184           description
185             "Unit label to show in the UI";
186           type string;
187           default "vms";
188         }
189       }
190
191       container ovs-offload {
192         leaf label {
193           description
194             "Label to show in UI for the param";
195           type string;
196           default "OVS OFFLOAD";
197         }
198
199         leaf vm {
200           description
201             "Number of VMs with the EPA attribute";
202           type uint64;
203         }
204
205         leaf unit {
206           description
207             "Unit label to show in the UI";
208           type string;
209           default "vms";
210         }
211
212       }
213
214       container ddio {
215         leaf label {
216           description
217             "Label to show in UI for the param";
218           type string;
219           default "DDIO";
220         }
221
222         leaf vm {
223           description
224             "Number of VMs with the EPA attribute";
225           type uint64;
226         }
227
228         leaf unit {
229           description
230             "Unit label to show in the UI";
231           type string;
232           default "vms";
233         }
234
235       }
236
237       container cat {
238         leaf label {
239           description
240             "Label to show in UI for the param";
241           type string;
242           default "CAT";
243         }
244
245         leaf vm {
246           description
247             "Number of VMs with the EPA attribute";
248           type uint64;
249         }
250
251         leaf unit {
252           description
253             "Unit label to show in the UI";
254           type string;
255           default "vms";
256         }
257       }
258
259       container cmt {
260         leaf label {
261           description
262             "Label to show in UI for the param";
263           type string;
264           default "CMT";
265         }
266
267         leaf vm {
268           description
269             "Number of VMs with the EPA attribute";
270           type uint64;
271         }
272
273         leaf unit {
274           description
275             "Unit label to show in the UI";
276           type string;
277           default "vms";
278         }
279
280       }
281     }
282     uses operational-events;
283   }
284
285   augment /nsr:ns-instance-opdata {
286     uses nsd-ref-count;
287   }
288
289   augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
290     leaf assigned-subnet {
291       description "Subnet added for the VL";
292       type string;
293     }
294   }
295
296   augment /nsr:ns-instance-config {
297     leaf nfvi-polling-period {
298       description
299         "Defines the period (secons) that the NFVI metrics are polled at";
300       type uint64;
301       default 4;
302     }
303   }
304 }
305
306 // vim: sw=2