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";
241 leaf x-onap-requestorid {
242 description "This is the user who initiated the LCM action. The content of the
243 header should be in the format of attuid@domain or mechid@domain.
244 If id or domain is missing, return an error. This parameter is
245 mandatory for v2.01 and optional for v2.00. The Yang model has it as
246 optional and software makes determination";
252 /**********************************************************************************
253 * Flags are generic flags that apply to any and all commands, all are optional
254 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc)
255 * state. Specific behaviour of forced commands varies, but implies cancellation
256 * of previous command and an override by the new command. The FALSE value is
258 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
259 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
260 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
261 * * Cease accepting additional command requests
262 * * Complete execution of outstanding commands
263 * * Execute the exclusive command to completion
264 * * Optionally report the result of the command
265 * * Optionally resume command acceptance and processing
266 * - NORMAL - Obverse of EXCLUSIVE, the default one.
267 **********************************************************************************/
269 description "Flags are generic flags that apply to any and all commands, all are optional";
275 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
276 or NORMAL (queue other requests until complete)";
284 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
285 locked, transiting, etc.) state";
289 description "<0....N> -Â The timeout value (expressed in seconds) for action
290 execution, between action being received by APPC and action initiation";
299 grouping action-identifiers {
300 description "A block containing the action arguments. These are used to specify
301 the object upon which APP-C LCM command is to operate";
302 container action-identifiers {
303 description "A block containing the action arguments. These are used to specify
304 the object upon which APP-C LCM command is to operate";
305 leaf service-instance-id {
306 description "identifies a specific service the command refers to. When multiple
307 APP-C instances are used and applied to a subset of services,
308 this will become significant . The field is mandatory when the
314 description "identifies the VNF to which this action is to be applied(vnf-id
315 uniquely identifies the service-instance referred to). Note that
316 some actions are applied to multiple VNFs in the same service.
317 When this is the case, vnf-id may be left out, but service-instance-id
318 must appear. The field is mandatory when service-instance-id is
324 description "identifies the VF module to which this action is to be applied.";
329 description "identifies the VNFC to which this action is to be applied. Some
330 actions apply only to a component within a VNF (e.g. RESTART is
331 sometimes applied to on VM only). In such a case, the name of
332 the VNFC is used to search for the component within the VNF";
337 description "identifies a specific VM within the given service/vnf to which
338 this action is to be applied";
347 description "The specific response codes are to be aligned with SDC reference doc
348 (main table removed to avoid duplication and digression from main table).
349 See SDC and ECOMP Distribution Consumer Interface Agreement";
351 description "The specific response codes are to be aligned with SDC reference doc
352 (main table removed to avoid duplication and digression from main table).
353 See SDC and ECOMP Distribution Consumer Interface Agreement";
355 description "Response code";
360 description "Response message";
367 typedef lcm-action-status {
374 enum "MULTIPLE_REQUESTS_FOUND";
376 description "The status of the requested LCM action";
379 /**********************************************************************************
380 * Define the restart service
381 **********************************************************************************/
383 description "An operation to restart a virtual network function (or VM)";
390 uses action-identifiers;
402 /**********************************************************************************
403 * Define the rebuild service
404 **********************************************************************************/
406 description "An operation to rebuild a virtual network function (or VM)";
413 uses action-identifiers;
425 /**********************************************************************************
426 * Define the migrate service
427 **********************************************************************************/
429 description "An operation to migrate a virtual network function (or VM)";
436 uses action-identifiers;
448 /**********************************************************************************
449 * Define the evacuate service
450 **********************************************************************************/
452 description "An operation to evacuate a virtual network function (or VM)";
459 uses action-identifiers;
471 /**********************************************************************************
472 * Define the snapshot service
473 **********************************************************************************/
475 description "An operation to create a snapshot of a virtual network function (or VM)";
482 uses action-identifiers;
500 /**********************************************************************************
501 * Define the VNF quiesce traffic service
502 **********************************************************************************/
503 rpc quiesce-traffic {
504 description "An operation to stop traffic gracefully on the VF.
505 It stops traffic gracefully without stopping the application";
512 uses action-identifiers;
528 /**********************************************************************************
529 * Define the VNF resume traffic service
530 **********************************************************************************/
532 description "An operation to resume traffic gracefully on the VF.
533 It resumes traffic gracefully without stopping the application";
540 uses action-identifiers;
556 /**********************************************************************************
557 * Define the VNF UpgradePreCheck service
558 **********************************************************************************/
559 rpc upgrade-pre-check {
560 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
567 uses action-identifiers;
583 /**********************************************************************************
584 * Define the VNF UpgradeSoftware service
585 **********************************************************************************/
586 rpc upgrade-software {
587 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
594 uses action-identifiers;
610 /**********************************************************************************
611 * Define the VNF UpgradePostCheck service
612 **********************************************************************************/
613 rpc upgrade-post-check {
614 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
621 uses action-identifiers;
637 /**********************************************************************************
638 * Define the VNF UpgradeBackup service
639 **********************************************************************************/
641 description "An operation to do full backup of the VNF data prior to an upgrade.";
648 uses action-identifiers;
664 /**********************************************************************************
665 * Define the VNF UpgradeBackout service
666 **********************************************************************************/
667 rpc upgrade-backout {
668 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
675 uses action-identifiers;
691 /**********************************************************************************
692 * Define the rollback service
693 **********************************************************************************/
695 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
702 uses action-identifiers;
727 /**********************************************************************************
728 * Additional RPCs added here...
729 **********************************************************************************/
732 /**********************************************************************************
733 * Define the sync service
734 **********************************************************************************/
736 description "An operation to sync the configurations of a virtual network function (or VM)";
743 uses action-identifiers;
759 /**********************************************************************************
760 * Define the terminate service
761 **********************************************************************************/
763 description "An operation to terminate the configurations of a virtual network function (or VM)";
770 uses action-identifiers;
784 description "An operation to configure the configurations of a virtual network
792 uses action-identifiers;
809 description "Use the ModifyConfig command when a full configuration cycle is either not required
810 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
811 total configuration data of a VNF. The set of configuration parameters to be affected
812 is a subset of the total configuration data of the target VNF type. The payload Stop
813 Application must contain the configuration parameters to be modified and their values.
814 A successful modify returns a success response. A failed modify returns a failure
815 response and the specific failure messages in the response payload Stop Application";
822 uses action-identifiers;
838 rpc config-scale-out {
839 description "An operation to Modify the configuration or other action to support
840 a ConfigScaleOut of a VNF.";
847 uses action-identifiers;
864 description "An operation to restore the configurations of a virtual network
872 uses action-identifiers;
888 /**********************************************************************************
889 * Define the test service
890 **********************************************************************************/
892 description "An operation to test the configurations of a virtual network function (or VM)";
899 uses action-identifiers;
911 /**********************************************************************************
912 * Define the stop service
913 **********************************************************************************/
915 description "An operation to stop the configurations of a virtual network function (or VM)";
922 uses action-identifiers;
935 description "An operation to start a virtual network function (or VM)";
942 uses action-identifiers;
954 /**********************************************************************************
955 * Define the audit service
956 **********************************************************************************/
958 description "An operation to audit the configurations of a virtual network function (or VM)";
965 uses action-identifiers;
981 /**********************************************************************************
982 * Define the SoftwareUpload vSCP service
983 **********************************************************************************/
984 rpc software-upload {
985 description "An operation to upload a new version of vSCP image to vSCP for updating it";
992 uses action-identifiers;
1004 /**********************************************************************************
1005 * Define the PreHealthCheck vSCP service
1006 **********************************************************************************/
1008 description "An operation to perform health check of vSCP prior its upgrading";
1015 uses action-identifiers;
1032 /**********************************************************************************
1033 * Define the Upgrade vSCP service
1034 **********************************************************************************/
1036 description "An operation to perform upgrade of vSCP";
1043 uses action-identifiers;
1056 /**********************************************************************************
1057 * Define the VNF lock service
1058 **********************************************************************************/
1060 description "An operation to perform VNF lock operation";
1067 uses action-identifiers;
1079 /**********************************************************************************
1080 * Define the VNF unlock service
1081 **********************************************************************************/
1083 description "An operation to perform VNF unlock operation";
1090 uses action-identifiers;
1102 /**********************************************************************************
1103 * Define the VNF check lock service
1104 **********************************************************************************/
1106 description "An operation to check VNF lock status";
1113 uses action-identifiers;
1123 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1131 description "An operation to Backup configurations of a virtual network function
1139 uses action-identifiers;
1155 rpc config-backup-delete {
1156 description "An operation to Delete backup configurations of a virtual network
1164 uses action-identifiers;
1177 description "An operation to Export configurations of a virtual network function
1185 uses action-identifiers;
1192 rpc stop-application {
1193 description "An operation to Stop Application traffic to a virtual network function";
1200 uses action-identifiers;
1216 /**********************************************************************************
1217 * Define the VNF Start Application service
1218 **********************************************************************************/
1219 rpc start-application {
1220 description "An operation to perform VNF Start Application operation";
1227 uses action-identifiers;
1244 /**********************************************************************************
1245 * Gets the current state of the previously submitted LCM request
1246 **********************************************************************************/
1248 description "An operation to get the current state of the previously submitted LCM request";
1255 uses action-identifiers;
1270 /**********************************************************************************
1271 * Define the VNF Query service
1272 **********************************************************************************/
1274 description "An operation to query the status of a targe VNF.
1275 Returns information on each VM, including state (active or standby)
1276 and status (healthy or unhealthy)";
1283 uses action-identifiers;
1288 list query-results {
1290 description "Identifier of a VM";
1295 description "The state of the VM";
1300 description "the status of the VM";
1308 /**********************************************************************************
1309 * Define the Reboot service
1310 **********************************************************************************/
1312 description "An operation to reboot a specified virtual machine (VM)";
1319 uses action-identifiers;
1331 /**********************************************************************************
1332 * Define the VM attach volume service
1333 **********************************************************************************/
1335 description "An operation to attach a cinder volume to a VM";
1342 uses action-identifiers;
1354 /**********************************************************************************
1355 * Define the VM detach volume service
1356 **********************************************************************************/
1358 description "An operation to detach a cinder volume from a VM";
1365 uses action-identifiers;
1377 /**********************************************************************************
1378 * Define the PreConfigure service
1379 **********************************************************************************/
1381 description "An operation to retrieve the current config";
1388 uses action-identifiers;
1404 /**********************************************************************************
1405 * Define the VNF GetConfig service
1406 **********************************************************************************/
1408 description "An operation to retrieve the current running config";
1415 uses action-identifiers;
1431 /**********************************************************************************
1432 * Define the traffic distribution service
1433 **********************************************************************************/
1434 rpc distribute-traffic {
1435 description "An operation to distribute traffic between VMs";
1442 uses action-identifiers;
1454 /**********************************************************************************
1455 * Define the distribute traffic check service
1456 **********************************************************************************/
1457 rpc distribute-traffic-check {
1458 description "An operation to check conditions and the result of DistributeTraffic.";
1465 uses action-identifiers;
1477 /**********************************************************************************
1478 * Define the PreRebuild service
1479 **********************************************************************************/
1481 description "An operation to perform prerequisite steps before a rebuild action";
1488 uses action-identifiers;
1504 /**********************************************************************************
1505 * Define the PostRebuild service
1506 **********************************************************************************/
1508 description "An operation to perform subsequent steps after a rebuild action";
1515 uses action-identifiers;
1531 /**********************************************************************************
1532 * Define the PreEvacuate service
1533 **********************************************************************************/
1535 description "An operation to perform prerequisite steps before an evacuate action";
1542 uses action-identifiers;
1558 /**********************************************************************************
1559 * Define the PostEvacuate service
1560 **********************************************************************************/
1562 description "An operation to perform postevacuate on specified Ansible virtual machine (VM)";
1569 uses action-identifiers;
1585 /**********************************************************************************
1586 * Define the PreMigrate service
1587 **********************************************************************************/
1589 description "An operation to perform premigrate on specified Ansible virtual machine (VM)";
1596 uses action-identifiers;
1612 /**********************************************************************************
1613 * Define the PostMigrate service
1614 **********************************************************************************/
1616 description "An operation to perform postmigrate on specified Ansible virtual machine (VM)";
1623 uses action-identifiers;
1639 /**********************************************************************************
1640 * Define the StartTraffic service
1641 **********************************************************************************/
1643 description "An operation to start a traffic action on specified Ansible virtual machine (VM)";
1650 uses action-identifiers;
1666 /**********************************************************************************
1667 * Define the StatusTraffic service
1668 **********************************************************************************/
1669 rpc status-traffic {
1670 description "An operation to perform status-traffic on specified Ansible virtual machine (VM)";
1677 uses action-identifiers;
1693 /**********************************************************************************
1694 * Define the StopTraffic service
1695 **********************************************************************************/
1697 description "An operation to stop an in-process traffic action";
1704 uses action-identifiers;
1720 /**********************************************************************************
1721 * Define the VNF provisioning service
1722 **********************************************************************************/
1724 description "An vnf operation for provisioning";
1731 uses action-identifiers;
1747 /**********************************************************************************
1748 * Define the VNF LicenseManagement service
1749 **********************************************************************************/
1750 rpc license-management {
1751 description "An vnf operation for provisioning";
1758 uses action-identifiers;
1774 /**********************************************************************************
1775 * Define the VNF ConfigScaleIn service
1776 **********************************************************************************/
1777 rpc config-scale-in {
1778 description "An operation to Modify the configuration or other action to support
1779 a ConfigScaleIn of a VNF.";
1786 uses action-identifiers;
1802 /**********************************************************************************
1803 * Define the downloadNESw operation
1804 **********************************************************************************/
1805 rpc download-n-e-sw {
1806 description "An operation to download NE software";
1813 uses action-identifiers;
1829 /**********************************************************************************
1830 * Define the activateNESw operation
1831 **********************************************************************************/
1832 rpc activate-n-e-sw {
1833 description "An operation to activate NE software";
1840 uses action-identifiers;
1856 /**********************************************************************************
1857 * Additional RPCs added here...
1858 **********************************************************************************/