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 {
46 namespace "org:onap:appc:provider";
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-04" {
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 **********************************************************************************/
71 * Define a common definition of a UUID
77 description "Universally Unique ID";
81 * Define the name of the provider region/LCP to connect to
87 description "The local control plane name (OpenStack region name) of the provider";
91 * Define a common definition of a time stamp (expressed as a formatted string) as follows
93 * yyyy-MM-dd HH:mm:ss.SSSSSSSS
95 * yyyy ...... exactly 4 digit year, e.g., 2015
96 * MM ........ 1 or 2 digit month of year, e.g., 7
97 * dd ........ 1 or 2 digit day of month, e.g., 29
98 * HH ........ 1 or 2 digit hour of day (24-hour clock) in UTC, e.g., 17
99 * mm ........ 1 or 2 digit minute of the hour, e.g. 31
100 * ss ........ 1 or 2 digit seconds of the minute, e.g., 28
101 * SSSSSS .... 1-6 digit microseconds
106 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}";
113 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";
119 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";
131 description "The action to be taken by APP-C, e.g. Test, Start, Terminate";
134 /**********************************************************************************
135 * All requests will include this standard header
137 * The standard request header is used to define a correlation identification for
138 * the request that is returned on all responses. This correlation identifier
139 * (called the service-request-id) is meaningful to the caller and is included on
140 * all responses from the services.
141 **********************************************************************************/
142 grouping common-request-header {
143 description "A common header for all requests";
144 container common-request-header {
145 leaf service-request-id {
146 description "An identifier meaningful to the caller to correlate all responses";
152 description "The alloted time to perform the operation, in seconds. If the
153 operation cannot be completed in this amount of time, the operation is
154 aborted. If set to zero, no timeout exists and the operation will continue
155 until it completes or fails. If omitted, the default value of 0 is used.";
164 /**********************************************************************************
165 * Basic manipulation of a VNF (or VM) will typically include querying the current
166 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
167 * "state"-type operations, the services require the identification of the VNF to
168 * be operated on, and the region or LCP that contains that resource. This
169 * information is used across all of these services, so it has been defined as a
170 * common structure here and is referenced in the appropriate RPC definitions.
171 **********************************************************************************/
172 grouping vnf-resource {
173 description "The data that uniquely identifies a virtual network function (or vm)";
174 container vnf-resource {
176 description "The UUID of the resource. For backwards compatibility, this can be
177 the self-link URL of the VM.";
182 description "The identity url used to access the resource";
187 description "The id of the provider tenant that owns the resource";
194 /**********************************************************************************
195 * All responses will include this standard header
197 * The standard response header includes the time of completion as well as a
198 * success|failure indication
199 **********************************************************************************/
200 grouping common-response-header {
201 description "A common header for all responses defining success or failure
202 and the time stamp when completed";
203 container common-response-header {
204 leaf service-request-id {
205 description "An identifier meaningful to the caller to correlate all responses";
209 description "True indicates the request was successful";
213 description "If success=false, the failure reason. Otherwise, undefined.";
217 description "The formatted time stamp when the operation was completed.";
221 description "The amount of time used (in seconds) to process the request";
228 /**********************************************************************************
229 * All requests/response will include this standard header
231 * The standard common header is used to define a correlation identification for
232 * the request that is returned on all responses.
233 **********************************************************************************/
234 grouping common-header {
235 description "A common header for all APP-C requests";
236 container common-header {
237 description "A common header for all APP-C requests";
239 description "timestamp is in ISO 8601 timestamp format ZULU offset";
245 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)";
251 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)";
257 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. The request-id shall be recorded throughout the operations on a single request";
262 leaf sub-request-id {
263 description "Uniquely identifies a specific LCM action. It is persistent over the life-cycle of a single request";
269 /**********************************************************************************
270 * Flags are generic flags that apply to any and all commands, all are optional
271 * 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.
272 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
273 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
274 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
275 * * Cease accepting additional command requests
276 * * Complete execution of outstanding commands
277 * * Execute the exclusive command to completion
278 * * Optionally report the result of the command
279 * * Optionally resume command acceptance and processing
280 * - NORMAL - Obverse of EXCLUSIVE, the default one.
281 **********************************************************************************/
283 description "Flags are generic flags that apply to any and all commands, all are optional";
289 description "EXCLUSIVE (accept no queued requests on this VNF while processing) or NORMAL (queue other requests until complete)";
297 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc.) state";
301 description "<0....N> -Â The timeout value (expressed in seconds) for action execution, between action being received by APPC and action initiation";
309 grouping config-payload {
310 description "Payload for modify config on traffic generator";
311 container config-payload {
312 description "Payload for modify config on traffic generator";
314 description "this is the restconf interface for vTrafficGenerator";
320 description "this is the configuration data";
328 grouping action-identifiers {
329 description "A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate";
330 container action-identifiers {
331 description "A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate";
332 leaf service-instance-id {
333 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";
338 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";
343 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";
348 description "identifies a specific VM within the given service/vnf to which this action is to be applied";
356 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";
358 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";
360 description "Response code";
365 description "Response message";
373 /**********************************************************************************
374 * NEW API ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
375 * All requests will include this standard header
377 * The standard request header is used to define a correlation identification for
378 * the request that is returned on all responses. This correlation identifier
379 * (called the service-request-id) is meaningful to the caller and is included on
380 * all responses from the services.
381 **********************************************************************************/
382 grouping RequestHeader {
383 container RequestHeader {
384 description "A common header for all APP-C requests";
386 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
392 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
398 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)";
404 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";
409 leaf-list RequestTrack {
410 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";
414 /**********************************************************************************
415 * Flags are generic flags that apply to any and all commands, all are optional
416 * 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.
417 * TTL = <0....N> - The timeout value for command execution, expressed in seconds
418 * MODE = EXCLUSIVE/NORMAL - defines execution mode as follows:
419 * - EXCLUSIVE � on encountering an exclusive command, the APP-C will:
420 * * Cease accepting additional command requests
422 * Complete execution of outstanding commands
423 * * Execute the exclusive command to completion
424 * * Optionally report the result of the command
425 * * Optionally resume command acceptance and processing
426 * - NORMAL - Obverse of EXCLUSIVE, the default one.
427 **********************************************************************************/
429 description "Flags are generic flags that apply to any and all commands, all are optional";
431 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc) state.";
436 description "<0....N> - The timeout value for action execution, expressed in seconds";
441 description "EXCLUSIVE/NORMAL - defines execution mode";
449 grouping RequestParameters {
450 description "The request contains the entry of command-specific and is opaque to the APP-C handler";
452 description "The actual action to be taken";
457 description "The specific VF a component of which is to be affected";
462 description "The specific VFC within a VF to be affected";
467 description "An action-specific value opaque to the APPC handler.
468 The value can be any valid JSON type (primitive, object, collection of those two).
469 APPC will pass the value as raw JSON string to the executing LCM action.";
475 grouping ResponseHeader {
476 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
477 container ResponseHeader {
478 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
480 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
486 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
492 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)";
497 leaf-list SubResponseID {
498 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";
504 grouping ResponseAttributes {
505 description "The response contains the status of executed functionality";
507 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";
509 description "Response code value";
514 description "Response code description";
520 description "Payload - the entry is command-specific and is opaque to the APP-C handler.
521 The value can be any valid JSON type (primitive, object, collection of those two).
522 APP-C will pass the value as raw JSON string to appropriate addressee";
531 /**********************************************************************************
532 * Define the restart service
533 **********************************************************************************/
535 description "An operation to restart a virtual network function (or VM)";
537 uses common-request-header;
541 uses common-response-header;
543 description "The UUID of the VM that was restarted";
549 /**********************************************************************************
550 * Define the rebuild service
551 **********************************************************************************/
553 description "An operation to rebuild a virtual network function (or VM)";
555 uses common-request-header;
559 uses common-response-header;
561 description "The UUID of the VM after rebuild. If the UUID was changed,
562 this contains the new UUID. If it was not changed, this contains
566 leaf original-vm-id {
567 description "The UUID of the VM before rebuild (i.e., the original UUID)";
573 /**********************************************************************************
574 * Define the migrate service
575 **********************************************************************************/
577 description "An operation to migrate a virtual network function (or VM)";
579 uses common-request-header;
583 uses common-response-header;
585 description "The UUID of the VM that was migrated.";
591 /**********************************************************************************
592 * Define the evacuate service
593 **********************************************************************************/
595 description "An operation to evacuate a virtual network function (or VM)";
597 uses common-request-header;
601 uses common-response-header;
603 description "The UUID of the VM that was evacuated";
610 /**********************************************************************************
611 * Define the snapshot service
612 **********************************************************************************/
614 description "An operation to create a snapshot of a virtual network function (or VM)";
616 uses common-request-header;
620 uses common-response-header;
622 description "The UUID of the VM that was snapshot";
629 description "An operation to modify-config the configurations of a virtual network function (or VM)";
631 uses common-request-header;
639 uses common-response-header;
644 description "An operation to check status of a VM";
646 uses common-request-header;
650 uses common-response-header;
652 description "The status of the VM requested";