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 {
22 namespace "org:openecomp:appc";
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-04" {
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";
107 description "The action to be taken by APP-C, e.g. Test, Start, Terminate";
110 /**********************************************************************************
111 * All requests will include this standard header
113 * The standard request header is used to define a correlation identification for
114 * the request that is returned on all responses. This correlation identifier
115 * (called the service-request-id) is meaningful to the caller and is included on
116 * all responses from the services.
117 **********************************************************************************/
118 grouping common-request-header {
119 description "A common header for all requests";
120 container common-request-header {
121 leaf service-request-id {
122 description "An identifier meaningful to the caller to correlate all responses";
128 description "The alloted time to perform the operation, in seconds. If the
129 operation cannot be completed in this amount of time, the operation is
130 aborted. If set to zero, no timeout exists and the operation will continue
131 until it completes or fails. If omitted, the default value of 0 is used.";
140 /**********************************************************************************
141 * Basic manipulation of a VNF (or VM) will typically include querying the current
142 * state, restarting, rebuilding, stopping, starting, etc. In all of these basic
143 * "state"-type operations, the services require the identification of the VNF to
144 * be operated on, and the region or LCP that contains that resource. This
145 * information is used across all of these services, so it has been defined as a
146 * common structure here and is referenced in the appropriate RPC definitions.
147 **********************************************************************************/
148 grouping vnf-resource {
149 description "The data that uniquely identifies a virtual network function (or vm)";
150 container vnf-resource {
152 description "The UUID of the resource. For backwards compatibility, this can be
153 the self-link URL of the VM.";
158 description "The identity url used to access the resource";
163 description "The id of the provider tenant that owns the resource";
170 /**********************************************************************************
171 * All responses will include this standard header
173 * The standard response header includes the time of completion as well as a
174 * success|failure indication
175 **********************************************************************************/
176 grouping common-response-header {
177 description "A common header for all responses defining success or failure
178 and the time stamp when completed";
179 container common-response-header {
180 leaf service-request-id {
181 description "An identifier meaningful to the caller to correlate all responses";
185 description "True indicates the request was successful";
189 description "If success=false, the failure reason. Otherwise, undefined.";
193 description "The formatted time stamp when the operation was completed.";
197 description "The amount of time used (in seconds) to process the request";
204 /**********************************************************************************
205 * All requests/response will include this standard header
207 * The standard common header is used to define a correlation identification for
208 * the request that is returned on all responses.
209 **********************************************************************************/
210 grouping common-header {
211 description "A common header for all APP-C requests";
212 container common-header {
213 description "A common header for all APP-C requests";
215 description "timestamp is in ISO 8601 timestamp format ZULU offset";
221 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)";
227 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)";
233 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";
238 leaf sub-request-id {
239 description "Uniquely identifies a specific LCM action. It is persistent over the life-cycle of a single request";
245 /**********************************************************************************
246 * Flags are generic flags that apply to any and all commands, all are optional
247 * 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.
248 * ttl = <0....N> - The timeout value for command execution, expressed in seconds
249 * mode = EXCLUSIVE/NORMAL - defines execution mode as follows:
250 * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will:
251 * * Cease accepting additional command requests
252 * * Complete execution of outstanding commands
253 * * Execute the exclusive command to completion
254 * * Optionally report the result of the command
255 * * Optionally resume command acceptance and processing
256 * - NORMAL - Obverse of EXCLUSIVE, the default one.
257 **********************************************************************************/
259 description "Flags are generic flags that apply to any and all commands, all are optional";
265 description "EXCLUSIVE (accept no queued requests on this VNF while processing) or NORMAL (queue other requests until complete)";
273 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc.) state";
277 description "<0....N> -Â The timeout value (expressed in seconds) for action execution, between action being received by APPC and action initiation";
285 grouping config-payload {
286 description "Payload for modify config on traffic generator";
287 container config-payload {
288 description "Payload for modify config on traffic generator";
290 description "this is the restconf interface for vTrafficGenerator";
296 description "this is the configuration data";
304 grouping 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 container action-identifiers {
307 description "A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate";
308 leaf service-instance-id {
309 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";
314 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";
319 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";
324 description "identifies a specific VM within the given service/vnf to which this action is to be applied";
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 "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";
336 description "Response code";
341 description "Response message";
349 /**********************************************************************************
350 * NEW API ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
351 * All requests will include this standard header
353 * The standard request header is used to define a correlation identification for
354 * the request that is returned on all responses. This correlation identifier
355 * (called the service-request-id) is meaningful to the caller and is included on
356 * all responses from the services.
357 **********************************************************************************/
358 grouping RequestHeader {
359 container RequestHeader {
360 description "A common header for all APP-C requests";
362 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
368 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
374 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)";
380 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";
385 leaf-list RequestTrack {
386 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";
390 /**********************************************************************************
391 * Flags are generic flags that apply to any and all commands, all are optional
392 * 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.
393 * TTL = <0....N> - The timeout value for command execution, expressed in seconds
394 * MODE = EXCLUSIVE/NORMAL - defines execution mode as follows:
395 * - EXCLUSIVE � on encountering an exclusive command, the APP-C will:
396 * * Cease accepting additional command requests
398 * Complete execution of outstanding commands
399 * * Execute the exclusive command to completion
400 * * Optionally report the result of the command
401 * * Optionally resume command acceptance and processing
402 * - NORMAL - Obverse of EXCLUSIVE, the default one.
403 **********************************************************************************/
405 description "Flags are generic flags that apply to any and all commands, all are optional";
407 description "TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc) state.";
412 description "<0....N> - The timeout value for action execution, expressed in seconds";
417 description "EXCLUSIVE/NORMAL - defines execution mode";
425 grouping RequestParameters {
426 description "The request contains the entry of command-specific and is opaque to the APP-C handler";
428 description "The actual action to be taken";
433 description "The specific VF a component of which is to be affected";
438 description "The specific VFC within a VF to be affected";
443 description "An action-specific value opaque to the APPC handler.
444 The value can be any valid JSON type (primitive, object, collection of those two).
445 APPC will pass the value as raw JSON string to the executing LCM action.";
451 grouping ResponseHeader {
452 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
453 container ResponseHeader {
454 description "The response to an APP-C command or control is, likewise, encoded in a JSON object. ";
456 description "TimeStamp is in ISO 8601 timestamp format ZULU offset";
462 description "APIver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)";
468 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)";
473 leaf-list SubResponseID {
474 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";
480 grouping ResponseAttributes {
481 description "The response contains the status of executed functionality";
483 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";
485 description "Response code value";
490 description "Response code description";
496 description "Payload - the entry is command-specific and is opaque to the APP-C handler.
497 The value can be any valid JSON type (primitive, object, collection of those two).
498 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)";
513 uses common-request-header;
517 uses common-response-header;
519 description "The UUID of the VM that was restarted";
525 /**********************************************************************************
526 * Define the rebuild service
527 **********************************************************************************/
529 description "An operation to rebuild a virtual network function (or VM)";
531 uses common-request-header;
535 uses common-response-header;
537 description "The UUID of the VM after rebuild. If the UUID was changed,
538 this contains the new UUID. If it was not changed, this contains
542 leaf original-vm-id {
543 description "The UUID of the VM before rebuild (i.e., the original UUID)";
549 /**********************************************************************************
550 * Define the migrate service
551 **********************************************************************************/
553 description "An operation to migrate a virtual network function (or VM)";
555 uses common-request-header;
559 uses common-response-header;
561 description "The UUID of the VM that was migrated.";
567 /**********************************************************************************
568 * Define the evacuate service
569 **********************************************************************************/
571 description "An operation to evacuate a virtual network function (or VM)";
573 uses common-request-header;
577 uses common-response-header;
579 description "The UUID of the VM that was evacuated";
586 /**********************************************************************************
587 * Define the snapshot service
588 **********************************************************************************/
590 description "An operation to create a snapshot of a virtual network function (or VM)";
592 uses common-request-header;
596 uses common-response-header;
598 description "The UUID of the VM that was snapshot";
605 description "An operation to modify-config the configurations of a virtual network function (or VM)";
607 uses common-request-header;
615 uses common-response-header;