Added name to nsi and nst as mandatory; removed wrong nst params; netslice instantiat...
[osm/IM.git] / models / yang / instantiation-parameters.yang
1 //INFORMATION
2 //organization "CTTC";
3 //contact "Pol Alemany, Ricard Vilalta, Juan Luis de la Cruz";
4 //description "Network Slice components definition";
5
6 // MODULE STRUCTURE
7 module instantiation-parameters {
8   //header information
9   yang-version 1;
10   namespace "urn:ietf:params:xml:ns:yang:nfvo:instantiation-parameters";
11   prefix "instantiation-parameters";
12   
13   import nsd {
14     prefix "nsd";
15   }
16
17   import vnfd {
18     prefix "vnfd";
19   }
20
21   import ietf-inet-types {
22     prefix "inet";
23   }
24
25   import ietf-yang-types {
26     prefix "ietf-yang";
27   }
28
29   //revision history
30   revision 2018-09-14 {
31     description "Initial version";
32   }
33
34   grouping netslice_params {
35     leaf vimAccountId {
36       mandatory true;
37       type string;
38     }
39     leaf ssh_keys {
40       type string;
41     }
42     list netslice-subnet {
43       key "id";
44       uses netslice_subnet_params;
45     }
46     list netslice-vld {
47       key "name";
48       uses vld_params;
49     }
50   }
51
52   grouping netslice_subnet_params {
53     leaf id {
54       mandatory true;
55       type string;
56     }
57     uses ns_params;
58   }
59
60   grouping ns_params {
61     leaf vimAccountId {
62       mandatory true;
63       type string;
64     }
65     leaf ssh_keys {
66       type string;
67     }
68     list vnf {
69       key "member-vnf-index";
70       uses vnf_params;
71     }
72     list vld {
73       key "name";
74       uses vld_params;
75     }
76   }
77
78   grouping vnf_params {
79     leaf member-vnf-index{
80       mandatory true;
81       type string;
82     }
83     leaf vimAccountId {
84       type string;
85     }
86     list vdu {
87       key "id";
88       uses vdu_params;
89     }
90     list internal-vld {
91       key "name";
92       uses internal_vld_params;
93     }
94   }
95
96   grouping vld_params {
97     leaf name {
98       type string;
99     }
100     leaf vim-network-name {
101       type string;
102     }
103     container ip-profile {
104       uses ip-profile-update-schema;
105     }
106     list vnfd-connection-point-ref {
107       key "member-vnf-index-ref vnfd-connection-point-ref";
108       leaf member-vnf-index-ref {
109         type leafref {
110             //path "../../../vnf/member-vnf-index";
111             path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
112         }
113       }
114       leaf vnfd-connection-point-ref {
115         type leafref {
116           path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
117         }
118       }
119       leaf ip-address{
120         type inet:ip-address;
121       }
122     }
123   }
124
125   grouping vdu_params {
126     leaf id {
127       mandatory true;
128       type string;
129     }
130     list volume {
131       key "name";
132       leaf name {
133         mandatory true;
134         type string;
135       }
136       leaf vim-volume-id {
137         mandatory true;
138         type string;
139       }
140     }
141     list interface {
142       key "name";
143       leaf name {
144         mandatory true;
145         type string;
146       }
147       leaf ip-address {
148         type inet:ip-address;
149       }
150       leaf mac-address {
151         type ietf-yang:mac-address;
152       }
153       leaf floating-ip-required {
154         type boolean;
155       }
156     }
157   }
158
159   grouping internal_vld_params {
160     leaf name {
161       mandatory true;
162       type string;
163     }
164     leaf vim-network-name {
165       type string; 
166     }
167     container ip-profile {
168       uses ip-profile-update-schema;
169     }
170     list internal-connection-point {
171       key "id-ref";
172       leaf id-ref {
173         mandatory true;
174         type string;
175       }
176       leaf ip-address{
177         type inet:ip-address;
178       }
179     }
180   }
181
182   grouping ip-profile-update-schema { //each leaf/list is either null or something
183     leaf ip-version {
184       type inet:ip-version;
185     }
186     leaf subnet-address {
187       type inet:ip-prefix;
188     }
189     leaf gateway-address {
190       type inet:ip-prefix;
191     }
192     list dns-server {
193       key "address";
194       leaf address {
195         mandatory true;
196         type inet:ip-address;
197       }
198     }
199     container dhcp-params {
200       leaf enabled {
201         type boolean;
202       }
203       leaf count {
204         type uint8; // >=1
205       }
206       leaf start-address {
207         type inet:ip-address;
208       }
209     }
210   }
211
212 }