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 {
44 namespace "org:openecomp:appc";
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-04" {
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 **********************************************************************************/
69 * Define a common definition of a UUID
75 description "Universally Unique ID";
79 * Define the name of the provider region/LCP to connect to
85 description "The local control plane name (OpenStack region name) of the provider";
89 * Define a common definition of a time stamp (expressed as a formatted string) as follows
91 * yyyy-MM-dd HH:mm:ss.SSSSSSSS
93 * yyyy ...... exactly 4 digit year, e.g., 2015
94 * MM ........ 1 or 2 digit month of year, e.g., 7
95 * dd ........ 1 or 2 digit day of month, e.g., 29
96 * HH ........ 1 or 2 digit hour of day (24-hour clock) in UTC, e.g., 17
97 * mm ........ 1 or 2 digit minute of the hour, e.g. 31
98 * ss ........ 1 or 2 digit seconds of the minute, e.g., 28
99 * SSSSSS .... 1-6 digit microseconds
104 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}";
111 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";
117 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";
129 description "The action to be taken by APP-C, e.g. Test, Start, Terminate";
132 /**********************************************************************************
133 * All requests will include this standard header
135 * The standard request header is used to define a correlation identification for
136 * the request that is returned on all responses. This correlation identifier
137 * (called the service-request-id) is meaningful to the caller and is included on
138 * all responses from the services.
139 **********************************************************************************/
140 grouping common-request-header {
141 description "A common header for all requests";
142 container common-request-header {
143 leaf service-request-id {
144 description "An identifier meaningful to the caller to correlate all responses";
150 description "The alloted time to perform the operation, in seconds. If the
151 operation cannot be completed in this amount of time, the operation is
152 aborted. If set to zero, no timeout exists and the operation will continue
153 until it completes or fails. If omitted, the default value of 0 is used.";
162 /**********************************************************************************
163 * Basic manipulation of a VNF (or VM) will typically include querying the current
164 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
165 * "state"-type operations, the services require the identification of the VNF to
166 * be operated on, and the region or LCP that contains that resource. This
167 * information is used across all of these services, so it has been defined as a
168 * common structure here and is referenced in the appropriate RPC definitions.
169 **********************************************************************************/
170 grouping vnf-resource {
171 description "The data that uniquely identifies a virtual network function (or vm)";
172 container vnf-resource {
174 description "The UUID of the resource. For backwards compatibility, this can be
175 the self-link URL of the VM.";
180 description "The identity url used to access the resource";
185 description "The id of the provider tenant that owns the resource";
192 /**********************************************************************************
193 * All responses will include this standard header
195 * The standard response header includes the time of completion as well as a
196 * success|failure indication
197 **********************************************************************************/
198 grouping common-response-header {
199 description "A common header for all responses defining success or failure
200 and the time stamp when completed";
201 container common-response-header {
202 leaf service-request-id {
203 description "An identifier meaningful to the caller to correlate all responses";
207 description "True indicates the request was successful";
211 description "If success=false, the failure reason. Otherwise, undefined.";
215 description "The formatted time stamp when the operation was completed.";
219 description "The amount of time used (in seconds) to process the request";
226 /**********************************************************************************
227 * All requests/response will include this standard header
229 * The standard common header is used to define a correlation identification for
230 * the request that is returned on all responses.
231 **********************************************************************************/
232 grouping common-header {
233 description "A common header for all APP-C requests";
234 container common-header {
235 description "A common header for all APP-C requests";
237 description "timestamp is in ISO 8601 timestamp format ZULU offset";
243 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)";
249 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)";
255 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";
260 leaf sub-request-id {
261 description "Uniquely identifies a specific LCM action. It is persistent over the life-cycle of a single request";
267 /**********************************************************************************
268 * Flags are generic flags that apply to any and all commands, all are optional
269 * 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.
270 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
271 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
272 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
273 * * Cease accepting additional command requests
274 * * Complete execution of outstanding commands
275 * * Execute the exclusive command to completion
276 * * Optionally report the result of the command
277 * * Optionally resume command acceptance and processing
278 * - NORMAL - Obverse of EXCLUSIVE, the default one.
279 **********************************************************************************/
281 description "Flags are generic flags that apply to any and all commands, all are optional";
287 description "EXCLUSIVE (accept no queued requests on this VNF while processing) or NORMAL (queue other requests until complete)";
295 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc.) state";
299 description "<0....N> -Â The timeout value (expressed in seconds) for action execution, between action being received by APPC and action initiation";
307 grouping config-payload {
308 description "Payload for modify config on traffic generator";
309 container config-payload {
310 description "Payload for modify config on traffic generator";
312 description "this is the restconf interface for vTrafficGenerator";
318 description "this is the configuration data";
326 grouping action-identifiers {
327 description "A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate";
328 container 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 leaf service-instance-id {
331 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";
336 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";
341 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";
346 description "identifies a specific VM within the given service/vnf to which this action is to be applied";
354 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";
356 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";
358 description "Response code";
363 description "Response message";
371 /**********************************************************************************
372 * NEW API ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
373 * All requests will include this standard header
375 * The standard request header is used to define a correlation identification for
376 * the request that is returned on all responses. This correlation identifier
377 * (called the service-request-id) is meaningful to the caller and is included on
378 * all responses from the services.
379 **********************************************************************************/
380 grouping RequestHeader {
381 container RequestHeader {
382 description "A common header for all APP-C requests";
384 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
390 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
396 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)";
402 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";
407 leaf-list RequestTrack {
408 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";
412 /**********************************************************************************
413 * Flags are generic flags that apply to any and all commands, all are optional
414 * 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.
415 * TTL = <0....N> - The timeout value for command execution, expressed in seconds
416 * MODE = EXCLUSIVE/NORMAL - defines execution mode as follows:
417 * - EXCLUSIVE � on encountering an exclusive command, the APP-C will:
418 * * Cease accepting additional command requests
420 * Complete execution of outstanding commands
421 * * Execute the exclusive command to completion
422 * * Optionally report the result of the command
423 * * Optionally resume command acceptance and processing
424 * - NORMAL - Obverse of EXCLUSIVE, the default one.
425 **********************************************************************************/
427 description "Flags are generic flags that apply to any and all commands, all are optional";
429 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc) state.";
434 description "<0....N> - The timeout value for action execution, expressed in seconds";
439 description "EXCLUSIVE/NORMAL - defines execution mode";
447 grouping RequestParameters {
448 description "The request contains the entry of command-specific and is opaque to the APP-C handler";
450 description "The actual action to be taken";
455 description "The specific VF a component of which is to be affected";
460 description "The specific VFC within a VF to be affected";
465 description "An action-specific value opaque to the APPC handler.
466 The value can be any valid JSON type (primitive, object, collection of those two).
467 APPC will pass the value as raw JSON string to the executing LCM action.";
473 grouping ResponseHeader {
474 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
475 container ResponseHeader {
476 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
478 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
484 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
490 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)";
495 leaf-list SubResponseID {
496 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";
502 grouping ResponseAttributes {
503 description "The response contains the status of executed functionality";
505 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";
507 description "Response code value";
512 description "Response code description";
518 description "Payload - the entry is command-specific and is opaque to the APP-C handler.
519 The value can be any valid JSON type (primitive, object, collection of those two).
520 APP-C will pass the value as raw JSON string to appropriate addressee";
529 /**********************************************************************************
530 * Define the restart service
531 **********************************************************************************/
533 description "An operation to restart a virtual network function (or VM)";
535 uses common-request-header;
539 uses common-response-header;
541 description "The UUID of the VM that was restarted";
547 /**********************************************************************************
548 * Define the rebuild service
549 **********************************************************************************/
551 description "An operation to rebuild a virtual network function (or VM)";
553 uses common-request-header;
557 uses common-response-header;
559 description "The UUID of the VM after rebuild. If the UUID was changed,
560 this contains the new UUID. If it was not changed, this contains
564 leaf original-vm-id {
565 description "The UUID of the VM before rebuild (i.e., the original UUID)";
571 /**********************************************************************************
572 * Define the migrate service
573 **********************************************************************************/
575 description "An operation to migrate a virtual network function (or VM)";
577 uses common-request-header;
581 uses common-response-header;
583 description "The UUID of the VM that was migrated.";
589 /**********************************************************************************
590 * Define the evacuate service
591 **********************************************************************************/
593 description "An operation to evacuate a virtual network function (or VM)";
595 uses common-request-header;
599 uses common-response-header;
601 description "The UUID of the VM that was evacuated";
608 /**********************************************************************************
609 * Define the snapshot service
610 **********************************************************************************/
612 description "An operation to create a snapshot of a virtual network function (or VM)";
614 uses common-request-header;
618 uses common-response-header;
620 description "The UUID of the VM that was snapshot";
627 description "An operation to modify-config the configurations of a virtual network function (or VM)";
629 uses common-request-header;
637 uses common-response-header;
642 description "An operation to check status of a VM";
644 uses common-request-header;
648 uses common-response-header;
650 description "The status of the VM requested";