+.. ============LICENSE_START==========================================
+.. ===================================================================
+.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+.. ===================================================================
+.. Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+.. you may not use this documentation except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. https://creativecommons.org/licenses/by/4.0/
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+.. ============LICENSE_END============================================
+.. ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+.. _appc_api_guide:
+
+============================================
ONAP Application Controller (APPC) API Guide
============================================
-Revision History
-----------------
-
-+--------------+------------+---------------+--------------------------------------------------------+
-| Date | Revision | Author | Changes |
-+--------------+------------+---------------+--------------------------------------------------------+
-| 2017-08-25 | 2.0.0 | Paul Miller | Updates for software contribution in Amsterdam Release |
-| | | | |
-| | | | **Commands Removed** |
-| | | | - LiveUpgrade |
-| | | | - ModifyConfig (replaced by ConfigModify) |
-| | | | - Rollback |
-| | | | - SoftwareUpload |
-| | | | - Terminate |
-| | | | - Test |
-+--------------+------------+---------------+--------------------------------------------------------+
-| 2017-02-06 | 1.0.0 | mjf | copyright updated |
-+--------------+------------+---------------+--------------------------------------------------------+
-
-|
-
Introduction
============
This document is intended for an advanced technical audience, such as the engineers or architects who need to use this guide to develop an interfacing application. The guide assumes a knowledge of the Open Network Automation Platform (ONAP) components and features, and familiarity with JSON notation.
-Conventions
------------
-
-+--------------+------------------------------------------------------------------------------------------+
-| Convention | Description |
-| | |
-+==============+==========================================================================================+
-|``Monospace`` | This font indicates sample codes, screenshots, or elements. For example:: |
-| | |
-| | "contact": { |
-| | "contactType": "USER", |
-| | "source": "app1", |
-| | } |
-| | |
-+--------------+------------------------------------------------------------------------------------------+
-|*Italics* | Emphasizes a point or denotes new terms at the place where they are defined in the text. |
-| | Indicates an external book title reference. |
-| | |
-+--------------+------------------------------------------------------------------------------------------+
-
-
-
Life Cycle Management Commands
==============================
-APPC receives commands from external ECOMP components, such as SO, Policy, DCAE, or the Portal, to manage the life cycle of virtual applications and their components.
+APPC receives commands from external ONAP components, such as SO, Policy, DCAE, or the Portal, to manage the life cycle of virtual applications and their components.
A virtual application is composed of the following layers of network technology:
For more details, see the APPC Client Library Guide at:
- guides/appc_api_client
+ :ref:`appc_client_library`
The client library supports both synchronous and asynchronous flows as follows.
The client library adds the following wrapper around request and responses to the LCM API (described below)::
{
- "version" : "2.0",
- "cambria.partition" : "<TOPIC>",
- "correlation-id" :"<CORRELATION_ID>",
- "rpc-name" : "<RPC_NME>",
- "type" : <MESSAGE_TYPE>
- "body" : <RPC_SPECIFIC_BODY>
+ "version" : "2.0",
+ "cambria.partition" : "<TOPIC>",
+ "correlation-id" :"<CORRELATION_ID>",
+ "rpc-name" : "<RPC_NME>",
+ "type" : <MESSAGE_TYPE>
+ "body" : <RPC_SPECIFIC_BODY>
}
{
"input": {
- "common-header": {"timestamp": "<TIMESTAMP>",
- "api-ver": "<API_VERSION>",
- "originator-id": "<ECOMP_SYSTEM_ID>",
- "request-id": "<ECOMP_REQUEST_ID>",
- "sub-request-id": "<ECOMP_SUBREQUEST_ID>",
- "flags": {
- "mode": "<EXCLUSIVE|NORMAL>",
- "force": "<TRUE|FALSE>",
- "ttl": "<TTL_VALUE>"
- }
- },
- "action": "<COMMAND_ACTION>",
- "action-identifiers": {
- "vnf-id": "<ECOMP_VNF_ID>",
- "vnfc-name": "<ECOMP_VNFC_NAME>",
- "vserver-id": "VSERVER_ID"
- },
- ["payload": "<PAYLOAD>"]
- }
+ "common-header": {"timestamp": "<TIMESTAMP>",
+ "api-ver": "<API_VERSION>",
+ "originator-id": "<ECOMP_SYSTEM_ID>",
+ "request-id": "<ECOMP_REQUEST_ID>",
+ "sub-request-id": "<ECOMP_SUBREQUEST_ID>",
+ "flags": {
+ "mode": "<EXCLUSIVE|NORMAL>",
+ "force": "<TRUE|FALSE>",
+ "ttl": "<TTL_VALUE>"
+ }
+ },
+ "action": "<COMMAND_ACTION>",
+ "action-identifiers": {
+ "vnf-id": "<ECOMP_VNF_ID>",
+ "vnfc-name": "<ECOMP_VNFC_NAME>",
+ "vserver-id": "VSERVER_ID"
+ },
+ ["payload": "<PAYLOAD>"]
+ }
}
The LCM response conforms to the following structure::
{
- "output": {
- "common-header": {
- "api-ver": "<API\_VERSION>",
- "flags": {
- "ttl": <TTL\_VALUE>,
- "force": "<TRUE\|FALSE>",
- "mode": "<EXCLUSIVE\|NORMAL>"
- },
- "originator-id": "<ECOMP\_SYSTEM\_ID>",
- "request-id": "<ECOMP\_REQUEST\_ID>",
- "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>",
- "timestamp": "2016-08-08T23:09:00.11Z",
- },
- "payload": "<PAYLOAD>",
- [Additional fields],
- "status": {
- "code": <RESULT\_CODE>,
- "message": "<RESULT\_MESSAGE>"
- }
- }
+ "output": {
+ "common-header": {
+ "api-ver": "<API\_VERSION>",
+ "flags": {
+ "ttl": <TTL\_VALUE>,
+ "force": "<TRUE\|FALSE>",
+ "mode": "<EXCLUSIVE\|NORMAL>"
+ },
+ "originator-id": "<ECOMP\_SYSTEM\_ID>",
+ "request-id": "<ECOMP\_REQUEST\_ID>",
+ "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>",
+ "timestamp": "2016-08-08T23:09:00.11Z",
+ },
+ "payload": "<PAYLOAD>",
+ [Additional fields],
+ "status": {
+ "code": <RESULT\_CODE>,
+ "message": "<RESULT\_MESSAGE>"
+ }
+ }
}
Status Codes
-^^^^^^^^^^^^
+------------
The status code is returned in the response message as the code parameter, and the description as the message parameter.
Malformed Message Response
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+--------------------------
A malformed message is an invalid request based on the LCM API YANG scheme specification. APPC rejects malformed requests as implemented by ODL infrastructure level.
{
"errors": {
- "error": [
- {
- "error-type": "protocol",
- "error-tag": "malformed-message",
- "error-message": "<ERROR-MESSAGE>",
- "error-info": "<ERROR-INFO>"
- }
- ]
- }
+ "error": [
+ {
+ "error-type": "protocol",
+ "error-tag": "malformed-message",
+ "error-message": "<ERROR-MESSAGE>",
+ "error-info": "<ERROR-INFO>"
+ }
+ ]
+ }
}
{
"errors": {
- "error": [
- {
- "error-type": "protocol",
- "error-tag": "malformed-message",
- "error-message": "Error parsing input: Invalid value 'Stopp' for
- enum type. Allowed values are: [Sync, Audit, Stop, Terminate]",
- "error-info": "java.lang.IllegalArgumentException: Invalid value
- 'Stopp' for enum type. Allowed values are: [Sync, Audit, Stop,
- Terminate]..."
- }
- ]
- }
+ "error": [
+ {
+ "error-type": "protocol",
+ "error-tag": "malformed-message",
+ "error-message": "Error parsing input: Invalid value 'Stopp' for
+ enum type. Allowed values are: [Sync, Audit, Stop, Terminate]",
+ "error-info": "java.lang.IllegalArgumentException: Invalid value
+ 'Stopp' for enum type. Allowed values are: [Sync, Audit, Stop,
+ Terminate]..."
+ }
+ ]
+ }
}
artifacts to SDC which distributes them to all APPC instances in the
same environment (e.g., production).
-For more details, see the APPC Self-Service VNF Onboarding Guide (add link).
+For more details, see the APPC Self-Service VNF Onboarding Guide.
Audit Response
^^^^^^^^^^^^^^
-The audit response returns an indication of success or failure of the audit. If a new configuration is uploaded to the APPC database, the payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ECOMP Data Router bus which may be received by an external configuration storage system.
+The audit response returns an indication of success or failure of the audit. If a new configuration is uploaded to the APPC database, the payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ONAP Data Router bus which may be received by an external configuration storage system.
CheckLock
{
"output": {
- "status": {
- "code": <RESULT\_CODE>, "message": "<RESULT\_MESSAGE>"
- },
- "common-header": {
- "api-ver": "<API\_VERSION>",
- "request-id": "<ECOMP\_REQUEST\_ID>", "originator-id":
- "<ECOMP\_SYSTEM\_ID>",
- "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>", "timestamp":
- "2016-08-08T23:09:00.11Z",
- "flags": {
- "ttl": <TTL\_VALUE>, "force": "<TRUE\|FALSE>",
- "mode": "<EXCLUSIVE\|NORMAL>"
- }
- },
- "locked": "<TRUE\|FALSE>"
+ "status": {
+ "code": <RESULT\_CODE>, "message": "<RESULT\_MESSAGE>"
+ },
+ "common-header": {
+ "api-ver": "<API\_VERSION>",
+ "request-id": "<ECOMP\_REQUEST\_ID>", "originator-id":
+ "<ECOMP\_SYSTEM\_ID>",
+ "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>", "timestamp":
+ "2016-08-08T23:09:00.11Z",
+ "flags": {
+ "ttl": <TTL\_VALUE>, "force": "<TRUE\|FALSE>",
+ "mode": "<EXCLUSIVE\|NORMAL>"
+ }
+ },
+ "locked": "<TRUE\|FALSE>"
}
Configure Response
^^^^^^^^^^^^^^^^^^
-The Configure response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ECOMP Data Router bus which may be received by an external configuration storage system.
+The Configure response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ONAP Data Router bus which may be received by an external configuration storage system.
SO is creating the VNFC records in A&AI. APPC is updating the VNFC status.
ConfigModify Response
^^^^^^^^^^^^^^^^^^^^^
-The ConfigModify response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ECOMP Data Router bus which may be received by an external configuration storage system.
+The ConfigModify response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ONAP Data Router bus which may be received by an external configuration storage system.
ConfigBackup
------------
| | | | |
| | | | \": { |
| | | | |
-| | | | \"host-ip-address\": \”value\” |
+| | | | \"host-ip-address\": \”value\” |
| | | | |
| | | | } |
| | | | |
-| | | | \"configuration- parameters\": {\"<CONFIG- PARAMS>\"} |
+| | | | \"configuration- parameters\": {\"<CONFIG- PARAMS>\"} |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
| configuration- parameters | A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook. | No | |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
+=================================+====================================================================================================================================================================================+=====================+=================================================================+
| request- parameters | The parameters required to process the request must include the host-ip-address to connect to the VNF (for Chef and Ansible, this will be the url to connect to the server). | Yes | "payload": |
| | | | |
-| | | | "{\"request-parameters |
+| | | | "{\"request-parameters |
| | | | |
-| | | | \": { |
+| | | | \": { |
| | | | |
-| | | | \"host-ip-address\\": \”value\” |
+| | | | \"host-ip-address\\": \”value\” |
| | | | |
| | | | } |
| | | | |
-| | | | \"configuration- parameters\": {\"<CONFIG- PARAMS>\"} |
+| | | | \"configuration- parameters\": {\"<CONFIG- PARAMS>\"} |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
| configuration- parameters | A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook. | No | |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+