2 * Yang model for the Application Controller (APP-C) component of ECOMP
4 * This model is used to define the data and services of the Application Controller
5 * component of ECOMP. The APP-C controller initiates the processing of directed
6 * graphs, which define the actual process implementations used. The name of the
7 * directed graph is set by properties and cannot be changed dynamically.
9 * The services exposed by this provider are:
12 * Used to request a restart of a virtual network function (a VM).
15 * Used to request a rebuild of a virtual network function (a VM).
19 module appc-provider-lcm {
22 namespace "org:openecomp:appc";
23 prefix appc-provider-lcm;
24 organization "Copyright 2017 AT&T Intellectual Property.";
27 "Defines the services and request/response requirements for the ECOMP APP-C component.";
30 * Note, the revision changes the package name of the generated java code. Do not
31 * change the revision unless you also update all references to the bindings.
33 revision "2016-01-08" {
35 "APP-C interface version 1.0.48";
38 /**********************************************************************************
39 * Data type definitions
41 * The following data type definitions are used to define common data structures,
42 * define constraints, or to impart special meanings to data objects related to the
43 * APP-C controller functions.
44 **********************************************************************************/
47 * Define a common definition of a UUID
53 description "Universally Unique ID";
57 * Define the name of the provider region/LCP to connect to
63 description "The local control plane name (OpenStack region name) of the provider";
67 * Define a common definition of a time stamp (expressed as a formatted string) as follows
69 * yyyy-MM-dd HH:mm:ss.SSSSSSSS
71 * yyyy ...... exactly 4 digit year, e.g., 2015
72 * MM ........ 1 or 2 digit month of year, e.g., 7
73 * dd ........ 1 or 2 digit day of month, e.g., 29
74 * HH ........ 1 or 2 digit hour of day (24-hour clock) in UTC, e.g., 17
75 * mm ........ 1 or 2 digit minute of the hour, e.g. 31
76 * ss ........ 1 or 2 digit seconds of the minute, e.g., 28
77 * SSSSSS .... 1-6 digit microseconds
82 pattern "[0-9]{4}-[0-9]{1,2}-[0-9]{1,2} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}.[0-9]{1,6}";
89 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";
95 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";
110 enum "SoftwareUpload";
119 description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate";
122 /**********************************************************************************
123 * All requests will include this standard header
125 * The standard request header is used to define a correlation identification for
126 * the request that is returned on all responses. This correlation identifier
127 * (called the service-request-id) is meaningful to the caller and is included on
128 * all responses from the services.
129 **********************************************************************************/
130 grouping common-request-header {
131 description "A common header for all requests";
132 container common-request-header {
133 leaf service-request-id {
134 description "An identifier meaningful to the caller to correlate all responses";
140 description "The alloted time to perform the operation, in seconds. If the
141 operation cannot be completed in this amount of time, the operation is
142 aborted. If set to zero, no timeout exists and the operation will continue
143 until it completes or fails. If omitted, the default value of 0 is used.";
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 **********************************************************************************/
160 grouping vnf-resource {
161 description "The data that uniquely identifies a virtual network function (or vm)";
162 container vnf-resource {
164 description "The UUID of the resource. For backwards compatibility, this can be
165 the self-link URL of the VM.";
170 description "The identity url used to access the resource";
175 description "The id of the provider tenant that owns the resource";
182 /**********************************************************************************
183 * All responses will include this standard header
185 * The standard response header includes the time of completion as well as a
186 * success|failure indication
187 **********************************************************************************/
188 grouping common-response-header {
189 description "A common header for all responses defining success or failure
190 and the time stamp when completed";
191 container common-response-header {
192 leaf service-request-id {
193 description "An identifier meaningful to the caller to correlate all responses";
197 description "True indicates the request was successful";
201 description "If success=false, the failure reason. Otherwise, undefined.";
205 description "The formatted time stamp when the operation was completed.";
209 description "The amount of time used (in seconds) to process the request";
216 /**********************************************************************************
217 * All requests/response will include this standard header
219 * The standard common header is used to define a correlation identification for
220 * the request that is returned on all responses.
221 **********************************************************************************/
222 grouping common-header {
223 description "A common header for all APP-C requests";
224 container common-header {
225 description "A common header for all APP-C requests";
227 description "timestamp is in ISO 8601 timestamp format ZULU offset";
233 description "api-ver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
236 error-message "API Version 2.XX is supported at this end point";
243 description "originator-id an identifier of the calling system which can be used addressing purposes, i.e. returning asynchronous response to the proper destination over DMaaP (especially in case of multiple consumers of APP-C APIs)";
249 description "UUID for the request ID. An OSS/BSS identifier for the request that caused the current action. Multiple API calls may be made with the same request-id
\vThe request-id shall be recorded throughout the operations on a single request";
254 leaf sub-request-id {
255 description "Uniquely identifies a specific LCM action. It is persistent over the life-cycle of a single request";
261 /**********************************************************************************
262 * Flags are generic flags that apply to any and all commands, all are optional
263 * 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.
264 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
265 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
266 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
267 * * Cease accepting additional command requests
268 * * Complete execution of outstanding commands
269 * * Execute the exclusive command to completion
270 * * Optionally report the result of the command
271 * * Optionally resume command acceptance and processing
272 * - NORMAL - Obverse of EXCLUSIVE, the default one.
273 **********************************************************************************/
275 description "Flags are generic flags that apply to any and all commands, all are optional";
281 description "EXCLUSIVE (accept no queued requests on this VNF while processing) or NORMAL (queue other requests until complete)";
289 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc.) state";
293 description "<0....N> -Â The timeout value (expressed in seconds) for action execution, between action being received by APPC and action initiation";
302 grouping action-identifiers {
303 description "A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate";
304 container action-identifiers {
305 description "A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate";
306 leaf service-instance-id {
307 description "identifies a specific service the command refers to. When multiple APP-C instances are used and applied to a subset of services, this will become significant . The field is mandatory when the vnf-id is empty";
312 description "identifies the VNF to which this action is to be applied(vnf-id uniquely identifies the service-instance referred to). Note that some actions are applied to multiple VNFs in the same service. When this is the case, vnf-id may be left out, but service-instance-id must appear. The field is mandatory when service-instance-id is empty";
317 description "identifies the VNFC to which this action is to be applied. Some actions apply only to a component within a VNF (e.g. RESTART is sometimes applied to on VM only). In such a case, the name of the VNFC is used to search for the component within the VNF";
322 description "identifies a specific VM within the given service/vnf to which this action is to be applied";
330 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";
332 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";
334 description "Response code";
339 description "Response message";
347 /**********************************************************************************
348 * NEW API ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
349 * All requests will include this standard header
351 * The standard request header is used to define a correlation identification for
352 * the request that is returned on all responses. This correlation identifier
353 * (called the service-request-id) is meaningful to the caller and is included on
354 * all responses from the services.
355 **********************************************************************************/
356 grouping RequestHeader {
357 container RequestHeader {
358 description "A common header for all APP-C requests";
360 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
366 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
372 description "OriginatorID an identifier of the calling system which can be used addressing purposes, i.e. returning asynchronous response to the proper destination over DMaaP (especially in case of multiple consumers of APP-C APIs)";
378 description "Identifiers that may be generated when multiple responses or handling passes are needed for a given request, allowing the request itself to be tracked";
383 leaf-list RequestTrack {
384 description "Identifiers that may be generated when multiple responses or handling passes are needed for a given request, allowing the request itself to be tracked";
388 /**********************************************************************************
389 * Flags are generic flags that apply to any and all commands, all are optional
390 * 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.
391 * TTL = <0....N> - The timeout value for command execution, expressed in seconds
392 * MODE = EXCLUSIVE/NORMAL - defines execution mode as follows:
393 * - EXCLUSIVE � on encountering an exclusive command, the APP-C will:
394 * * Cease accepting additional command requests
396 * Complete execution of outstanding commands
397 * * Execute the exclusive command to completion
398 * * Optionally report the result of the command
399 * * Optionally resume command acceptance and processing
400 * - NORMAL - Obverse of EXCLUSIVE, the default one.
401 **********************************************************************************/
403 description "Flags are generic flags that apply to any and all commands, all are optional";
405 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc) state.";
410 description "<0....N> - The timeout value for action execution, expressed in seconds";
415 description "EXCLUSIVE/NORMAL - defines execution mode";
423 grouping RequestParameters {
424 description "The request contains the entry of command-specific and is opaque to the APP-C handler";
426 description "The actual action to be taken";
431 description "The specific VF a component of which is to be affected";
436 description "The specific VFC within a VF to be affected";
441 description "An action-specific value opaque to the APPC handler.
442 The value can be any valid JSON type (primitive, object, collection of those two).
443 APPC will pass the value as raw JSON string to the executing LCM action.";
449 grouping ResponseHeader {
450 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
451 container ResponseHeader {
452 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
454 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
460 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
466 description "ResponseID an identifier of the calling system which can be used addressing purposes, i.e. returning asynchronous response to the proper destination over DMaaP (especially in case of multiple consumers of APP-C APIs)";
471 leaf-list SubResponseID {
472 description "Identifiers that may be generated when multiple responses or handling passes are needed for a given request, allowing the request itself to be tracked";
478 grouping ResponseAttributes {
479 description "The response contains the status of executed functionality";
481 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";
483 description "Response code value";
488 description "Response code description";
494 description "Payload - the entry is command-specific and is opaque to the APP-C handler.
495 The value can be any valid JSON type (primitive, object, collection of those two).
496 APP-C will pass the value as raw JSON string to appropriate addressee";
507 /**********************************************************************************
508 * Define the restart service
509 **********************************************************************************/
511 description "An operation to restart a virtual network function (or VM)";
518 uses action-identifiers;
530 /**********************************************************************************
531 * Define the rebuild service
532 **********************************************************************************/
534 description "An operation to rebuild a virtual network function (or VM)";
541 uses action-identifiers;
553 /**********************************************************************************
554 * Define the migrate service
555 **********************************************************************************/
557 description "An operation to migrate a virtual network function (or VM)";
564 uses action-identifiers;
576 /**********************************************************************************
577 * Define the evacuate service
578 **********************************************************************************/
580 description "An operation to evacuate a virtual network function (or VM)";
587 uses action-identifiers;
600 /**********************************************************************************
601 * Define the snapshot service
602 **********************************************************************************/
604 description "An operation to create a snapshot of a virtual network function (or VM)";
611 uses action-identifiers;
631 /**********************************************************************************
632 * Define the rollback service
633 **********************************************************************************/
635 description "An operation to rollback to particular snapshot of a virtual network function (or VM)";
642 uses action-identifiers;
663 /**********************************************************************************
664 * Additional RPCs added here...
665 **********************************************************************************/
668 /**********************************************************************************
669 * Define the sync service
670 **********************************************************************************/
672 description "An operation to sync the configurations of a virtual network function (or VM)";
679 uses action-identifiers;
687 /**********************************************************************************
688 * Define the terminate service
689 **********************************************************************************/
691 description "An operation to terminate the configurations of a virtual network function (or VM)";
698 uses action-identifiers;
710 /**********************************************************************************
711 * Define the modify-config service
712 **********************************************************************************/
714 description "An operation to modify-config the configurations of a virtual network function (or VM)";
721 uses action-identifiers;
733 /**********************************************************************************
734 * Define the test service
735 **********************************************************************************/
737 description "An operation to test the configurations of a virtual network function (or VM)";
744 uses action-identifiers;
756 /**********************************************************************************
757 * Define the stop service
758 **********************************************************************************/
760 description "An operation to stop the configurations of a virtual network function (or VM)";
767 uses action-identifiers;
779 /**********************************************************************************
780 * Define the audit service
781 **********************************************************************************/
783 description "An operation to audit the configurations of a virtual network function (or VM)";
790 uses action-identifiers;
798 /**********************************************************************************
799 * Define the SoftwareUpload vSCP service
800 **********************************************************************************/
801 rpc software-upload {
802 description "An operation to upload a new version of vSCP image to vSCP for updating it";
809 uses action-identifiers;
823 /**********************************************************************************
824 * Define the PreHealthCheck vSCP service
825 **********************************************************************************/
827 description "An operation to perform health check of vSCP prior its upgrading";
834 uses action-identifiers;
848 /**********************************************************************************
849 * Define the Upgrade vSCP service
850 **********************************************************************************/
852 description "An operation to perform upgrade of vSCP";
859 uses action-identifiers;
872 /**********************************************************************************
873 * Define the VNF lock service
874 **********************************************************************************/
876 description "An operation to perform VNF lock operation";
883 uses action-identifiers;
895 /**********************************************************************************
896 * Define the VNF unlock service
897 **********************************************************************************/
899 description "An operation to perform VNF unlock operation";
906 uses action-identifiers;
918 /**********************************************************************************
919 * Define the VNF check lock service
920 **********************************************************************************/
922 description "An operation to check VNF lock status";
929 uses action-identifiers;
939 description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE";
946 /**********************************************************************************
947 * Additional RPCs added here...
948 **********************************************************************************/