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