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 Nokia
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";
141 enum "ConfigScaleIn";
145 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
149 description "The state of a VM";
159 description "The status of a VM";
168 /**********************************************************************************
169 * Basic manipulation of a VNF (or VM) will typically include querying the current
170 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
171 * "state"-type operations, the services require the identification of the VNF to
172 * be operated on, and the region or LCP that contains that resource. This
173 * information is used across all of these services, so it has been defined as a
174 * common structure here and is referenced in the appropriate RPC definitions.
175 **********************************************************************************/
178 /**********************************************************************************
179 * All requests will include this standard header
181 * The standard request header is used to define a correlation identification for
182 * the request that is returned on all responses. This correlation identifier
183 * (called the service-request-id) is meaningful to the caller and is included on
184 * all responses from the services.
185 **********************************************************************************/
187 /**********************************************************************************
188 * All responses will include this standard header
190 * The standard response header includes the time of completion as well as a
191 * success|failure indication
192 **********************************************************************************/
194 grouping common-header {
195 description "A common header for all APP-C requests";
196 container common-header {
197 description "A common header for all APP-C requests";
199 description "timestamp is in ISO 8601 timestamp format ZULU offset";
205 description "api-ver is the API version identifier. A given release of APPC
206 should support all previous versions of APPC API (correlate with
207 general requirements)";
209 pattern "[2]\.\d\d" {
210 error-message "API Version 2.XX is supported at this end point";
217 description "originator-id an identifier of the calling system which can be
218 used addressing purposes, i.e. returning asynchronous response
219 to the proper destination over DMaaP (especially in case of multiple
220 consumers of APP-C APIs)";
226 description "UUID for the request ID. An OSS/BSS identifier for the request
227 that caused the current action. Multiple API calls may be made
228 with the same request-id The request-id shall be recorded throughout
229 the operations on a single request";
234 leaf sub-request-id {
235 description "Uniquely identifies a specific LCM action. It is persistent over
236 the life-cycle of a single request";
242 /**********************************************************************************
243 * Flags are generic flags that apply to any and all commands, all are optional
244 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc)
245 * state. Specific behaviour of forced commands varies, but implies cancellation
246 * of previous command and an override by the new command. The FALSE value is
248 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
249 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
250 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
251 * * Cease accepting additional command requests
252 * * Complete execution of outstanding commands
253 * * Execute the exclusive command to completion
254 * * Optionally report the result of the command
255 * * Optionally resume command acceptance and processing
256 * - NORMAL - Obverse of EXCLUSIVE, the default one.
257 **********************************************************************************/
259 description "Flags are generic flags that apply to any and all commands, all are optional";
265 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
266 or NORMAL (queue other requests until complete)";
274 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
275 locked, transiting, etc.) state";
279 description "<0....N> -Â The timeout value (expressed in seconds) for action
280 execution, between action being received by APPC and action initiation";
289 grouping 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 container action-identifiers {
293 description "A block containing the action arguments. These are used to specify
294 the object upon which APP-C LCM command is to operate";
295 leaf service-instance-id {
296 description "identifies a specific service the command refers to. When multiple
297 APP-C instances are used and applied to a subset of services,
298 this will become significant . The field is mandatory when the
304 description "identifies the VNF to which this action is to be applied(vnf-id
305 uniquely identifies the service-instance referred to). Note that
306 some actions are applied to multiple VNFs in the same service.
307 When this is the case, vnf-id may be left out, but service-instance-id
308 must appear. The field is mandatory when service-instance-id is
314 description "identifies the VF module to which this action is to be applied.";
319 description "identifies the VNFC to which this action is to be applied. Some
320 actions apply only to a component within a VNF (e.g. RESTART is
321 sometimes applied to on VM only). In such a case, the name of
322 the VNFC is used to search for the component within the VNF";
327 description "identifies a specific VM within the given service/vnf to which
328 this action is to be applied";
337 description "The specific response codes are to be aligned with SDC reference doc
338 (main table removed to avoid duplication and digression from main table).
339 See SDC and ECOMP Distribution Consumer Interface Agreement";
341 description "The specific response codes are to be aligned with SDC reference doc
342 (main table removed to avoid duplication and digression from main table).
343 See SDC and ECOMP Distribution Consumer Interface Agreement";
345 description "Response code";
350 description "Response message";
357 typedef lcm-action-status {
364 enum "MULTIPLE_REQUESTS_FOUND";
366 description "The status of the requested LCM action";
369 /**********************************************************************************
370 * Define the restart service
371 **********************************************************************************/
373 description "An operation to restart a virtual network function (or VM)";
380 uses action-identifiers;
392 /**********************************************************************************
393 * Define the rebuild service
394 **********************************************************************************/
396 description "An operation to rebuild a virtual network function (or VM)";
403 uses action-identifiers;
415 /**********************************************************************************
416 * Define the migrate service
417 **********************************************************************************/
419 description "An operation to migrate a virtual network function (or VM)";
426 uses action-identifiers;
438 /**********************************************************************************
439 * Define the evacuate service
440 **********************************************************************************/
442 description "An operation to evacuate a virtual network function (or VM)";
449 uses action-identifiers;
461 /**********************************************************************************
462 * Define the snapshot service
463 **********************************************************************************/
465 description "An operation to create a snapshot of a virtual network function (or VM)";
472 uses action-identifiers;
490 /**********************************************************************************
491 * Define the VNF quiesce traffic service
492 **********************************************************************************/
493 rpc quiesce-traffic {
494 description "An operation to stop traffic gracefully on the VF.
495 It stops traffic gracefully without stopping the application";
502 uses action-identifiers;
518 /**********************************************************************************
519 * Define the VNF resume traffic service
520 **********************************************************************************/
522 description "An operation to resume traffic gracefully on the VF.
523 It resumes traffic gracefully without stopping the application";
530 uses action-identifiers;
546 /**********************************************************************************
547 * Define the VNF UpgradePreCheck service
548 **********************************************************************************/
549 rpc upgrade-pre-check {
550 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
557 uses action-identifiers;
573 /**********************************************************************************
574 * Define the VNF UpgradeSoftware service
575 **********************************************************************************/
576 rpc upgrade-software {
577 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
584 uses action-identifiers;
600 /**********************************************************************************
601 * Define the VNF UpgradePostCheck service
602 **********************************************************************************/
603 rpc upgrade-post-check {
604 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
611 uses action-identifiers;
627 /**********************************************************************************
628 * Define the VNF UpgradeBackup service
629 **********************************************************************************/
631 description "An operation to do full backup of the VNF data prior to an upgrade.";
638 uses action-identifiers;
654 /**********************************************************************************
655 * Define the VNF UpgradeBackout service
656 **********************************************************************************/
657 rpc upgrade-backout {
658 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
665 uses action-identifiers;
681 /**********************************************************************************
682 * Define the rollback service
683 **********************************************************************************/
685 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
692 uses action-identifiers;
717 /**********************************************************************************
718 * Additional RPCs added here...
719 **********************************************************************************/
722 /**********************************************************************************
723 * Define the sync service
724 **********************************************************************************/
726 description "An operation to sync the configurations of a virtual network function (or VM)";
733 uses action-identifiers;
749 /**********************************************************************************
750 * Define the terminate service
751 **********************************************************************************/
753 description "An operation to terminate the configurations of a virtual network function (or VM)";
760 uses action-identifiers;
774 description "An operation to configure the configurations of a virtual network
782 uses action-identifiers;
799 description "Use the ModifyConfig command when a full configuration cycle is either not required
800 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
801 total configuration data of a VNF. The set of configuration parameters to be affected
802 is a subset of the total configuration data of the target VNF type. The payload Stop
803 Application must contain the configuration parameters to be modified and their values.
804 A successful modify returns a success response. A failed modify returns a failure
805 response and the specific failure messages in the response payload Stop Application";
812 uses action-identifiers;
828 rpc config-scale-out {
829 description "An operation to Modify the configuration or other action to support
830 a ConfigScaleOut of a VNF.";
837 uses action-identifiers;
854 description "An operation to restore the configurations of a virtual network
862 uses action-identifiers;
878 /**********************************************************************************
879 * Define the test service
880 **********************************************************************************/
882 description "An operation to test the configurations of a virtual network function (or VM)";
889 uses action-identifiers;
901 /**********************************************************************************
902 * Define the stop service
903 **********************************************************************************/
905 description "An operation to stop the configurations of a virtual network function (or VM)";
912 uses action-identifiers;
925 description "An operation to start a virtual network function (or VM)";
932 uses action-identifiers;
944 /**********************************************************************************
945 * Define the audit service
946 **********************************************************************************/
948 description "An operation to audit the configurations of a virtual network function (or VM)";
955 uses action-identifiers;
971 /**********************************************************************************
972 * Define the SoftwareUpload vSCP service
973 **********************************************************************************/
974 rpc software-upload {
975 description "An operation to upload a new version of vSCP image to vSCP for updating it";
982 uses action-identifiers;
994 /**********************************************************************************
995 * Define the PreHealthCheck vSCP service
996 **********************************************************************************/
998 description "An operation to perform health check of vSCP prior its upgrading";
1005 uses action-identifiers;
1022 /**********************************************************************************
1023 * Define the Upgrade vSCP service
1024 **********************************************************************************/
1026 description "An operation to perform upgrade of vSCP";
1033 uses action-identifiers;
1046 /**********************************************************************************
1047 * Define the VNF lock service
1048 **********************************************************************************/
1050 description "An operation to perform VNF lock operation";
1057 uses action-identifiers;
1069 /**********************************************************************************
1070 * Define the VNF unlock service
1071 **********************************************************************************/
1073 description "An operation to perform VNF unlock operation";
1080 uses action-identifiers;
1092 /**********************************************************************************
1093 * Define the VNF check lock service
1094 **********************************************************************************/
1096 description "An operation to check VNF lock status";
1103 uses action-identifiers;
1113 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1121 description "An operation to Backup configurations of a virtual network function
1129 uses action-identifiers;
1145 rpc config-backup-delete {
1146 description "An operation to Delete backup configurations of a virtual network
1154 uses action-identifiers;
1167 description "An operation to Export configurations of a virtual network function
1175 uses action-identifiers;
1182 rpc stop-application {
1183 description "An operation to Stop Application traffic to a virtual network function";
1190 uses action-identifiers;
1206 /**********************************************************************************
1207 * Define the VNF Start Application service
1208 **********************************************************************************/
1209 rpc start-application {
1210 description "An operation to perform VNF Start Application operation";
1217 uses action-identifiers;
1234 /**********************************************************************************
1235 * Gets the current state of the previously submitted LCM request
1236 **********************************************************************************/
1238 description "An operation to get the current state of the previously submitted LCM request";
1245 uses action-identifiers;
1260 /**********************************************************************************
1261 * Define the VNF Query service
1262 **********************************************************************************/
1264 description "An operation to query the status of a targe VNF.
1265 Returns information on each VM, including state (active or standby)
1266 and status (healthy or unhealthy)";
1273 uses action-identifiers;
1278 list query-results {
1280 description "Identifier of a VM";
1285 description "The state of the VM";
1290 description "the status of the VM";
1298 /**********************************************************************************
1299 * Define the Reboot service
1300 **********************************************************************************/
1302 description "An operation to reboot a specified virtual machine (VM)";
1309 uses action-identifiers;
1321 /**********************************************************************************
1322 * Define the VM attach volume service
1323 **********************************************************************************/
1325 description "An operation to attach a cinder volume to a VM";
1332 uses action-identifiers;
1344 /**********************************************************************************
1345 * Define the VM detach volume service
1346 **********************************************************************************/
1348 description "An operation to detach a cinder volume from a VM";
1355 uses action-identifiers;
1367 /**********************************************************************************
1368 * Define the PreConfigure service
1369 **********************************************************************************/
1371 description "An operation to retrieve the current config";
1378 uses action-identifiers;
1394 /**********************************************************************************
1395 * Define the VNF GetConfig service
1396 **********************************************************************************/
1398 description "An operation to retrieve the current running config";
1405 uses action-identifiers;
1421 /**********************************************************************************
1422 * Define the traffic distribution service
1423 **********************************************************************************/
1424 rpc distribute-traffic {
1425 description "An operation to distribute traffic between VMs";
1432 uses action-identifiers;
1444 /**********************************************************************************
1445 * Define the distribute traffic check service
1446 **********************************************************************************/
1447 rpc distribute-traffic-check {
1448 description "An operation to check conditions and the result of DistributeTraffic.";
1455 uses action-identifiers;
1467 /**********************************************************************************
1468 * Define the PreRebuild service
1469 **********************************************************************************/
1471 description "An operation to perform prerequisite steps before a rebuild action";
1478 uses action-identifiers;
1494 /**********************************************************************************
1495 * Define the PostRebuild service
1496 **********************************************************************************/
1498 description "An operation to perform subsequent steps after a rebuild action";
1505 uses action-identifiers;
1521 /**********************************************************************************
1522 * Define the PreEvacuate service
1523 **********************************************************************************/
1525 description "An operation to perform prerequisite steps before an evacuate action";
1532 uses action-identifiers;
1548 /**********************************************************************************
1549 * Define the PostEvacuate service
1550 **********************************************************************************/
1552 description "An operation to perform postevacuate on specified Ansible virtual machine (VM)";
1559 uses action-identifiers;
1575 /**********************************************************************************
1576 * Define the PreMigrate service
1577 **********************************************************************************/
1579 description "An operation to perform premigrate on specified Ansible virtual machine (VM)";
1586 uses action-identifiers;
1602 /**********************************************************************************
1603 * Define the PostMigrate service
1604 **********************************************************************************/
1606 description "An operation to perform postmigrate on specified Ansible virtual machine (VM)";
1613 uses action-identifiers;
1629 /**********************************************************************************
1630 * Define the StartTraffic service
1631 **********************************************************************************/
1633 description "An operation to start a traffic action on specified Ansible virtual machine (VM)";
1640 uses action-identifiers;
1656 /**********************************************************************************
1657 * Define the StatusTraffic service
1658 **********************************************************************************/
1659 rpc status-traffic {
1660 description "An operation to perform status-traffic on specified Ansible virtual machine (VM)";
1667 uses action-identifiers;
1683 /**********************************************************************************
1684 * Define the StopTraffic service
1685 **********************************************************************************/
1687 description "An operation to stop an in-process traffic action";
1694 uses action-identifiers;
1710 /**********************************************************************************
1711 * Define the VNF provisioning service
1712 **********************************************************************************/
1714 description "An vnf operation for provisioning";
1721 uses action-identifiers;
1737 /**********************************************************************************
1738 * Define the VNF LicenseManagement service
1739 **********************************************************************************/
1740 rpc license-management {
1741 description "An vnf operation for provisioning";
1748 uses action-identifiers;
1764 /**********************************************************************************
1765 * Define the VNF ConfigScaleIn service
1766 **********************************************************************************/
1767 rpc config-scale-in {
1768 description "An operation to Modify the configuration or other action to support
1769 a ConfigScaleIn of a VNF.";
1776 uses action-identifiers;
1792 /**********************************************************************************
1793 * Define the downloadNESw operation
1794 **********************************************************************************/
1795 rpc download-n-e-sw {
1796 description "An operation to download NE software";
1803 uses action-identifiers;
1819 /**********************************************************************************
1820 * Define the activateNESw operation
1821 **********************************************************************************/
1822 rpc activate-n-e-sw {
1823 description "An operation to activate NE software";
1830 uses action-identifiers;
1846 /**********************************************************************************
1847 * Additional RPCs added here...
1848 **********************************************************************************/