2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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;
48 organization "Copyright 2017 AT&T Intellectual Property.";
51 "Defines the services and request/response requirements for the ECOMP APP-C component.";
54 * Note, the revision changes the package name of the generated java code. Do not
55 * change the revision unless you also update all references to the bindings.
57 revision "2016-01-08" {
59 "APP-C interface version 1.0.48";
62 /**********************************************************************************
63 * Data type definitions
65 * The following data type definitions are used to define common data structures,
66 * define constraints, or to impart special meanings to data objects related to the
67 * APP-C controller functions.
68 **********************************************************************************/
73 description "Define a common definition of a time stamp (expressed as a formatted
74 string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ";
77 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";
83 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";
99 enum "SoftwareUpload";
108 enum "ConfigScaleOut";
109 enum "ConfigRestore";
111 enum "ConfigBackupDelete";
113 enum "StopApplication";
114 enum "StartApplication";
116 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
119 /**********************************************************************************
120 * All requests will include this standard header
122 * The standard request header is used to define a correlation identification for
123 * the request that is returned on all responses. This correlation identifier
124 * (called the service-request-id) is meaningful to the caller and is included on
125 * all responses from the services.
126 **********************************************************************************/
129 /**********************************************************************************
130 * Basic manipulation of a VNF (or VM) will typically include querying the current
131 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
132 * "state"-type operations, the services require the identification of the VNF to
133 * be operated on, and the region or LCP that contains that resource. This
134 * information is used across all of these services, so it has been defined as a
135 * common structure here and is referenced in the appropriate RPC definitions.
136 **********************************************************************************/
139 /**********************************************************************************
140 * All responses will include this standard header
142 * The standard response header includes the time of completion as well as a
143 * success|failure indication
144 **********************************************************************************/
148 /**********************************************************************************
149 * All requests/response will include this standard header
151 * The standard common header is used to define a correlation identification for
152 * the request that is returned on all responses.
153 **********************************************************************************/
157 grouping common-header {
158 description "A common header for all APP-C requests";
159 container common-header {
160 description "A common header for all APP-C requests";
162 description "timestamp is in ISO 8601 timestamp format ZULU offset";
168 description "api-ver is the API version identifier. A given release of APPC
169 should support all previous versions of APPC API (correlate with
170 general requirements)";
172 pattern "[2]\.\d\d" {
173 error-message "API Version 2.XX is supported at this end point";
180 description "originator-id an identifier of the calling system which can be
181 used addressing purposes, i.e. returning asynchronous response
182 to the proper destination over DMaaP (especially in case of multiple
183 consumers of APP-C APIs)";
189 description "UUID for the request ID. An OSS/BSS identifier for the request
190 that caused the current action. Multiple API calls may be made
191 with the same request-id The request-id shall be recorded throughout
192 the operations on a single request";
197 leaf sub-request-id {
198 description "Uniquely identifies a specific LCM action. It is persistent over
199 the life-cycle of a single request";
205 /**********************************************************************************
206 * Flags are generic flags that apply to any and all commands, all are optional
207 * 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.
208 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
209 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
210 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
211 * * Cease accepting additional command requests
212 * * Complete execution of outstanding commands
213 * * Execute the exclusive command to completion
214 * * Optionally report the result of the command
215 * * Optionally resume command acceptance and processing
216 * - NORMAL - Obverse of EXCLUSIVE, the default one.
217 **********************************************************************************/
219 description "Flags are generic flags that apply to any and all commands, all
226 description "EXCLUSIVE (accept no queued requests on this VNF while processing)
227 or NORMAL (queue other requests until complete)";
235 description "TRUE/FALSE - Execute action even if target is in unstable (i.e.
236 locked, transiting, etc.) state";
240 description "<0....N> -Â The timeout value (expressed in seconds) for action
241 execution, between action being received by APPC and action initiation";
250 grouping action-identifiers {
251 description "A block containing the action arguments. These are used to specify
252 the object upon which APP-C LCM command is to operate";
253 container action-identifiers {
254 description "A block containing the action arguments. These are used to specify
255 the object upon which APP-C LCM command is to operate";
256 leaf service-instance-id {
257 description "identifies a specific service the command refers to. When multiple
258 APP-C instances are used and applied to a subset of services,
259 this will become significant . The field is mandatory when the
265 description "identifies the VNF to which this action is to be applied(vnf-id
266 uniquely identifies the service-instance referred to). Note that
267 some actions are applied to multiple VNFs in the same service.
268 When this is the case, vnf-id may be left out, but service-instance-id
269 must appear. The field is mandatory when service-instance-id is
275 description "identifies the VF module to which this action is to be applied.";
280 description "identifies the VNFC to which this action is to be applied. Some
281 actions apply only to a component within a VNF (e.g. RESTART is
282 sometimes applied to on VM only). In such a case, the name of
283 the VNFC is used to search for the component within the VNF";
288 description "identifies a specific VM within the given service/vnf to which
289 this action is to be applied";
298 description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
300 description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
302 description "Response code";
307 description "Response message";
318 /**********************************************************************************
319 * Define the restart service
320 **********************************************************************************/
322 description "An operation to restart a virtual network function (or VM)";
329 uses action-identifiers;
341 /**********************************************************************************
342 * Define the rebuild service
343 **********************************************************************************/
345 description "An operation to rebuild a virtual network function (or VM)";
352 uses action-identifiers;
364 /**********************************************************************************
365 * Define the migrate service
366 **********************************************************************************/
368 description "An operation to migrate a virtual network function (or VM)";
375 uses action-identifiers;
387 /**********************************************************************************
388 * Define the evacuate service
389 **********************************************************************************/
391 description "An operation to evacuate a virtual network function (or VM)";
398 uses action-identifiers;
411 /**********************************************************************************
412 * Define the snapshot service
413 **********************************************************************************/
415 description "An operation to create a snapshot of a virtual network function (or VM)";
422 uses action-identifiers;
442 /**********************************************************************************
443 * Define the rollback service
444 **********************************************************************************/
446 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
453 uses action-identifiers;
474 /**********************************************************************************
475 * Additional RPCs added here...
476 **********************************************************************************/
479 /**********************************************************************************
480 * Define the sync service
481 **********************************************************************************/
483 description "An operation to sync the configurations of a virtual network function (or VM)";
490 uses action-identifiers;
506 /**********************************************************************************
507 * Define the terminate service
508 **********************************************************************************/
510 description "An operation to terminate the configurations of a virtual network function (or VM)";
517 uses action-identifiers;
531 description "An operation to configure the configurations of a virtual network
539 uses action-identifiers;
556 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";
563 uses action-identifiers;
579 rpc config-scaleout {
580 description "An operation to scaleout the configurations of a virtual network
588 uses action-identifiers;
605 description "An operation to restore the configurations of a virtual network
613 uses action-identifiers;
629 /**********************************************************************************
630 * Define the test service
631 **********************************************************************************/
633 description "An operation to test the configurations of a virtual network function (or VM)";
640 uses action-identifiers;
652 /**********************************************************************************
653 * Define the stop service
654 **********************************************************************************/
656 description "An operation to stop the configurations of a virtual network function (or VM)";
663 uses action-identifiers;
676 description "An operation to start a virtual network function (or VM)";
683 uses action-identifiers;
695 /**********************************************************************************
696 * Define the audit service
697 **********************************************************************************/
699 description "An operation to audit the configurations of a virtual network function (or VM)";
706 uses action-identifiers;
722 /**********************************************************************************
723 * Define the SoftwareUpload vSCP service
724 **********************************************************************************/
725 rpc software-upload {
726 description "An operation to upload a new version of vSCP image to vSCP for updating it";
733 uses action-identifiers;
747 /**********************************************************************************
748 * Define the PreHealthCheck vSCP service
749 **********************************************************************************/
751 description "An operation to perform health check of vSCP prior its upgrading";
758 uses action-identifiers;
772 /**********************************************************************************
773 * Define the Upgrade vSCP service
774 **********************************************************************************/
776 description "An operation to perform upgrade of vSCP";
783 uses action-identifiers;
796 /**********************************************************************************
797 * Define the VNF lock service
798 **********************************************************************************/
800 description "An operation to perform VNF lock operation";
807 uses action-identifiers;
819 /**********************************************************************************
820 * Define the VNF unlock service
821 **********************************************************************************/
823 description "An operation to perform VNF unlock operation";
830 uses action-identifiers;
842 /**********************************************************************************
843 * Define the VNF check lock service
844 **********************************************************************************/
846 description "An operation to check VNF lock status";
853 uses action-identifiers;
863 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
871 description "An operation to Backup configurations of a virtual network function
879 uses action-identifiers;
891 rpc config-backup-delete {
892 description "An operation to Delete backup configurations of a virtual network
900 uses action-identifiers;
913 description "An operation to Export configurations of a virtual network function
921 uses action-identifiers;
928 rpc stop-application {
929 description "An operation to Stop Application traffic to a virtual network function";
936 uses action-identifiers;
948 rpc start-application {
949 description "An operation to Start Application traffic to a virtual network function";
956 uses action-identifiers;
967 /**********************************************************************************
968 * Additional RPCs added here...
969 **********************************************************************************/