blob: 58e379251dcb9575947eb3313da0d063482854c6 [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 * ================================================================================
5 * Copyright (C) 2017 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
8 * =============================================================================
Patrick Brady7a261fb2017-06-06 22:35:43 -07009 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
Patrick Brady10bba352017-07-19 12:09:28 -070020 *
Patrick Brady7a261fb2017-06-06 22:35:43 -070021 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
Patrick Brady10bba352017-07-19 12:09:28 -070022 * ============LICENSE_END=========================================================
Patrick Brady7a261fb2017-06-06 22:35:43 -070023 */
24
Patrick Brady57b5eef2017-02-10 15:00:49 -080025/*
26 * Yang model for the Application Controller (APP-C) component of ECOMP
27 *
28 * This model is used to define the data and services of the Application Controller
29 * component of ECOMP. The APP-C controller initiates the processing of directed
30 * graphs, which define the actual process implementations used. The name of the
31 * directed graph is set by properties and cannot be changed dynamically.
32 *
33 * The services exposed by this provider are:
34 *
35 * restart-vnf:
36 * Used to request a restart of a virtual network function (a VM).
37 *
38 * rebuild-vnf:
39 * Used to request a rebuild of a virtual network function (a VM).
40 *
41 */
42
43module appc-provider-lcm {
44
45 yang-version 1;
Patrick Brady07567592017-12-13 11:09:30 -080046 namespace "org:onap:appc:lcm";
Patrick Brady57b5eef2017-02-10 15:00:49 -080047 prefix appc-provider-lcm;
48 organization "Copyright 2017 AT&T Intellectual Property.";
Anand36bcd562018-01-04 19:35:51 -050049 contact
50 "Dewayne Hafenstein <dh868g@att.us.com>";
51
Patrick Brady57b5eef2017-02-10 15:00:49 -080052 description
53 "Defines the services and request/response requirements for the ECOMP APP-C component.";
54
55 /*
56 * Note, the revision changes the package name of the generated java code. Do not
57 * change the revision unless you also update all references to the bindings.
58 */
59 revision "2016-01-08" {
60 description
61 "APP-C interface version 1.0.48";
62 }
63
64 /**********************************************************************************
65 * Data type definitions
66 *
67 * The following data type definitions are used to define common data structures,
68 * define constraints, or to impart special meanings to data objects related to the
69 * APP-C controller functions.
70 **********************************************************************************/
71
Patrick Brady57b5eef2017-02-10 15:00:49 -080072 typedef ZULU {
Patrick Bradyc7d00752017-06-01 10:45:37 -070073 description "Define a common definition of a time stamp (expressed as a formatted
74 string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ";
Patrick Brady57b5eef2017-02-10 15:00:49 -080075 type string {
76 length "16..28";
77 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";
78 }
79 }
80
81 typedef payload {
82 type string ;
83 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";
84 }
85
86 typedef action {
Patrick Bradyc7d00752017-06-01 10:45:37 -070087 type enumeration {
88 enum "Restart";
89 enum "Rebuild";
90 enum "Migrate";
91 enum "Evacuate";
92 enum "Snapshot";
93 enum "Rollback";
94 enum "Sync";
95 enum "Audit";
96 enum "Stop";
97 enum "Start";
98 enum "Terminate";
99 enum "SoftwareUpload";
100 enum "HealthCheck";
101 enum "LiveUpgrade";
102 enum "Lock";
103 enum "Unlock";
104 enum "Test";
105 enum "CheckLock";
106 enum "Configure";
107 enum "ConfigModify";
108 enum "ConfigScaleOut";
109 enum "ConfigRestore";
110 enum "ConfigBackup";
111 enum "ConfigBackupDelete";
112 enum "ConfigExport";
mojahidide52c622017-08-14 12:50:45 +0530113 enum "StopApplication";
114 enum "StartApplication";
Anand36bcd562018-01-04 19:35:51 -0500115 enum "QuiesceTraffic";
116 enum "ResumeTraffic";
117 enum "UpgradePreCheck";
118 enum "UpgradeSoftware";
119 enum "UpgradePostCheck";
120 enum "UpgradeBackup";
121 enum "UpgradeBackout";
122 enum "ActionStatus";
123 enum "Query";
124 enum "Reboot";
125 enum "AttachVolume";
126 enum "DetachVolume";
127
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 }
474 /**********************************************************************************
475 * 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;
511 }
512 output {
513 uses common-header;
514 uses status;
515 }
516 }
517
518 /**********************************************************************************
519 * Define the VNF UpgradePreCheck service
520 **********************************************************************************/
521 rpc upgrade-pre-check {
522 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
523 input {
524 uses common-header;
525 leaf action {
526 type action;
527 mandatory true;
528 }
529 uses action-identifiers;
530 leaf payload {
531 type payload;
532 mandatory true;
533 }
534 }
535 output {
536 uses common-header;
537 uses status;
538 }
539 }
540
541 /**********************************************************************************
542 * Define the VNF UpgradeSoftware service
543 **********************************************************************************/
544 rpc upgrade-software {
545 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
546 input {
547 uses common-header;
548 leaf action {
549 type action;
550 mandatory true;
551 }
552 uses action-identifiers;
553 leaf payload {
554 type payload;
555 mandatory true;
556 }
557 }
558 output {
559 uses common-header;
560 uses status;
561 }
562 }
563
564 /**********************************************************************************
565 * Define the VNF UpgradePostCheck service
566 **********************************************************************************/
567 rpc upgrade-post-check {
568 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
569 input {
570 uses common-header;
571 leaf action {
572 type action;
573 mandatory true;
574 }
575 uses action-identifiers;
576 leaf payload {
577 type payload;
578 mandatory true;
579 }
580 }
581 output {
582 uses common-header;
583 uses status;
584 }
585 }
586
587 /**********************************************************************************
588 * Define the VNF UpgradeBackup service
589 **********************************************************************************/
590 rpc upgrade-backup {
591 description "An operation to do full backup of the VNF data prior to an upgrade.";
592 input {
593 uses common-header;
594 leaf action {
595 type action;
596 mandatory true;
597 }
598 uses action-identifiers;
599 leaf payload {
600 type payload;
601 mandatory true;
602 }
603 }
604 output {
605 uses common-header;
606 uses status;
607 }
608 }
609
610 /**********************************************************************************
611 * Define the VNF UpgradeBackout service
612 **********************************************************************************/
613 rpc upgrade-backout {
614 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
615 input {
616 uses common-header;
617 leaf action {
618 type action;
619 mandatory true;
620 }
621 uses action-identifiers;
622 leaf payload {
623 type payload;
624 mandatory true;
625 }
626 }
627 output {
628 uses common-header;
629 uses status;
630 }
631 }
632
633 /**********************************************************************************
634 * Define the rollback service
635 **********************************************************************************/
636 rpc rollback {
637 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
638 input {
639 uses common-header;
640 leaf action {
641 type action;
642 mandatory true;
643 }
644 uses action-identifiers;
645 leaf payload {
646 type payload;
647 mandatory false;
648 }
649 leaf identity-url {
650 type string;
651 mandatory true;
652 }
653 leaf snapshot-id {
654 type string;
655 mandatory true;
656 }
657 }
658 output {
659 uses common-header;
660 uses status;
661 }
662 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800663
664
665 /**********************************************************************************
666 * Additional RPCs added here...
667 **********************************************************************************/
668
669
Anand36bcd562018-01-04 19:35:51 -0500670 /**********************************************************************************
Patrick Brady57b5eef2017-02-10 15:00:49 -0800671 * Define the sync service
672 **********************************************************************************/
673 rpc sync {
674 description "An operation to sync the configurations of a virtual network function (or VM)";
675 input {
676 uses common-header;
677 leaf action {
678 type action;
679 mandatory true;
680 }
681 uses action-identifiers;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700682 leaf payload {
683 type payload;
684 mandatory false;
685 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800686 }
687 output {
688 uses common-header;
689 uses status;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700690 leaf payload {
691 type payload;
692 mandatory false;
693 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800694 }
695 }
696
697 /**********************************************************************************
698 * Define the terminate service
699 **********************************************************************************/
700 rpc terminate {
701 description "An operation to terminate the configurations of a virtual network function (or VM)";
702 input {
703 uses common-header;
704 leaf action {
705 type action;
706 mandatory true;
707 }
708 uses action-identifiers;
709 leaf payload {
710 type payload;
711 mandatory false;
712 }
713 }
714 output {
715 uses common-header;
716 uses status;
717 }
718 }
719
Patrick Bradyc7d00752017-06-01 10:45:37 -0700720
721 rpc configure {
722 description "An operation to configure the configurations of a virtual network
723 function (or VM)";
Patrick Brady57b5eef2017-02-10 15:00:49 -0800724 input {
725 uses common-header;
726 leaf action {
Patrick Bradyc7d00752017-06-01 10:45:37 -0700727 type action;
728 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800729 }
730 uses action-identifiers;
731 leaf payload {
Patrick Bradyc7d00752017-06-01 10:45:37 -0700732 type payload;
733 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800734 }
735 }
736 output {
737 uses common-header;
738 uses status;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700739 leaf payload {
740 type payload;
741 mandatory false;
742 }
743 }
744 }
745
746 rpc config-modify {
Anand36bcd562018-01-04 19:35:51 -0500747 description "Use the ModifyConfig command when a full configuration cycle is either not required
748 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
749 total configuration data of a VNF. The set of configuration parameters to be affected
750 is a subset of the total configuration data of the target VNF type. The payload Stop
751 Application must contain the configuration parameters to be modified and their values.
752 A successful modify returns a success response. A failed modify returns a failure
753 response and the specific failure messages in the response payload Stop Application";
Patrick Bradyc7d00752017-06-01 10:45:37 -0700754 input {
755 uses common-header;
756 leaf action {
757 type action;
758 mandatory true;
759 }
760 uses action-identifiers;
761 leaf payload {
762 type payload;
763 mandatory false;
764 }
765 }
766 output {
767 uses common-header;
768 uses status;
769 leaf payload {
770 type payload;
771 mandatory false;
772 }
773 }
774 }
775
776 rpc config-scaleout {
777 description "An operation to scaleout the configurations of a virtual network
778 function (or VM)";
779 input {
780 uses common-header;
781 leaf action {
782 type action;
783 mandatory true;
784 }
785 uses action-identifiers;
786 leaf payload {
787 type payload;
788 mandatory false;
789 }
790 }
791 output {
792 uses common-header;
793 uses status;
794 leaf payload {
795 type payload;
796 mandatory false;
797 }
798 }
799 }
800
801 rpc config-restore {
802 description "An operation to restore the configurations of a virtual network
803 function (or VM)";
804 input {
805 uses common-header;
806 leaf action {
807 type action;
808 mandatory true;
809 }
810 uses action-identifiers;
811 leaf payload {
812 type payload;
813 mandatory false;
814 }
815 }
816 output {
817 uses common-header;
818 uses status;
819 leaf payload {
820 type payload;
821 mandatory false;
822 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800823 }
824 }
825
826 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -0500827 * Define the test service
828 **********************************************************************************/
Patrick Brady57b5eef2017-02-10 15:00:49 -0800829 rpc test {
830 description "An operation to test the configurations of a virtual network function (or VM)";
831 input {
832 uses common-header;
833 leaf action {
834 type action;
835 mandatory true;
836 }
837 uses action-identifiers;
838 leaf payload {
839 type payload;
840 mandatory false;
841 }
842 }
843 output {
844 uses common-header;
845 uses status;
846 }
847 }
848
Anand36bcd562018-01-04 19:35:51 -0500849 /**********************************************************************************
850 * Define the stop service
851 **********************************************************************************/
852 rpc stop {
853 description "An operation to stop the configurations of a virtual network function (or VM)";
854 input {
855 uses common-header;
856 leaf action {
857 type action;
858 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800859 }
Anand36bcd562018-01-04 19:35:51 -0500860 uses action-identifiers;
861 leaf payload {
862 type payload;
863 mandatory false;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800864 }
865 }
Anand36bcd562018-01-04 19:35:51 -0500866 output {
867 uses common-header;
868 uses status;
869 }
870 }
Patrick Brady57b5eef2017-02-10 15:00:49 -0800871
Anand36bcd562018-01-04 19:35:51 -0500872 rpc start {
873 description "An operation to start a virtual network function (or VM)";
874 input {
875 uses common-header;
876 leaf action {
877 type action;
878 mandatory true;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700879 }
Anand36bcd562018-01-04 19:35:51 -0500880 uses action-identifiers;
881 leaf payload {
882 type payload;
883 mandatory false;
Patrick Bradyc7d00752017-06-01 10:45:37 -0700884 }
885 }
Anand36bcd562018-01-04 19:35:51 -0500886 output {
887 uses common-header;
888 uses status;
889 }
890 }
Patrick Bradyc7d00752017-06-01 10:45:37 -0700891
Anand36bcd562018-01-04 19:35:51 -0500892 /**********************************************************************************
893 * Define the audit service
894 **********************************************************************************/
895 rpc audit {
896 description "An operation to audit the configurations of a virtual network function (or VM)";
897 input {
898 uses common-header;
899 leaf action {
900 type action;
901 mandatory true;
902 }
903 uses action-identifiers;
904 leaf payload {
905 type payload;
906 mandatory false;
907 }
908 }
909 output {
910 uses common-header;
911 uses status;
912 leaf payload {
913 type payload;
914 mandatory false;
915 }
916 }
917 }
918
919 /**********************************************************************************
920 * Define the SoftwareUpload vSCP service
921 **********************************************************************************/
922 rpc software-upload {
923 description "An operation to upload a new version of vSCP image to vSCP for updating it";
924 input {
925 uses common-header;
926 leaf action {
927 type action;
928 mandatory true;
929 }
930 uses action-identifiers;
931 leaf payload {
932 type payload;
933 mandatory false;
934 }
935 }
936 output {
937 uses common-header;
938 uses status;
939 }
940 }
941
942 /**********************************************************************************
943 * Define the PreHealthCheck vSCP service
944 **********************************************************************************/
945 rpc health-check {
946 description "An operation to perform health check of vSCP prior its upgrading";
947 input {
948 uses common-header;
949 leaf action {
950 type action;
951 mandatory true;
952 }
953 uses action-identifiers;
954 leaf payload {
955 type payload;
956 mandatory false;
957 }
958 }
959 output {
960 uses common-header;
961 uses status;
962 }
963 }
964
965
966 /**********************************************************************************
967 * Define the Upgrade vSCP service
968 **********************************************************************************/
969 rpc live-upgrade {
970 description "An operation to perform upgrade of vSCP";
971 input {
972 uses common-header;
973 leaf action {
974 type action;
975 mandatory true;
976 }
977 uses action-identifiers;
978 leaf payload {
979 type payload;
980 mandatory false;
981 }
982 }
983 output {
984 uses common-header;
985 uses status;
986 }
987 }
988
989
990 /**********************************************************************************
991 * Define the VNF lock service
992 **********************************************************************************/
993 rpc lock {
994 description "An operation to perform VNF lock operation";
995 input {
996 uses common-header;
Patrick Brady57b5eef2017-02-10 15:00:49 -0800997 leaf action {
Anand36bcd562018-01-04 19:35:51 -0500998 type action;
999 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -08001000 }
1001 uses action-identifiers;
Patrick Bradyc7d00752017-06-01 10:45:37 -07001002 leaf payload {
1003 type payload;
1004 mandatory false;
1005 }
Patrick Brady57b5eef2017-02-10 15:00:49 -08001006 }
1007 output {
1008 uses common-header;
1009 uses status;
1010 }
Anand36bcd562018-01-04 19:35:51 -05001011 }
Patrick Brady57b5eef2017-02-10 15:00:49 -08001012
1013 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -05001014 * Define the VNF unlock service
1015 **********************************************************************************/
1016 rpc unlock {
1017 description "An operation to perform VNF unlock operation";
1018 input {
1019 uses common-header;
1020 leaf action {
1021 type action;
1022 mandatory true;
Patrick Brady57b5eef2017-02-10 15:00:49 -08001023 }
Anand36bcd562018-01-04 19:35:51 -05001024 uses action-identifiers;
1025 leaf payload {
1026 type payload;
1027 mandatory false;
1028 }
1029 }
1030 output {
1031 uses common-header;
1032 uses status;
1033 }
1034 }
Patrick Brady57b5eef2017-02-10 15:00:49 -08001035
Anand36bcd562018-01-04 19:35:51 -05001036 /**********************************************************************************
Patrick Brady57b5eef2017-02-10 15:00:49 -08001037 * Define the VNF check lock service
1038 **********************************************************************************/
1039 rpc check-lock {
1040 description "An operation to check VNF lock status";
1041 input {
1042 uses common-header;
1043 leaf action {
1044 type action;
1045 mandatory true;
1046 }
1047 uses action-identifiers;
1048 }
1049 output {
1050 uses common-header;
1051 uses status;
1052 leaf locked {
1053 type enumeration {
1054 enum "TRUE";
1055 enum "FALSE";
1056 }
1057 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1058 mandatory false;
1059 }
1060 }
1061 }
1062
1063
Patrick Bradyc7d00752017-06-01 10:45:37 -07001064 rpc config-backup {
1065 description "An operation to Backup configurations of a virtual network function
1066 (or VM)";
1067 input {
1068 uses common-header;
1069 leaf action {
1070 type action;
1071 mandatory true;
1072 }
1073 uses action-identifiers;
Anand36bcd562018-01-04 19:35:51 -05001074 leaf payload {
1075 type payload;
1076 mandatory false;
1077 }
Patrick Bradyc7d00752017-06-01 10:45:37 -07001078 }
1079 output {
1080 uses common-header;
1081 uses status;
1082 leaf payload {
1083 type payload;
1084 mandatory false;
1085 }
1086 }
1087 }
1088
1089 rpc config-backup-delete {
1090 description "An operation to Delete backup configurations of a virtual network
1091 function (or VM)";
1092 input {
1093 uses common-header;
1094 leaf action {
1095 type action;
1096 mandatory true;
1097 }
1098 uses action-identifiers;
1099 }
1100 output {
1101 uses common-header;
1102 uses status;
1103 leaf payload {
1104 type payload;
1105 mandatory false;
1106 }
1107 }
1108 }
1109
1110 rpc config-export {
1111 description "An operation to Export configurations of a virtual network function
1112 (or VM)";
1113 input {
1114 uses common-header;
1115 leaf action {
1116 type action;
1117 mandatory true;
1118 }
1119 uses action-identifiers;
1120 }
1121 output {
1122 uses common-header;
1123 uses status;
1124 }
mojahidide52c622017-08-14 12:50:45 +05301125 }
1126 rpc stop-application {
1127 description "An operation to Stop Application traffic to a virtual network function";
1128 input {
1129 uses common-header;
1130 leaf action {
1131 type action;
1132 mandatory true;
1133 }
1134 uses action-identifiers;
1135 leaf payload {
1136 type payload;
1137 mandatory false;
1138 }
1139 }
1140 output {
1141 uses common-header;
1142 uses status;
1143 }
Anand36bcd562018-01-04 19:35:51 -05001144 }
mojahidide52c622017-08-14 12:50:45 +05301145
Patrick Brady57b5eef2017-02-10 15:00:49 -08001146 /**********************************************************************************
Anand36bcd562018-01-04 19:35:51 -05001147 * Define the VNF Start Application service
Patrick Brady57b5eef2017-02-10 15:00:49 -08001148 **********************************************************************************/
Anand36bcd562018-01-04 19:35:51 -05001149 rpc start-application {
1150 description "An operation to perform VNF Start Application operation";
1151 input {
1152 uses common-header;
1153 leaf action {
1154 type action;
1155 mandatory true;
1156 }
1157 uses action-identifiers;
1158 leaf payload {
1159 type payload;
1160 mandatory false;
1161 }
1162 }
1163 output {
1164 uses common-header;
1165 uses status;
1166 }
1167 }
1168
1169
1170 /**********************************************************************************
1171 * Gets the current state of the previously submitted LCM request
1172 **********************************************************************************/
1173 rpc action-status {
1174 description "An operation to get the current state of the previously submitted LCM request";
1175 input {
1176 uses common-header;
1177 leaf action {
1178 type action;
1179 mandatory true;
1180 }
1181 uses action-identifiers;
1182 leaf payload {
1183 type payload;
1184 mandatory false;
1185 }
1186 }
1187 output {
1188 uses common-header;
1189 uses status;
1190 leaf payload {
1191 type payload;
1192 }
1193 }
1194 }
1195
1196 /**********************************************************************************
1197 * Define the VNF Query service
1198 **********************************************************************************/
1199 rpc query {
1200 description "An operation to query the status of a targe VNF.
1201 Returns information on each VM, including state (active or standby)
1202 and status (healthy or unhealthy)";
1203 input {
1204 uses common-header;
1205 leaf action {
1206 type action;
1207 mandatory true;
1208 }
1209 uses action-identifiers;
1210 }
1211 output {
1212 uses common-header;
1213 uses status;
1214 list query-results {
1215 leaf vserver-id {
1216 description "Identifier of a VM";
1217 type string;
1218 mandatory true;
1219 }
1220 leaf vm-state {
1221 description "The state of the VM";
1222 type vm-state;
1223 mandatory true;
1224 }
1225 leaf vm-status {
1226 description "the status of the VM";
1227 type vm-status;
1228 mandatory true;
1229 }
1230 }
1231 }
1232 }
1233
1234 /**********************************************************************************
1235 * Define the Reboot service
1236 **********************************************************************************/
1237 rpc reboot {
1238 description "An operation to reboot a specified virtual machine (VM)";
1239 input {
1240 uses common-header;
1241 leaf action {
1242 type action;
1243 mandatory true;
1244 }
1245 uses action-identifiers;
1246 leaf payload {
1247 type payload;
1248 mandatory false;
1249 }
1250 }
1251 output {
1252 uses common-header;
1253 uses status;
1254 }
1255 }
1256
1257 /**********************************************************************************
1258 * Define the VM attach volume service
1259 **********************************************************************************/
1260 rpc attach-volume {
1261 description "An operation to attach a cinder volume to a VM";
1262 input {
1263 uses common-header;
1264 leaf action {
1265 type action;
1266 mandatory true;
1267 }
1268 uses action-identifiers;
1269 leaf payload {
1270 type payload;
1271 mandatory true;
1272 }
1273 }
1274 output {
1275 uses common-header;
1276 uses status;
1277 }
1278 }
1279
1280 /**********************************************************************************
1281 * Define the VM detach volume service
1282 **********************************************************************************/
1283 rpc detach-volume {
1284 description "An operation to detach a cinder volume from a VM";
1285 input {
1286 uses common-header;
1287 leaf action {
1288 type action;
1289 mandatory true;
1290 }
1291 uses action-identifiers;
1292 leaf payload {
1293 type payload;
1294 mandatory true;
1295 }
1296 }
1297 output {
1298 uses common-header;
1299 uses status;
1300 }
1301 }
1302
1303
1304
1305 /**********************************************************************************
1306 * Additional RPCs added here...
1307 **********************************************************************************/
Patrick Brady57b5eef2017-02-10 15:00:49 -08001308}