blob: 49a44e365994f9fd62c0e4eeb6d7317278c37804 [file] [log] [blame]
velandy88a64f12017-06-07 23:32:49 -04001
2/*
3 *
Rajesh Velandye27e0b22017-09-18 17:21:48 -04004 * Copyright 2016-2017 RIFT.IO Inc
velandy88a64f12017-06-07 23:32:49 -04005 *
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
21module nsr
22{
garciadeblasc038a8d2019-04-03 13:35:27 +020023 namespace "urn:etsi:osm:yang:nsr";
velandy88a64f12017-06-07 23:32:49 -040024 prefix "nsr";
25
velandy88a64f12017-06-07 23:32:49 -040026 import vlr {
27 prefix "vlr";
28 }
29
Rajesh Velandye27e0b22017-09-18 17:21:48 -040030 import nsd-base {
31 prefix "nsd-base";
velandy88a64f12017-06-07 23:32:49 -040032 }
33
Rajesh Velandye27e0b22017-09-18 17:21:48 -040034 import project-nsd {
35 prefix "project-nsd";
36 }
37
38 import project-vnfd {
39 prefix "project-vnfd";
velandy88a64f12017-06-07 23:32:49 -040040 }
41
42 import vnfr {
43 prefix "vnfr";
44 }
45
46 import ietf-inet-types {
47 prefix "inet";
48 }
49
50 import ietf-yang-types {
51 prefix "yang";
52 }
53
54 import mano-types {
55 prefix "manotypes";
56 }
57
garciadeblasc038a8d2019-04-03 13:35:27 +020058 import osm-project {
59 prefix "osm-project";
Rajesh Velandye27e0b22017-09-18 17:21:48 -040060 }
61
62 revision 2017-02-08 {
63 description
64 "Update model to support projects.";
velandy88a64f12017-06-07 23:32:49 -040065 }
66
67 revision 2015-09-10 {
68 description
69 "Initial revision. This YANG file defines
70 the Network Service Record (NSR)";
71 reference
72 "Derived from earlier versions of base YANG files";
73 }
74
Rajesh989442e2017-10-08 04:13:32 +000075 typedef vnffgr-operational-status {
76 type enumeration {
77 enum init;
78 enum running;
79 enum terminate;
80 enum terminated;
81 enum failed;
82 }
83 }
84
85 typedef ns-operational-status {
86 type enumeration {
87 enum init;
88 enum vl-init-phase;
89 enum vnf-init-phase;
90 enum running;
91 enum terminate;
92 enum vnf-terminate-phase;
93 enum vl-terminate-phase;
94 enum terminated;
95 enum failed;
96 enum scaling-out;
97 enum scaling-in;
98 enum vl-instantiate;
99 enum vl-terminate;
100 }
101 }
102
velandy88a64f12017-06-07 23:32:49 -0400103 typedef config-states {
104 type enumeration {
105 enum init;
106 enum configuring;
107 enum config_not_needed;
108 enum configured;
109 enum failed;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400110 enum terminate;
velandy88a64f12017-06-07 23:32:49 -0400111 }
112 }
113
114 typedef trigger-type {
115 type enumeration {
116 enum ns-primitive;
117 enum vnf-primitive;
118 }
119 }
120
121 grouping cloud-config {
122 description "List of cloud config parameters";
123
124 list ssh-authorized-key {
125 key "key-pair-ref";
126
127 description "List of authorized ssh keys as part of cloud-config";
128
129 leaf key-pair-ref {
130 description "A reference to the key pair entry in the global key pair table";
131 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400132 path "../../../../key-pair/name";
velandy88a64f12017-06-07 23:32:49 -0400133 }
134 }
135 }
136 list user {
137 key "name";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400138 description "Used to configure the list of public keys to be injected as part
139 of ns instantiation";
velandy88a64f12017-06-07 23:32:49 -0400140 leaf name {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400141 description "Name of this key pair";
velandy88a64f12017-06-07 23:32:49 -0400142 type string;
143 }
144 leaf user-info {
145 description "The user name's real name";
146 type string;
147 }
148 list ssh-authorized-key {
149 key "key-pair-ref";
150
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400151 description "Used to configure the list of public keys to be injected as part
velandy88a64f12017-06-07 23:32:49 -0400152 of ns instantiation";
153
154 leaf key-pair-ref {
155 description "A reference to the key pair entry in the global key pair table";
156 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400157 path "../../../../../key-pair/name";
velandy88a64f12017-06-07 23:32:49 -0400158 }
159 }
160 }
161 }
162 }
163
garciadeblasc038a8d2019-04-03 13:35:27 +0200164 augment "/osm-project:project" {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400165 list key-pair {
166 key "name";
167 description "Used to configure the list of public keys to be injected as part
velandy88a64f12017-06-07 23:32:49 -0400168 of ns instantiation";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400169 leaf name {
170 description "Name of this key pair";
171 type string;
172 }
173
174 leaf key {
175 description "Key associated with this key pair";
176 type string;
177 }
178 }
179 }
180
Michele Carignani75e49ea2019-05-24 11:48:54 +0200181 grouping event-config-primitive {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400182 leaf seq {
183 description
Michele Carignani75e49ea2019-05-24 11:48:54 +0200184 "Sequence number for the config primitive.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400185 type uint64;
186 }
187
velandy88a64f12017-06-07 23:32:49 -0400188 leaf name {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400189 description
Michele Carignani75e49ea2019-05-24 11:48:54 +0200190 "Name of the primitive.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400191 type string;
garciadeblas0090f912019-10-09 15:00:15 +0200192 mandatory true;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400193 }
194
195 leaf user-defined-script {
196 description
197 "A user defined script.";
velandy88a64f12017-06-07 23:32:49 -0400198 type string;
199 }
200
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400201 list parameter {
202 key "name";
velandy88a64f12017-06-07 23:32:49 -0400203 leaf name {
velandy88a64f12017-06-07 23:32:49 -0400204 type string;
205 }
velandy88a64f12017-06-07 23:32:49 -0400206
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400207 leaf value {
208 type string;
velandy88a64f12017-06-07 23:32:49 -0400209 }
210 }
211 }
212
garciadeblasc038a8d2019-04-03 13:35:27 +0200213 augment "/osm-project:project" {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400214 container ns-instance-config {
velandy88a64f12017-06-07 23:32:49 -0400215
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400216 list nsr {
217 key "id";
218 unique "name";
velandy88a64f12017-06-07 23:32:49 -0400219
garciadeblas781fe342017-12-18 11:34:47 +0100220 leaf schema-version {
221 description "Schema version for the NSR. If unspecified, it assumes v3.0";
222 type string;
223 default "v3.0";
224 }
225
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400226 leaf id {
227 description "Identifier for the NSR.";
228 type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -0400229 }
velandy88a64f12017-06-07 23:32:49 -0400230
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400231 leaf name {
232 description "NSR name.";
233 type string;
234 }
velandy88a64f12017-06-07 23:32:49 -0400235
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400236 leaf short-name {
237 description "NSR short name.";
238 type string;
239 }
240
241 leaf description {
242 description "NSR description.";
243 type string;
244 }
245
246 leaf admin-status {
247 description
248 "This is the administrative status of the NS instance";
249
250 type enumeration {
251 enum ENABLED;
252 enum DISABLED;
253 }
254 }
255
256 container nsd {
257 description "NS descriptor used to instantiate this NS";
258
259 uses nsd-base:nsd-descriptor-common;
260
261 uses project-nsd:nsr-nsd-vld;
262
263 uses project-nsd:nsr-nsd-constituent-vnfd;
264
265 uses project-nsd:nsr-nsd-placement-groups;
266
267 uses project-nsd:nsr-nsd-vnf-dependency;
268
269 uses project-nsd:nsr-nsd-monitoring-param;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400270 }
271 uses ns-instance-config-params;
272 }
velandy88a64f12017-06-07 23:32:49 -0400273 }
274 }
275
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400276 grouping ns-instance-config-params-common {
velandy88a64f12017-06-07 23:32:49 -0400277 uses manotypes:input-parameter;
278
279 list scaling-group {
280 description "List of ns scaling group instances";
281 key "scaling-group-name-ref";
282
283 leaf scaling-group-name-ref {
284 description "name of the scaling group
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400285 leafref path ../nsd/scaling-group-descriptor/name";
velandy88a64f12017-06-07 23:32:49 -0400286 type string;
287 }
288
289 list instance {
290 description "The instance of the scaling group";
291 key "id";
292 leaf id {
293 description "Scaling group instance uuid";
294 type uint16;
295 }
296 }
297 }
298
299 list nsd-placement-group-maps {
300 description
301 "Mapping from mano-placement groups construct from NSD to cloud
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400302 platform placement group construct";
velandy88a64f12017-06-07 23:32:49 -0400303
304 key "placement-group-ref";
305
306 leaf placement-group-ref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400307 description
308 "Reference for NSD placement group";
309 // type leafref {
310 // path "../../nsd/placement-groups/name";
311 // }
velandy88a64f12017-06-07 23:32:49 -0400312 type string;
313 }
314 uses manotypes:placement-group-input;
315 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400316 }
velandy88a64f12017-06-07 23:32:49 -0400317
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400318 grouping ns-instance-config-params {
319 uses ns-instance-config-params-common;
320
321 list vnfd-placement-group-maps {
velandy88a64f12017-06-07 23:32:49 -0400322 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400323 "Mapping from mano-placement groups construct from VNFD to cloud
velandy88a64f12017-06-07 23:32:49 -0400324 platform placement group construct";
325
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400326 key "placement-group-ref vnfd-id-ref";
velandy88a64f12017-06-07 23:32:49 -0400327
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400328 leaf vnfd-id-ref {
329 description
velandy88a64f12017-06-07 23:32:49 -0400330 "A reference to a vnfd. This is a
331 leafref to path:
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400332 ../../../../project-nsd:constituent-vnfd
333 + [id = current()/../id-ref]
334 + /project-nsd:vnfd-id-ref
335 NOTE: An issue with confd is preventing the
336 use of xpath. Seems to be an issue with leafref
337 to leafref, whose target is in a different module.
338 Once that is resolved this will switched to use
339 leafref";
340 type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -0400341 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400342
343 leaf placement-group-ref {
344 description
345 "A reference to VNFD placement group";
346 type leafref {
347 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
348 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
349 }
350 }
351
352 uses manotypes:placement-group-input;
velandy88a64f12017-06-07 23:32:49 -0400353 }
354
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400355 uses cloud-config;
velandy88a64f12017-06-07 23:32:49 -0400356 }
357
358 grouping vnffgr {
359
360 list vnffgr {
361 key "id";
362
363 leaf id {
364 description "Identifier for the VNFFGR.";
365 type yang:uuid;
366 }
367
368 leaf vnffgd-id-ref {
369 description "VNFFG descriptor id reference";
370 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400371 path "../../../../ns-instance-config/nsr"
372 + "[id=current()/../../ns-instance-config-ref]"
373 + "/nsd/vnffgd/id";
velandy88a64f12017-06-07 23:32:49 -0400374 }
375 }
376
377 leaf vnffgd-name-ref {
378 description "VNFFG descriptor name reference";
379 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400380 path "../../../../ns-instance-config/nsr"
velandy88a64f12017-06-07 23:32:49 -0400381 + "[id=current()/../../ns-instance-config-ref]"
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400382 + "/nsd/vnffgd"
383 + "[id=current()/../vnffgd-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400384 + "/name";
385 }
386 }
387
388 leaf sdn-account {
389 description
390 "The SDN account to use when requesting resources for
391 this vnffgr";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400392 type string;
393 }
394
395 leaf cloud-account {
396 description "Cloud Account in which NSR is instantiated";
397 type string;
velandy88a64f12017-06-07 23:32:49 -0400398 }
399
400 leaf operational-status {
401 description
402 "The operational status of the VNFFGR instance
403 init : The VNFFGR has just started.
404 running : The VNFFGR is in running state.
405 terminate : The VNFFGR is being terminated.
406 terminated : The VNFFGR is in the terminated state.
407 failed : The VNFFGR instantiation failed
408 ";
Rajesh989442e2017-10-08 04:13:32 +0000409 type vnffgr-operational-status;
velandy88a64f12017-06-07 23:32:49 -0400410 }
411
412 list rsp {
413 key "id";
414
415 leaf id {
416 description
417 "Identifier for the RSP.";
418 type yang:uuid;
419 }
420
421 leaf name {
422 description
423 "Name for the RSP";
424 type string;
425 }
426
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400427 leaf rsp-id {
428 description
429 "Returned Identifier for the RSP.";
430 type yang:uuid;
431 }
432
velandy88a64f12017-06-07 23:32:49 -0400433 leaf vnffgd-rsp-id-ref {
434 description
435 "Identifier for the VNFFG Descriptor RSP reference";
436 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400437 path "../../../../../ns-instance-config/nsr"
velandy88a64f12017-06-07 23:32:49 -0400438 + "[id=current()/../../../ns-instance-config-ref]"
439 + "/nsd/vnffgd"
440 + "[id=current()/../../vnffgd-id-ref]"
441 + "/rsp/id";
442 }
443 }
444
445 leaf vnffgd-rsp-name-ref {
446 description
447 "Name for the VNFFG Descriptor RSP reference";
448 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400449 path "../../../../../ns-instance-config/nsr"
velandy88a64f12017-06-07 23:32:49 -0400450 + "[id=current()/../../../ns-instance-config-ref]"
451 + "/nsd/vnffgd"
452 + "[id=current()/../../vnffgd-id-ref]"
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400453 + "/rsp"
454 + "[id=current()/../vnffgd-rsp-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400455 + "/name";
456 }
457 }
458
459 leaf classifier-name {
460 type string;
461 }
462
463 leaf path-id {
464 description
465 "Unique Identifier for the service path";
466 type uint32;
467 }
468
469 list vnfr-connection-point-ref {
470 key "hop-number";
471 leaf hop-number {
472 description
473 "Monotonically increasing number to show service path hop
474 order";
475 type uint8;
476 }
477 leaf service-function-type {
478 description
479 "Type of Service Function.
480 NOTE: This needs to map with Service Function Type in ODL to
481 support VNFFG. Service Function Type is mandatory param in ODL
482 SFC. This is temporarily set to string for ease of use";
483 type string;
484 }
485
486 leaf member-vnf-index-ref {
tiernoea872d42018-04-24 15:13:58 +0200487 type string;
velandy88a64f12017-06-07 23:32:49 -0400488 }
489 leaf vnfd-id-ref {
490 description
491 "Reference to VNF Descriptor Id";
492 type string;
493 }
494 leaf vnfr-id-ref {
495 description
496 "A reference to a vnfr id";
497 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400498 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
velandy88a64f12017-06-07 23:32:49 -0400499 }
500 }
501 leaf vnfr-name-ref {
502 description
503 "A reference to a vnfr name";
504 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400505 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
velandy88a64f12017-06-07 23:32:49 -0400506 }
507 }
Eduardo Sousaebba2672018-11-29 15:42:01 +0000508 leaf vnfr-ingress-connection-point-ref {
509 description
510 "A reference to a vnfr connection point.";
511 type leafref {
512 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
513 + "[vnfr:id = current()/../vnfr-id-ref]"
514 + "/vnfr:connection-point/vnfr:name";
515 }
516 }
517 leaf vnfr-egress-connection-point-ref {
velandy88a64f12017-06-07 23:32:49 -0400518 description
519 "A reference to a vnfr connection point.";
520 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400521 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
522 + "[vnfr:id = current()/../vnfr-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400523 + "/vnfr:connection-point/vnfr:name";
524 }
525 }
526 leaf service-index {
527 description
528 "Location within the service path";
529 type uint8;
530 }
531 container connection-point-params {
532 leaf mgmt-address {
533 type inet:ip-address;
534 }
535 leaf name {
536 type string;
537 }
538 leaf port-id {
velandy88a64f12017-06-07 23:32:49 -0400539 type string;
540 }
541 leaf vm-id {
velandy88a64f12017-06-07 23:32:49 -0400542 type string;
543 }
544 leaf address {
545 type inet:ip-address;
546 }
547 leaf port {
548 type inet:port-number;
549 }
550 }
551
552 container service-function-forwarder {
553 leaf name {
554 description
555 "Service Function Forwarder name";
556 type string;
557 }
558 leaf ip-address {
559 description
560 "Data Plane IP Address of the SFF";
561 type inet:ip-address;
562 }
563 leaf port {
564 description
565 "Data Plane Port of the SFF";
566 type inet:port-number;
567 }
568 }
569 }
570 }
571
572 list classifier {
573 key "id";
574
575 leaf id {
576 description
577 "Identifier for the classifier rule.";
578 type yang:uuid;
579 }
580 leaf name {
581 description
582 "Name of the classifier.";
583 type string;
584 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400585 leaf-list classifier-id {
586 description
587 "Returned Identifier for the classifier rule.";
588 type yang:uuid;
589 }
velandy88a64f12017-06-07 23:32:49 -0400590 leaf rsp-id-ref {
591 description
592 "A reference to the RSP.";
593 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400594 path "../../rsp/id";
velandy88a64f12017-06-07 23:32:49 -0400595 }
596 }
597 leaf rsp-name {
598 description
599 "Name for the RSP";
600 type string;
601 }
602 leaf vnfr-id-ref {
603 description
604 "A reference to a vnfr id";
605 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400606 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
velandy88a64f12017-06-07 23:32:49 -0400607 }
608 }
609 leaf vnfr-name-ref {
610 description
611 "A reference to a vnfr name";
612 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400613 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
velandy88a64f12017-06-07 23:32:49 -0400614 }
615 }
616 leaf vnfr-connection-point-ref {
617 description
618 "A reference to a vnfr connection point.";
619 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400620 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
621 + "[vnfr:id = current()/../vnfr-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400622 + "/vnfr:connection-point/vnfr:name";
623 }
624 }
625 leaf port-id {
velandy88a64f12017-06-07 23:32:49 -0400626 type string;
627 }
628 leaf vm-id {
velandy88a64f12017-06-07 23:32:49 -0400629 type string;
630 }
631 leaf ip-address {
632 type string;
633 }
634 leaf sff-name {
635 type string;
636 }
637 }
638 }
639 }
640
garciadeblasc038a8d2019-04-03 13:35:27 +0200641 augment "/osm-project:project" {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400642 container ns-instance-opdata {
643 config false;
velandy88a64f12017-06-07 23:32:49 -0400644
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400645 list nsr {
646 key "ns-instance-config-ref";
velandy88a64f12017-06-07 23:32:49 -0400647
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400648 leaf ns-instance-config-ref {
649 type leafref {
650 path "../../../ns-instance-config/nsr/id";
651 }
652 // type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -0400653 }
velandy88a64f12017-06-07 23:32:49 -0400654
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400655 leaf name-ref {
656 description "Network service name reference";
657 type leafref {
658 path "../../../ns-instance-config/nsr" +
659 "[id=current()/../ns-instance-config-ref]" +
660 "/name";
661 }
velandy88a64f12017-06-07 23:32:49 -0400662 }
velandy88a64f12017-06-07 23:32:49 -0400663
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400664 leaf nsd-ref {
665 description "Network service descriptor id reference";
666 type leafref {
667 path "../../../ns-instance-config/nsr"
668 + "[id=current()/../ns-instance-config-ref]"
669 + "/nsd/id";
670 }
velandy88a64f12017-06-07 23:32:49 -0400671 }
velandy88a64f12017-06-07 23:32:49 -0400672
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400673 leaf nsd-name-ref {
674 description "Network service descriptor name reference";
675 type leafref {
676 path "../../../ns-instance-config/nsr"
677 + "[id=current()/../ns-instance-config-ref]"
678 + "/nsd/name";
679 }
velandy88a64f12017-06-07 23:32:49 -0400680 }
velandy88a64f12017-06-07 23:32:49 -0400681
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400682 leaf create-time {
683 description
684 "Creation timestamp of this Network Service.
velandy88a64f12017-06-07 23:32:49 -0400685 The timestamp is expressed as seconds
686 since unix epoch - 1970-01-01T00:00:00Z";
687
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400688 type uint32;
689 }
velandy88a64f12017-06-07 23:32:49 -0400690
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400691 leaf uptime {
692 description
693 "Active period of this Network Service.
velandy88a64f12017-06-07 23:32:49 -0400694 Uptime is expressed in seconds";
695
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400696 type uint32;
697 }
velandy88a64f12017-06-07 23:32:49 -0400698
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400699 list connection-point {
700 description
velandy88a64f12017-06-07 23:32:49 -0400701 "List for external connection points.
702 Each NS has one or more external connection points.
703 As the name implies that external connection points
704 are used for connecting the NS to other NS or to
705 external networks. Each NS exposes these connection
706 points to the orchestrator. The orchestrator can
707 construct network service chains by connecting the
708 connection points between different NS.";
709
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400710 key "name";
711 leaf name {
712 description
velandy88a64f12017-06-07 23:32:49 -0400713 "Name of the NS connection point.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400714 type string;
715 }
velandy88a64f12017-06-07 23:32:49 -0400716
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400717 leaf type {
718 description
velandy88a64f12017-06-07 23:32:49 -0400719 "Type of the connection point.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400720 type manotypes:connection-point-type;
velandy88a64f12017-06-07 23:32:49 -0400721 }
722 }
723
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400724 list vlr {
725 key "vlr-ref";
726 leaf vlr-ref {
727 description
728 "Reference to a VLR record in the VLR catalog";
729 type leafref {
730 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
731 }
732 }
velandy88a64f12017-06-07 23:32:49 -0400733
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400734
735 list vnfr-connection-point-ref {
736 description
737 "A list of references to connection points.";
738 key "vnfr-id";
739
740 leaf vnfr-id {
741 description "A reference to a vnfr";
742 type leafref {
743 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
744 }
745 }
746
747 leaf connection-point {
748 description
749 "A reference to a connection point name in a vnfr";
750 type leafref {
751 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
752 + "[vnfr:id = current()/../vnfr-id]"
753 + "/vnfr:connection-point/vnfr:name";
754 }
755 }
756 }
757 }
758
759 list constituent-vnfr-ref {
velandy88a64f12017-06-07 23:32:49 -0400760 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400761 "List of VNFRs that are part of this
762 network service.";
velandy88a64f12017-06-07 23:32:49 -0400763 key "vnfr-id";
764
765 leaf vnfr-id {
velandy88a64f12017-06-07 23:32:49 -0400766 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400767 "Reference to the VNFR id
768 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
769 But due to confd bug (RIFT-9451), changing to string.";
770 type string;
771 }
772 }
773
774 list scaling-group-record {
775 description "List of scaling group records";
776 key "scaling-group-name-ref";
777
778 leaf scaling-group-name-ref {
779 description "name of the scaling group";
velandy88a64f12017-06-07 23:32:49 -0400780 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400781 path "../../../../ns-instance-config/nsr"
782 + "[id=current()/../../ns-instance-config-ref]"
783 + "/nsd/scaling-group-descriptor/name";
velandy88a64f12017-06-07 23:32:49 -0400784 }
785 }
velandy88a64f12017-06-07 23:32:49 -0400786
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400787 list instance {
788 description "Reference to scaling group instance record";
789 key "instance-id";
790 leaf instance-id {
791 description "Scaling group instance id";
792 type uint16;
793 }
velandy88a64f12017-06-07 23:32:49 -0400794
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400795 leaf is-default {
796 description "Flag indicating whether this instance was part of
velandy88a64f12017-06-07 23:32:49 -0400797 default scaling group (and thus undeletable)";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400798 type boolean;
799 }
velandy88a64f12017-06-07 23:32:49 -0400800
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400801 leaf op-status {
802 description
803 "The operational status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400804 init : The scaling group has just started.
805 vnf-init-phase : The VNFs in the scaling group are being instantiated.
806 running : The scaling group is in running state.
807 terminate : The scaling group is being terminated.
808 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
809 terminated : The scaling group is in the terminated state.
810 failed : The scaling group instantiation failed.
811 ";
812
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400813 type enumeration {
814 enum init;
815 enum vnf-init-phase;
816 enum running;
817 enum terminate;
818 enum vnf-terminate-phase;
819 enum terminated;
820 enum failed;
821 }
velandy88a64f12017-06-07 23:32:49 -0400822 }
velandy88a64f12017-06-07 23:32:49 -0400823
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400824 leaf config-status {
825 description
826 "The configuration status of the scaling group instance
velandy88a64f12017-06-07 23:32:49 -0400827 configuring : At least one of the VNFs in this scaling group instance
828 is in configuring state
829 configured : All the VNFs in this scaling group instance are
830 configured or config-not-needed state
831 failed : Configuring this scaling group instance failed
832 ";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400833 type config-states;
834 }
velandy88a64f12017-06-07 23:32:49 -0400835
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400836 leaf error-msg {
837 description
838 "Reason for failure in configuration of this scaling instance";
839 type string;
840 }
velandy88a64f12017-06-07 23:32:49 -0400841
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400842 leaf create-time {
843 description
844 "Creation timestamp of this scaling group record.
velandy88a64f12017-06-07 23:32:49 -0400845 The timestamp is expressed as seconds
846 since unix epoch - 1970-01-01T00:00:00Z";
847
848 type uint32;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400849 }
velandy88a64f12017-06-07 23:32:49 -0400850
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400851 leaf-list vnfrs {
852 description "Reference to VNFR within the scale instance";
853 type leafref {
854 path "../../../constituent-vnfr-ref/vnfr-id";
855 }
velandy88a64f12017-06-07 23:32:49 -0400856 }
857 }
858 }
velandy88a64f12017-06-07 23:32:49 -0400859
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400860 uses vnffgr;
velandy88a64f12017-06-07 23:32:49 -0400861
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400862 leaf operational-status {
863 description
864 "The operational status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400865 init : The network service has just started.
866 vl-init-phase : The VLs in the NS are being instantiated.
867 vnf-init-phase : The VNFs in the NS are being instantiated.
868 running : The NS is in running state.
869 terminate : The NS is being terminated.
870 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
871 vl-terminate-phase : The NS is terminating the VLs in the NS.
872 terminated : The NS is in the terminated state.
873 failed : The NS instantiation failed.
874 scaling-out : The NS is scaling out
875 scaling-in : The NS is scaling in
876 vl-instantiate : The NS is initiating a new VL
877 vl-terminate : The NS is terminating a VL
878 ";
879
Rajesh989442e2017-10-08 04:13:32 +0000880 type ns-operational-status;
velandy88a64f12017-06-07 23:32:49 -0400881 }
velandy88a64f12017-06-07 23:32:49 -0400882
garciadeblas634a26f2019-04-09 15:12:41 +0200883 container ns-configuration {
884 uses manotypes:vca-configuration;
885 }
886
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400887 leaf config-status {
888 description
889 "The configuration status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400890 configuring: At least one of the VNFs in this instance is in configuring state
891 configured: All the VNFs in this NS instance are configured or config-not-needed state
892 ";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400893 type config-states;
894 }
velandy88a64f12017-06-07 23:32:49 -0400895
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400896 list monitoring-param {
velandy88a64f12017-06-07 23:32:49 -0400897 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400898 "List of NS level params.";
899 key "id";
900
901 uses manotypes:monitoring-param-value;
902 uses manotypes:monitoring-param-ui-data;
903 uses manotypes:monitoring-param-aggregation;
904
905 leaf id {
906 type string;
907 }
908
velandy88a64f12017-06-07 23:32:49 -0400909 leaf name {
velandy88a64f12017-06-07 23:32:49 -0400910 type string;
911 }
912
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400913 leaf nsd-mon-param-ref {
914 description "Reference to the NSD monitoring param descriptor
velandy88a64f12017-06-07 23:32:49 -0400915 that produced this result";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400916 // TODO: Fix leafref
917 type leafref {
918 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
919 "[project-nsd:id = current()/../../nsd-ref]" +
920 "/project-nsd:monitoring-param/project-nsd:id";
921 }
velandy88a64f12017-06-07 23:32:49 -0400922 }
velandy88a64f12017-06-07 23:32:49 -0400923
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400924 list vnfr-mon-param-ref {
925 description "A list of VNFR monitoring params associated with this monp";
926 key "vnfr-id-ref vnfr-mon-param-ref";
velandy88a64f12017-06-07 23:32:49 -0400927
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400928 leaf vnfr-id-ref {
929 description
930 "A reference to a vnfr. This is a
velandy88a64f12017-06-07 23:32:49 -0400931 leafref to path:
932 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
933
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400934 type yang:uuid;
935 }
velandy88a64f12017-06-07 23:32:49 -0400936
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400937 leaf vnfr-mon-param-ref {
938 description "A reference to the VNFR monitoring param";
939 type leafref {
940 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
941 + "[vnfr:id = current()/../vnfr-id-ref]"
942 + "/vnfr:monitoring-param/vnfr:id";
943 }
velandy88a64f12017-06-07 23:32:49 -0400944 }
945 }
946 }
velandy88a64f12017-06-07 23:32:49 -0400947
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400948 list config-agent-job {
949 key "job-id";
velandy88a64f12017-06-07 23:32:49 -0400950
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400951 leaf job-id {
952 description "config agent job Identifier for the NS.";
953 type uint64;
954 }
velandy88a64f12017-06-07 23:32:49 -0400955
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400956 leaf job-name {
957 description "Config agent job name";
958 type string;
959 }
velandy88a64f12017-06-07 23:32:49 -0400960
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400961 leaf job-status {
962 description
velandy88a64f12017-06-07 23:32:49 -0400963 "Job status to be set based on each VNF primitive execution,
964 pending - if at least one VNF is in pending state
965 and remaining VNFs are in success state.
966 Success - if all VNF executions are in success state
967 failure - if one of the VNF executions is failure";
velandy88a64f12017-06-07 23:32:49 -0400968 type enumeration {
969 enum pending;
970 enum success;
971 enum failure;
972 }
973 }
974
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400975 leaf triggered-by {
976 description "The primitive is triggered from NS or VNF level";
977 type trigger-type;
978 }
979
980 leaf create-time {
981 description
982 "Creation timestamp of this Config Agent Job.
983 The timestamp is expressed as seconds
984 since unix epoch - 1970-01-01T00:00:00Z";
985
986 type uint32;
987 }
988
989 leaf job-status-details {
990 description "Config agent job status details, in case of errors";
991 type string;
992 }
993
994 uses manotypes:primitive-parameter-value;
995
996 list parameter-group {
997 description
998 "List of NS Primitive parameter groups";
velandy88a64f12017-06-07 23:32:49 -0400999 key "name";
1000 leaf name {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001001 description
1002 "Name of the parameter.";
velandy88a64f12017-06-07 23:32:49 -04001003 type string;
1004 }
1005
1006 uses manotypes:primitive-parameter-value;
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001007 }
velandy88a64f12017-06-07 23:32:49 -04001008
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001009 list vnfr {
1010 key "id";
1011 leaf id {
1012 description "Identifier for the VNFR.";
1013 type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -04001014 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001015 leaf vnf-job-status {
1016 description
1017 "Job status to be set based on each VNF primitive execution,
1018 pending - if at least one primitive is in pending state
1019 and remaining primitives are in success state.
1020 Success - if all primitive executions are in success state
1021 failure - if one of the primitive executions is failure";
velandy88a64f12017-06-07 23:32:49 -04001022 type enumeration {
1023 enum pending;
1024 enum success;
1025 enum failure;
1026 }
1027 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001028
1029 list primitive {
1030 key "name";
1031 leaf name {
1032 description "the name of the primitive";
1033 type string;
1034 }
1035
1036 uses manotypes:primitive-parameter-value;
1037
1038 leaf execution-id {
1039 description "Execution id of the primitive";
1040 type string;
1041 }
1042 leaf execution-status {
1043 description "status of the Execution";
1044 type enumeration {
1045 enum pending;
1046 enum success;
1047 enum failure;
1048 }
1049 }
1050 leaf execution-error-details {
1051 description "Error details if execution-status is failure";
1052 type string;
1053 }
velandy88a64f12017-06-07 23:32:49 -04001054 }
1055 }
1056 }
1057 }
1058 }
1059 }
1060
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001061 grouping rpc-common {
1062 uses manotypes:rpc-project-name;
1063
1064 leaf nsr_id_ref {
1065 description "Reference to NSR ID ref";
1066 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001067 path "/osm-project:project[osm-project:name=current()/.." +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001068 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1069 }
1070 mandatory true;
1071 }
1072 }
1073
Michele Carignani75e49ea2019-05-24 11:48:54 +02001074 rpc get-ns-config-primitive-values {
1075 description "Get the config primitive parameter values";
velandy88a64f12017-06-07 23:32:49 -04001076
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001077 input {
velandy88a64f12017-06-07 23:32:49 -04001078 leaf name {
Michele Carignani75e49ea2019-05-24 11:48:54 +02001079 description "Name of the NS config primitive group";
velandy88a64f12017-06-07 23:32:49 -04001080 mandatory true;
1081 type string;
1082 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001083
1084 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001085 }
1086
1087 output {
1088 list ns-parameter {
1089 description "Automatically generated parameter";
1090 key "name";
1091
1092 leaf name {
1093 description "Parameter name which should be pulled from a parameter pool";
1094 type string;
1095 }
1096 leaf value {
1097 description "Automatically generated value";
1098 type string;
1099 }
1100 }
1101
1102 list ns-parameter-group {
1103 description "Automatically generated parameters in parameter group";
1104 key "name";
1105 leaf name {
1106 description "Parameter group name";
1107 type string;
1108 }
1109 list parameter {
1110 description "Automatically generated group parameter";
1111 key "name";
1112
1113 leaf name {
1114 description "Parameter name which should be pulled from a parameter pool";
1115 type string;
1116 }
1117 leaf value {
1118 description "Automatically generated value";
1119 type string;
1120 }
1121 }
1122 }
1123
1124 list vnf-primitive-group {
1125 description
1126 "List of service primitives grouped by VNF.";
1127
1128 key "member-vnf-index-ref";
1129 leaf member-vnf-index-ref {
1130 description
1131 "Reference to member-vnf within constituent-vnfds";
tiernoea872d42018-04-24 15:13:58 +02001132 type string;
velandy88a64f12017-06-07 23:32:49 -04001133 }
1134
1135 leaf vnfd-id-ref {
1136 description
1137 "A reference to a vnfd. This is a
1138 leafref to path:
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001139 ../../../../project-nsd:constituent-vnfd
1140 + [project-nsd:id = current()/../project-nsd:id-ref]
1141 + /project-nsd:vnfd-id-ref
1142 NOTE: An issue with confd is preventing the
1143 use of xpath. Seems to be an issue with leafref
1144 to leafref, whose target is in a different module.
1145 Once that is resolved this will switched to use
1146 leafref";
velandy88a64f12017-06-07 23:32:49 -04001147
1148 type string;
1149 }
1150
1151 list primitive {
1152 key "index";
1153 leaf index {
1154 description "Index of this primitive";
1155 type uint32;
1156 }
1157
1158 leaf name {
1159 description "Name of the primitive associated with a value pool";
1160 type string;
1161 }
1162
1163 list parameter {
1164 description "Automatically generated parameter";
1165 key "name";
1166
1167 leaf name {
1168 description "Parameter name which should be pulled from a parameter pool";
1169 type string;
1170 }
1171 leaf value {
1172 description "Automatically generated value";
1173 type string;
1174 }
1175 }
1176 }
1177 }
1178 }
1179 }
1180
Michele Carignani75e49ea2019-05-24 11:48:54 +02001181 rpc exec-ns-config-primitive {
1182 description "Executes a NS config primitive or script";
velandy88a64f12017-06-07 23:32:49 -04001183
1184 input {
1185 leaf name {
1186 description "Name of the primitive";
1187 type string;
1188 }
1189
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001190 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001191
1192 leaf triggered-by {
1193 description "The primitive is triggered from NS or VNF level";
1194 type trigger-type;
1195 default ns-primitive;
1196 }
1197
1198 uses manotypes:primitive-parameter-value;
1199
1200 list parameter-group {
1201 description
1202 "List of NS Primitive parameter groups";
1203 key "name";
1204 leaf name {
1205 description
1206 "Name of the parameter.";
1207 type string;
1208 }
1209
1210 uses manotypes:primitive-parameter-value;
1211 }
1212
1213 list vnf-list {
1214 description
1215 "List of VNFs whose primitives are being set.";
1216 key "member_vnf_index_ref";
1217
1218 leaf member_vnf_index_ref {
1219 description "Member VNF index";
1220 type uint64;
1221 }
1222
1223 leaf vnfr-id-ref {
1224 description
1225 "A reference to a vnfr. This is a
1226 leafref to path";
1227 type yang:uuid;
1228 }
1229
1230 list vnf-primitive {
1231 description
1232 "List of service primitives supported by the
1233 configuration agent for this VNF.";
1234 key "index";
1235
1236 leaf index {
1237 description
1238 "index of the service primitive.";
1239 type uint32;
1240 }
1241 leaf name {
1242 description
1243 "Name of the service primitive.";
1244 type string;
1245 }
1246
1247 uses manotypes:primitive-parameter-value;
1248 }
1249 }
1250 leaf user-defined-script {
1251 description
1252 "A user defined script.";
1253 type string;
1254 }
1255 }
1256 output {
1257 leaf job-id {
1258 description "Job identifier for this RPC";
1259 type uint64;
1260 }
1261
1262 leaf name {
1263 description "Name of the service primitive";
1264 type string;
1265 }
1266
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001267 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001268
1269 leaf triggered-by {
1270 description "The primitive is triggered from NS or VNF level";
1271 type trigger-type;
1272 }
1273
1274 leaf create-time {
1275 description
1276 "Creation timestamp of this config agent JOB.
1277 The timestamp is expressed as seconds
1278 since unix epoch - 1970-01-01T00:00:00Z";
1279
1280 type uint32;
1281 }
1282
1283 leaf job-status-details {
1284 description "Job status details, in case of any errors";
1285 type string;
1286 }
1287
1288 uses manotypes:primitive-parameter-value;
1289
1290 list parameter-group {
1291 description
1292 "List of NS Primitive parameter groups";
1293 key "name";
1294 leaf name {
1295 description
1296 "Name of the parameter.";
1297 type string;
1298 }
1299
1300 uses manotypes:primitive-parameter-value;
1301 }
1302
1303 list vnf-out-list {
1304 description
1305 "List of VNFs whose primitives were set.";
1306 key "member_vnf_index_ref";
1307
1308 leaf member_vnf_index_ref {
1309 description "Member VNF index";
1310 type uint64;
1311 }
1312 leaf vnfr-id-ref {
1313 description
1314 "A reference to a vnfr. This is a
1315 leafref to path";
1316 type yang:uuid;
1317 }
1318
1319 list vnf-out-primitive {
1320 description
1321 "List of service primitives supported by the
1322 configuration agent for this VNF.";
1323 key "index";
1324
1325 leaf index {
1326 description
1327 "index of the service primitive.";
1328 type uint32;
1329 }
1330
1331 leaf name {
1332 description
1333 "Name of the service primitive.";
1334 type string;
1335 }
1336
1337 uses manotypes:primitive-parameter-value;
1338
1339 leaf execution-id {
1340 description "Execution id of this primitive";
1341 type string;
1342 }
1343
1344 leaf execution-status {
1345 description "Status of the execution of this primitive";
1346 type string;
1347 }
1348
1349 leaf execution-error-details {
1350 description "Error details if execution-status is failed";
1351 type string;
1352 }
1353 }
1354 }
1355 }
1356 }
1357
1358 rpc exec-scale-in {
1359 description "Executes scale out request";
1360
1361 input {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001362 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001363
1364 leaf scaling-group-name-ref {
1365 description "name of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001366 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001367 path "/osm-project:project[osm-project:name=current()/.." +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001368 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1369 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1370 "/nsr:scaling-group-descriptor/nsr:name";
1371 }
1372 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001373 }
1374
1375 leaf instance-id {
1376 description "id of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001377 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001378 path "/osm-project:project[osm-project:name=current()/.." +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001379 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1380 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1381 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1382 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1383 }
1384 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001385 }
1386
1387
1388 }
1389 output {
1390 leaf instance-id {
1391 description "id of the scaling group";
1392 type uint64;
1393 }
1394 }
1395 }
1396
1397 rpc exec-scale-out {
1398 description "Executes scale out request";
1399
1400 input {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001401 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001402
1403 leaf scaling-group-name-ref {
1404 description "name of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001405 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001406 path "/osm-project:project[osm-project:name=current()/.." +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001407 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1408 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1409 "/nsr:scaling-group-descriptor/nsr:name";
1410 }
1411 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001412 }
1413
1414 leaf instance-id {
1415 description "id of the scaling group";
1416 type uint64;
1417 }
velandy88a64f12017-06-07 23:32:49 -04001418 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001419
velandy88a64f12017-06-07 23:32:49 -04001420 output {
1421 leaf instance-id {
1422 description "id of the scaling group";
1423 type uint64;
1424 }
1425 }
1426 }
1427
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001428 rpc start-network-service {
1429 description "Start the network service";
1430 input {
1431 leaf name {
1432 mandatory true;
1433 description "Name of the Network Service";
1434 type string;
1435 }
1436
1437 uses manotypes:rpc-project-name;
1438
1439 leaf nsd_id_ref {
1440 description "Reference to NSD ID ref";
1441 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001442 path "/osm-project:project[osm-project:name=current()/.." +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001443 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1444 }
1445 }
1446 uses ns-instance-config-params-common;
1447
1448 list vnfd-placement-group-maps {
1449 description
1450 "Mapping from mano-placement groups construct from VNFD to cloud
1451 platform placement group construct";
1452
1453 key "placement-group-ref vnfd-id-ref";
1454
1455 leaf vnfd-id-ref {
1456 description
1457 "A reference to a vnfd. This is a
1458 leafref to path:
1459 ../../../../project-nsd:constituent-vnfd
1460 + [id = current()/../project-nsd:id-ref]
1461 + /project-nsd:vnfd-id-ref
1462 NOTE: An issue with confd is preventing the
1463 use of xpath. Seems to be an issue with leafref
1464 to leafref, whose target is in a different module.
1465 Once that is resovled this will switched to use
1466 leafref";
1467 type yang:uuid;
1468 }
1469
1470 leaf placement-group-ref {
1471 description
1472 "A reference to VNFD placement group";
1473 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001474 path "/osm-project:project[osm-project:name=current()/" +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001475 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1476 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1477 }
1478 }
1479
1480 uses manotypes:placement-group-input;
1481
1482 list ssh-authorized-key {
1483 key "key-pair-ref";
1484
1485 description "List of authorized ssh keys as part of cloud-config";
1486
1487 leaf key-pair-ref {
1488 description "A reference to the key pair entry in the global key pair table";
1489 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001490 path "/osm-project:project[osm-project:name=current()/../../../" +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001491 "project-name]/key-pair/name";
1492 }
1493 }
1494 }
1495
1496 list user {
1497 key "name";
1498
1499 description "List of users to be added through cloud-config";
1500 leaf name {
1501 description "Name of the user ";
1502 type string;
1503 }
1504 leaf user-info {
1505 description "The user name's real name";
1506 type string;
1507 }
1508 list ssh-authorized-key {
1509 key "key-pair-ref";
1510
1511 description "Used to configure the list of public keys to be injected as part
1512 of ns instantiation";
1513
1514 leaf key-pair-ref {
1515 description "A reference to the key pair entry in the global key pair table";
1516 type leafref {
garciadeblasc038a8d2019-04-03 13:35:27 +02001517 path "/osm-project:project[osm-project:name=current()/" +
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001518 "../../../../project-name]/key-pair/name";
1519 }
1520 }
1521 }
1522 }
1523 }
1524 }
1525
1526 output {
1527 leaf nsr-id {
1528 description "Automatically generated parameter";
1529 type yang:uuid;
1530 }
1531 }
1532 }
velandy88a64f12017-06-07 23:32:49 -04001533}