2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * =============================================================================
9 * 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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
26 * Yang model for the Application Controller (APP-C) component of ECOMP
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.
33 * The services exposed by this provider are:
36 * Used to request a restart of a virtual network function (a VM).
39 * Used to request a rebuild of a virtual network function (a VM).
46 namespace "org:onap:ccsdk:sli:northbound:lcm";
50 "Defines the services and request/response requirements for the CCSDK LCM component.";
53 * Note, the revision changes the package name of the generated java code. Do not
54 * change the revision unless you also update all references to the bindings.
56 revision "2018-03-29" {
58 "CCSDK LCM interface version 0.2.1";
61 /**********************************************************************************
62 * Data type definitions
64 * The following data type definitions are used to define common data structures,
65 * define constraints, or to impart special meanings to data objects related to the
66 * APP-C controller functions.
67 **********************************************************************************/
70 description "Define a common definition of a time stamp (expressed as a formatted
71 string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ";
74 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";
80 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";
96 enum "SoftwareUpload";
105 enum "ConfigScaleOut";
106 enum "ConfigRestore";
108 enum "ConfigBackupDelete";
110 enum "StopApplication";
111 enum "StartApplication";
112 enum "QuiesceTraffic";
113 enum "ResumeTraffic";
114 enum "DistributeTraffic";
115 enum "UpgradePreCheck";
116 enum "UpgradeSoftware";
119 enum "UpgradePostCheck";
120 enum "UpgradeBackup";
121 enum "UpgradeBackout";
129 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
133 description "The state of a VM";
143 description "The status of a VM";
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 **********************************************************************************/
162 /**********************************************************************************
163 * All requests will include this standard header
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 **********************************************************************************/
171 /**********************************************************************************
172 * All responses will include this standard header
174 * The standard response header includes the time of completion as well as a
175 * success|failure indication
176 **********************************************************************************/
178 grouping common-header {
179 description "A common header for all APP-C requests";
180 container common-header {
181 description "A common header for all APP-C requests";
183 description "timestamp is in ISO 8601 timestamp format ZULU offset";
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)";
193 pattern "[2]\.\d\d" {
194 error-message "API Version 2.XX is supported at this end point";
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)";
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";
218 leaf sub-request-id {
219 description "Uniquely identifies a specific LCM action. It is persistent over
220 the life-cycle of a single request";
226 /**********************************************************************************
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
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 **********************************************************************************/
243 description "Flags are generic flags that apply to any and all commands, all are optional";
249 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
250 or NORMAL (queue other requests until complete)";
258 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
259 locked, transiting, etc.) state";
263 description "<0....N> -Â The timeout value (expressed in seconds) for action
264 execution, between action being received by APPC and action initiation";
273 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
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
298 description "identifies the VF module to which this action is to be applied.";
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";
311 description "identifies a specific VM within the given service/vnf to which
312 this action is to be applied";
317 description "identifies the PNF to which this action is to be applied.";
327 description "The specific response codes are to be aligned with SDC reference doc
328 (main table removed to avoid duplication and digression from main table).
329 See SDC and ECOMP Distribution Consumer Interface Agreement";
331 description "The specific response codes are to be aligned with SDC reference doc
332 (main table removed to avoid duplication and digression from main table).
333 See SDC and ECOMP Distribution Consumer Interface Agreement";
335 description "Response code";
340 description "Response message";
347 typedef lcm-action-status {
354 enum "MULTIPLE_REQUESTS_FOUND";
356 description "The status of the requested LCM action";
359 /**********************************************************************************
360 * Define the restart service
361 **********************************************************************************/
363 description "An operation to restart a virtual network function (or VM)";
370 uses action-identifiers;
382 /**********************************************************************************
383 * Define the rebuild service
384 **********************************************************************************/
386 description "An operation to rebuild a virtual network function (or VM)";
393 uses action-identifiers;
405 /**********************************************************************************
406 * Define the migrate service
407 **********************************************************************************/
409 description "An operation to migrate a virtual network function (or VM)";
416 uses action-identifiers;
428 /**********************************************************************************
429 * Define the evacuate service
430 **********************************************************************************/
432 description "An operation to evacuate a virtual network function (or VM)";
439 uses action-identifiers;
451 /**********************************************************************************
452 * Define the snapshot service
453 **********************************************************************************/
455 description "An operation to create a snapshot of a virtual network function (or VM)";
462 uses action-identifiers;
480 /**********************************************************************************
481 * Define the VNF quiesce traffic service
482 **********************************************************************************/
483 rpc quiesce-traffic {
484 description "An operation to stop traffic gracefully on the VF.
485 It stops traffic gracefully without stopping the application";
492 uses action-identifiers;
504 /**********************************************************************************
505 * Define the VNF resume traffic service
506 **********************************************************************************/
508 description "An operation to resume traffic gracefully on the VF.
509 It resumes traffic gracefully without stopping the application";
516 uses action-identifiers;
528 /**********************************************************************************
529 * Define the VNF distribute traffic service
530 **********************************************************************************/
531 rpc distribute-traffic {
532 description "An operation to distribute traffic gracefully on the VF.
533 It distributes traffic gracefully without stopping the application";
540 uses action-identifiers;
552 /**********************************************************************************
553 * Define the VNF UpgradePreCheck service
554 **********************************************************************************/
555 rpc upgrade-pre-check {
556 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
563 uses action-identifiers;
579 /**********************************************************************************
580 * Define the VNF UpgradeSoftware service
581 **********************************************************************************/
582 rpc upgrade-software {
583 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
590 uses action-identifiers;
602 /**********************************************************************************
603 * Define the downloadNeSw operation
604 **********************************************************************************/
606 description "An operation to download NE software";
613 uses action-identifiers;
629 /**********************************************************************************
630 * Define the activateNeSw operation
631 **********************************************************************************/
633 description "An operation to activate NE software";
640 uses action-identifiers;
656 /**********************************************************************************
657 * Define the VNF UpgradePostCheck service
658 **********************************************************************************/
659 rpc upgrade-post-check {
660 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
667 uses action-identifiers;
683 /**********************************************************************************
684 * Define the VNF UpgradeBackup service
685 **********************************************************************************/
687 description "An operation to do full backup of the VNF data prior to an upgrade.";
694 uses action-identifiers;
706 /**********************************************************************************
707 * Define the VNF UpgradeBackout service
708 **********************************************************************************/
709 rpc upgrade-backout {
710 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
717 uses action-identifiers;
729 /**********************************************************************************
730 * Define the rollback service
731 **********************************************************************************/
733 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
740 uses action-identifiers;
765 /**********************************************************************************
766 * Additional RPCs added here...
767 **********************************************************************************/
770 /**********************************************************************************
771 * Define the sync service
772 **********************************************************************************/
774 description "An operation to sync the configurations of a virtual network function (or VM)";
781 uses action-identifiers;
797 /**********************************************************************************
798 * Define the terminate service
799 **********************************************************************************/
801 description "An operation to terminate the configurations of a virtual network function (or VM)";
808 uses action-identifiers;
822 description "An operation to configure the configurations of a virtual network
830 uses action-identifiers;
847 description "Use the ModifyConfig command when a full configuration cycle is either not required
848 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
849 total configuration data of a VNF. The set of configuration parameters to be affected
850 is a subset of the total configuration data of the target VNF type. The payload Stop
851 Application must contain the configuration parameters to be modified and their values.
852 A successful modify returns a success response. A failed modify returns a failure
853 response and the specific failure messages in the response payload Stop Application";
860 uses action-identifiers;
876 rpc config-scale-out {
877 description "An operation to Modify the configuration or other action to support
878 a ConfigScaleOut of a VNF.";
885 uses action-identifiers;
902 description "An operation to restore the configurations of a virtual network
910 uses action-identifiers;
926 /**********************************************************************************
927 * Define the test service
928 **********************************************************************************/
930 description "An operation to test the configurations of a virtual network function (or VM)";
937 uses action-identifiers;
949 /**********************************************************************************
950 * Define the stop service
951 **********************************************************************************/
953 description "An operation to stop the configurations of a virtual network function (or VM)";
960 uses action-identifiers;
973 description "An operation to start a virtual network function (or VM)";
980 uses action-identifiers;
992 /**********************************************************************************
993 * Define the audit service
994 **********************************************************************************/
996 description "An operation to audit the configurations of a virtual network function (or VM)";
1003 uses action-identifiers;
1019 /**********************************************************************************
1020 * Define the SoftwareUpload vSCP service
1021 **********************************************************************************/
1022 rpc software-upload {
1023 description "An operation to upload a new version of vSCP image to vSCP for updating it";
1030 uses action-identifiers;
1042 /**********************************************************************************
1043 * Define the PreHealthCheck vSCP service
1044 **********************************************************************************/
1046 description "An operation to perform health check of vSCP prior its upgrading";
1053 uses action-identifiers;
1071 /**********************************************************************************
1072 * Define the Upgrade vSCP service
1073 **********************************************************************************/
1075 description "An operation to perform upgrade of vSCP";
1082 uses action-identifiers;
1095 /**********************************************************************************
1096 * Define the VNF lock service
1097 **********************************************************************************/
1099 description "An operation to perform VNF lock operation";
1106 uses action-identifiers;
1118 /**********************************************************************************
1119 * Define the VNF unlock service
1120 **********************************************************************************/
1122 description "An operation to perform VNF unlock operation";
1129 uses action-identifiers;
1141 /**********************************************************************************
1142 * Define the VNF check lock service
1143 **********************************************************************************/
1145 description "An operation to check VNF lock status";
1152 uses action-identifiers;
1162 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1170 description "An operation to Backup configurations of a virtual network function
1178 uses action-identifiers;
1194 rpc config-backup-delete {
1195 description "An operation to Delete backup configurations of a virtual network
1203 uses action-identifiers;
1216 description "An operation to Export configurations of a virtual network function
1224 uses action-identifiers;
1231 rpc stop-application {
1232 description "An operation to Stop Application traffic to a virtual network function";
1239 uses action-identifiers;
1251 /**********************************************************************************
1252 * Define the VNF Start Application service
1253 **********************************************************************************/
1254 rpc start-application {
1255 description "An operation to perform VNF Start Application operation";
1262 uses action-identifiers;
1275 /**********************************************************************************
1276 * Gets the current state of the previously submitted LCM request
1277 **********************************************************************************/
1279 description "An operation to get the current state of the previously submitted LCM request";
1286 uses action-identifiers;
1301 /**********************************************************************************
1302 * Define the VNF Query service
1303 **********************************************************************************/
1305 description "An operation to query the status of a targe VNF.
1306 Returns information on each VM, including state (active or standby)
1307 and status (healthy or unhealthy)";
1314 uses action-identifiers;
1319 list query-results {
1321 description "Identifier of a VM";
1326 description "The state of the VM";
1331 description "the status of the VM";
1339 /**********************************************************************************
1340 * Define the Reboot service
1341 **********************************************************************************/
1343 description "An operation to reboot a specified virtual machine (VM)";
1350 uses action-identifiers;
1362 /**********************************************************************************
1363 * Define the VM attach volume service
1364 **********************************************************************************/
1366 description "An operation to attach a cinder volume to a VM";
1373 uses action-identifiers;
1385 /**********************************************************************************
1386 * Define the VM detach volume service
1387 **********************************************************************************/
1389 description "An operation to detach a cinder volume from a VM";
1396 uses action-identifiers;
1410 /**********************************************************************************
1411 * Additional RPCs added here...
1412 **********************************************************************************/