update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[osm/SO.git] / models / plugins / yang / rw-project-nsd.yang
1
2 /*
3  * 
4  *   Copyright 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-project-nsd
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rw-project-nsd";
24   prefix "rw-project-nsd";
25
26   import rw-nsd-base {
27     prefix "rw-nsd-base";
28   }
29
30   import project-nsd {
31     prefix "project-nsd";
32   }
33
34   import project-vnfd {
35     prefix "project-vnfd";
36   }
37
38   import rw-project-vnfd {
39     prefix "rw-project-vnfd";
40   }
41
42   import vnfd-base {
43     prefix "vnfd-base";
44   }
45
46   import rw-project {
47     prefix "rw-project";
48   }
49
50   revision 2017-02-28 {
51     description
52       "Initial revision. This YANG file augments
53        the base MANO NSD";
54     reference
55       "Derived from earlier versions of base YANG files";
56   }
57
58   grouping project-nsd-config-parameter{
59     list config-parameter-map {
60       key "id";
61       description "A mapping of VNF config parameter
62                    requests and sources within this network service";
63       leaf id {
64         description "Identfier for VNF map";
65         type string;
66       }
67       container config-parameter-request {
68         leaf member-vnf-index-ref {
69           description "Reference to member-vnf within constituent-vnfds";
70           type leafref {
71             path "../../../project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
72           }
73         }
74         leaf vnfd-id-ref {
75           description
76               "A reference to a vnfd. This is a
77                leafref to path:
78                    ../../project-nsd:constituent-vnfd
79                    + [project-nsd:id = current()/../id-ref]
80                    + /project-nsd:vnfd-id-ref";
81
82           type leafref {
83             path "../../../project-nsd:constituent-vnfd[project-nsd:member-vnf-index = current()/../member-vnf-index-ref]/project-nsd:vnfd-id-ref";
84           }
85         }
86         leaf config-parameter-request-ref {
87           description "Reference to the request in  the VNF
88                        with the specified member-vnf-index";
89           type leafref {
90             path "../../../../.." +
91               "/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = current()/../vnfd-id-ref]" +
92               "/rw-project-vnfd:config-parameter/rw-project-vnfd:config-parameter-request/rw-project-vnfd:name";
93           }
94         }
95       }
96       container config-parameter-source {
97         leaf member-vnf-index-ref {
98           description "Reference to member-vnf within constituent-vnfds";
99           type leafref {
100             path "../../../project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
101           }
102         }
103         leaf vnfd-id-ref {
104           description
105               "A reference to a vnfd. This is a
106                leafref to path:
107                    ../../project-nsd:constituent-vnfd
108                    + [project-nsd:id = current()/../id-ref]
109                    + /project-nsd:vnfd-id-ref";
110
111           type leafref {
112             path "../../../project-nsd:constituent-vnfd[project-nsd:member-vnf-index = current()/../member-vnf-index-ref]/project-nsd:vnfd-id-ref";
113           }
114         }
115         leaf config-parameter-source-ref {
116           description "Reference to the source in the VNF
117                        with the specified member-vnf-index";
118           type leafref {
119             path "../../../../.." +
120               "/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = current()/../vnfd-id-ref]" +
121               "/rw-project-vnfd:config-parameter/rw-project-vnfd:config-parameter-source/rw-project-vnfd:name";
122           }
123         }
124       }
125     }
126   }
127
128   augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd {
129     uses rw-nsd-base:rw-nsd-ext;
130   }
131
132   augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:service-primitive/project-nsd:parameter {
133     leaf out {
134       description "If this is an output of the primitive execution";
135       type boolean;
136       default false;
137     }
138   }
139
140   augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:service-primitive/project-nsd:parameter-group/project-nsd:parameter {
141     leaf out {
142       description "If this is an output of the primitive execution";
143       type boolean;
144       default false;
145     }
146   }
147
148   augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:vld {
149     leaf ipv4-nat-pool-name{
150       type string;
151       description "IPV4 nat pool name";
152     }
153     
154     list virtual-connection-points {
155       description
156         "A list of virtual-connection points associated with Virtual Link.
157              These connection points are not directly associated with any VNFs";
158       key name;
159       uses vnfd-base:common-connection-point;
160
161       leaf-list associated-cps {
162         description
163           "A List of connection points associated with virtual connection point";
164         type leafref {
165           path "../../project-nsd:vnfd-connection-point-ref/project-nsd:vnfd-connection-point-ref";
166         }
167       }
168     }
169   }
170
171   augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd {
172     uses project-nsd-config-parameter;
173   }
174 }
175
176 // vim: sw=2