2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * ================================================================================
9 * Modifications Copyright (C) 2018-2019 Orange
10 * =============================================================================
11 * 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
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * 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.
23 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 * ============LICENSE_END=========================================================
28 * Yang model for the Application Controller (APP-C) component of ECOMP
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.
35 * The services exposed by this provider are:
38 * Used to request a restart of a virtual network function (a VM).
41 * Used to request a rebuild of a virtual network function (a VM).
45 module appc-provider-lcm {
48 namespace "org:onap:appc:lcm";
49 prefix appc-provider-lcm;
52 "Defines the services and request/response requirements for the ECOMP APP-C component.";
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.
58 revision "2016-01-08" {
60 "APP-C interface version 1.0.48";
63 /**********************************************************************************
64 * Data type definitions
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 **********************************************************************************/
72 description "Define a common definition of a time stamp (expressed as a formatted
73 string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ";
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";
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";
98 enum "SoftwareUpload";
100 enum "LicenseManagement";
108 enum "ConfigScaleOut";
109 enum "ConfigRestore";
111 enum "ConfigBackupDelete";
113 enum "StopApplication";
114 enum "StartApplication";
115 enum "QuiesceTraffic";
116 enum "ResumeTraffic";
117 enum "UpgradePreCheck";
118 enum "UpgradeSoftware";
119 enum "UpgradePostCheck";
120 enum "UpgradeBackup";
121 enum "UpgradeBackout";
129 enum "DistributeTraffic";
130 enum "DistributeTrafficCheck";
139 enum "StatusTraffic";
142 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
146 description "The state of a VM";
156 description "The status of a VM";
165 /**********************************************************************************
166 * Basic manipulation of a VNF (or VM) will typically include querying the current
167 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
168 * "state"-type operations, the services require the identification of the VNF to
169 * be operated on, and the region or LCP that contains that resource. This
170 * information is used across all of these services, so it has been defined as a
171 * common structure here and is referenced in the appropriate RPC definitions.
172 **********************************************************************************/
175 /**********************************************************************************
176 * All requests will include this standard header
178 * The standard request header is used to define a correlation identification for
179 * the request that is returned on all responses. This correlation identifier
180 * (called the service-request-id) is meaningful to the caller and is included on
181 * all responses from the services.
182 **********************************************************************************/
184 /**********************************************************************************
185 * All responses will include this standard header
187 * The standard response header includes the time of completion as well as a
188 * success|failure indication
189 **********************************************************************************/
191 grouping common-header {
192 description "A common header for all APP-C requests";
193 container common-header {
194 description "A common header for all APP-C requests";
196 description "timestamp is in ISO 8601 timestamp format ZULU offset";
202 description "api-ver is the API version identifier. A given release of APPC
203 should support all previous versions of APPC API (correlate with
204 general requirements)";
206 pattern "[2]\.\d\d" {
207 error-message "API Version 2.XX is supported at this end point";
214 description "originator-id an identifier of the calling system which can be
215 used addressing purposes, i.e. returning asynchronous response
216 to the proper destination over DMaaP (especially in case of multiple
217 consumers of APP-C APIs)";
223 description "UUID for the request ID. An OSS/BSS identifier for the request
224 that caused the current action. Multiple API calls may be made
225 with the same request-id The request-id shall be recorded throughout
226 the operations on a single request";
231 leaf sub-request-id {
232 description "Uniquely identifies a specific LCM action. It is persistent over
233 the life-cycle of a single request";
239 /**********************************************************************************
240 * Flags are generic flags that apply to any and all commands, all are optional
241 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc)
242 * state. Specific behaviour of forced commands varies, but implies cancellation
243 * of previous command and an override by the new command. The FALSE value is
245 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
246 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
247 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
248 * * Cease accepting additional command requests
249 * * Complete execution of outstanding commands
250 * * Execute the exclusive command to completion
251 * * Optionally report the result of the command
252 * * Optionally resume command acceptance and processing
253 * - NORMAL - Obverse of EXCLUSIVE, the default one.
254 **********************************************************************************/
256 description "Flags are generic flags that apply to any and all commands, all are optional";
262 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
263 or NORMAL (queue other requests until complete)";
271 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
272 locked, transiting, etc.) state";
276 description "<0....N> -Â The timeout value (expressed in seconds) for action
277 execution, between action being received by APPC and action initiation";
286 grouping action-identifiers {
287 description "A block containing the action arguments. These are used to specify
288 the object upon which APP-C LCM command is to operate";
289 container action-identifiers {
290 description "A block containing the action arguments. These are used to specify
291 the object upon which APP-C LCM command is to operate";
292 leaf service-instance-id {
293 description "identifies a specific service the command refers to. When multiple
294 APP-C instances are used and applied to a subset of services,
295 this will become significant . The field is mandatory when the
301 description "identifies the VNF to which this action is to be applied(vnf-id
302 uniquely identifies the service-instance referred to). Note that
303 some actions are applied to multiple VNFs in the same service.
304 When this is the case, vnf-id may be left out, but service-instance-id
305 must appear. The field is mandatory when service-instance-id is
311 description "identifies the VF module to which this action is to be applied.";
316 description "identifies the VNFC to which this action is to be applied. Some
317 actions apply only to a component within a VNF (e.g. RESTART is
318 sometimes applied to on VM only). In such a case, the name of
319 the VNFC is used to search for the component within the VNF";
324 description "identifies a specific VM within the given service/vnf to which
325 this action is to be applied";
334 description "The specific response codes are to be aligned with SDC reference doc
335 (main table removed to avoid duplication and digression from main table).
336 See SDC and ECOMP Distribution Consumer Interface Agreement";
338 description "The specific response codes are to be aligned with SDC reference doc
339 (main table removed to avoid duplication and digression from main table).
340 See SDC and ECOMP Distribution Consumer Interface Agreement";
342 description "Response code";
347 description "Response message";
354 typedef lcm-action-status {
361 enum "MULTIPLE_REQUESTS_FOUND";
363 description "The status of the requested LCM action";
366 /**********************************************************************************
367 * Define the restart service
368 **********************************************************************************/
370 description "An operation to restart a virtual network function (or VM)";
377 uses action-identifiers;
389 /**********************************************************************************
390 * Define the rebuild service
391 **********************************************************************************/
393 description "An operation to rebuild a virtual network function (or VM)";
400 uses action-identifiers;
412 /**********************************************************************************
413 * Define the migrate service
414 **********************************************************************************/
416 description "An operation to migrate a virtual network function (or VM)";
423 uses action-identifiers;
435 /**********************************************************************************
436 * Define the evacuate service
437 **********************************************************************************/
439 description "An operation to evacuate a virtual network function (or VM)";
446 uses action-identifiers;
458 /**********************************************************************************
459 * Define the snapshot service
460 **********************************************************************************/
462 description "An operation to create a snapshot of a virtual network function (or VM)";
469 uses action-identifiers;
487 /**********************************************************************************
488 * Define the VNF quiesce traffic service
489 **********************************************************************************/
490 rpc quiesce-traffic {
491 description "An operation to stop traffic gracefully on the VF.
492 It stops traffic gracefully without stopping the application";
499 uses action-identifiers;
515 /**********************************************************************************
516 * Define the VNF resume traffic service
517 **********************************************************************************/
519 description "An operation to resume traffic gracefully on the VF.
520 It resumes traffic gracefully without stopping the application";
527 uses action-identifiers;
543 /**********************************************************************************
544 * Define the VNF UpgradePreCheck service
545 **********************************************************************************/
546 rpc upgrade-pre-check {
547 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
554 uses action-identifiers;
570 /**********************************************************************************
571 * Define the VNF UpgradeSoftware service
572 **********************************************************************************/
573 rpc upgrade-software {
574 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
581 uses action-identifiers;
597 /**********************************************************************************
598 * Define the VNF UpgradePostCheck service
599 **********************************************************************************/
600 rpc upgrade-post-check {
601 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
608 uses action-identifiers;
624 /**********************************************************************************
625 * Define the VNF UpgradeBackup service
626 **********************************************************************************/
628 description "An operation to do full backup of the VNF data prior to an upgrade.";
635 uses action-identifiers;
651 /**********************************************************************************
652 * Define the VNF UpgradeBackout service
653 **********************************************************************************/
654 rpc upgrade-backout {
655 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
662 uses action-identifiers;
678 /**********************************************************************************
679 * Define the rollback service
680 **********************************************************************************/
682 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
689 uses action-identifiers;
710 /**********************************************************************************
711 * Additional RPCs added here...
712 **********************************************************************************/
715 /**********************************************************************************
716 * Define the sync service
717 **********************************************************************************/
719 description "An operation to sync the configurations of a virtual network function (or VM)";
726 uses action-identifiers;
742 /**********************************************************************************
743 * Define the terminate service
744 **********************************************************************************/
746 description "An operation to terminate the configurations of a virtual network function (or VM)";
753 uses action-identifiers;
767 description "An operation to configure the configurations of a virtual network
775 uses action-identifiers;
792 description "Use the ModifyConfig command when a full configuration cycle is either not required
793 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
794 total configuration data of a VNF. The set of configuration parameters to be affected
795 is a subset of the total configuration data of the target VNF type. The payload Stop
796 Application must contain the configuration parameters to be modified and their values.
797 A successful modify returns a success response. A failed modify returns a failure
798 response and the specific failure messages in the response payload Stop Application";
805 uses action-identifiers;
821 rpc config-scale-out {
822 description "An operation to Modify the configuration or other action to support
823 a ConfigScaleOut of a VNF.";
830 uses action-identifiers;
847 description "An operation to restore the configurations of a virtual network
855 uses action-identifiers;
871 /**********************************************************************************
872 * Define the test service
873 **********************************************************************************/
875 description "An operation to test the configurations of a virtual network function (or VM)";
882 uses action-identifiers;
894 /**********************************************************************************
895 * Define the stop service
896 **********************************************************************************/
898 description "An operation to stop the configurations of a virtual network function (or VM)";
905 uses action-identifiers;
918 description "An operation to start a virtual network function (or VM)";
925 uses action-identifiers;
937 /**********************************************************************************
938 * Define the audit service
939 **********************************************************************************/
941 description "An operation to audit the configurations of a virtual network function (or VM)";
948 uses action-identifiers;
964 /**********************************************************************************
965 * Define the SoftwareUpload vSCP service
966 **********************************************************************************/
967 rpc software-upload {
968 description "An operation to upload a new version of vSCP image to vSCP for updating it";
975 uses action-identifiers;
987 /**********************************************************************************
988 * Define the PreHealthCheck vSCP service
989 **********************************************************************************/
991 description "An operation to perform health check of vSCP prior its upgrading";
998 uses action-identifiers;
1015 /**********************************************************************************
1016 * Define the Upgrade vSCP service
1017 **********************************************************************************/
1019 description "An operation to perform upgrade of vSCP";
1026 uses action-identifiers;
1039 /**********************************************************************************
1040 * Define the VNF lock service
1041 **********************************************************************************/
1043 description "An operation to perform VNF lock operation";
1050 uses action-identifiers;
1062 /**********************************************************************************
1063 * Define the VNF unlock service
1064 **********************************************************************************/
1066 description "An operation to perform VNF unlock operation";
1073 uses action-identifiers;
1085 /**********************************************************************************
1086 * Define the VNF check lock service
1087 **********************************************************************************/
1089 description "An operation to check VNF lock status";
1096 uses action-identifiers;
1106 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1114 description "An operation to Backup configurations of a virtual network function
1122 uses action-identifiers;
1138 rpc config-backup-delete {
1139 description "An operation to Delete backup configurations of a virtual network
1147 uses action-identifiers;
1160 description "An operation to Export configurations of a virtual network function
1168 uses action-identifiers;
1175 rpc stop-application {
1176 description "An operation to Stop Application traffic to a virtual network function";
1183 uses action-identifiers;
1199 /**********************************************************************************
1200 * Define the VNF Start Application service
1201 **********************************************************************************/
1202 rpc start-application {
1203 description "An operation to perform VNF Start Application operation";
1210 uses action-identifiers;
1227 /**********************************************************************************
1228 * Gets the current state of the previously submitted LCM request
1229 **********************************************************************************/
1231 description "An operation to get the current state of the previously submitted LCM request";
1238 uses action-identifiers;
1253 /**********************************************************************************
1254 * Define the VNF Query service
1255 **********************************************************************************/
1257 description "An operation to query the status of a targe VNF.
1258 Returns information on each VM, including state (active or standby)
1259 and status (healthy or unhealthy)";
1266 uses action-identifiers;
1271 list query-results {
1273 description "Identifier of a VM";
1278 description "The state of the VM";
1283 description "the status of the VM";
1291 /**********************************************************************************
1292 * Define the Reboot service
1293 **********************************************************************************/
1295 description "An operation to reboot a specified virtual machine (VM)";
1302 uses action-identifiers;
1314 /**********************************************************************************
1315 * Define the VM attach volume service
1316 **********************************************************************************/
1318 description "An operation to attach a cinder volume to a VM";
1325 uses action-identifiers;
1337 /**********************************************************************************
1338 * Define the VM detach volume service
1339 **********************************************************************************/
1341 description "An operation to detach a cinder volume from a VM";
1348 uses action-identifiers;
1360 /**********************************************************************************
1361 * Define the PreConfigure service
1362 **********************************************************************************/
1364 description "An operation to retrieve the current config";
1371 uses action-identifiers;
1387 /**********************************************************************************
1388 * Define the VNF GetConfig service
1389 **********************************************************************************/
1391 description "An operation to retrieve the current running config";
1398 uses action-identifiers;
1414 /**********************************************************************************
1415 * Define the traffic distribution service
1416 **********************************************************************************/
1417 rpc distribute-traffic {
1418 description "An operation to distribute traffic between VMs";
1425 uses action-identifiers;
1437 /**********************************************************************************
1438 * Define the distribute traffic check service
1439 **********************************************************************************/
1440 rpc distribute-traffic-check {
1441 description "An operation to check conditions and the result of DistributeTraffic.";
1448 uses action-identifiers;
1460 /**********************************************************************************
1461 * Define the PreRebuild service
1462 **********************************************************************************/
1464 description "An operation to perform prerequisite steps before a rebuild action";
1471 uses action-identifiers;
1487 /**********************************************************************************
1488 * Define the PostRebuild service
1489 **********************************************************************************/
1491 description "An operation to perform subsequent steps after a rebuild action";
1498 uses action-identifiers;
1514 /**********************************************************************************
1515 * Define the PreEvacuate service
1516 **********************************************************************************/
1518 description "An operation to perform prerequisite steps before an evacuate action";
1525 uses action-identifiers;
1541 /**********************************************************************************
1542 * Define the PostEvacuate service
1543 **********************************************************************************/
1545 description "An operation to perform postevacuate on specified Ansible virtual machine (VM)";
1552 uses action-identifiers;
1568 /**********************************************************************************
1569 * Define the PreMigrate service
1570 **********************************************************************************/
1572 description "An operation to perform premigrate on specified Ansible virtual machine (VM)";
1579 uses action-identifiers;
1595 /**********************************************************************************
1596 * Define the PostMigrate service
1597 **********************************************************************************/
1599 description "An operation to perform postmigrate on specified Ansible virtual machine (VM)";
1606 uses action-identifiers;
1622 /**********************************************************************************
1623 * Define the StartTraffic service
1624 **********************************************************************************/
1626 description "An operation to start a traffic action on specified Ansible virtual machine (VM)";
1633 uses action-identifiers;
1649 /**********************************************************************************
1650 * Define the StatusTraffic service
1651 **********************************************************************************/
1652 rpc status-traffic {
1653 description "An operation to perform status-traffic on specified Ansible virtual machine (VM)";
1660 uses action-identifiers;
1676 /**********************************************************************************
1677 * Define the StopTraffic service
1678 **********************************************************************************/
1680 description "An operation to stop an in-process traffic action";
1687 uses action-identifiers;
1703 /**********************************************************************************
1704 * Define the VNF provisioning service
1705 **********************************************************************************/
1707 description "An vnf operation for provisioning";
1714 uses action-identifiers;
1730 /**********************************************************************************
1731 * Define the VNF LicenseManagement service
1732 **********************************************************************************/
1733 rpc license-management {
1734 description "An vnf operation for provisioning";
1741 uses action-identifiers;
1757 /**********************************************************************************
1758 * Additional RPCs added here...
1759 **********************************************************************************/