Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / composer / src / schemas / yang / rw-vnfd.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-vnfd
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rw-vnfd";
24   prefix "rw-vnfd";
25
26   import vnfd {
27     prefix "vnfd";
28   }
29
30   import rwvcs-types {
31     prefix "rwvcstypes";
32   }
33
34   import rw-pb-ext { prefix "rwpb"; }
35
36   import ietf-yang-types {
37     prefix "yang";
38   }
39
40   import mano-types {
41     prefix "manotypes";
42   }
43
44   revision 2015-09-10 {
45     description
46       "Initial revision. This YANG file augments
47        the base MANO VNFD";
48     reference
49       "Derived from earlier versions of base YANG files";
50   }
51
52   augment /vnfd:vnfd-catalog/vnfd:vnfd {
53     uses manotypes:control-param;
54     uses manotypes:action-param;
55     leaf meta {
56       description
57         "Any meta-data needed by the UI";
58       type string;
59     }
60     list component {
61       description
62           "This section defines the RIFT.ware
63            virtual components";
64       key "component-name";
65       //rwpb:msg-new VcsComponent;
66       //rwpb:application-request-point;
67
68       leaf component-name {
69         description "";
70         type string;
71       }
72
73       leaf component-type {
74         description "";
75         type rwvcstypes:component_type;
76         mandatory true;
77       }
78
79       choice component {
80         case rwvcs-rwcollection {
81           uses rwvcstypes:rwvcs-rwcollection;
82         }
83         case rwvcs-rwvm {
84           uses rwvcstypes:rwvcs-rwvm;
85         }
86         case rwvcs-rwproc {
87           uses rwvcstypes:rwvcs-rwproc;
88         }
89         case native-proc {
90           uses rwvcstypes:native-proc;
91         }
92         case rwvcs-rwtasklet {
93           uses rwvcstypes:rwvcs-rwtasklet;
94         }
95       }
96     } // list component
97   }
98
99   augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu {
100     leaf vcs-component-ref {
101       description
102           "This defines the software components using the
103            RIFT.ware Virtual Component System (VCS). This
104            also allows specifying a state machine during
105            the VM startup.
106            NOTE: This is an significant addition to MANO,
107            since MANO doesn't clearly specify a method to
108            identify various software components in a VM.
109            Also using a state machine is not something that
110            is well described in MANO.";
111       type leafref {
112         path "/vnfd:vnfd-catalog/vnfd:vnfd/rw-vnfd:component/rw-vnfd:component-name";
113       }
114     }
115   }
116 }
117 // vim: sw=2