2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright (C) 2017 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
20 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 * Yang model for the Application Controller (APP-C) component of ECOMP
26 * This model is used to define the data and services of the Application Controller
27 * component of ECOMP. The APP-C controller initiates the processing of directed
28 * graphs, which define the actual process implementations used. The name of the
29 * directed graph is set by properties and cannot be changed dynamically.
31 * The services exposed by this provider are:
34 * Used to request a restart of a virtual network function (a VM).
37 * Used to request a rebuild of a virtual network function (a VM).
41 module appc-provider-lcm {
44 namespace "org:openecomp:appc:lcm";
45 prefix appc-provider-lcm;
46 organization "Copyright 2017 AT&T Intellectual Property.";
49 "Defines the services and request/response requirements for the ECOMP APP-C component.";
52 * Note, the revision changes the package name of the generated java code. Do not
53 * change the revision unless you also update all references to the bindings.
55 revision "2016-01-08" {
57 "APP-C interface version 1.0.48";
60 /**********************************************************************************
61 * Data type definitions
63 * The following data type definitions are used to define common data structures,
64 * define constraints, or to impart special meanings to data objects related to the
65 * APP-C controller functions.
66 **********************************************************************************/
71 description "Define a common definition of a time stamp (expressed as a formatted
72 string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ";
75 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";
81 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";
97 enum "SoftwareUpload";
106 enum "ConfigScaleOut";
107 enum "ConfigRestore";
109 enum "ConfigBackupDelete";
112 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
115 /**********************************************************************************
116 * All requests will include this standard header
118 * The standard request header is used to define a correlation identification for
119 * the request that is returned on all responses. This correlation identifier
120 * (called the service-request-id) is meaningful to the caller and is included on
121 * all responses from the services.
122 **********************************************************************************/
125 /**********************************************************************************
126 * Basic manipulation of a VNF (or VM) will typically include querying the current
127 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
128 * "state"-type operations, the services require the identification of the VNF to
129 * be operated on, and the region or LCP that contains that resource. This
130 * information is used across all of these services, so it has been defined as a
131 * common structure here and is referenced in the appropriate RPC definitions.
132 **********************************************************************************/
135 /**********************************************************************************
136 * All responses will include this standard header
138 * The standard response header includes the time of completion as well as a
139 * success|failure indication
140 **********************************************************************************/
144 /**********************************************************************************
145 * All requests/response will include this standard header
147 * The standard common header is used to define a correlation identification for
148 * the request that is returned on all responses.
149 **********************************************************************************/
153 grouping common-header {
154 description "A common header for all APP-C requests";
155 container common-header {
156 description "A common header for all APP-C requests";
158 description "timestamp is in ISO 8601 timestamp format ZULU offset";
164 description "api-ver is the API version identifier. A given release of APPC
165 should support all previous versions of APPC API (correlate with
166 general requirements)";
168 pattern "[2]\.\d\d" {
169 error-message "API Version 2.XX is supported at this end point";
176 description "originator-id an identifier of the calling system which can be
177 used addressing purposes, i.e. returning asynchronous response
178 to the proper destination over DMaaP (especially in case of multiple
179 consumers of APP-C APIs)";
185 description "UUID for the request ID. An OSS/BSS identifier for the request
186 that caused the current action. Multiple API calls may be made
187 with the same request-id The request-id shall be recorded throughout
188 the operations on a single request";
193 leaf sub-request-id {
194 description "Uniquely identifies a specific LCM action. It is persistent over
195 the life-cycle of a single request";
201 /**********************************************************************************
202 * Flags are generic flags that apply to any and all commands, all are optional
203 * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc) state. Specific behaviour of forced commands varies, but implies cancellation of previous command and an override by the new command. The FALSE value is used by default.
204 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
205 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
206 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
207 * * Cease accepting additional command requests
208 * * Complete execution of outstanding commands
209 * * Execute the exclusive command to completion
210 * * Optionally report the result of the command
211 * * Optionally resume command acceptance and processing
212 * - NORMAL - Obverse of EXCLUSIVE, the default one.
213 **********************************************************************************/
215 description "Flags are generic flags that apply to any and all commands, all
222 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
223 or NORMAL (queue other requests until complete)";
231 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
232 locked, transiting, etc.) state";
236 description "<0....N> -Â The timeout value (expressed in seconds) for action
237 execution, between action being received by APPC and action initiation";
246 grouping action-identifiers {
247 description "A block containing the action arguments. These are used to specify
248 the object upon which APP-C LCM command is to operate";
249 container action-identifiers {
250 description "A block containing the action arguments. These are used to specify
251 the object upon which APP-C LCM command is to operate";
252 leaf service-instance-id {
253 description "identifies a specific service the command refers to. When multiple
254 APP-C instances are used and applied to a subset of services,
255 this will become significant . The field is mandatory when the
261 description "identifies the VNF to which this action is to be applied(vnf-id
262 uniquely identifies the service-instance referred to). Note that
263 some actions are applied to multiple VNFs in the same service.
264 When this is the case, vnf-id may be left out, but service-instance-id
265 must appear. The field is mandatory when service-instance-id is
271 description "identifies the VNFC to which this action is to be applied. Some
272 actions apply only to a component within a VNF (e.g. RESTART is
273 sometimes applied to on VM only). In such a case, the name of
274 the VNFC is used to search for the component within the VNF";
279 description "identifies a specific VM within the given service/vnf to which
280 this action is to be applied";
289 description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
291 description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
293 description "Response code";
298 description "Response message";
309 /**********************************************************************************
310 * Define the restart service
311 **********************************************************************************/
313 description "An operation to restart a virtual network function (or VM)";
320 uses action-identifiers;
332 /**********************************************************************************
333 * Define the rebuild service
334 **********************************************************************************/
336 description "An operation to rebuild a virtual network function (or VM)";
343 uses action-identifiers;
355 /**********************************************************************************
356 * Define the migrate service
357 **********************************************************************************/
359 description "An operation to migrate a virtual network function (or VM)";
366 uses action-identifiers;
378 /**********************************************************************************
379 * Define the evacuate service
380 **********************************************************************************/
382 description "An operation to evacuate a virtual network function (or VM)";
389 uses action-identifiers;
402 /**********************************************************************************
403 * Define the snapshot service
404 **********************************************************************************/
406 description "An operation to create a snapshot of a virtual network function (or VM)";
413 uses action-identifiers;
433 /**********************************************************************************
434 * Define the rollback service
435 **********************************************************************************/
437 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
444 uses action-identifiers;
465 /**********************************************************************************
466 * Additional RPCs added here...
467 **********************************************************************************/
470 /**********************************************************************************
471 * Define the sync service
472 **********************************************************************************/
474 description "An operation to sync the configurations of a virtual network function (or VM)";
481 uses action-identifiers;
497 /**********************************************************************************
498 * Define the terminate service
499 **********************************************************************************/
501 description "An operation to terminate the configurations of a virtual network function (or VM)";
508 uses action-identifiers;
522 description "An operation to configure the configurations of a virtual network
530 uses action-identifiers;
547 description "Use the ModifyConfig command when a full configuration cycle is either not required or is considered too costly. The ModifyConfig LCM action affects only a subset of the total configuration data of a VNF. The set of configuration parameters to be affected is a subset of the total configuration data of the target VNF type. The payload block must contain the configuration parameters to be modified and their values. A successful modify returns a success response. A failed modify returns a failure response and the specific failure messages in the response payload block";
554 uses action-identifiers;
570 rpc config-scaleout {
571 description "An operation to scaleout the configurations of a virtual network
579 uses action-identifiers;
596 description "An operation to restore the configurations of a virtual network
604 uses action-identifiers;
620 /**********************************************************************************
621 * Define the test service
622 **********************************************************************************/
624 description "An operation to test the configurations of a virtual network function (or VM)";
631 uses action-identifiers;
643 /**********************************************************************************
644 * Define the stop service
645 **********************************************************************************/
647 description "An operation to stop the configurations of a virtual network function (or VM)";
654 uses action-identifiers;
667 description "An operation to start a virtual network function (or VM)";
674 uses action-identifiers;
686 /**********************************************************************************
687 * Define the audit service
688 **********************************************************************************/
690 description "An operation to audit the configurations of a virtual network function (or VM)";
697 uses action-identifiers;
713 /**********************************************************************************
714 * Define the SoftwareUpload vSCP service
715 **********************************************************************************/
716 rpc software-upload {
717 description "An operation to upload a new version of vSCP image to vSCP for updating it";
724 uses action-identifiers;
738 /**********************************************************************************
739 * Define the PreHealthCheck vSCP service
740 **********************************************************************************/
742 description "An operation to perform health check of vSCP prior its upgrading";
749 uses action-identifiers;
763 /**********************************************************************************
764 * Define the Upgrade vSCP service
765 **********************************************************************************/
767 description "An operation to perform upgrade of vSCP";
774 uses action-identifiers;
787 /**********************************************************************************
788 * Define the VNF lock service
789 **********************************************************************************/
791 description "An operation to perform VNF lock operation";
798 uses action-identifiers;
810 /**********************************************************************************
811 * Define the VNF unlock service
812 **********************************************************************************/
814 description "An operation to perform VNF unlock operation";
821 uses action-identifiers;
833 /**********************************************************************************
834 * Define the VNF check lock service
835 **********************************************************************************/
837 description "An operation to check VNF lock status";
844 uses action-identifiers;
854 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
862 description "An operation to Backup configurations of a virtual network function
870 uses action-identifiers;
882 rpc config-backup-delete {
883 description "An operation to Delete backup configurations of a virtual network
891 uses action-identifiers;
904 description "An operation to Export configurations of a virtual network function
912 uses action-identifiers;
920 /**********************************************************************************
921 * Additional RPCs added here...
922 **********************************************************************************/