blob: c5258ff46b06c0491bac39c95a76b8ab2195776b [file] [log] [blame]
garciadeblas54197362018-11-27 15:30:13 +01001/*
2 *
3 * Copyright 2018 CTTC
4 * Copyright 2018 Telefonica Investigacion y Desarrollo S.A.U.
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 */
jdelacruzd2999e72018-09-18 19:08:29 +020020
jdelacruzd2999e72018-09-18 19:08:29 +020021module instantiation-parameters {
22 //header information
23 yang-version 1;
garciadeblasc038a8d2019-04-03 13:35:27 +020024 namespace "urn:etsi:osm:yang:instantiation-parameters";
jdelacruzd2999e72018-09-18 19:08:29 +020025 prefix "instantiation-parameters";
26
jdelacruzd2999e72018-09-18 19:08:29 +020027 import nsd {
28 prefix "nsd";
29 }
30
31 import vnfd {
32 prefix "vnfd";
33 }
34
jdelacruzd2999e72018-09-18 19:08:29 +020035 import ietf-inet-types {
36 prefix "inet";
37 }
38
39 import ietf-yang-types {
40 prefix "ietf-yang";
41 }
garciadeblas54197362018-11-27 15:30:13 +010042
jdelacruzd2999e72018-09-18 19:08:29 +020043 //revision history
44 revision 2018-09-14 {
45 description "Initial version";
46 }
jdelacruz27797532018-09-18 19:16:16 +020047
garciadeblasff4b9262018-10-19 14:31:56 +020048 grouping ns_params {
49 leaf vimAccountId {
50 mandatory true;
51 type string;
52 }
53 leaf ssh_keys {
54 type string;
55 }
56 list vnf {
57 key "member-vnf-index";
58 uses vnf_params;
59 }
60 list vld {
61 key "name";
62 uses vld_params;
63 }
64 }
65
66 grouping vnf_params {
jdelacruzd2999e72018-09-18 19:08:29 +020067 leaf member-vnf-index{
68 mandatory true;
69 type string;
70 }
71 leaf vimAccountId {
72 type string;
73 }
74 list vdu {
75 key "id";
garciadeblasff4b9262018-10-19 14:31:56 +020076 uses vdu_params;
jdelacruzd2999e72018-09-18 19:08:29 +020077 }
78 list internal-vld {
79 key "name";
garciadeblasff4b9262018-10-19 14:31:56 +020080 uses internal_vld_params;
jdelacruzd2999e72018-09-18 19:08:29 +020081 }
82 }
83
garciadeblas54197362018-11-27 15:30:13 +010084 grouping vld_common_params {
jdelacruzd2999e72018-09-18 19:08:29 +020085 leaf name {
86 type string;
87 }
88 leaf vim-network-name {
89 type string;
90 }
91 container ip-profile {
92 uses ip-profile-update-schema;
93 }
garciadeblas54197362018-11-27 15:30:13 +010094 }
95
96 grouping vld_params {
97 uses vld_common_params;
jdelacruzd2999e72018-09-18 19:08:29 +020098 list vnfd-connection-point-ref {
99 key "member-vnf-index-ref vnfd-connection-point-ref";
100 leaf member-vnf-index-ref {
101 type leafref {
jdelacruz27797532018-09-18 19:16:16 +0200102 //path "../../../vnf/member-vnf-index";
103 path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
jdelacruzd2999e72018-09-18 19:08:29 +0200104 }
105 }
106 leaf vnfd-connection-point-ref {
107 type leafref {
108 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
109 }
110 }
111 leaf ip-address{
112 type inet:ip-address;
113 }
114 }
jdelacruzd2999e72018-09-18 19:08:29 +0200115 }
116
garciadeblasff4b9262018-10-19 14:31:56 +0200117 grouping vdu_params {
jdelacruzd2999e72018-09-18 19:08:29 +0200118 leaf id {
119 mandatory true;
120 type string;
121 }
122 list volume {
123 key "name";
124 leaf name {
125 mandatory true;
126 type string;
127 }
128 leaf vim-volume-id {
129 mandatory true;
130 type string;
131 }
132 }
133 list interface {
134 key "name";
135 leaf name {
136 mandatory true;
137 type string;
138 }
139 leaf ip-address {
140 type inet:ip-address;
141 }
142 leaf mac-address {
143 type ietf-yang:mac-address;
144 }
145 leaf floating-ip-required {
146 type boolean;
147 }
148 }
149 }
150
garciadeblasff4b9262018-10-19 14:31:56 +0200151 grouping internal_vld_params {
jdelacruzd2999e72018-09-18 19:08:29 +0200152 leaf name {
153 mandatory true;
154 type string;
155 }
156 leaf vim-network-name {
157 type string;
158 }
159 container ip-profile {
160 uses ip-profile-update-schema;
161 }
162 list internal-connection-point {
163 key "id-ref";
164 leaf id-ref {
165 mandatory true;
166 type string;
167 }
168 leaf ip-address{
169 type inet:ip-address;
170 }
171 }
172 }
173
174 grouping ip-profile-update-schema { //each leaf/list is either null or something
175 leaf ip-version {
176 type inet:ip-version;
177 }
178 leaf subnet-address {
179 type inet:ip-prefix;
180 }
181 leaf gateway-address {
Felipe Vicens9055b002020-02-11 21:53:23 +0100182 type inet:ip-address;
jdelacruzd2999e72018-09-18 19:08:29 +0200183 }
184 list dns-server {
185 key "address";
186 leaf address {
187 mandatory true;
188 type inet:ip-address;
189 }
190 }
191 container dhcp-params {
192 leaf enabled {
193 type boolean;
194 }
195 leaf count {
196 type uint8; // >=1
197 }
198 leaf start-address {
199 type inet:ip-address;
200 }
201 }
202 }
jdelacruzd2999e72018-09-18 19:08:29 +0200203
garciadeblasff4b9262018-10-19 14:31:56 +0200204}