blob: 48ac592ccadbf81b8a5795cf485e01460206a985 [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
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400885 leaf config-status {
886 description
887 "The configuration status of the NS instance
velandy88a64f12017-06-07 23:32:49 -0400888 configuring: At least one of the VNFs in this instance is in configuring state
889 configured: All the VNFs in this NS instance are configured or config-not-needed state
890 ";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400891 type config-states;
892 }
velandy88a64f12017-06-07 23:32:49 -0400893
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400894 list service-primitive {
velandy88a64f12017-06-07 23:32:49 -0400895 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400896 "Network service level service primitives.";
897
898 key "name";
899
900 leaf name {
901 description
902 "Name of the service primitive.";
903 type string;
904 }
905
906 list parameter {
907 description
908 "List of parameters for the service primitive.";
909
910 key "name";
911 uses manotypes:primitive-parameter;
912 }
913
914 uses manotypes:ui-primitive-group;
915
916 list vnf-primitive-group {
917 description
918 "Reference to member-vnf within constituent-vnfds";
919
920 key "member-vnf-index-ref";
921 leaf member-vnf-index-ref {
922 description
923 "Reference to member-vnf within constituent-vnfds";
tiernoea872d42018-04-24 15:13:58 +0200924 type string;
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400925 }
926
927 leaf vnfd-id-ref {
928 description
929 "A reference to a vnfd. This is a
930 leafref to path:
931 ../../../../nsd:constituent-vnfd
932 + [nsd:id = current()/../nsd:id-ref]
933 + /nsd:vnfd-id-ref
934 NOTE: An issue with confd is preventing the
935 use of xpath. Seems to be an issue with leafref
936 to leafref, whose target is in a different module.
937 Once that is resovled this will switched to use
938 leafref";
939
940 type string;
941 }
942
943 leaf vnfd-name {
944 description
945 "Name of the VNFD";
946 type string;
947 }
948
949 list primitive {
950 key "index";
951
952 leaf index {
953 description "Index of this primitive";
954 type uint32;
955 }
956
957 leaf name {
958 description "Name of the primitive in the VNF primitive ";
959 type string;
960 }
961 }
962 }
963
964 leaf user-defined-script {
965 description
velandy88a64f12017-06-07 23:32:49 -0400966 "A user defined script.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400967 type string;
968 }
velandy88a64f12017-06-07 23:32:49 -0400969 }
970
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400971 list initial-service-primitive {
velandy88a64f12017-06-07 23:32:49 -0400972 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400973 "Initial set of service primitives for NSD.";
974 key "seq";
975
976 uses event-service-primitive;
velandy88a64f12017-06-07 23:32:49 -0400977 }
978
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400979 list terminate-service-primitive {
velandy88a64f12017-06-07 23:32:49 -0400980 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400981 "Set of service primitives to
982 execute during termination of NSD.";
983 key "seq";
984
985 uses event-service-primitive;
velandy88a64f12017-06-07 23:32:49 -0400986 }
987
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400988 list monitoring-param {
velandy88a64f12017-06-07 23:32:49 -0400989 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400990 "List of NS level params.";
991 key "id";
992
993 uses manotypes:monitoring-param-value;
994 uses manotypes:monitoring-param-ui-data;
995 uses manotypes:monitoring-param-aggregation;
996
997 leaf id {
998 type string;
999 }
1000
velandy88a64f12017-06-07 23:32:49 -04001001 leaf name {
velandy88a64f12017-06-07 23:32:49 -04001002 type string;
1003 }
1004
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001005 leaf nsd-mon-param-ref {
1006 description "Reference to the NSD monitoring param descriptor
velandy88a64f12017-06-07 23:32:49 -04001007 that produced this result";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001008 // TODO: Fix leafref
1009 type leafref {
1010 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1011 "[project-nsd:id = current()/../../nsd-ref]" +
1012 "/project-nsd:monitoring-param/project-nsd:id";
1013 }
velandy88a64f12017-06-07 23:32:49 -04001014 }
velandy88a64f12017-06-07 23:32:49 -04001015
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001016 list vnfr-mon-param-ref {
1017 description "A list of VNFR monitoring params associated with this monp";
1018 key "vnfr-id-ref vnfr-mon-param-ref";
velandy88a64f12017-06-07 23:32:49 -04001019
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001020 leaf vnfr-id-ref {
1021 description
1022 "A reference to a vnfr. This is a
velandy88a64f12017-06-07 23:32:49 -04001023 leafref to path:
1024 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1025
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001026 type yang:uuid;
1027 }
velandy88a64f12017-06-07 23:32:49 -04001028
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001029 leaf vnfr-mon-param-ref {
1030 description "A reference to the VNFR monitoring param";
1031 type leafref {
1032 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1033 + "[vnfr:id = current()/../vnfr-id-ref]"
1034 + "/vnfr:monitoring-param/vnfr:id";
1035 }
velandy88a64f12017-06-07 23:32:49 -04001036 }
1037 }
1038 }
velandy88a64f12017-06-07 23:32:49 -04001039
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001040 list config-agent-job {
1041 key "job-id";
velandy88a64f12017-06-07 23:32:49 -04001042
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001043 leaf job-id {
1044 description "config agent job Identifier for the NS.";
1045 type uint64;
1046 }
velandy88a64f12017-06-07 23:32:49 -04001047
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001048 leaf job-name {
1049 description "Config agent job name";
1050 type string;
1051 }
velandy88a64f12017-06-07 23:32:49 -04001052
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001053 leaf job-status {
1054 description
velandy88a64f12017-06-07 23:32:49 -04001055 "Job status to be set based on each VNF primitive execution,
1056 pending - if at least one VNF is in pending state
1057 and remaining VNFs are in success state.
1058 Success - if all VNF executions are in success state
1059 failure - if one of the VNF executions is failure";
velandy88a64f12017-06-07 23:32:49 -04001060 type enumeration {
1061 enum pending;
1062 enum success;
1063 enum failure;
1064 }
1065 }
1066
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001067 leaf triggered-by {
1068 description "The primitive is triggered from NS or VNF level";
1069 type trigger-type;
1070 }
1071
1072 leaf create-time {
1073 description
1074 "Creation timestamp of this Config Agent Job.
1075 The timestamp is expressed as seconds
1076 since unix epoch - 1970-01-01T00:00:00Z";
1077
1078 type uint32;
1079 }
1080
1081 leaf job-status-details {
1082 description "Config agent job status details, in case of errors";
1083 type string;
1084 }
1085
1086 uses manotypes:primitive-parameter-value;
1087
1088 list parameter-group {
1089 description
1090 "List of NS Primitive parameter groups";
velandy88a64f12017-06-07 23:32:49 -04001091 key "name";
1092 leaf name {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001093 description
1094 "Name of the parameter.";
velandy88a64f12017-06-07 23:32:49 -04001095 type string;
1096 }
1097
1098 uses manotypes:primitive-parameter-value;
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001099 }
velandy88a64f12017-06-07 23:32:49 -04001100
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001101 list vnfr {
1102 key "id";
1103 leaf id {
1104 description "Identifier for the VNFR.";
1105 type yang:uuid;
velandy88a64f12017-06-07 23:32:49 -04001106 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001107 leaf vnf-job-status {
1108 description
1109 "Job status to be set based on each VNF primitive execution,
1110 pending - if at least one primitive is in pending state
1111 and remaining primitives are in success state.
1112 Success - if all primitive executions are in success state
1113 failure - if one of the primitive executions is failure";
velandy88a64f12017-06-07 23:32:49 -04001114 type enumeration {
1115 enum pending;
1116 enum success;
1117 enum failure;
1118 }
1119 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001120
1121 list primitive {
1122 key "name";
1123 leaf name {
1124 description "the name of the primitive";
1125 type string;
1126 }
1127
1128 uses manotypes:primitive-parameter-value;
1129
1130 leaf execution-id {
1131 description "Execution id of the primitive";
1132 type string;
1133 }
1134 leaf execution-status {
1135 description "status of the Execution";
1136 type enumeration {
1137 enum pending;
1138 enum success;
1139 enum failure;
1140 }
1141 }
1142 leaf execution-error-details {
1143 description "Error details if execution-status is failure";
1144 type string;
1145 }
velandy88a64f12017-06-07 23:32:49 -04001146 }
1147 }
1148 }
1149 }
1150 }
1151 }
1152
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001153 grouping rpc-common {
1154 uses manotypes:rpc-project-name;
1155
1156 leaf nsr_id_ref {
1157 description "Reference to NSR ID ref";
1158 type leafref {
1159 path "/rw-project:project[rw-project:name=current()/.." +
1160 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1161 }
1162 mandatory true;
1163 }
1164 }
1165
velandy88a64f12017-06-07 23:32:49 -04001166 rpc get-ns-service-primitive-values {
1167 description "Get the service primitive parameter values";
velandy88a64f12017-06-07 23:32:49 -04001168
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001169 input {
velandy88a64f12017-06-07 23:32:49 -04001170 leaf name {
1171 description "Name of the NS service primitive group";
1172 mandatory true;
1173 type string;
1174 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001175
1176 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001177 }
1178
1179 output {
1180 list ns-parameter {
1181 description "Automatically generated parameter";
1182 key "name";
1183
1184 leaf name {
1185 description "Parameter name which should be pulled from a parameter pool";
1186 type string;
1187 }
1188 leaf value {
1189 description "Automatically generated value";
1190 type string;
1191 }
1192 }
1193
1194 list ns-parameter-group {
1195 description "Automatically generated parameters in parameter group";
1196 key "name";
1197 leaf name {
1198 description "Parameter group name";
1199 type string;
1200 }
1201 list parameter {
1202 description "Automatically generated group parameter";
1203 key "name";
1204
1205 leaf name {
1206 description "Parameter name which should be pulled from a parameter pool";
1207 type string;
1208 }
1209 leaf value {
1210 description "Automatically generated value";
1211 type string;
1212 }
1213 }
1214 }
1215
1216 list vnf-primitive-group {
1217 description
1218 "List of service primitives grouped by VNF.";
1219
1220 key "member-vnf-index-ref";
1221 leaf member-vnf-index-ref {
1222 description
1223 "Reference to member-vnf within constituent-vnfds";
tiernoea872d42018-04-24 15:13:58 +02001224 type string;
velandy88a64f12017-06-07 23:32:49 -04001225 }
1226
1227 leaf vnfd-id-ref {
1228 description
1229 "A reference to a vnfd. This is a
1230 leafref to path:
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001231 ../../../../project-nsd:constituent-vnfd
1232 + [project-nsd:id = current()/../project-nsd:id-ref]
1233 + /project-nsd:vnfd-id-ref
1234 NOTE: An issue with confd is preventing the
1235 use of xpath. Seems to be an issue with leafref
1236 to leafref, whose target is in a different module.
1237 Once that is resolved this will switched to use
1238 leafref";
velandy88a64f12017-06-07 23:32:49 -04001239
1240 type string;
1241 }
1242
1243 list primitive {
1244 key "index";
1245 leaf index {
1246 description "Index of this primitive";
1247 type uint32;
1248 }
1249
1250 leaf name {
1251 description "Name of the primitive associated with a value pool";
1252 type string;
1253 }
1254
1255 list parameter {
1256 description "Automatically generated parameter";
1257 key "name";
1258
1259 leaf name {
1260 description "Parameter name which should be pulled from a parameter pool";
1261 type string;
1262 }
1263 leaf value {
1264 description "Automatically generated value";
1265 type string;
1266 }
1267 }
1268 }
1269 }
1270 }
1271 }
1272
1273 rpc exec-ns-service-primitive {
1274 description "Executes a NS service primitive or script";
1275
1276 input {
1277 leaf name {
1278 description "Name of the primitive";
1279 type string;
1280 }
1281
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001282 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001283
1284 leaf triggered-by {
1285 description "The primitive is triggered from NS or VNF level";
1286 type trigger-type;
1287 default ns-primitive;
1288 }
1289
1290 uses manotypes:primitive-parameter-value;
1291
1292 list parameter-group {
1293 description
1294 "List of NS Primitive parameter groups";
1295 key "name";
1296 leaf name {
1297 description
1298 "Name of the parameter.";
1299 type string;
1300 }
1301
1302 uses manotypes:primitive-parameter-value;
1303 }
1304
1305 list vnf-list {
1306 description
1307 "List of VNFs whose primitives are being set.";
1308 key "member_vnf_index_ref";
1309
1310 leaf member_vnf_index_ref {
1311 description "Member VNF index";
1312 type uint64;
1313 }
1314
1315 leaf vnfr-id-ref {
1316 description
1317 "A reference to a vnfr. This is a
1318 leafref to path";
1319 type yang:uuid;
1320 }
1321
1322 list vnf-primitive {
1323 description
1324 "List of service primitives supported by the
1325 configuration agent for this VNF.";
1326 key "index";
1327
1328 leaf index {
1329 description
1330 "index of the service primitive.";
1331 type uint32;
1332 }
1333 leaf name {
1334 description
1335 "Name of the service primitive.";
1336 type string;
1337 }
1338
1339 uses manotypes:primitive-parameter-value;
1340 }
1341 }
1342 leaf user-defined-script {
1343 description
1344 "A user defined script.";
1345 type string;
1346 }
1347 }
1348 output {
1349 leaf job-id {
1350 description "Job identifier for this RPC";
1351 type uint64;
1352 }
1353
1354 leaf name {
1355 description "Name of the service primitive";
1356 type string;
1357 }
1358
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001359 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001360
1361 leaf triggered-by {
1362 description "The primitive is triggered from NS or VNF level";
1363 type trigger-type;
1364 }
1365
1366 leaf create-time {
1367 description
1368 "Creation timestamp of this config agent JOB.
1369 The timestamp is expressed as seconds
1370 since unix epoch - 1970-01-01T00:00:00Z";
1371
1372 type uint32;
1373 }
1374
1375 leaf job-status-details {
1376 description "Job status details, in case of any errors";
1377 type string;
1378 }
1379
1380 uses manotypes:primitive-parameter-value;
1381
1382 list parameter-group {
1383 description
1384 "List of NS Primitive parameter groups";
1385 key "name";
1386 leaf name {
1387 description
1388 "Name of the parameter.";
1389 type string;
1390 }
1391
1392 uses manotypes:primitive-parameter-value;
1393 }
1394
1395 list vnf-out-list {
1396 description
1397 "List of VNFs whose primitives were set.";
1398 key "member_vnf_index_ref";
1399
1400 leaf member_vnf_index_ref {
1401 description "Member VNF index";
1402 type uint64;
1403 }
1404 leaf vnfr-id-ref {
1405 description
1406 "A reference to a vnfr. This is a
1407 leafref to path";
1408 type yang:uuid;
1409 }
1410
1411 list vnf-out-primitive {
1412 description
1413 "List of service primitives supported by the
1414 configuration agent for this VNF.";
1415 key "index";
1416
1417 leaf index {
1418 description
1419 "index of the service primitive.";
1420 type uint32;
1421 }
1422
1423 leaf name {
1424 description
1425 "Name of the service primitive.";
1426 type string;
1427 }
1428
1429 uses manotypes:primitive-parameter-value;
1430
1431 leaf execution-id {
1432 description "Execution id of this primitive";
1433 type string;
1434 }
1435
1436 leaf execution-status {
1437 description "Status of the execution of this primitive";
1438 type string;
1439 }
1440
1441 leaf execution-error-details {
1442 description "Error details if execution-status is failed";
1443 type string;
1444 }
1445 }
1446 }
1447 }
1448 }
1449
1450 rpc exec-scale-in {
1451 description "Executes scale out request";
1452
1453 input {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001454 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001455
1456 leaf scaling-group-name-ref {
1457 description "name of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001458 type leafref {
1459 path "/rw-project:project[rw-project:name=current()/.." +
1460 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1461 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1462 "/nsr:scaling-group-descriptor/nsr:name";
1463 }
1464 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001465 }
1466
1467 leaf instance-id {
1468 description "id of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001469 type leafref {
1470 path "/rw-project:project[rw-project:name=current()/.." +
1471 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1472 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1473 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1474 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1475 }
1476 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001477 }
1478
1479
1480 }
1481 output {
1482 leaf instance-id {
1483 description "id of the scaling group";
1484 type uint64;
1485 }
1486 }
1487 }
1488
1489 rpc exec-scale-out {
1490 description "Executes scale out request";
1491
1492 input {
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001493 uses rpc-common;
velandy88a64f12017-06-07 23:32:49 -04001494
1495 leaf scaling-group-name-ref {
1496 description "name of the scaling group";
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001497 type leafref {
1498 path "/rw-project:project[rw-project:name=current()/.." +
1499 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1500 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1501 "/nsr:scaling-group-descriptor/nsr:name";
1502 }
1503 mandatory true;
velandy88a64f12017-06-07 23:32:49 -04001504 }
1505
1506 leaf instance-id {
1507 description "id of the scaling group";
1508 type uint64;
1509 }
velandy88a64f12017-06-07 23:32:49 -04001510 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001511
velandy88a64f12017-06-07 23:32:49 -04001512 output {
1513 leaf instance-id {
1514 description "id of the scaling group";
1515 type uint64;
1516 }
1517 }
1518 }
1519
Rajesh Velandye27e0b22017-09-18 17:21:48 -04001520 rpc start-network-service {
1521 description "Start the network service";
1522 input {
1523 leaf name {
1524 mandatory true;
1525 description "Name of the Network Service";
1526 type string;
1527 }
1528
1529 uses manotypes:rpc-project-name;
1530
1531 leaf nsd_id_ref {
1532 description "Reference to NSD ID ref";
1533 type leafref {
1534 path "/rw-project:project[rw-project:name=current()/.." +
1535 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1536 }
1537 }
1538 uses ns-instance-config-params-common;
1539
1540 list vnfd-placement-group-maps {
1541 description
1542 "Mapping from mano-placement groups construct from VNFD to cloud
1543 platform placement group construct";
1544
1545 key "placement-group-ref vnfd-id-ref";
1546
1547 leaf vnfd-id-ref {
1548 description
1549 "A reference to a vnfd. This is a
1550 leafref to path:
1551 ../../../../project-nsd:constituent-vnfd
1552 + [id = current()/../project-nsd:id-ref]
1553 + /project-nsd:vnfd-id-ref
1554 NOTE: An issue with confd is preventing the
1555 use of xpath. Seems to be an issue with leafref
1556 to leafref, whose target is in a different module.
1557 Once that is resovled this will switched to use
1558 leafref";
1559 type yang:uuid;
1560 }
1561
1562 leaf placement-group-ref {
1563 description
1564 "A reference to VNFD placement group";
1565 type leafref {
1566 path "/rw-project:project[rw-project:name=current()/" +
1567 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1568 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1569 }
1570 }
1571
1572 uses manotypes:placement-group-input;
1573
1574 list ssh-authorized-key {
1575 key "key-pair-ref";
1576
1577 description "List of authorized ssh keys as part of cloud-config";
1578
1579 leaf key-pair-ref {
1580 description "A reference to the key pair entry in the global key pair table";
1581 type leafref {
1582 path "/rw-project:project[rw-project:name=current()/../../../" +
1583 "project-name]/key-pair/name";
1584 }
1585 }
1586 }
1587
1588 list user {
1589 key "name";
1590
1591 description "List of users to be added through cloud-config";
1592 leaf name {
1593 description "Name of the user ";
1594 type string;
1595 }
1596 leaf user-info {
1597 description "The user name's real name";
1598 type string;
1599 }
1600 list ssh-authorized-key {
1601 key "key-pair-ref";
1602
1603 description "Used to configure the list of public keys to be injected as part
1604 of ns instantiation";
1605
1606 leaf key-pair-ref {
1607 description "A reference to the key pair entry in the global key pair table";
1608 type leafref {
1609 path "/rw-project:project[rw-project:name=current()/" +
1610 "../../../../project-name]/key-pair/name";
1611 }
1612 }
1613 }
1614 }
1615 }
1616 }
1617
1618 output {
1619 leaf nsr-id {
1620 description "Automatically generated parameter";
1621 type yang:uuid;
1622 }
1623 }
1624 }
velandy88a64f12017-06-07 23:32:49 -04001625}