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";
117 enum "UpgradePostCheck";
118 enum "UpgradeBackup";
119 enum "UpgradeBackout";
127 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
131 description "The state of a VM";
141 description "The status of a VM";
150 /**********************************************************************************
151 * Basic manipulation of a VNF (or VM) will typically include querying the current
152 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
153 * "state"-type operations, the services require the identification of the VNF to
154 * be operated on, and the region or LCP that contains that resource. This
155 * information is used across all of these services, so it has been defined as a
156 * common structure here and is referenced in the appropriate RPC definitions.
157 **********************************************************************************/
160 /**********************************************************************************
161 * All requests will include this standard header
163 * The standard request header is used to define a correlation identification for
164 * the request that is returned on all responses. This correlation identifier
165 * (called the service-request-id) is meaningful to the caller and is included on
166 * all responses from the services.
167 **********************************************************************************/
169 /**********************************************************************************
170 * All responses will include this standard header
172 * The standard response header includes the time of completion as well as a
173 * success|failure indication
174 **********************************************************************************/
176 grouping common-header {
177 description "A common header for all APP-C requests";
178 container common-header {
179 description "A common header for all APP-C requests";
181 description "timestamp is in ISO 8601 timestamp format ZULU offset";
187 description "api-ver is the API version identifier. A given release of APPC
188 should support all previous versions of APPC API (correlate with
189 general requirements)";
191 pattern "[2]\.\d\d" {
192 error-message "API Version 2.XX is supported at this end point";
199 description "originator-id an identifier of the calling system which can be
200 used addressing purposes, i.e. returning asynchronous response
201 to the proper destination over DMaaP (especially in case of multiple
202 consumers of APP-C APIs)";
208 description "UUID for the request ID. An OSS/BSS identifier for the request
209 that caused the current action. Multiple API calls may be made
210 with the same request-id The request-id shall be recorded throughout
211 the operations on a single request";
216 leaf sub-request-id {
217 description "Uniquely identifies a specific LCM action. It is persistent over
218 the life-cycle of a single request";
224 /**********************************************************************************
225 * Flags are generic flags that apply to any and all commands, all are optional
226 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc)
227 * state. Specific behaviour of forced commands varies, but implies cancellation
228 * of previous command and an override by the new command. The FALSE value is
230 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
231 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
232 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
233 * * Cease accepting additional command requests
234 * * Complete execution of outstanding commands
235 * * Execute the exclusive command to completion
236 * * Optionally report the result of the command
237 * * Optionally resume command acceptance and processing
238 * - NORMAL - Obverse of EXCLUSIVE, the default one.
239 **********************************************************************************/
241 description "Flags are generic flags that apply to any and all commands, all are optional";
247 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
248 or NORMAL (queue other requests until complete)";
256 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
257 locked, transiting, etc.) state";
261 description "<0....N> -Â The timeout value (expressed in seconds) for action
262 execution, between action being received by APPC and action initiation";
271 grouping action-identifiers {
272 description "A block containing the action arguments. These are used to specify
273 the object upon which APP-C LCM command is to operate";
274 container action-identifiers {
275 description "A block containing the action arguments. These are used to specify
276 the object upon which APP-C LCM command is to operate";
277 leaf service-instance-id {
278 description "identifies a specific service the command refers to. When multiple
279 APP-C instances are used and applied to a subset of services,
280 this will become significant . The field is mandatory when the
286 description "identifies the VNF to which this action is to be applied(vnf-id
287 uniquely identifies the service-instance referred to). Note that
288 some actions are applied to multiple VNFs in the same service.
289 When this is the case, vnf-id may be left out, but service-instance-id
290 must appear. The field is mandatory when service-instance-id is
296 description "identifies the VF module to which this action is to be applied.";
301 description "identifies the VNFC to which this action is to be applied. Some
302 actions apply only to a component within a VNF (e.g. RESTART is
303 sometimes applied to on VM only). In such a case, the name of
304 the VNFC is used to search for the component within the VNF";
309 description "identifies a specific VM within the given service/vnf to which
310 this action is to be applied";
319 description "The specific response codes are to be aligned with SDC reference doc
320 (main table removed to avoid duplication and digression from main table).
321 See SDC and ECOMP Distribution Consumer Interface Agreement";
323 description "The specific response codes are to be aligned with SDC reference doc
324 (main table removed to avoid duplication and digression from main table).
325 See SDC and ECOMP Distribution Consumer Interface Agreement";
327 description "Response code";
332 description "Response message";
339 typedef lcm-action-status {
346 enum "MULTIPLE_REQUESTS_FOUND";
348 description "The status of the requested LCM action";
351 /**********************************************************************************
352 * Define the restart service
353 **********************************************************************************/
355 description "An operation to restart a virtual network function (or VM)";
362 uses action-identifiers;
374 /**********************************************************************************
375 * Define the rebuild service
376 **********************************************************************************/
378 description "An operation to rebuild a virtual network function (or VM)";
385 uses action-identifiers;
397 /**********************************************************************************
398 * Define the migrate service
399 **********************************************************************************/
401 description "An operation to migrate a virtual network function (or VM)";
408 uses action-identifiers;
420 /**********************************************************************************
421 * Define the evacuate service
422 **********************************************************************************/
424 description "An operation to evacuate a virtual network function (or VM)";
431 uses action-identifiers;
443 /**********************************************************************************
444 * Define the snapshot service
445 **********************************************************************************/
447 description "An operation to create a snapshot of a virtual network function (or VM)";
454 uses action-identifiers;
472 /**********************************************************************************
473 * Define the VNF quiesce traffic service
474 **********************************************************************************/
475 rpc quiesce-traffic {
476 description "An operation to stop traffic gracefully on the VF.
477 It stops traffic gracefully without stopping the application";
484 uses action-identifiers;
496 /**********************************************************************************
497 * Define the VNF resume traffic service
498 **********************************************************************************/
500 description "An operation to resume traffic gracefully on the VF.
501 It resumes traffic gracefully without stopping the application";
508 uses action-identifiers;
520 /**********************************************************************************
521 * Define the VNF distribute traffic service
522 **********************************************************************************/
523 rpc distribute-traffic {
524 description "An operation to distribute traffic gracefully on the VF.
525 It distributes traffic gracefully without stopping the application";
532 uses action-identifiers;
544 /**********************************************************************************
545 * Define the VNF UpgradePreCheck service
546 **********************************************************************************/
547 rpc upgrade-pre-check {
548 description "An operation to check that the VNF has the correct software version needed for a software upgrade.";
555 uses action-identifiers;
567 /**********************************************************************************
568 * Define the VNF UpgradeSoftware service
569 **********************************************************************************/
570 rpc upgrade-software {
571 description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .";
578 uses action-identifiers;
590 /**********************************************************************************
591 * Define the VNF UpgradePostCheck service
592 **********************************************************************************/
593 rpc upgrade-post-check {
594 description "An operation to check the VNF upgrade has been successful completed and all processes are running properly.";
601 uses action-identifiers;
613 /**********************************************************************************
614 * Define the VNF UpgradeBackup service
615 **********************************************************************************/
617 description "An operation to do full backup of the VNF data prior to an upgrade.";
624 uses action-identifiers;
636 /**********************************************************************************
637 * Define the VNF UpgradeBackout service
638 **********************************************************************************/
639 rpc upgrade-backout {
640 description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).";
647 uses action-identifiers;
659 /**********************************************************************************
660 * Define the rollback service
661 **********************************************************************************/
663 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
670 uses action-identifiers;
691 /**********************************************************************************
692 * Additional RPCs added here...
693 **********************************************************************************/
696 /**********************************************************************************
697 * Define the sync service
698 **********************************************************************************/
700 description "An operation to sync the configurations of a virtual network function (or VM)";
707 uses action-identifiers;
723 /**********************************************************************************
724 * Define the terminate service
725 **********************************************************************************/
727 description "An operation to terminate the configurations of a virtual network function (or VM)";
734 uses action-identifiers;
748 description "An operation to configure the configurations of a virtual network
756 uses action-identifiers;
773 description "Use the ModifyConfig command when a full configuration cycle is either not required
774 or is considered too costly. The ModifyConfig LCM action affects only a subset of the
775 total configuration data of a VNF. The set of configuration parameters to be affected
776 is a subset of the total configuration data of the target VNF type. The payload Stop
777 Application must contain the configuration parameters to be modified and their values.
778 A successful modify returns a success response. A failed modify returns a failure
779 response and the specific failure messages in the response payload Stop Application";
786 uses action-identifiers;
802 rpc config-scale-out {
803 description "An operation to Modify the configuration or other action to support
804 a ConfigScaleOut of a VNF.";
811 uses action-identifiers;
828 description "An operation to restore the configurations of a virtual network
836 uses action-identifiers;
852 /**********************************************************************************
853 * Define the test service
854 **********************************************************************************/
856 description "An operation to test the configurations of a virtual network function (or VM)";
863 uses action-identifiers;
875 /**********************************************************************************
876 * Define the stop service
877 **********************************************************************************/
879 description "An operation to stop the configurations of a virtual network function (or VM)";
886 uses action-identifiers;
899 description "An operation to start a virtual network function (or VM)";
906 uses action-identifiers;
918 /**********************************************************************************
919 * Define the audit service
920 **********************************************************************************/
922 description "An operation to audit the configurations of a virtual network function (or VM)";
929 uses action-identifiers;
945 /**********************************************************************************
946 * Define the SoftwareUpload vSCP service
947 **********************************************************************************/
948 rpc software-upload {
949 description "An operation to upload a new version of vSCP image to vSCP for updating it";
956 uses action-identifiers;
968 /**********************************************************************************
969 * Define the PreHealthCheck vSCP service
970 **********************************************************************************/
972 description "An operation to perform health check of vSCP prior its upgrading";
979 uses action-identifiers;
992 /**********************************************************************************
993 * Define the Upgrade vSCP service
994 **********************************************************************************/
996 description "An operation to perform upgrade of vSCP";
1003 uses action-identifiers;
1016 /**********************************************************************************
1017 * Define the VNF lock service
1018 **********************************************************************************/
1020 description "An operation to perform VNF lock operation";
1027 uses action-identifiers;
1039 /**********************************************************************************
1040 * Define the VNF unlock service
1041 **********************************************************************************/
1043 description "An operation to perform VNF unlock operation";
1050 uses action-identifiers;
1062 /**********************************************************************************
1063 * Define the VNF check lock service
1064 **********************************************************************************/
1066 description "An operation to check VNF lock status";
1073 uses action-identifiers;
1083 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
1091 description "An operation to Backup configurations of a virtual network function
1099 uses action-identifiers;
1115 rpc config-backup-delete {
1116 description "An operation to Delete backup configurations of a virtual network
1124 uses action-identifiers;
1137 description "An operation to Export configurations of a virtual network function
1145 uses action-identifiers;
1152 rpc stop-application {
1153 description "An operation to Stop Application traffic to a virtual network function";
1160 uses action-identifiers;
1172 /**********************************************************************************
1173 * Define the VNF Start Application service
1174 **********************************************************************************/
1175 rpc start-application {
1176 description "An operation to perform VNF Start Application operation";
1183 uses action-identifiers;
1196 /**********************************************************************************
1197 * Gets the current state of the previously submitted LCM request
1198 **********************************************************************************/
1200 description "An operation to get the current state of the previously submitted LCM request";
1207 uses action-identifiers;
1222 /**********************************************************************************
1223 * Define the VNF Query service
1224 **********************************************************************************/
1226 description "An operation to query the status of a targe VNF.
1227 Returns information on each VM, including state (active or standby)
1228 and status (healthy or unhealthy)";
1235 uses action-identifiers;
1240 list query-results {
1242 description "Identifier of a VM";
1247 description "The state of the VM";
1252 description "the status of the VM";
1260 /**********************************************************************************
1261 * Define the Reboot service
1262 **********************************************************************************/
1264 description "An operation to reboot a specified virtual machine (VM)";
1271 uses action-identifiers;
1283 /**********************************************************************************
1284 * Define the VM attach volume service
1285 **********************************************************************************/
1287 description "An operation to attach a cinder volume to a VM";
1294 uses action-identifiers;
1306 /**********************************************************************************
1307 * Define the VM detach volume service
1308 **********************************************************************************/
1310 description "An operation to detach a cinder volume from a VM";
1317 uses action-identifiers;
1331 /**********************************************************************************
1332 * Additional RPCs added here...
1333 **********************************************************************************/