blob: 520252bd289749667adc0c194240b538fcfe8d44 [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{
23 namespace "urn:ietf:params:xml:ns:yang:nfvo:nsr";
24 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
Rajesh Velandye27e0b22017-09-18 17:21:48 -040058 import rw-project {
59 prefix "rw-project";
60 }
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
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400164 augment "/rw-project:project" {
165 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
181 grouping event-service-primitive {
182 leaf seq {
183 description
184 "Sequence number for the service primitive.";
185 type uint64;
186 }
187
velandy88a64f12017-06-07 23:32:49 -0400188 leaf name {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400189 description
190 "Name of the service primitive.";
191 type string;
192 mandatory "true";
193 }
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
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400213 augment "/rw-project:project" {
214 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;
270
271 uses project-nsd:nsr-nsd-service-primitive;
272 }
273 uses ns-instance-config-params;
274 }
velandy88a64f12017-06-07 23:32:49 -0400275 }
276 }
277
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400278 grouping ns-instance-config-params-common {
velandy88a64f12017-06-07 23:32:49 -0400279 uses manotypes:input-parameter;
280
281 list scaling-group {
282 description "List of ns scaling group instances";
283 key "scaling-group-name-ref";
284
285 leaf scaling-group-name-ref {
286 description "name of the scaling group
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400287 leafref path ../nsd/scaling-group-descriptor/name";
velandy88a64f12017-06-07 23:32:49 -0400288 type string;
289 }
290
291 list instance {
292 description "The instance of the scaling group";
293 key "id";
294 leaf id {
295 description "Scaling group instance uuid";
296 type uint16;
297 }
298 }
299 }
300
301 list nsd-placement-group-maps {
302 description
303 "Mapping from mano-placement groups construct from NSD to cloud
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400304 platform placement group construct";
velandy88a64f12017-06-07 23:32:49 -0400305
306 key "placement-group-ref";
307
308 leaf placement-group-ref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400309 description
310 "Reference for NSD placement group";
311 // type leafref {
312 // path "../../nsd/placement-groups/name";
313 // }
velandy88a64f12017-06-07 23:32:49 -0400314 type string;
315 }
316 uses manotypes:placement-group-input;
317 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400318 }
velandy88a64f12017-06-07 23:32:49 -0400319
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400320 grouping ns-instance-config-params {
321 uses ns-instance-config-params-common;
322
323 list vnfd-placement-group-maps {
velandy88a64f12017-06-07 23:32:49 -0400324 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400325 "Mapping from mano-placement groups construct from VNFD to cloud
velandy88a64f12017-06-07 23:32:49 -0400326 platform placement group construct";
327
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400328 key "placement-group-ref vnfd-id-ref";
velandy88a64f12017-06-07 23:32:49 -0400329
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400330 leaf vnfd-id-ref {
331 description
velandy88a64f12017-06-07 23:32:49 -0400332 "A reference to a vnfd. This is a
333 leafref to path:
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400334 ../../../../project-nsd:constituent-vnfd
335 + [id = current()/../id-ref]
336 + /project-nsd:vnfd-id-ref
337 NOTE: An issue with confd is preventing the
338 use of xpath. Seems to be an issue with leafref
339 to leafref, whose target is in a different module.
340 Once that is resolved this will switched to use
341 leafref";
342 type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -0400343 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400344
345 leaf placement-group-ref {
346 description
347 "A reference to VNFD placement group";
348 type leafref {
349 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
350 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
351 }
352 }
353
354 uses manotypes:placement-group-input;
velandy88a64f12017-06-07 23:32:49 -0400355 }
356
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400357 uses cloud-config;
velandy88a64f12017-06-07 23:32:49 -0400358 }
359
360 grouping vnffgr {
361
362 list vnffgr {
363 key "id";
364
365 leaf id {
366 description "Identifier for the VNFFGR.";
367 type yang:uuid;
368 }
369
370 leaf vnffgd-id-ref {
371 description "VNFFG descriptor id reference";
372 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400373 path "../../../../ns-instance-config/nsr"
374 + "[id=current()/../../ns-instance-config-ref]"
375 + "/nsd/vnffgd/id";
velandy88a64f12017-06-07 23:32:49 -0400376 }
377 }
378
379 leaf vnffgd-name-ref {
380 description "VNFFG descriptor name reference";
381 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400382 path "../../../../ns-instance-config/nsr"
velandy88a64f12017-06-07 23:32:49 -0400383 + "[id=current()/../../ns-instance-config-ref]"
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400384 + "/nsd/vnffgd"
385 + "[id=current()/../vnffgd-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400386 + "/name";
387 }
388 }
389
390 leaf sdn-account {
391 description
392 "The SDN account to use when requesting resources for
393 this vnffgr";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400394 type string;
395 }
396
397 leaf cloud-account {
398 description "Cloud Account in which NSR is instantiated";
399 type string;
velandy88a64f12017-06-07 23:32:49 -0400400 }
401
402 leaf operational-status {
403 description
404 "The operational status of the VNFFGR instance
405 init : The VNFFGR has just started.
406 running : The VNFFGR is in running state.
407 terminate : The VNFFGR is being terminated.
408 terminated : The VNFFGR is in the terminated state.
409 failed : The VNFFGR instantiation failed
410 ";
Rajesh989442e2017-10-08 04:13:32 +0000411 type vnffgr-operational-status;
velandy88a64f12017-06-07 23:32:49 -0400412 }
413
414 list rsp {
415 key "id";
416
417 leaf id {
418 description
419 "Identifier for the RSP.";
420 type yang:uuid;
421 }
422
423 leaf name {
424 description
425 "Name for the RSP";
426 type string;
427 }
428
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400429 leaf rsp-id {
430 description
431 "Returned Identifier for the RSP.";
432 type yang:uuid;
433 }
434
velandy88a64f12017-06-07 23:32:49 -0400435 leaf vnffgd-rsp-id-ref {
436 description
437 "Identifier for the VNFFG Descriptor RSP reference";
438 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400439 path "../../../../../ns-instance-config/nsr"
velandy88a64f12017-06-07 23:32:49 -0400440 + "[id=current()/../../../ns-instance-config-ref]"
441 + "/nsd/vnffgd"
442 + "[id=current()/../../vnffgd-id-ref]"
443 + "/rsp/id";
444 }
445 }
446
447 leaf vnffgd-rsp-name-ref {
448 description
449 "Name for the VNFFG Descriptor RSP reference";
450 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400451 path "../../../../../ns-instance-config/nsr"
velandy88a64f12017-06-07 23:32:49 -0400452 + "[id=current()/../../../ns-instance-config-ref]"
453 + "/nsd/vnffgd"
454 + "[id=current()/../../vnffgd-id-ref]"
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400455 + "/rsp"
456 + "[id=current()/../vnffgd-rsp-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400457 + "/name";
458 }
459 }
460
461 leaf classifier-name {
462 type string;
463 }
464
465 leaf path-id {
466 description
467 "Unique Identifier for the service path";
468 type uint32;
469 }
470
471 list vnfr-connection-point-ref {
472 key "hop-number";
473 leaf hop-number {
474 description
475 "Monotonically increasing number to show service path hop
476 order";
477 type uint8;
478 }
479 leaf service-function-type {
480 description
481 "Type of Service Function.
482 NOTE: This needs to map with Service Function Type in ODL to
483 support VNFFG. Service Function Type is mandatory param in ODL
484 SFC. This is temporarily set to string for ease of use";
485 type string;
486 }
487
488 leaf member-vnf-index-ref {
tiernoea872d42018-04-24 15:13:58 +0200489 type string;
velandy88a64f12017-06-07 23:32:49 -0400490 }
491 leaf vnfd-id-ref {
492 description
493 "Reference to VNF Descriptor Id";
494 type string;
495 }
496 leaf vnfr-id-ref {
497 description
498 "A reference to a vnfr id";
499 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400500 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
velandy88a64f12017-06-07 23:32:49 -0400501 }
502 }
503 leaf vnfr-name-ref {
504 description
505 "A reference to a vnfr name";
506 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400507 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
velandy88a64f12017-06-07 23:32:49 -0400508 }
509 }
Eduardo Sousaebba2672018-11-29 15:42:01 +0000510 leaf vnfr-ingress-connection-point-ref {
511 description
512 "A reference to a vnfr connection point.";
513 type leafref {
514 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
515 + "[vnfr:id = current()/../vnfr-id-ref]"
516 + "/vnfr:connection-point/vnfr:name";
517 }
518 }
519 leaf vnfr-egress-connection-point-ref {
velandy88a64f12017-06-07 23:32:49 -0400520 description
521 "A reference to a vnfr connection point.";
522 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400523 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
524 + "[vnfr:id = current()/../vnfr-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400525 + "/vnfr:connection-point/vnfr:name";
526 }
527 }
528 leaf service-index {
529 description
530 "Location within the service path";
531 type uint8;
532 }
533 container connection-point-params {
534 leaf mgmt-address {
535 type inet:ip-address;
536 }
537 leaf name {
538 type string;
539 }
540 leaf port-id {
velandy88a64f12017-06-07 23:32:49 -0400541 type string;
542 }
543 leaf vm-id {
velandy88a64f12017-06-07 23:32:49 -0400544 type string;
545 }
546 leaf address {
547 type inet:ip-address;
548 }
549 leaf port {
550 type inet:port-number;
551 }
552 }
553
554 container service-function-forwarder {
555 leaf name {
556 description
557 "Service Function Forwarder name";
558 type string;
559 }
560 leaf ip-address {
561 description
562 "Data Plane IP Address of the SFF";
563 type inet:ip-address;
564 }
565 leaf port {
566 description
567 "Data Plane Port of the SFF";
568 type inet:port-number;
569 }
570 }
571 }
572 }
573
574 list classifier {
575 key "id";
576
577 leaf id {
578 description
579 "Identifier for the classifier rule.";
580 type yang:uuid;
581 }
582 leaf name {
583 description
584 "Name of the classifier.";
585 type string;
586 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400587 leaf-list classifier-id {
588 description
589 "Returned Identifier for the classifier rule.";
590 type yang:uuid;
591 }
velandy88a64f12017-06-07 23:32:49 -0400592 leaf rsp-id-ref {
593 description
594 "A reference to the RSP.";
595 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400596 path "../../rsp/id";
velandy88a64f12017-06-07 23:32:49 -0400597 }
598 }
599 leaf rsp-name {
600 description
601 "Name for the RSP";
602 type string;
603 }
604 leaf vnfr-id-ref {
605 description
606 "A reference to a vnfr id";
607 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400608 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
velandy88a64f12017-06-07 23:32:49 -0400609 }
610 }
611 leaf vnfr-name-ref {
612 description
613 "A reference to a vnfr name";
614 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400615 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
velandy88a64f12017-06-07 23:32:49 -0400616 }
617 }
618 leaf vnfr-connection-point-ref {
619 description
620 "A reference to a vnfr connection point.";
621 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400622 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
623 + "[vnfr:id = current()/../vnfr-id-ref]"
velandy88a64f12017-06-07 23:32:49 -0400624 + "/vnfr:connection-point/vnfr:name";
625 }
626 }
627 leaf port-id {
velandy88a64f12017-06-07 23:32:49 -0400628 type string;
629 }
630 leaf vm-id {
velandy88a64f12017-06-07 23:32:49 -0400631 type string;
632 }
633 leaf ip-address {
634 type string;
635 }
636 leaf sff-name {
637 type string;
638 }
639 }
640 }
641 }
642
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400643 augment "/rw-project:project" {
644 container ns-instance-opdata {
645 config false;
velandy88a64f12017-06-07 23:32:49 -0400646
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400647 list nsr {
648 key "ns-instance-config-ref";
velandy88a64f12017-06-07 23:32:49 -0400649
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400650 leaf ns-instance-config-ref {
651 type leafref {
652 path "../../../ns-instance-config/nsr/id";
653 }
654 // type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -0400655 }
velandy88a64f12017-06-07 23:32:49 -0400656
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400657 leaf name-ref {
658 description "Network service name reference";
659 type leafref {
660 path "../../../ns-instance-config/nsr" +
661 "[id=current()/../ns-instance-config-ref]" +
662 "/name";
663 }
velandy88a64f12017-06-07 23:32:49 -0400664 }
velandy88a64f12017-06-07 23:32:49 -0400665
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400666 leaf nsd-ref {
667 description "Network service descriptor id reference";
668 type leafref {
669 path "../../../ns-instance-config/nsr"
670 + "[id=current()/../ns-instance-config-ref]"
671 + "/nsd/id";
672 }
velandy88a64f12017-06-07 23:32:49 -0400673 }
velandy88a64f12017-06-07 23:32:49 -0400674
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400675 leaf nsd-name-ref {
676 description "Network service descriptor name reference";
677 type leafref {
678 path "../../../ns-instance-config/nsr"
679 + "[id=current()/../ns-instance-config-ref]"
680 + "/nsd/name";
681 }
velandy88a64f12017-06-07 23:32:49 -0400682 }
velandy88a64f12017-06-07 23:32:49 -0400683
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400684 leaf create-time {
685 description
686 "Creation timestamp of this Network Service.
velandy88a64f12017-06-07 23:32:49 -0400687 The timestamp is expressed as seconds
688 since unix epoch - 1970-01-01T00:00:00Z";
689
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400690 type uint32;
691 }
velandy88a64f12017-06-07 23:32:49 -0400692
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400693 leaf uptime {
694 description
695 "Active period of this Network Service.
velandy88a64f12017-06-07 23:32:49 -0400696 Uptime is expressed in seconds";
697
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400698 type uint32;
699 }
velandy88a64f12017-06-07 23:32:49 -0400700
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400701 list connection-point {
702 description
velandy88a64f12017-06-07 23:32:49 -0400703 "List for external connection points.
704 Each NS has one or more external connection points.
705 As the name implies that external connection points
706 are used for connecting the NS to other NS or to
707 external networks. Each NS exposes these connection
708 points to the orchestrator. The orchestrator can
709 construct network service chains by connecting the
710 connection points between different NS.";
711
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400712 key "name";
713 leaf name {
714 description
velandy88a64f12017-06-07 23:32:49 -0400715 "Name of the NS connection point.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400716 type string;
717 }
velandy88a64f12017-06-07 23:32:49 -0400718
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400719 leaf type {
720 description
velandy88a64f12017-06-07 23:32:49 -0400721 "Type of the connection point.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400722 type manotypes:connection-point-type;
velandy88a64f12017-06-07 23:32:49 -0400723 }
724 }
725
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400726 list vlr {
727 key "vlr-ref";
728 leaf vlr-ref {
729 description
730 "Reference to a VLR record in the VLR catalog";
731 type leafref {
732 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
733 }
734 }
velandy88a64f12017-06-07 23:32:49 -0400735
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400736
737 list vnfr-connection-point-ref {
738 description
739 "A list of references to connection points.";
740 key "vnfr-id";
741
742 leaf vnfr-id {
743 description "A reference to a vnfr";
744 type leafref {
745 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
746 }
747 }
748
749 leaf connection-point {
750 description
751 "A reference to a connection point name in a vnfr";
752 type leafref {
753 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
754 + "[vnfr:id = current()/../vnfr-id]"
755 + "/vnfr:connection-point/vnfr:name";
756 }
757 }
758 }
759 }
760
761 list constituent-vnfr-ref {
velandy88a64f12017-06-07 23:32:49 -0400762 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400763 "List of VNFRs that are part of this
764 network service.";
velandy88a64f12017-06-07 23:32:49 -0400765 key "vnfr-id";
766
767 leaf vnfr-id {
velandy88a64f12017-06-07 23:32:49 -0400768 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400769 "Reference to the VNFR id
770 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
771 But due to confd bug (RIFT-9451), changing to string.";
772 type string;
773 }
774 }
775
776 list scaling-group-record {
777 description "List of scaling group records";
778 key "scaling-group-name-ref";
779
780 leaf scaling-group-name-ref {
781 description "name of the scaling group";
velandy88a64f12017-06-07 23:32:49 -0400782 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400783 path "../../../../ns-instance-config/nsr"
784 + "[id=current()/../../ns-instance-config-ref]"
785 + "/nsd/scaling-group-descriptor/name";
velandy88a64f12017-06-07 23:32:49 -0400786 }
787 }
velandy88a64f12017-06-07 23:32:49 -0400788
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400789 list instance {
790 description "Reference to scaling group instance record";
791 key "instance-id";
792 leaf instance-id {
793 description "Scaling group instance id";
794 type uint16;
795 }
velandy88a64f12017-06-07 23:32:49 -0400796
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400797 leaf is-default {
798 description "Flag indicating whether this instance was part of
velandy88a64f12017-06-07 23:32:49 -0400799 default scaling group (and thus undeletable)";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400800 type boolean;
801 }
velandy88a64f12017-06-07 23:32:49 -0400802
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400803 leaf op-status {
804 description
805 "The operational status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400806 init : The scaling group has just started.
807 vnf-init-phase : The VNFs in the scaling group are being instantiated.
808 running : The scaling group is in running state.
809 terminate : The scaling group is being terminated.
810 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
811 terminated : The scaling group is in the terminated state.
812 failed : The scaling group instantiation failed.
813 ";
814
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400815 type enumeration {
816 enum init;
817 enum vnf-init-phase;
818 enum running;
819 enum terminate;
820 enum vnf-terminate-phase;
821 enum terminated;
822 enum failed;
823 }
velandy88a64f12017-06-07 23:32:49 -0400824 }
velandy88a64f12017-06-07 23:32:49 -0400825
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400826 leaf config-status {
827 description
828 "The configuration status of the scaling group instance
velandy88a64f12017-06-07 23:32:49 -0400829 configuring : At least one of the VNFs in this scaling group instance
830 is in configuring state
831 configured : All the VNFs in this scaling group instance are
832 configured or config-not-needed state
833 failed : Configuring this scaling group instance failed
834 ";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400835 type config-states;
836 }
velandy88a64f12017-06-07 23:32:49 -0400837
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400838 leaf error-msg {
839 description
840 "Reason for failure in configuration of this scaling instance";
841 type string;
842 }
velandy88a64f12017-06-07 23:32:49 -0400843
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400844 leaf create-time {
845 description
846 "Creation timestamp of this scaling group record.
velandy88a64f12017-06-07 23:32:49 -0400847 The timestamp is expressed as seconds
848 since unix epoch - 1970-01-01T00:00:00Z";
849
850 type uint32;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400851 }
velandy88a64f12017-06-07 23:32:49 -0400852
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400853 leaf-list vnfrs {
854 description "Reference to VNFR within the scale instance";
855 type leafref {
856 path "../../../constituent-vnfr-ref/vnfr-id";
857 }
velandy88a64f12017-06-07 23:32:49 -0400858 }
859 }
860 }
velandy88a64f12017-06-07 23:32:49 -0400861
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400862 uses vnffgr;
velandy88a64f12017-06-07 23:32:49 -0400863
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400864 leaf operational-status {
865 description
866 "The operational status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400867 init : The network service has just started.
868 vl-init-phase : The VLs in the NS are being instantiated.
869 vnf-init-phase : The VNFs in the NS are being instantiated.
870 running : The NS is in running state.
871 terminate : The NS is being terminated.
872 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
873 vl-terminate-phase : The NS is terminating the VLs in the NS.
874 terminated : The NS is in the terminated state.
875 failed : The NS instantiation failed.
876 scaling-out : The NS is scaling out
877 scaling-in : The NS is scaling in
878 vl-instantiate : The NS is initiating a new VL
879 vl-terminate : The NS is terminating a VL
880 ";
881
Rajesh989442e2017-10-08 04:13:32 +0000882 type ns-operational-status;
velandy88a64f12017-06-07 23:32:49 -0400883 }
velandy88a64f12017-06-07 23:32:49 -0400884
garciadeblas634a26f2019-04-09 15:12:41 +0200885 container ns-configuration {
886 uses manotypes:vca-configuration;
887 }
888
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400889 leaf config-status {
890 description
891 "The configuration status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400892 configuring: At least one of the VNFs in this instance is in configuring state
893 configured: All the VNFs in this NS instance are configured or config-not-needed state
894 ";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400895 type config-states;
896 }
velandy88a64f12017-06-07 23:32:49 -0400897
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400898 list service-primitive {
velandy88a64f12017-06-07 23:32:49 -0400899 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400900 "Network service level service primitives.";
901
902 key "name";
903
904 leaf name {
905 description
906 "Name of the service primitive.";
907 type string;
908 }
909
910 list parameter {
911 description
912 "List of parameters for the service primitive.";
913
914 key "name";
915 uses manotypes:primitive-parameter;
916 }
917
918 uses manotypes:ui-primitive-group;
919
920 list vnf-primitive-group {
921 description
922 "Reference to member-vnf within constituent-vnfds";
923
924 key "member-vnf-index-ref";
925 leaf member-vnf-index-ref {
926 description
927 "Reference to member-vnf within constituent-vnfds";
tiernoea872d42018-04-24 15:13:58 +0200928 type string;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400929 }
930
931 leaf vnfd-id-ref {
932 description
933 "A reference to a vnfd. This is a
934 leafref to path:
935 ../../../../nsd:constituent-vnfd
936 + [nsd:id = current()/../nsd:id-ref]
937 + /nsd:vnfd-id-ref
938 NOTE: An issue with confd is preventing the
939 use of xpath. Seems to be an issue with leafref
940 to leafref, whose target is in a different module.
941 Once that is resovled this will switched to use
942 leafref";
943
944 type string;
945 }
946
947 leaf vnfd-name {
948 description
949 "Name of the VNFD";
950 type string;
951 }
952
953 list primitive {
954 key "index";
955
956 leaf index {
957 description "Index of this primitive";
958 type uint32;
959 }
960
961 leaf name {
962 description "Name of the primitive in the VNF primitive ";
963 type string;
964 }
965 }
966 }
967
968 leaf user-defined-script {
969 description
velandy88a64f12017-06-07 23:32:49 -0400970 "A user defined script.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400971 type string;
972 }
velandy88a64f12017-06-07 23:32:49 -0400973 }
974
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400975 list initial-service-primitive {
velandy88a64f12017-06-07 23:32:49 -0400976 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400977 "Initial set of service primitives for NSD.";
978 key "seq";
979
980 uses event-service-primitive;
velandy88a64f12017-06-07 23:32:49 -0400981 }
982
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400983 list terminate-service-primitive {
velandy88a64f12017-06-07 23:32:49 -0400984 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400985 "Set of service primitives to
986 execute during termination of NSD.";
987 key "seq";
988
989 uses event-service-primitive;
velandy88a64f12017-06-07 23:32:49 -0400990 }
991
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400992 list monitoring-param {
velandy88a64f12017-06-07 23:32:49 -0400993 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400994 "List of NS level params.";
995 key "id";
996
997 uses manotypes:monitoring-param-value;
998 uses manotypes:monitoring-param-ui-data;
999 uses manotypes:monitoring-param-aggregation;
1000
1001 leaf id {
1002 type string;
1003 }
1004
velandy88a64f12017-06-07 23:32:49 -04001005 leaf name {
velandy88a64f12017-06-07 23:32:49 -04001006 type string;
1007 }
1008
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001009 leaf nsd-mon-param-ref {
1010 description "Reference to the NSD monitoring param descriptor
velandy88a64f12017-06-07 23:32:49 -04001011 that produced this result";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001012 // TODO: Fix leafref
1013 type leafref {
1014 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1015 "[project-nsd:id = current()/../../nsd-ref]" +
1016 "/project-nsd:monitoring-param/project-nsd:id";
1017 }
velandy88a64f12017-06-07 23:32:49 -04001018 }
velandy88a64f12017-06-07 23:32:49 -04001019
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001020 list vnfr-mon-param-ref {
1021 description "A list of VNFR monitoring params associated with this monp";
1022 key "vnfr-id-ref vnfr-mon-param-ref";
velandy88a64f12017-06-07 23:32:49 -04001023
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001024 leaf vnfr-id-ref {
1025 description
1026 "A reference to a vnfr. This is a
velandy88a64f12017-06-07 23:32:49 -04001027 leafref to path:
1028 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1029
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001030 type yang:uuid;
1031 }
velandy88a64f12017-06-07 23:32:49 -04001032
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001033 leaf vnfr-mon-param-ref {
1034 description "A reference to the VNFR monitoring param";
1035 type leafref {
1036 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1037 + "[vnfr:id = current()/../vnfr-id-ref]"
1038 + "/vnfr:monitoring-param/vnfr:id";
1039 }
velandy88a64f12017-06-07 23:32:49 -04001040 }
1041 }
1042 }
velandy88a64f12017-06-07 23:32:49 -04001043
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001044 list config-agent-job {
1045 key "job-id";
velandy88a64f12017-06-07 23:32:49 -04001046
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001047 leaf job-id {
1048 description "config agent job Identifier for the NS.";
1049 type uint64;
1050 }
velandy88a64f12017-06-07 23:32:49 -04001051
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001052 leaf job-name {
1053 description "Config agent job name";
1054 type string;
1055 }
velandy88a64f12017-06-07 23:32:49 -04001056
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001057 leaf job-status {
1058 description
velandy88a64f12017-06-07 23:32:49 -04001059 "Job status to be set based on each VNF primitive execution,
1060 pending - if at least one VNF is in pending state
1061 and remaining VNFs are in success state.
1062 Success - if all VNF executions are in success state
1063 failure - if one of the VNF executions is failure";
velandy88a64f12017-06-07 23:32:49 -04001064 type enumeration {
1065 enum pending;
1066 enum success;
1067 enum failure;
1068 }
1069 }
1070
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001071 leaf triggered-by {
1072 description "The primitive is triggered from NS or VNF level";
1073 type trigger-type;
1074 }
1075
1076 leaf create-time {
1077 description
1078 "Creation timestamp of this Config Agent Job.
1079 The timestamp is expressed as seconds
1080 since unix epoch - 1970-01-01T00:00:00Z";
1081
1082 type uint32;
1083 }
1084
1085 leaf job-status-details {
1086 description "Config agent job status details, in case of errors";
1087 type string;
1088 }
1089
1090 uses manotypes:primitive-parameter-value;
1091
1092 list parameter-group {
1093 description
1094 "List of NS Primitive parameter groups";
velandy88a64f12017-06-07 23:32:49 -04001095 key "name";
1096 leaf name {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001097 description
1098 "Name of the parameter.";
velandy88a64f12017-06-07 23:32:49 -04001099 type string;
1100 }
1101
1102 uses manotypes:primitive-parameter-value;
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001103 }
velandy88a64f12017-06-07 23:32:49 -04001104
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001105 list vnfr {
1106 key "id";
1107 leaf id {
1108 description "Identifier for the VNFR.";
1109 type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -04001110 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001111 leaf vnf-job-status {
1112 description
1113 "Job status to be set based on each VNF primitive execution,
1114 pending - if at least one primitive is in pending state
1115 and remaining primitives are in success state.
1116 Success - if all primitive executions are in success state
1117 failure - if one of the primitive executions is failure";
velandy88a64f12017-06-07 23:32:49 -04001118 type enumeration {
1119 enum pending;
1120 enum success;
1121 enum failure;
1122 }
1123 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001124
1125 list primitive {
1126 key "name";
1127 leaf name {
1128 description "the name of the primitive";
1129 type string;
1130 }
1131
1132 uses manotypes:primitive-parameter-value;
1133
1134 leaf execution-id {
1135 description "Execution id of the primitive";
1136 type string;
1137 }
1138 leaf execution-status {
1139 description "status of the Execution";
1140 type enumeration {
1141 enum pending;
1142 enum success;
1143 enum failure;
1144 }
1145 }
1146 leaf execution-error-details {
1147 description "Error details if execution-status is failure";
1148 type string;
1149 }
velandy88a64f12017-06-07 23:32:49 -04001150 }
1151 }
1152 }
1153 }
1154 }
1155 }
1156
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001157 grouping rpc-common {
1158 uses manotypes:rpc-project-name;
1159
1160 leaf nsr_id_ref {
1161 description "Reference to NSR ID ref";
1162 type leafref {
1163 path "/rw-project:project[rw-project:name=current()/.." +
1164 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1165 }
1166 mandatory true;
1167 }
1168 }
1169
velandy88a64f12017-06-07 23:32:49 -04001170 rpc get-ns-service-primitive-values {
1171 description "Get the service primitive parameter values";
velandy88a64f12017-06-07 23:32:49 -04001172
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001173 input {
velandy88a64f12017-06-07 23:32:49 -04001174 leaf name {
1175 description "Name of the NS service primitive group";
1176 mandatory true;
1177 type string;
1178 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001179
1180 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001181 }
1182
1183 output {
1184 list ns-parameter {
1185 description "Automatically generated parameter";
1186 key "name";
1187
1188 leaf name {
1189 description "Parameter name which should be pulled from a parameter pool";
1190 type string;
1191 }
1192 leaf value {
1193 description "Automatically generated value";
1194 type string;
1195 }
1196 }
1197
1198 list ns-parameter-group {
1199 description "Automatically generated parameters in parameter group";
1200 key "name";
1201 leaf name {
1202 description "Parameter group name";
1203 type string;
1204 }
1205 list parameter {
1206 description "Automatically generated group parameter";
1207 key "name";
1208
1209 leaf name {
1210 description "Parameter name which should be pulled from a parameter pool";
1211 type string;
1212 }
1213 leaf value {
1214 description "Automatically generated value";
1215 type string;
1216 }
1217 }
1218 }
1219
1220 list vnf-primitive-group {
1221 description
1222 "List of service primitives grouped by VNF.";
1223
1224 key "member-vnf-index-ref";
1225 leaf member-vnf-index-ref {
1226 description
1227 "Reference to member-vnf within constituent-vnfds";
tiernoea872d42018-04-24 15:13:58 +02001228 type string;
velandy88a64f12017-06-07 23:32:49 -04001229 }
1230
1231 leaf vnfd-id-ref {
1232 description
1233 "A reference to a vnfd. This is a
1234 leafref to path:
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001235 ../../../../project-nsd:constituent-vnfd
1236 + [project-nsd:id = current()/../project-nsd:id-ref]
1237 + /project-nsd:vnfd-id-ref
1238 NOTE: An issue with confd is preventing the
1239 use of xpath. Seems to be an issue with leafref
1240 to leafref, whose target is in a different module.
1241 Once that is resolved this will switched to use
1242 leafref";
velandy88a64f12017-06-07 23:32:49 -04001243
1244 type string;
1245 }
1246
1247 list primitive {
1248 key "index";
1249 leaf index {
1250 description "Index of this primitive";
1251 type uint32;
1252 }
1253
1254 leaf name {
1255 description "Name of the primitive associated with a value pool";
1256 type string;
1257 }
1258
1259 list parameter {
1260 description "Automatically generated parameter";
1261 key "name";
1262
1263 leaf name {
1264 description "Parameter name which should be pulled from a parameter pool";
1265 type string;
1266 }
1267 leaf value {
1268 description "Automatically generated value";
1269 type string;
1270 }
1271 }
1272 }
1273 }
1274 }
1275 }
1276
1277 rpc exec-ns-service-primitive {
1278 description "Executes a NS service primitive or script";
1279
1280 input {
1281 leaf name {
1282 description "Name of the primitive";
1283 type string;
1284 }
1285
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001286 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001287
1288 leaf triggered-by {
1289 description "The primitive is triggered from NS or VNF level";
1290 type trigger-type;
1291 default ns-primitive;
1292 }
1293
1294 uses manotypes:primitive-parameter-value;
1295
1296 list parameter-group {
1297 description
1298 "List of NS Primitive parameter groups";
1299 key "name";
1300 leaf name {
1301 description
1302 "Name of the parameter.";
1303 type string;
1304 }
1305
1306 uses manotypes:primitive-parameter-value;
1307 }
1308
1309 list vnf-list {
1310 description
1311 "List of VNFs whose primitives are being set.";
1312 key "member_vnf_index_ref";
1313
1314 leaf member_vnf_index_ref {
1315 description "Member VNF index";
1316 type uint64;
1317 }
1318
1319 leaf vnfr-id-ref {
1320 description
1321 "A reference to a vnfr. This is a
1322 leafref to path";
1323 type yang:uuid;
1324 }
1325
1326 list vnf-primitive {
1327 description
1328 "List of service primitives supported by the
1329 configuration agent for this VNF.";
1330 key "index";
1331
1332 leaf index {
1333 description
1334 "index of the service primitive.";
1335 type uint32;
1336 }
1337 leaf name {
1338 description
1339 "Name of the service primitive.";
1340 type string;
1341 }
1342
1343 uses manotypes:primitive-parameter-value;
1344 }
1345 }
1346 leaf user-defined-script {
1347 description
1348 "A user defined script.";
1349 type string;
1350 }
1351 }
1352 output {
1353 leaf job-id {
1354 description "Job identifier for this RPC";
1355 type uint64;
1356 }
1357
1358 leaf name {
1359 description "Name of the service primitive";
1360 type string;
1361 }
1362
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001363 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001364
1365 leaf triggered-by {
1366 description "The primitive is triggered from NS or VNF level";
1367 type trigger-type;
1368 }
1369
1370 leaf create-time {
1371 description
1372 "Creation timestamp of this config agent JOB.
1373 The timestamp is expressed as seconds
1374 since unix epoch - 1970-01-01T00:00:00Z";
1375
1376 type uint32;
1377 }
1378
1379 leaf job-status-details {
1380 description "Job status details, in case of any errors";
1381 type string;
1382 }
1383
1384 uses manotypes:primitive-parameter-value;
1385
1386 list parameter-group {
1387 description
1388 "List of NS Primitive parameter groups";
1389 key "name";
1390 leaf name {
1391 description
1392 "Name of the parameter.";
1393 type string;
1394 }
1395
1396 uses manotypes:primitive-parameter-value;
1397 }
1398
1399 list vnf-out-list {
1400 description
1401 "List of VNFs whose primitives were set.";
1402 key "member_vnf_index_ref";
1403
1404 leaf member_vnf_index_ref {
1405 description "Member VNF index";
1406 type uint64;
1407 }
1408 leaf vnfr-id-ref {
1409 description
1410 "A reference to a vnfr. This is a
1411 leafref to path";
1412 type yang:uuid;
1413 }
1414
1415 list vnf-out-primitive {
1416 description
1417 "List of service primitives supported by the
1418 configuration agent for this VNF.";
1419 key "index";
1420
1421 leaf index {
1422 description
1423 "index of the service primitive.";
1424 type uint32;
1425 }
1426
1427 leaf name {
1428 description
1429 "Name of the service primitive.";
1430 type string;
1431 }
1432
1433 uses manotypes:primitive-parameter-value;
1434
1435 leaf execution-id {
1436 description "Execution id of this primitive";
1437 type string;
1438 }
1439
1440 leaf execution-status {
1441 description "Status of the execution of this primitive";
1442 type string;
1443 }
1444
1445 leaf execution-error-details {
1446 description "Error details if execution-status is failed";
1447 type string;
1448 }
1449 }
1450 }
1451 }
1452 }
1453
1454 rpc exec-scale-in {
1455 description "Executes scale out request";
1456
1457 input {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001458 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001459
1460 leaf scaling-group-name-ref {
1461 description "name of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001462 type leafref {
1463 path "/rw-project:project[rw-project:name=current()/.." +
1464 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1465 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1466 "/nsr:scaling-group-descriptor/nsr:name";
1467 }
1468 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001469 }
1470
1471 leaf instance-id {
1472 description "id of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001473 type leafref {
1474 path "/rw-project:project[rw-project:name=current()/.." +
1475 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1476 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1477 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1478 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1479 }
1480 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001481 }
1482
1483
1484 }
1485 output {
1486 leaf instance-id {
1487 description "id of the scaling group";
1488 type uint64;
1489 }
1490 }
1491 }
1492
1493 rpc exec-scale-out {
1494 description "Executes scale out request";
1495
1496 input {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001497 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001498
1499 leaf scaling-group-name-ref {
1500 description "name of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001501 type leafref {
1502 path "/rw-project:project[rw-project:name=current()/.." +
1503 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1504 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1505 "/nsr:scaling-group-descriptor/nsr:name";
1506 }
1507 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001508 }
1509
1510 leaf instance-id {
1511 description "id of the scaling group";
1512 type uint64;
1513 }
velandy88a64f12017-06-07 23:32:49 -04001514 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001515
velandy88a64f12017-06-07 23:32:49 -04001516 output {
1517 leaf instance-id {
1518 description "id of the scaling group";
1519 type uint64;
1520 }
1521 }
1522 }
1523
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001524 rpc start-network-service {
1525 description "Start the network service";
1526 input {
1527 leaf name {
1528 mandatory true;
1529 description "Name of the Network Service";
1530 type string;
1531 }
1532
1533 uses manotypes:rpc-project-name;
1534
1535 leaf nsd_id_ref {
1536 description "Reference to NSD ID ref";
1537 type leafref {
1538 path "/rw-project:project[rw-project:name=current()/.." +
1539 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1540 }
1541 }
1542 uses ns-instance-config-params-common;
1543
1544 list vnfd-placement-group-maps {
1545 description
1546 "Mapping from mano-placement groups construct from VNFD to cloud
1547 platform placement group construct";
1548
1549 key "placement-group-ref vnfd-id-ref";
1550
1551 leaf vnfd-id-ref {
1552 description
1553 "A reference to a vnfd. This is a
1554 leafref to path:
1555 ../../../../project-nsd:constituent-vnfd
1556 + [id = current()/../project-nsd:id-ref]
1557 + /project-nsd:vnfd-id-ref
1558 NOTE: An issue with confd is preventing the
1559 use of xpath. Seems to be an issue with leafref
1560 to leafref, whose target is in a different module.
1561 Once that is resovled this will switched to use
1562 leafref";
1563 type yang:uuid;
1564 }
1565
1566 leaf placement-group-ref {
1567 description
1568 "A reference to VNFD placement group";
1569 type leafref {
1570 path "/rw-project:project[rw-project:name=current()/" +
1571 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1572 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1573 }
1574 }
1575
1576 uses manotypes:placement-group-input;
1577
1578 list ssh-authorized-key {
1579 key "key-pair-ref";
1580
1581 description "List of authorized ssh keys as part of cloud-config";
1582
1583 leaf key-pair-ref {
1584 description "A reference to the key pair entry in the global key pair table";
1585 type leafref {
1586 path "/rw-project:project[rw-project:name=current()/../../../" +
1587 "project-name]/key-pair/name";
1588 }
1589 }
1590 }
1591
1592 list user {
1593 key "name";
1594
1595 description "List of users to be added through cloud-config";
1596 leaf name {
1597 description "Name of the user ";
1598 type string;
1599 }
1600 leaf user-info {
1601 description "The user name's real name";
1602 type string;
1603 }
1604 list ssh-authorized-key {
1605 key "key-pair-ref";
1606
1607 description "Used to configure the list of public keys to be injected as part
1608 of ns instantiation";
1609
1610 leaf key-pair-ref {
1611 description "A reference to the key pair entry in the global key pair table";
1612 type leafref {
1613 path "/rw-project:project[rw-project:name=current()/" +
1614 "../../../../project-name]/key-pair/name";
1615 }
1616 }
1617 }
1618 }
1619 }
1620 }
1621
1622 output {
1623 leaf nsr-id {
1624 description "Automatically generated parameter";
1625 type yang:uuid;
1626 }
1627 }
1628 }
velandy88a64f12017-06-07 23:32:49 -04001629}