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).
43 module appc-provider-lcm {
46 namespace "org:onap:appc:lcm";
47 prefix appc-provider-lcm;
50 "Defines the services and request/response requirements for the ECOMP APP-C 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 "2016-01-08" {
58 "APP-C interface version 1.0.48";
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 "UpgradePreCheck";
115 enum "UpgradeSoftware";
116 enum "UpgradePostCheck";
117 enum "UpgradeBackup";
118 enum "UpgradeBackout";
126 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
130 description "The state of a VM";
140 description "The status of a VM";
149 /**********************************************************************************
150 * Basic manipulation of a VNF (or VM) will typically include querying the current
151 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
152 * "state"-type operations, the services require the identification of the VNF to
153 * be operated on, and the region or LCP that contains that resource. This
154 * information is used across all of these services, so it has been defined as a
155 * common structure here and is referenced in the appropriate RPC definitions.
156 **********************************************************************************/
159 /**********************************************************************************
160 * All requests will include this standard header
162 * The standard request header is used to define a correlation identification for
163 * the request that is returned on all responses. This correlation identifier
164 * (called the service-request-id) is meaningful to the caller and is included on
165 * all responses from the services.
166 **********************************************************************************/
168 /**********************************************************************************
169 * All responses will include this standard header
171 * The standard response header includes the time of completion as well as a
172 * success|failure indication
173 **********************************************************************************/
175 grouping common-header {
176 description "A common header for all APP-C requests";
177 container common-header {
178 description "A common header for all APP-C requests";
180 description "timestamp is in ISO 8601 timestamp format ZULU offset";
186 description "api-ver is the API version identifier. A given release of APPC
187 should support all previous versions of APPC API (correlate with
188 general requirements)";
190 pattern "[2]\.\d\d" {
191 error-message "API Version 2.XX is supported at this end point";
198 description "originator-id an identifier of the calling system which can be
199 used addressing purposes, i.e. returning asynchronous response
200 to the proper destination over DMaaP (especially in case of multiple
201 consumers of APP-C APIs)";
207 description "UUID for the request ID. An OSS/BSS identifier for the request
208 that caused the current action. Multiple API calls may be made
209 with the same request-id The request-id shall be recorded throughout
210 the operations on a single request";
215 leaf sub-request-id {
216 description "Uniquely identifies a specific LCM action. It is persistent over
217 the life-cycle of a single request";
223 /**********************************************************************************
224 * Flags are generic flags that apply to any and all commands, all are optional
225 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc)
226 * state. Specific behaviour of forced commands varies, but implies cancellation
227 * of previous command and an override by the new command. The FALSE value is
229 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
230 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
231 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
232 * * Cease accepting additional command requests
233 * * Complete execution of outstanding commands
234 * * Execute the exclusive command to completion
235 * * Optionally report the result of the command
236 * * Optionally resume command acceptance and processing
237 * - NORMAL - Obverse of EXCLUSIVE, the default one.
238 **********************************************************************************/
240 description "Flags are generic flags that apply to any and all commands, all are optional";
246 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
247 or NORMAL (queue other requests until complete)";
255 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
256 locked, transiting, etc.) state";
260 description "<0....N> -Â The timeout value (expressed in seconds) for action
261 execution, between action being received by APPC and action initiation";
270 grouping action-identifiers {
271 description "A block containing the action arguments. These are used to specify
272 the object upon which APP-C LCM command is to operate";
273 container 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 leaf service-instance-id {
277 description "identifies a specific service the command refers to. When multiple
278 APP-C instances are used and applied to a subset of services,
279 this will become significant . The field is mandatory when the
285 description "identifies the VNF to which this action is to be applied(vnf-id
286 uniquely identifies the service-instance referred to). Note that
287 some actions are applied to multiple VNFs in the same service.
288 When this is the case, vnf-id may be left out, but service-instance-id
289 must appear. The field is mandatory when service-instance-id is
295 description "identifies the VF module to which this action is to be applied.";
300 description "identifies the VNFC to which this action is to be applied. Some
301 actions apply only to a component within a VNF (e.g. RESTART is
302 sometimes applied to on VM only). In such a case, the name of
303 the VNFC is used to search for the component within the VNF";
308 description "identifies a specific VM within the given service/vnf to which
309 this action is to be applied";
318 description "The specific response codes are to be aligned with SDC reference doc
319 (main table removed to avoid duplication and digression from main table).
320 See SDC and ECOMP Distribution Consumer Interface Agreement";
322 description "The specific response codes are to be aligned with SDC reference doc
323 (main table removed to avoid duplication and digression from main table).
324 See SDC and ECOMP Distribution Consumer Interface Agreement";
326 description "Response code";
331 description "Response message";
338 typedef lcm-action-status {
345 enum "MULTIPLE_REQUESTS_FOUND";
347 description "The status of the requested LCM action";
350 /**********************************************************************************
351 * Define the restart service
352 **********************************************************************************/
354 description "An operation to restart a virtual network function (or VM)";
361 uses action-identifiers;
373 /**********************************************************************************
374 * Define the rebuild service
375 **********************************************************************************/
377 description "An operation to rebuild a virtual network function (or VM)";
384 uses action-identifiers;
396 /**********************************************************************************
397 * Define the migrate service
398 **********************************************************************************/
400 description "An operation to migrate a virtual network function (or VM)";
407 uses action-identifiers;
419 /**********************************************************************************
420 * Define the evacuate service
421 **********************************************************************************/
423 description "An operation to evacuate a virtual network function (or VM)";
430 uses action-identifiers;
442 /**********************************************************************************
443 * Define the snapshot service
444 **********************************************************************************/
446 description "An operation to create a snapshot of a virtual network function (or VM)";
453 uses action-identifiers;
471 /**********************************************************************************
472 * Define the VNF quiesce traffic service
473 **********************************************************************************/
474 rpc quiesce-traffic {
475 description "An operation to stop traffic gracefully on the VF.
476 It stops traffic gracefully without stopping the application";
483 uses action-identifiers;
495 /**********************************************************************************
496 * Define the VNF resume traffic service
497 **********************************************************************************/
499 description "An operation to resume traffic gracefully on the VF.
500 It resumes traffic gracefully without stopping the application";
507 uses action-identifiers;
519 /**********************************************************************************
520 * Define the VNF UpgradePreCheck service
521 **********************************************************************************/
522 rpc upgrade-pre-check {
523 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
530 uses action-identifiers;
546 /**********************************************************************************
547 * Define the VNF UpgradeSoftware service
548 **********************************************************************************/
549 rpc upgrade-software {
550 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
557 uses action-identifiers;
569 /**********************************************************************************
570 * Define the VNF UpgradePostCheck service
571 **********************************************************************************/
572 rpc upgrade-post-check {
573 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
580 uses action-identifiers;
596 /**********************************************************************************
597 * Define the VNF UpgradeBackup service
598 **********************************************************************************/
600 description "An operation to do full backup of the VNF data prior to an upgrade.";
607 uses action-identifiers;
619 /**********************************************************************************
620 * Define the VNF UpgradeBackout service
621 **********************************************************************************/
622 rpc upgrade-backout {
623 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
630 uses action-identifiers;
642 /**********************************************************************************
643 * Define the rollback service
644 **********************************************************************************/
646 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
653 uses action-identifiers;
674 /**********************************************************************************
675 * Additional RPCs added here...
676 **********************************************************************************/
679 /**********************************************************************************
680 * Define the sync service
681 **********************************************************************************/
683 description "An operation to sync the configurations of a virtual network function (or VM)";
690 uses action-identifiers;
706 /**********************************************************************************
707 * Define the terminate service
708 **********************************************************************************/
710 description "An operation to terminate the configurations of a virtual network function (or VM)";
717 uses action-identifiers;
731 description "An operation to configure the configurations of a virtual network
739 uses action-identifiers;
756 description "Use the ModifyConfig command when a full configuration cycle is either not required
757 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
758 total configuration data of a VNF. The set of configuration parameters to be affected
759 is a subset of the total configuration data of the target VNF type. The payload Stop
760 Application must contain the configuration parameters to be modified and their values.
761 A successful modify returns a success response. A failed modify returns a failure
762 response and the specific failure messages in the response payload Stop Application";
769 uses action-identifiers;
785 rpc config-scale-out {
786 description "An operation to Modify the configuration or other action to support
787 a ConfigScaleOut of a VNF.";
794 uses action-identifiers;
811 description "An operation to restore the configurations of a virtual network
819 uses action-identifiers;
835 /**********************************************************************************
836 * Define the test service
837 **********************************************************************************/
839 description "An operation to test the configurations of a virtual network function (or VM)";
846 uses action-identifiers;
858 /**********************************************************************************
859 * Define the stop service
860 **********************************************************************************/
862 description "An operation to stop the configurations of a virtual network function (or VM)";
869 uses action-identifiers;
882 description "An operation to start a virtual network function (or VM)";
889 uses action-identifiers;
901 /**********************************************************************************
902 * Define the audit service
903 **********************************************************************************/
905 description "An operation to audit the configurations of a virtual network function (or VM)";
912 uses action-identifiers;
928 /**********************************************************************************
929 * Define the SoftwareUpload vSCP service
930 **********************************************************************************/
931 rpc software-upload {
932 description "An operation to upload a new version of vSCP image to vSCP for updating it";
939 uses action-identifiers;
951 /**********************************************************************************
952 * Define the PreHealthCheck vSCP service
953 **********************************************************************************/
955 description "An operation to perform health check of vSCP prior its upgrading";
962 uses action-identifiers;
980 /**********************************************************************************
981 * Define the Upgrade vSCP service
982 **********************************************************************************/
984 description "An operation to perform upgrade of vSCP";
991 uses action-identifiers;
1004 /**********************************************************************************
1005 * Define the VNF lock service
1006 **********************************************************************************/
1008 description "An operation to perform VNF lock operation";
1015 uses action-identifiers;
1027 /**********************************************************************************
1028 * Define the VNF unlock service
1029 **********************************************************************************/
1031 description "An operation to perform VNF unlock operation";
1038 uses action-identifiers;
1050 /**********************************************************************************
1051 * Define the VNF check lock service
1052 **********************************************************************************/
1054 description "An operation to check VNF lock status";
1061 uses action-identifiers;
1071 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1079 description "An operation to Backup configurations of a virtual network function
1087 uses action-identifiers;
1103 rpc config-backup-delete {
1104 description "An operation to Delete backup configurations of a virtual network
1112 uses action-identifiers;
1125 description "An operation to Export configurations of a virtual network function
1133 uses action-identifiers;
1140 rpc stop-application {
1141 description "An operation to Stop Application traffic to a virtual network function";
1148 uses action-identifiers;
1160 /**********************************************************************************
1161 * Define the VNF Start Application service
1162 **********************************************************************************/
1163 rpc start-application {
1164 description "An operation to perform VNF Start Application operation";
1171 uses action-identifiers;
1184 /**********************************************************************************
1185 * Gets the current state of the previously submitted LCM request
1186 **********************************************************************************/
1188 description "An operation to get the current state of the previously submitted LCM request";
1195 uses action-identifiers;
1210 /**********************************************************************************
1211 * Define the VNF Query service
1212 **********************************************************************************/
1214 description "An operation to query the status of a targe VNF.
1215 Returns information on each VM, including state (active or standby)
1216 and status (healthy or unhealthy)";
1223 uses action-identifiers;
1228 list query-results {
1230 description "Identifier of a VM";
1235 description "The state of the VM";
1240 description "the status of the VM";
1248 /**********************************************************************************
1249 * Define the Reboot service
1250 **********************************************************************************/
1252 description "An operation to reboot a specified virtual machine (VM)";
1259 uses action-identifiers;
1271 /**********************************************************************************
1272 * Define the VM attach volume service
1273 **********************************************************************************/
1275 description "An operation to attach a cinder volume to a VM";
1282 uses action-identifiers;
1294 /**********************************************************************************
1295 * Define the VM detach volume service
1296 **********************************************************************************/
1298 description "An operation to detach a cinder volume from a VM";
1305 uses action-identifiers;
1319 /**********************************************************************************
1320 * Additional RPCs added here...
1321 **********************************************************************************/