blob: 2e369fae3727b575fe0b2ea87c5e5e7b7aa8a2f6 [file] [log] [blame]
Patrick Brady7a261fb2017-06-06 22:35:43 -07001/*-
2 * ============LICENSE_START=======================================================
Patrick Brady10bba352017-07-19 12:09:28 -07003 * ONAP : APPC
Patrick Brady7a261fb2017-06-06 22:35:43 -07004 * ================================================================================
vidhyasree6cf060d2018-02-21 11:19:33 -05005 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
Patrick Brady7a261fb2017-06-06 22:35:43 -07006 * ================================================================================
Patrick Brady10bba352017-07-19 12:09:28 -07007 * Copyright (C) 2017 Amdocs
Tomek Osinski3c0def22018-09-12 15:10:08 +02008 * ================================================================================
9 * Modifications Copyright (C) 2018 Orange
Patrick Brady10bba352017-07-19 12:09:28 -070010 * =============================================================================
Patrick Brady7a261fb2017-06-06 22:35:43 -070011 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
vidhyasreeac975222018-01-12 15:23:34 -050014 *
Patrick Brady7a261fb2017-06-06 22:35:43 -070015 * http://www.apache.org/licenses/LICENSE-2.0
vidhyasreeac975222018-01-12 15:23:34 -050016 *
Patrick Brady7a261fb2017-06-06 22:35:43 -070017 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
vidhyasreeac975222018-01-12 15:23:34 -050022 *
Patrick Brady7a261fb2017-06-06 22:35:43 -070023 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
Patrick Brady10bba352017-07-19 12:09:28 -070024 * ============LICENSE_END=========================================================
Patrick Brady7a261fb2017-06-06 22:35:43 -070025 */
26
Patrick Brady57b5eef2017-02-10 15:00:49 -080027/*
28 * Yang model for the Application Controller (APP-C) component of ECOMP
29 *
30 * This model is used to define the data and services of the Application Controller
31 * component of ECOMP. The APP-C controller initiates the processing of directed
32 * graphs, which define the actual process implementations used. The name of the
33 * directed graph is set by properties and cannot be changed dynamically.
34 *
35 * The services exposed by this provider are:
36 *
37 * restart-vnf:
38 * Used to request a restart of a virtual network function (a VM).
39 *
40 * rebuild-vnf:
41 * Used to request a rebuild of a virtual network function (a VM).
42 *
43 */
44
45module appc-provider-lcm {
46
47 yang-version 1;
Patrick Brady07567592017-12-13 11:09:30 -080048 namespace "org:onap:appc:lcm";
Patrick Brady57b5eef2017-02-10 15:00:49 -080049 prefix appc-provider-lcm;
Anand36bcd562018-01-04 19:35:51 -050050
Patrick Brady57b5eef2017-02-10 15:00:49 -080051 description
52 "Defines the services and request/response requirements for the ECOMP APP-C component.";
53
54 /*
55 * Note, the revision changes the package name of the generated java code. Do not
56 * change the revision unless you also update all references to the bindings.
57 */
58 revision "2016-01-08" {
59 description
60 "APP-C interface version 1.0.48";
61 }
62
63 /**********************************************************************************
64 * Data type definitions
65 *
66 * The following data type definitions are used to define common data structures,
67 * define constraints, or to impart special meanings to data objects related to the
68 * APP-C controller functions.
69 **********************************************************************************/
70
Patrick Brady57b5eef2017-02-10 15:00:49 -080071 typedef ZULU {
Patrick Bradyc7d00752017-06-01 10:45:37 -070072 description "Define a common definition of a time stamp (expressed as a formatted
73 string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ";
Patrick Brady57b5eef2017-02-10 15:00:49 -080074 type string {
75 length "16..28";
76 pattern "[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}.[0-9]{1,6}Z";
77 }
78 }
79
80 typedef payload {
81 type string ;
82 description "The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value";
83 }
84
85 typedef action {
Patrick Bradyc7d00752017-06-01 10:45:37 -070086 type enumeration {
87 enum "Restart";
88 enum "Rebuild";
89 enum "Migrate";
90 enum "Evacuate";
91 enum "Snapshot";
92 enum "Rollback";
93 enum "Sync";
94 enum "Audit";
95 enum "Stop";
96 enum "Start";
97 enum "Terminate";
98 enum "SoftwareUpload";
99 enum "HealthCheck";
100 enum "LiveUpgrade";
101 enum "Lock";
102 enum "Unlock";
103 enum "Test";
104 enum "CheckLock";
105 enum "Configure";
106 enum "ConfigModify";
107 enum "ConfigScaleOut";
108 enum "ConfigRestore";
109 enum "ConfigBackup";
110 enum "ConfigBackupDelete";
111 enum "ConfigExport";
mojahidide52c622017-08-14 12:50:45 +0530112 enum "StopApplication";
113 enum "StartApplication";
vidhyasreeac975222018-01-12 15:23:34 -0500114 enum "QuiesceTraffic";
Anand36bcd562018-01-04 19:35:51 -0500115 enum "ResumeTraffic";
116 enum "UpgradePreCheck";
117 enum "UpgradeSoftware";
118 enum "UpgradePostCheck";
119 enum "UpgradeBackup";
120 enum "UpgradeBackout";
121 enum "ActionStatus";
122 enum "Query";
123 enum "Reboot";
124 enum "AttachVolume";
125 enum "DetachVolume";
Tomek Osinski3c0def22018-09-12 15:10:08 +0200126 enum "DistributeTraffic";
Anand36bcd562018-01-04 19:35:51 -0500127
Patrick Bradyc7d00752017-06-01 10:45:37 -0700128 }
129 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800130 }
131
Anand36bcd562018-01-04 19:35:51 -0500132 typedef vm-state {
133 description "The state of a VM";
134 type enumeration {
135 enum "active";
136 enum "standby";
137 enum "inactive";
138 enum "unknown";
139 }
140 }
141
142 typedef vm-status {
143 description "The status of a VM";
144 type enumeration {
145 enum "healthy";
146 enum "unhealthy";
147 enum "unknown";
148 }
149 }
150
Patrick Brady57b5eef2017-02-10 15:00:49 -0800151
152 /**********************************************************************************
153 * Basic manipulation of a VNF (or VM) will typically include querying the current
154 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
155 * "state"-type operations, the services require the identification of the VNF to
156 * be operated on, and the region or LCP that contains that resource. This
157 * information is used across all of these services, so it has been defined as a
158 * common structure here and is referenced in the appropriate RPC definitions.
159 **********************************************************************************/
Patrick Bradyc7d00752017-06-01 10:45:37 -0700160
Patrick Brady57b5eef2017-02-10 15:00:49 -0800161
162 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -0500163 * All requests will include this standard header
164 *
165 * The standard request header is used to define a correlation identification for
166 * the request that is returned on all responses. This correlation identifier
167 * (called the service-request-id) is meaningful to the caller and is included on
168 * all responses from the services.
169 **********************************************************************************/
170
171 /**********************************************************************************
Patrick Brady57b5eef2017-02-10 15:00:49 -0800172 * All responses will include this standard header
173 *
174 * The standard response header includes the time of completion as well as a
175 * success|failure indication
176 **********************************************************************************/
Patrick Brady57b5eef2017-02-10 15:00:49 -0800177
Patrick Bradyc7d00752017-06-01 10:45:37 -0700178 grouping common-header {
179 description "A common header for all APP-C requests";
180 container common-header {
Patrick Brady57b5eef2017-02-10 15:00:49 -0800181 description "A common header for all APP-C requests";
Patrick Bradyc7d00752017-06-01 10:45:37 -0700182 leaf timestamp {
183 description "timestamp is in ISO 8601 timestamp format ZULU offset";
184 type ZULU;
185 mandatory true;
186 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800187
Patrick Bradyc7d00752017-06-01 10:45:37 -0700188 leaf api-ver {
189 description "api-ver is the API version identifier. A given release of APPC
190 should support all previous versions of APPC API (correlate with
191 general requirements)";
192 type string {
193 pattern "[2]\.\d\d" {
194 error-message "API Version 2.XX is supported at this end point";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800195 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800196 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700197 mandatory true;
198 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800199
Patrick Bradyc7d00752017-06-01 10:45:37 -0700200 leaf originator-id {
201 description "originator-id an identifier of the calling system which can be
202 used addressing purposes, i.e. returning asynchronous response
203 to the proper destination over DMaaP (especially in case of multiple
204 consumers of APP-C APIs)";
205 type string;
206 mandatory true;
207 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800208
Patrick Bradyc7d00752017-06-01 10:45:37 -0700209 leaf request-id {
210 description "UUID for the request ID. An OSS/BSS identifier for the request
211 that caused the current action. Multiple API calls may be made
212 with the same request-id The request-id shall be recorded throughout
213 the operations on a single request";
214 type string;
215 mandatory true;
216 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800217
Patrick Bradyc7d00752017-06-01 10:45:37 -0700218 leaf sub-request-id {
219 description "Uniquely identifies a specific LCM action. It is persistent over
220 the life-cycle of a single request";
221 type string;
222 mandatory false;
223 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800224
225
Anand36bcd562018-01-04 19:35:51 -0500226 /**********************************************************************************
227 * Flags are generic flags that apply to any and all commands, all are optional
228 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc)
229 * state. Specific behaviour of forced commands varies, but implies cancellation
230 * of previous command and an override by the new command. The FALSE value is
231 * used by default.
232 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
233 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
234 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
235 * * Cease accepting additional command requests
236 * * Complete execution of outstanding commands
237 * * Execute the exclusive command to completion
238 * * Optionally report the result of the command
239 * * Optionally resume command acceptance and processing
240 * - NORMAL - Obverse of EXCLUSIVE, the default one.
241 **********************************************************************************/
Patrick Bradyc7d00752017-06-01 10:45:37 -0700242 container flags {
Anand36bcd562018-01-04 19:35:51 -0500243 description "Flags are generic flags that apply to any and all commands, all are optional";
Patrick Bradyc7d00752017-06-01 10:45:37 -0700244 leaf mode {
245 type enumeration {
246 enum "EXCLUSIVE";
247 enum "NORMAL";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800248 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700249 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
250 or NORMAL (queue other requests until complete)";
251 mandatory false;
252 }
253 leaf force {
254 type enumeration {
255 enum "TRUE";
256 enum "FALSE";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800257 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700258 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
259 locked, transiting, etc.) state";
260 mandatory false;
261 }
262 leaf ttl {
263 description "<0....N> - The timeout value (expressed in seconds) for action
264 execution, between action being received by APPC and action initiation";
265 type uint16;
266 mandatory false;
267 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800268 }
269 }
Anand36bcd562018-01-04 19:35:51 -0500270 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800271
272
Patrick Bradyc7d00752017-06-01 10:45:37 -0700273 grouping action-identifiers {
274 description "A block containing the action arguments. These are used to specify
275 the object upon which APP-C LCM command is to operate";
276 container action-identifiers {
277 description "A block containing the action arguments. These are used to specify
278 the object upon which APP-C LCM command is to operate";
279 leaf service-instance-id {
280 description "identifies a specific service the command refers to. When multiple
281 APP-C instances are used and applied to a subset of services,
282 this will become significant . The field is mandatory when the
283 vnf-id is empty";
284 type string;
285 mandatory false;
286 }
287 leaf vnf-id {
288 description "identifies the VNF to which this action is to be applied(vnf-id
289 uniquely identifies the service-instance referred to). Note that
290 some actions are applied to multiple VNFs in the same service.
291 When this is the case, vnf-id may be left out, but service-instance-id
292 must appear. The field is mandatory when service-instance-id is
293 empty";
294 type string;
295 mandatory false;
296 }
Kalpesh Chaniyara01316dc2017-08-15 14:45:00 +0530297 leaf vf-module-id {
298 description "identifies the VF module to which this action is to be applied.";
299 type string;
300 mandatory false;
301 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700302 leaf vnfc-name {
303 description "identifies the VNFC to which this action is to be applied. Some
304 actions apply only to a component within a VNF (e.g. RESTART is
305 sometimes applied to on VM only). In such a case, the name of
306 the VNFC is used to search for the component within the VNF";
307 type string;
308 mandatory false;
309 }
310 leaf vserver-id {
311 description "identifies a specific VM within the given service/vnf to which
312 this action is to be applied";
313 type string;
314 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800315 }
316 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700317 }
318
Patrick Brady57b5eef2017-02-10 15:00:49 -0800319
320 grouping status {
Anand36bcd562018-01-04 19:35:51 -0500321 description "The specific response codes are to be aligned with SDC reference doc
322 (main table removed to avoid duplication and digression from main table).
323 See SDC and ECOMP Distribution Consumer Interface Agreement";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800324 container status {
Anand36bcd562018-01-04 19:35:51 -0500325 description "The specific response codes are to be aligned with SDC reference doc
326 (main table removed to avoid duplication and digression from main table).
327 See SDC and ECOMP Distribution Consumer Interface Agreement";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800328 leaf code {
329 description "Response code";
330 type uint16;
331 mandatory true;
332 }
333 leaf message {
334 description "Response message";
335 type string;
336 mandatory true;
337 }
338 }
339 }
340
Anand36bcd562018-01-04 19:35:51 -0500341 typedef lcm-action-status {
342 type enumeration {
343 enum "IN_PROGRESS";
344 enum "SUCCESSFUL";
345 enum "FAILED";
346 enum "NOT_FOUND";
347 enum "ABORTED";
348 enum "MULTIPLE_REQUESTS_FOUND";
349 }
350 description "The status of the requested LCM action";
351 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800352
353 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -0500354 * Define the restart service
355 **********************************************************************************/
356 rpc restart {
357 description "An operation to restart a virtual network function (or VM)";
358 input {
359 uses common-header;
360 leaf action {
361 type action;
362 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800363 }
Anand36bcd562018-01-04 19:35:51 -0500364 uses action-identifiers;
365 leaf payload {
366 type payload;
367 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800368 }
369 }
Anand36bcd562018-01-04 19:35:51 -0500370 output {
371 uses common-header;
372 uses status;
373 }
374 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800375
Anand36bcd562018-01-04 19:35:51 -0500376 /**********************************************************************************
377 * Define the rebuild service
378 **********************************************************************************/
379 rpc rebuild {
380 description "An operation to rebuild a virtual network function (or VM)";
381 input {
382 uses common-header;
383 leaf action {
384 type action;
385 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800386 }
Anand36bcd562018-01-04 19:35:51 -0500387 uses action-identifiers;
388 leaf payload {
389 type payload;
390 mandatory false;
391 }
392 }
393 output {
394 uses common-header;
395 uses status;
396 }
397 }
398
399 /**********************************************************************************
400 * Define the migrate service
401 **********************************************************************************/
402 rpc migrate {
403 description "An operation to migrate a virtual network function (or VM)";
404 input {
405 uses common-header;
406 leaf action {
407 type action;
408 mandatory true;
409 }
410 uses action-identifiers;
411 leaf payload {
412 type payload;
413 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800414 }
415 }
Anand36bcd562018-01-04 19:35:51 -0500416 output {
417 uses common-header;
418 uses status;
419 }
420 }
421
422 /**********************************************************************************
423 * Define the evacuate service
424 **********************************************************************************/
425 rpc evacuate {
426 description "An operation to evacuate a virtual network function (or VM)";
427 input {
428 uses common-header;
429 leaf action {
430 type action;
431 mandatory true;
432 }
433 uses action-identifiers;
434 leaf payload {
435 type payload;
436 mandatory false;
437 }
438 }
439 output {
440 uses common-header;
441 uses status;
442 }
443 }
444
445 /**********************************************************************************
446 * Define the snapshot service
447 **********************************************************************************/
448 rpc snapshot {
449 description "An operation to create a snapshot of a virtual network function (or VM)";
450 input {
451 uses common-header;
452 leaf action {
453 type action;
454 mandatory true;
455 }
456 uses action-identifiers;
457 leaf payload {
458 type payload;
459 mandatory false;
460 }
461 leaf identity-url {
462 type string;
463 mandatory true;
464 }
465 }
466 output {
467 uses common-header;
468 uses status;
469 leaf snapshot-id {
470 type string;
471 }
472 }
473 }
vidhyasreeac975222018-01-12 15:23:34 -0500474 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -0500475 * Define the VNF quiesce traffic service
476 **********************************************************************************/
477 rpc quiesce-traffic {
478 description "An operation to stop traffic gracefully on the VF.
479 It stops traffic gracefully without stopping the application";
480 input {
481 uses common-header;
482 leaf action {
483 type action;
484 mandatory true;
485 }
486 uses action-identifiers;
487 leaf payload {
488 type payload;
489 mandatory true;
490 }
491 }
492 output {
493 uses common-header;
494 uses status;
495 }
496 }
497
498 /**********************************************************************************
499 * Define the VNF resume traffic service
500 **********************************************************************************/
501 rpc resume-traffic {
502 description "An operation to resume traffic gracefully on the VF.
503 It resumes traffic gracefully without stopping the application";
504 input {
505 uses common-header;
506 leaf action {
507 type action;
508 mandatory true;
509 }
510 uses action-identifiers;
vidhyasreeac975222018-01-12 15:23:34 -0500511 leaf payload {
512 type payload;
513 mandatory true;
514 }
515 }
Anand36bcd562018-01-04 19:35:51 -0500516 output {
517 uses common-header;
518 uses status;
519 }
520 }
521
522 /**********************************************************************************
523 * Define the VNF UpgradePreCheck service
524 **********************************************************************************/
525 rpc upgrade-pre-check {
526 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
527 input {
528 uses common-header;
529 leaf action {
530 type action;
531 mandatory true;
532 }
533 uses action-identifiers;
534 leaf payload {
535 type payload;
536 mandatory true;
537 }
538 }
539 output {
540 uses common-header;
541 uses status;
vidhyasree41db8472018-06-29 16:18:12 -0400542 leaf payload {
543 type payload;
544 mandatory true;
545 }
Anand36bcd562018-01-04 19:35:51 -0500546 }
547 }
548
549 /**********************************************************************************
550 * Define the VNF UpgradeSoftware service
551 **********************************************************************************/
552 rpc upgrade-software {
553 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
554 input {
555 uses common-header;
556 leaf action {
557 type action;
558 mandatory true;
559 }
560 uses action-identifiers;
561 leaf payload {
562 type payload;
563 mandatory true;
564 }
565 }
566 output {
567 uses common-header;
568 uses status;
569 }
570 }
571
572 /**********************************************************************************
573 * Define the VNF UpgradePostCheck service
574 **********************************************************************************/
575 rpc upgrade-post-check {
576 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
577 input {
578 uses common-header;
579 leaf action {
580 type action;
581 mandatory true;
582 }
583 uses action-identifiers;
584 leaf payload {
585 type payload;
586 mandatory true;
587 }
588 }
589 output {
590 uses common-header;
591 uses status;
vidhyasree41db8472018-06-29 16:18:12 -0400592 leaf payload {
593 type payload;
594 mandatory true;
595 }
Anand36bcd562018-01-04 19:35:51 -0500596 }
597 }
598
599 /**********************************************************************************
600 * Define the VNF UpgradeBackup service
601 **********************************************************************************/
602 rpc upgrade-backup {
603 description "An operation to do full backup of the VNF data prior to an upgrade.";
604 input {
605 uses common-header;
606 leaf action {
607 type action;
608 mandatory true;
609 }
610 uses action-identifiers;
611 leaf payload {
612 type payload;
613 mandatory true;
614 }
615 }
616 output {
617 uses common-header;
618 uses status;
619 }
620 }
621
622 /**********************************************************************************
623 * Define the VNF UpgradeBackout service
624 **********************************************************************************/
625 rpc upgrade-backout {
626 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
627 input {
628 uses common-header;
629 leaf action {
630 type action;
631 mandatory true;
632 }
633 uses action-identifiers;
634 leaf payload {
635 type payload;
636 mandatory true;
637 }
638 }
639 output {
640 uses common-header;
641 uses status;
642 }
643 }
644
645 /**********************************************************************************
646 * Define the rollback service
647 **********************************************************************************/
648 rpc rollback {
649 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
650 input {
651 uses common-header;
652 leaf action {
653 type action;
654 mandatory true;
655 }
656 uses action-identifiers;
657 leaf payload {
658 type payload;
659 mandatory false;
660 }
661 leaf identity-url {
662 type string;
663 mandatory true;
664 }
665 leaf snapshot-id {
666 type string;
667 mandatory true;
668 }
669 }
670 output {
671 uses common-header;
672 uses status;
673 }
674 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800675
676
677 /**********************************************************************************
678 * Additional RPCs added here...
679 **********************************************************************************/
680
681
Anand36bcd562018-01-04 19:35:51 -0500682 /**********************************************************************************
Patrick Brady57b5eef2017-02-10 15:00:49 -0800683 * Define the sync service
684 **********************************************************************************/
685 rpc sync {
686 description "An operation to sync the configurations of a virtual network function (or VM)";
687 input {
688 uses common-header;
689 leaf action {
690 type action;
691 mandatory true;
692 }
693 uses action-identifiers;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700694 leaf payload {
695 type payload;
696 mandatory false;
697 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800698 }
699 output {
700 uses common-header;
701 uses status;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700702 leaf payload {
703 type payload;
704 mandatory false;
705 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800706 }
707 }
708
709 /**********************************************************************************
710 * Define the terminate service
711 **********************************************************************************/
712 rpc terminate {
713 description "An operation to terminate the configurations of a virtual network function (or VM)";
714 input {
715 uses common-header;
716 leaf action {
717 type action;
718 mandatory true;
719 }
720 uses action-identifiers;
721 leaf payload {
722 type payload;
723 mandatory false;
724 }
725 }
726 output {
727 uses common-header;
728 uses status;
729 }
730 }
731
Patrick Bradyc7d00752017-06-01 10:45:37 -0700732
733 rpc configure {
734 description "An operation to configure the configurations of a virtual network
735 function (or VM)";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800736 input {
737 uses common-header;
738 leaf action {
Patrick Bradyc7d00752017-06-01 10:45:37 -0700739 type action;
740 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800741 }
742 uses action-identifiers;
743 leaf payload {
Patrick Bradyc7d00752017-06-01 10:45:37 -0700744 type payload;
745 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800746 }
747 }
748 output {
749 uses common-header;
750 uses status;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700751 leaf payload {
752 type payload;
753 mandatory false;
754 }
755 }
756 }
757
758 rpc config-modify {
Anand36bcd562018-01-04 19:35:51 -0500759 description "Use the ModifyConfig command when a full configuration cycle is either not required
760 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
761 total configuration data of a VNF. The set of configuration parameters to be affected
762 is a subset of the total configuration data of the target VNF type. The payload Stop
763 Application must contain the configuration parameters to be modified and their values.
764 A successful modify returns a success response. A failed modify returns a failure
765 response and the specific failure messages in the response payload Stop Application";
Patrick Bradyc7d00752017-06-01 10:45:37 -0700766 input {
767 uses common-header;
768 leaf action {
769 type action;
770 mandatory true;
771 }
772 uses action-identifiers;
773 leaf payload {
774 type payload;
775 mandatory false;
776 }
777 }
778 output {
779 uses common-header;
780 uses status;
781 leaf payload {
782 type payload;
783 mandatory false;
784 }
785 }
786 }
787
vidhyasree6cf060d2018-02-21 11:19:33 -0500788 rpc config-scale-out {
789 description "An operation to Modify the configuration or other action to support
790 a ConfigScaleOut of a VNF.";
791 input {
792 uses common-header;
793 leaf action {
794 type action;
795 mandatory true;
796 }
797 uses action-identifiers;
798 leaf payload {
799 type payload;
vidhyasree6f44e212018-05-31 23:49:10 -0400800 mandatory true;
vidhyasree6cf060d2018-02-21 11:19:33 -0500801 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700802 }
vidhyasree6cf060d2018-02-21 11:19:33 -0500803 output {
804 uses common-header;
805 uses status;
806 leaf payload {
807 type payload;
808 mandatory false;
809 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700810 }
811 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700812
813 rpc config-restore {
814 description "An operation to restore the configurations of a virtual network
815 function (or VM)";
816 input {
817 uses common-header;
818 leaf action {
819 type action;
820 mandatory true;
821 }
822 uses action-identifiers;
823 leaf payload {
824 type payload;
825 mandatory false;
826 }
827 }
828 output {
829 uses common-header;
830 uses status;
831 leaf payload {
832 type payload;
833 mandatory false;
834 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800835 }
836 }
837
838 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -0500839 * Define the test service
840 **********************************************************************************/
Patrick Brady57b5eef2017-02-10 15:00:49 -0800841 rpc test {
842 description "An operation to test the configurations of a virtual network function (or VM)";
843 input {
844 uses common-header;
845 leaf action {
846 type action;
847 mandatory true;
848 }
849 uses action-identifiers;
850 leaf payload {
851 type payload;
852 mandatory false;
853 }
854 }
855 output {
856 uses common-header;
857 uses status;
858 }
859 }
860
Anand36bcd562018-01-04 19:35:51 -0500861 /**********************************************************************************
862 * Define the stop service
863 **********************************************************************************/
864 rpc stop {
865 description "An operation to stop the configurations of a virtual network function (or VM)";
866 input {
867 uses common-header;
868 leaf action {
869 type action;
870 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800871 }
Anand36bcd562018-01-04 19:35:51 -0500872 uses action-identifiers;
873 leaf payload {
874 type payload;
875 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800876 }
877 }
Anand36bcd562018-01-04 19:35:51 -0500878 output {
879 uses common-header;
880 uses status;
881 }
882 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800883
Anand36bcd562018-01-04 19:35:51 -0500884 rpc start {
885 description "An operation to start a virtual network function (or VM)";
886 input {
887 uses common-header;
888 leaf action {
889 type action;
890 mandatory true;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700891 }
Anand36bcd562018-01-04 19:35:51 -0500892 uses action-identifiers;
893 leaf payload {
894 type payload;
895 mandatory false;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700896 }
897 }
Anand36bcd562018-01-04 19:35:51 -0500898 output {
899 uses common-header;
900 uses status;
901 }
902 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700903
Anand36bcd562018-01-04 19:35:51 -0500904 /**********************************************************************************
905 * Define the audit service
906 **********************************************************************************/
907 rpc audit {
908 description "An operation to audit the configurations of a virtual network function (or VM)";
909 input {
910 uses common-header;
911 leaf action {
912 type action;
913 mandatory true;
914 }
915 uses action-identifiers;
916 leaf payload {
917 type payload;
918 mandatory false;
919 }
920 }
921 output {
922 uses common-header;
923 uses status;
924 leaf payload {
925 type payload;
926 mandatory false;
927 }
928 }
929 }
930
931 /**********************************************************************************
932 * Define the SoftwareUpload vSCP service
933 **********************************************************************************/
934 rpc software-upload {
935 description "An operation to upload a new version of vSCP image to vSCP for updating it";
936 input {
937 uses common-header;
938 leaf action {
939 type action;
940 mandatory true;
941 }
942 uses action-identifiers;
943 leaf payload {
944 type payload;
945 mandatory false;
946 }
947 }
948 output {
949 uses common-header;
950 uses status;
951 }
952 }
953
954 /**********************************************************************************
955 * Define the PreHealthCheck vSCP service
956 **********************************************************************************/
957 rpc health-check {
958 description "An operation to perform health check of vSCP prior its upgrading";
959 input {
960 uses common-header;
961 leaf action {
962 type action;
963 mandatory true;
964 }
965 uses action-identifiers;
966 leaf payload {
967 type payload;
968 mandatory false;
969 }
970 }
971 output {
972 uses common-header;
973 uses status;
vidhyasree41db8472018-06-29 16:18:12 -0400974 leaf payload {
975 type payload;
976 mandatory true;
977 }
978
Anand36bcd562018-01-04 19:35:51 -0500979 }
980 }
981
982
983 /**********************************************************************************
984 * Define the Upgrade vSCP service
985 **********************************************************************************/
986 rpc live-upgrade {
987 description "An operation to perform upgrade of vSCP";
988 input {
989 uses common-header;
990 leaf action {
991 type action;
992 mandatory true;
993 }
994 uses action-identifiers;
995 leaf payload {
996 type payload;
997 mandatory false;
998 }
999 }
1000 output {
1001 uses common-header;
1002 uses status;
1003 }
1004 }
1005
1006
1007 /**********************************************************************************
1008 * Define the VNF lock service
1009 **********************************************************************************/
1010 rpc lock {
1011 description "An operation to perform VNF lock operation";
1012 input {
1013 uses common-header;
Patrick Brady57b5eef2017-02-10 15:00:49 -08001014 leaf action {
Anand36bcd562018-01-04 19:35:51 -05001015 type action;
1016 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -08001017 }
1018 uses action-identifiers;
Patrick Bradyc7d00752017-06-01 10:45:37 -07001019 leaf payload {
1020 type payload;
1021 mandatory false;
1022 }
Patrick Brady57b5eef2017-02-10 15:00:49 -08001023 }
1024 output {
1025 uses common-header;
1026 uses status;
1027 }
Anand36bcd562018-01-04 19:35:51 -05001028 }
Patrick Brady57b5eef2017-02-10 15:00:49 -08001029
1030 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -05001031 * Define the VNF unlock service
1032 **********************************************************************************/
1033 rpc unlock {
1034 description "An operation to perform VNF unlock operation";
1035 input {
1036 uses common-header;
1037 leaf action {
1038 type action;
1039 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -08001040 }
Anand36bcd562018-01-04 19:35:51 -05001041 uses action-identifiers;
1042 leaf payload {
1043 type payload;
1044 mandatory false;
1045 }
1046 }
1047 output {
1048 uses common-header;
1049 uses status;
1050 }
1051 }
Patrick Brady57b5eef2017-02-10 15:00:49 -08001052
Anand36bcd562018-01-04 19:35:51 -05001053 /**********************************************************************************
Patrick Brady57b5eef2017-02-10 15:00:49 -08001054 * Define the VNF check lock service
1055 **********************************************************************************/
1056 rpc check-lock {
1057 description "An operation to check VNF lock status";
1058 input {
1059 uses common-header;
1060 leaf action {
1061 type action;
1062 mandatory true;
1063 }
1064 uses action-identifiers;
1065 }
1066 output {
1067 uses common-header;
1068 uses status;
1069 leaf locked {
1070 type enumeration {
1071 enum "TRUE";
1072 enum "FALSE";
1073 }
1074 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1075 mandatory false;
1076 }
1077 }
1078 }
1079
1080
Patrick Bradyc7d00752017-06-01 10:45:37 -07001081 rpc config-backup {
1082 description "An operation to Backup configurations of a virtual network function
1083 (or VM)";
1084 input {
1085 uses common-header;
1086 leaf action {
1087 type action;
1088 mandatory true;
1089 }
1090 uses action-identifiers;
Anand36bcd562018-01-04 19:35:51 -05001091 leaf payload {
1092 type payload;
1093 mandatory false;
1094 }
Patrick Bradyc7d00752017-06-01 10:45:37 -07001095 }
1096 output {
1097 uses common-header;
1098 uses status;
1099 leaf payload {
1100 type payload;
1101 mandatory false;
1102 }
1103 }
1104 }
1105
1106 rpc config-backup-delete {
1107 description "An operation to Delete backup configurations of a virtual network
1108 function (or VM)";
1109 input {
1110 uses common-header;
1111 leaf action {
1112 type action;
1113 mandatory true;
1114 }
1115 uses action-identifiers;
1116 }
1117 output {
1118 uses common-header;
1119 uses status;
1120 leaf payload {
1121 type payload;
1122 mandatory false;
1123 }
1124 }
1125 }
1126
1127 rpc config-export {
1128 description "An operation to Export configurations of a virtual network function
1129 (or VM)";
1130 input {
1131 uses common-header;
1132 leaf action {
1133 type action;
1134 mandatory true;
1135 }
1136 uses action-identifiers;
1137 }
1138 output {
1139 uses common-header;
1140 uses status;
1141 }
mojahidide52c622017-08-14 12:50:45 +05301142 }
1143 rpc stop-application {
1144 description "An operation to Stop Application traffic to a virtual network function";
1145 input {
1146 uses common-header;
1147 leaf action {
1148 type action;
1149 mandatory true;
1150 }
1151 uses action-identifiers;
1152 leaf payload {
1153 type payload;
1154 mandatory false;
1155 }
1156 }
1157 output {
1158 uses common-header;
1159 uses status;
1160 }
Anand36bcd562018-01-04 19:35:51 -05001161 }
mojahidide52c622017-08-14 12:50:45 +05301162
Patrick Brady57b5eef2017-02-10 15:00:49 -08001163 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -05001164 * Define the VNF Start Application service
Patrick Brady57b5eef2017-02-10 15:00:49 -08001165 **********************************************************************************/
Anand36bcd562018-01-04 19:35:51 -05001166 rpc start-application {
1167 description "An operation to perform VNF Start Application operation";
1168 input {
1169 uses common-header;
1170 leaf action {
1171 type action;
1172 mandatory true;
1173 }
1174 uses action-identifiers;
1175 leaf payload {
1176 type payload;
1177 mandatory false;
1178 }
1179 }
1180 output {
1181 uses common-header;
1182 uses status;
1183 }
1184 }
1185
1186
1187 /**********************************************************************************
1188 * Gets the current state of the previously submitted LCM request
1189 **********************************************************************************/
1190 rpc action-status {
1191 description "An operation to get the current state of the previously submitted LCM request";
1192 input {
1193 uses common-header;
1194 leaf action {
1195 type action;
1196 mandatory true;
1197 }
1198 uses action-identifiers;
1199 leaf payload {
1200 type payload;
1201 mandatory false;
1202 }
1203 }
1204 output {
1205 uses common-header;
1206 uses status;
1207 leaf payload {
1208 type payload;
1209 }
1210 }
1211 }
1212
1213 /**********************************************************************************
1214 * Define the VNF Query service
1215 **********************************************************************************/
1216 rpc query {
1217 description "An operation to query the status of a targe VNF.
1218 Returns information on each VM, including state (active or standby)
1219 and status (healthy or unhealthy)";
1220 input {
1221 uses common-header;
1222 leaf action {
1223 type action;
1224 mandatory true;
1225 }
1226 uses action-identifiers;
1227 }
1228 output {
1229 uses common-header;
1230 uses status;
1231 list query-results {
1232 leaf vserver-id {
1233 description "Identifier of a VM";
1234 type string;
1235 mandatory true;
1236 }
1237 leaf vm-state {
1238 description "The state of the VM";
1239 type vm-state;
1240 mandatory true;
1241 }
1242 leaf vm-status {
1243 description "the status of the VM";
1244 type vm-status;
1245 mandatory true;
1246 }
1247 }
1248 }
1249 }
1250
1251 /**********************************************************************************
1252 * Define the Reboot service
1253 **********************************************************************************/
1254 rpc reboot {
1255 description "An operation to reboot a specified virtual machine (VM)";
1256 input {
1257 uses common-header;
1258 leaf action {
1259 type action;
1260 mandatory true;
1261 }
1262 uses action-identifiers;
1263 leaf payload {
1264 type payload;
1265 mandatory false;
1266 }
1267 }
1268 output {
1269 uses common-header;
1270 uses status;
1271 }
1272 }
1273
1274 /**********************************************************************************
1275 * Define the VM attach volume service
1276 **********************************************************************************/
1277 rpc attach-volume {
1278 description "An operation to attach a cinder volume to a VM";
1279 input {
1280 uses common-header;
1281 leaf action {
1282 type action;
1283 mandatory true;
1284 }
1285 uses action-identifiers;
1286 leaf payload {
1287 type payload;
1288 mandatory true;
1289 }
1290 }
1291 output {
1292 uses common-header;
1293 uses status;
1294 }
1295 }
1296
1297 /**********************************************************************************
1298 * Define the VM detach volume service
1299 **********************************************************************************/
1300 rpc detach-volume {
1301 description "An operation to detach a cinder volume from a VM";
1302 input {
1303 uses common-header;
1304 leaf action {
1305 type action;
1306 mandatory true;
1307 }
1308 uses action-identifiers;
1309 leaf payload {
1310 type payload;
1311 mandatory true;
1312 }
1313 }
1314 output {
1315 uses common-header;
1316 uses status;
1317 }
1318 }
1319
Tomek Osinski3c0def22018-09-12 15:10:08 +02001320 /**********************************************************************************
1321 * Define the traffic distribution service
1322 **********************************************************************************/
1323 rpc distribute-traffic {
1324 description "An operation to distribute traffic between VMs";
1325 input {
1326 uses common-header;
1327 leaf action {
1328 type action;
1329 mandatory true;
1330 }
1331 uses action-identifiers;
1332 leaf payload {
1333 type payload;
1334 mandatory true;
1335 }
1336 }
1337 output {
1338 uses common-header;
1339 uses status;
1340 }
1341 }
1342
Anand36bcd562018-01-04 19:35:51 -05001343
1344
1345 /**********************************************************************************
1346 * Additional RPCs added here...
1347 **********************************************************************************/
Patrick Brady57b5eef2017-02-10 15:00:49 -08001348}