Updating the formatting for APPC docs
[appc.git] / docs / APPC API Guide / APPC API Guide.rst
1 .. _appc_api_guide:
2
3 ============================================
4 ONAP Application Controller (APPC) API Guide
5 ============================================
6
7 Revision History
8 ================
9
10 +--------------+------------+---------------+--------------------------------------------------------+
11 | Date         | Revision   | Author        | Changes                                                |
12 +--------------+------------+---------------+--------------------------------------------------------+
13 | 2017-08-25   | 2.0.0      | Paul Miller   | Updates for software contribution in Amsterdam Release |
14 |              |            |               |                                                        |
15 |              |            |               | **Commands Removed**                                   |
16 |              |            |               | - LiveUpgrade                                          |
17 |              |            |               | - ModifyConfig (replaced by ConfigModify)              |
18 |              |            |               | - Rollback                                             |
19 |              |            |               | - SoftwareUpload                                       |
20 |              |            |               | - Terminate                                            |
21 |              |            |               | - Test                                                 |
22 +--------------+------------+---------------+--------------------------------------------------------+
23 | 2017-02-06   | 1.0.0      | mjf           | copyright updated                                      |
24 +--------------+------------+---------------+--------------------------------------------------------+
25
26
27
28 Introduction
29 ============
30
31 This guide describes the APPC API that allows you to manage and control the life cycle of controlled virtual network functions (VNFs).
32
33
34 Target Audience
35 ---------------
36 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.
37
38
39 Life Cycle Management Commands
40 ==============================
41
42 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.
43
44 A virtual application is composed of the following layers of network technology:
45
46 - Virtual Network Function (VNF)
47 - Virtual Network Function Component (VNFC)
48 - Virtual Machine (VM)
49
50 A Life Cycle Management (LCM) command may affect one or more of these layers.
51
52 An LCM command is sent as a request to the APPC using an HTTP POST request or in a message on a message bus (DMaaP or UEB).  A request may result in either a single synchronous response or multiple asynchronous responses:
53
54 - An **asynchronous** command, which is sent as an authorized and valid request, results in at least two discrete response events:
55     - an accept response, to indicate that the request is accepted for processing
56     - a final response to indicate the status and outcome of the request processing
57     - An unauthorized or invalid request results in a single ERROR response.
58
59 - A **synchronous** command, such as Lock or Unlock, results in a single response that is either SUCCESS or ERROR.
60
61 **NOTE:** For both asynchronous or synchronous commands, the first response is always returned using the same transport that the initial action used. For example, if the action request was via the message bus (such as when it originates from Policy), then the response is also via the message bus. However, if the request was via a direct HTTP call, the response is similarly a synchronous HTTP response.
62
63
64 Message Bus and the LCM API Client Library
65 ------------------------------------------
66
67 The recommended approach for sending/receiving requests to APPC is via the message bus.   To support this approach, an APPC client library is available and should be used.  The client library aims to provide consumers of APPC capabilities with a strongly-typed Java interface and to encapsulate the actual interaction with APPC component via the message bus.
68
69 For more details, see the APPC Client Library Guide at:
70
71   :ref:`appc_client_library`
72
73
74 The client library supports both synchronous and asynchronous flows as follows.
75
76 Asynchronous Flow
77 ^^^^^^^^^^^^^^^^^
78
79 - The APPC Client Library is called via an asynchronous API using a full command object, which is mapped to a JSON representation.
80 - The APPC client calls the UEB/DMaaP client and sends the JSON command to a configured topic.
81 - The APPC client pulls response messages from the configured topic.
82 - On receiving the response for the command, APPC client runs the relevant callback method of the consumer ResponseHandler.
83
84 Synchronous Flow
85 ^^^^^^^^^^^^^^^^
86
87 - The APPC Client Library is called via a synchronous API using a full command object, which is mapped to a JSON representation.
88 - The APPC client calls the UEB/DMaaP client and sends the JSON command to a configured topic.
89 - The APPC client pulls response messages from the configured topic.
90 - On receiving the final response for the command, the APPC client returns the response object with a final status.
91
92 The client library adds the following wrapper around request and responses to the LCM API (described below)::
93
94     {
95         "version" : "2.0",
96         "cambria.partition" : "<TOPIC>",
97         "correlation-id" :"<CORRELATION_ID>",
98         "rpc-name" : "<RPC_NME>",
99         "type" : <MESSAGE_TYPE>
100         "body" : <RPC_SPECIFIC_BODY>
101     }
102
103
104
105 Table 1 Request / Response Message Fields
106
107 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
108 | **Field**            | **Description**                                                                                                | **Required**        |
109 +======================+================================================================================================================+=====================+
110 | version              | Indicates the version of the message bus protocol with APPC. Version 2.0 should be used.                       |     Yes             |
111 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
112 | cambria. partition   | Indicates the specific topic partition that the message is intended for. For example:                          |     No              |
113 |                      |                                                                                                                |                     |
114 |                      | -  For incoming messages, this value should be APP-C.                                                          |                     |
115 |                      |                                                                                                                |                     |
116 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
117 | correlation- id      | Correlation ID used for associating responses in APPC Client Library. Built as: <request-id>-<sub-request-id>  |     Yes             |
118 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
119 | rpc-name             | The target Remote Processing Call (RPC) name which should match the LCM command name. For example: configure   |     Yes             |
120 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
121 | type                 | Message type: request, response or error                                                                       |     Yes             |
122 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
123 | body                 | Contains the input or output LCM command content, which is either the request or response                      |                     |
124 |                      | The body field format is identical to the equivalent HTTP Rest API command based on the specific RPC name      |     Yes             |
125 |                      |                                                                                                                |                     |
126 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
127
128
129 Generic Request Format
130 ----------------------
131
132 The LCM API general request format is applicable for both POST HTTP API and for the message body received via the EUB/DMaaP bus.
133
134 LCM Request
135 ^^^^^^^^^^^
136
137 The LCM request comprises a common header and a section containing the details of the LCM action.
138 The LCM request conforms to the following structure::
139
140     {
141     "input": {
142                 "common-header": {"timestamp": "<TIMESTAMP>",
143                                         "api-ver": "<API_VERSION>",
144                                         "originator-id": "<ECOMP_SYSTEM_ID>",
145                                         "request-id": "<ECOMP_REQUEST_ID>",
146                                         "sub-request-id": "<ECOMP_SUBREQUEST_ID>",
147                                         "flags": {
148                                                    "mode": "<EXCLUSIVE|NORMAL>",
149                                                    "force": "<TRUE|FALSE>",
150                                                    "ttl": "<TTL_VALUE>"
151                                                  }
152                                  },
153                 "action": "<COMMAND_ACTION>",
154                 "action-identifiers": {
155                                         "vnf-id": "<ECOMP_VNF_ID>",
156                                         "vnfc-name": "<ECOMP_VNFC_NAME>",
157                                         "vserver-id": "VSERVER_ID"
158                                       },
159                 ["payload": "<PAYLOAD>"]
160             }
161     }
162
163
164 Table 2 LCM Request Fields
165
166 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
167 |     **Field**             |     **Description**                                                                                                                                                                                                                                                                                                    |     **Required?**   |
168 +===========================+========================================================================================================================================================================================================================================================================================================================+=====================+
169 |     input                 |     The block that defines the details of the input to the command processing. Contains the common-header details.                                                                                                                                                                                                     |     Yes             |
170 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
171 |     common- header        |     The block that contains the generic details about a request.                                                                                                                                                                                                                                                       |     Yes             |
172 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
173 |     timestamp             |     The time of the request, in ISO 8601 format, ZULU offset. For example: 2016-08-03T08:50:18.97Z.                                                                                                                                                                                                                    |     Yes             |
174 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
175 |                           |     APPC will reject the request if timestamp is in the future (due to clock error), or timestamp is too old (compared to TTL flag)                                                                                                                                                                                    |                     |
176 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
177 |     api-ver               |     Identifies the API version, in X.YY format, where X denotes the major version increased with each APPC release, and YY is the minor release version. For example:                                                                                                                                                  |     Yes             |
178 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
179 |                           | -  5.00 for this version                                                                                                                                                                                                                                                                                               |                     |
180 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
181 |     originator-id         |     An identifier of the calling system limited to a length of 40 characters.                                                                                                                                                                                                                                          |     Yes             |
182 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
183 |                           |     It can be used for addressing purposes, such as to return an asynchronous response to the correct destination, in particular where there are multiple consumers of APPC APIs.                                                                                                                                      |                     |
184 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
185 |     request-id            |     The UUID for the request ID, limited to a length of 40 characters. The unique OSS/BSS identifier for the request ID that triggers the current LCM action. Multiple API calls can be made with the same request-id.                                                                                                 |     Yes             |
186 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
187 |                           |     The request-id is stored throughout the operations performed during a single request.                                                                                                                                                                                                                              |                     |
188 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
189 |     sub-request-id        |     Uniquely identifies a specific LCM or control action, limited to a length of 40 characters. Persists throughout the life cycle of a single request.                                                                                                                                                                |     No              |
190 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
191 |     flags                 |     Generic flags that apply to all LCM actions:                                                                                                                                                                                                                                                                       |     No              |
192 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
193 |                           | -  "MODE" :                                                                                                                                                                                                                                                                                                            |                     |
194 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
195 |                           |    -  "EXCLUSIVE" - accept no queued requests on this VNF while processing, or                                                                                                                                                                                                                                         |                     |
196 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
197 |                           |    -  "NORMAL" - queue other requests until complete                                                                                                                                                                                                                                                                   |                     |
198 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
199 |                           | -  "FORCE" : "TRUE"\|"FALSE" - run action even if target is in an unstable state (for example, if VNF is busy processing another LCM command or if a previous command failed and VNF was indicated as not STABLE), or not.                                                                                             |                     |
200 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
201 |                           |     The specific behavior of forced actions varies, but implies cancellation of the previous action and an override by the new action. The default value is FALSE.                                                                                                                                                     |                     |
202 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
203 |                           |     Force flag are used to bypass APPC’s working state management for the VNF(VNF working State Management) :                                                                                                                                                                                                          |                     |
204 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
205 |                           |     APPC maintains working state (in the VNF\_STATE\_MANAGEMENT table present in the APPC-DB) for the VNF depending on the last action performed on it:                                                                                                                                                                |                     |
206 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
207 |                           |     There are below 3 states appc have for VNF while performing non-read only operation (Read-Only operations are : Lock, Unlock, CheckLock, Sync, Audit etc. ) :                                                                                                                                                      |                     |
208 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
209 |                           |     1) Stable – If the last action performed on a VNF is Successful (returning Success).                                                                                                                                                                                                                               |                     |
210 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
211 |                           |     2) Unstable – This is the intermediate state for any VNF on which operation is being performed.                                                                                                                                                                                                                    |                     |
212 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
213 |                           |     3) Unknown – This is the status when the last action performed on a VNF is not successful.                                                                                                                                                                                                                         |                     |
214 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
215 |                           |     APPC have validation that it will not allow any operations on VNF which is in Unstable or Unknown state. To skip this check end-user can pass Force-flag=true in the request.                                                                                                                                      |                     |
216 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
217 |                           | -  "TTL": <0....N> - The timeout value for the action to run, between action received by APPC and action initiated.                                                                                                                                                                                                    |                     |
218 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
219 |                           |     If no TTL value provided, the default/configurable TTL value is to be used.                                                                                                                                                                                                                                        |                     |
220 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
221 |     action                |     The action to be taken by APPC, for example: Test, Start, Terminate.                                                                                                                                                                                                                                               |     Yes             |
222 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
223 |                           |     ***NOTE:** The specific value for the action parameter is provided for each* command.                                                                                                                                                                                                                              |                     |
224 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
225 |     action- identifiers   |     A block containing the action arguments. These are used to specify the object upon which APPC LCM command is to operate. At least one action-identifier must be specified (note that vnf-id is mandatory). For actions that are at the VM level, the action-identifiers provided would be vnf-id and vserver-id.   | Yes                 |
226 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
227 |     vnf-id                |     Identifies the VNF instance to which this action is to be applied. Required for actions.                                                                                                                                                                                                                           |     Yes             |
228 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
229 |     vnfc-name             |     Identifies the VNFC instance to which this action is to be applied. Required if the action applied to a specific VNFC.                                                                                                                                                                                             |     No              |
230 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
231 |     vserver-id            |     Identifies a specific VM instance to which this action is to be applied. Required if the action applied to a specific VM. (Populate the vserver-id field with the UUID of the VM)                                                                                                                                  |     No              |
232 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
233 |     vf-module-id          |     Identifies a specific VF module to which this action is to be applied. Required if the action applied to a specific VF module.                                                                                                                                                                                     |     No              |
234 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
235 |     payload               |     An action-specific open-format field.                                                                                                                                                                                                                                                                              |     No              |
236 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
237 |                           |     The payload can be any valid JSON string value. JSON escape characters need to be added when an inner JSON string is included within the payload, for example: "{\\" vnf -host- ip                                                                                                                                 |                     |
238 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
239 |                           |     -address\\": \\"<VNF-HOST-IP-ADDRESS>\\"}".                                                                                                                                                                                                                                                                        |                     |
240 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
241 |                           |     The payload is typically used to provide parametric data associated with the command, such as a list of configuration parameters.                                                                                                                                                                                  |                     |
242 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
243 |                           |     Note that not all LCM commands need have a payload.                                                                                                                                                                                                                                                                |                     |
244 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
245 |                           |     ***NOTE:** See discussion below on the use of payloads for self-service actions.*                                                                                                                                                                                                                                  |                     |
246 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
247
248
249 Generic Response Format
250 -----------------------
251
252
253 This section describes the generic response format.
254
255 The response format is applicable for both POST HTTP API and for the message body received via the EUB/DMaaP bus.
256
257
258 LCM Response
259 ^^^^^^^^^^^^
260
261 The LCM response comprises a common header and a section containing the payload and action details.
262
263 The LCM response conforms to the following structure::
264
265     {
266         "output": {
267                     "common-header": {
268                                         "api-ver": "<API\_VERSION>",
269                                         "flags": {
270                                                    "ttl": <TTL\_VALUE>,
271                                                    "force": "<TRUE\|FALSE>",
272                                                    "mode": "<EXCLUSIVE\|NORMAL>"
273                                                  },
274                                         "originator-id": "<ECOMP\_SYSTEM\_ID>",
275                                         "request-id": "<ECOMP\_REQUEST\_ID>",
276                                         "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>",
277                                         "timestamp": "2016-08-08T23:09:00.11Z",
278                                      },
279                    "payload": "<PAYLOAD>",
280                    [Additional fields],
281                    "status": {
282                                 "code": <RESULT\_CODE>,
283                                 "message": "<RESULT\_MESSAGE>"
284                              }
285                  }
286     }
287
288
289 Table 3 LCM Response Fields
290
291 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
292 |     **Field**        |     **Description**                                                                                                                                                                                                       |     **Required?**   |
293 +======================+===========================================================================================================================================================================================================================+=====================+
294 |     output           |     The block that defines the details of the output of the command processing. Contains the common-header details.                                                                                                       |     Yes             |
295 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
296 |     common- header   |     The block that contains the generic details about a request.                                                                                                                                                          |     Yes             |
297 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
298 |     api-ver          |     Identifies the API version, in X.YY format, where X denotes the major version increased with each APPC release, and YY is the minor release version. For example:                                                     |     Yes             |
299 |                      |                                                                                                                                                                                                                           |                     |
300 |                      | -  5.00 for this version                                                                                                                                                                                                  |                     |
301 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
302 |     originator-id    |     An identifier of the calling system limited to a length of 40 characters.                                                                                                                                             |     Yes             |
303 |                      |                                                                                                                                                                                                                           |                     |
304 |                      |     It can be used for addressing purposes, such as to return an asynchronous response to the correct destination, in particular where there are multiple consumers of APPC APIs.                                         |                     |
305 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
306 |     request-id       |     The UUID for the request ID, limited to a length of 40 characters. The unique OSS/BSS identifier for the request ID that triggers the current LCM action. Multiple API calls can be made with the same request- id.   |     Yes             |
307 |                      |                                                                                                                                                                                                                           |                     |
308 |                      |     The request-id is stored throughout the operations performed during a single request.                                                                                                                                 |                     |
309 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
310 |     sub-request-id   |     Uniquely identifies a specific LCM or control action, limited to a length of 40 characters. Persists throughout the life cycle of a single request.                                                                   |     No              |
311 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
312 |     timestamp        |     The time of the request, in ISO 8601 format, ZULU offset. For example: 2016-08-03T08:50:18.97Z.                                                                                                                       |     Yes             |
313 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
314 |     status           |     The status describes the outcome of the command processing. Contains a code and a message providing success or failure details.                                                                                       |     Yes             |
315 |                      |                                                                                                                                                                                                                           |                     |
316 |                      |     ***NOTE:** See* status *for code values.*                                                                                                                                                                             |                     |
317 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
318 |     payload          |     An open-format field.                                                                                                                                                                                                 |     No              |
319 |                      |                                                                                                                                                                                                                           |                     |
320 |                      |     The payload can be any valid JSON string value. JSON escape characters need to be added when an inner JSON string is included within the payload, for example: "{\\"upload\_config\_id\\": \\"<value\\"}".            |                     |
321 |                      |                                                                                                                                                                                                                           |                     |
322 |                      |     The payload is typically used to provide parametric data associated with the response to the command.                                                                                                                 |                     |
323 |                      |                                                                                                                                                                                                                           |                     |
324 |                      |     Note that not all LCM commands need have a payload.                                                                                                                                                                   |                     |
325 |                      |                                                                                                                                                                                                                           |                     |
326 |                      |     ***NOTE:** The specific value(s) for the response payload, where relevant, is provided for in each* command *description.*                                                                                            |                     |
327 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
328 |     [Field name]     |     Additional fields can be provided in the response, if needed, by specific commands.                                                                                                                                   |     No              |
329 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
330 |     code             |     A unique pre-defined value that identifies the exact nature of the success or failure status.                                                                                                                         |     No              |
331 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
332 |     message          |     The description of the success or failure status.                                                                                                                                                                     |     No              |
333 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
334
335
336 Status Codes
337 ------------
338
339 The status code is returned in the response message as the code parameter, and the description as the message parameter.
340
341 The different responses are categorized as follows:
342
343 **ACCEPTED**
344
345     Request is valid and accepted for processing.
346
347 **ERROR**
348
349     Request invalid or incomplete.
350
351 **REJECT**
352
353     Request rejected during processing due to invalid data, such as an
354     unsupported command or a non-existent service-instance-id.
355
356 **SUCCESS**
357
358     Request is valid and completes successfully.
359
360 **FAILURE**
361
362     The request processing resulted in failure.
363
364     A FAILURE response is always returned asynchronously via the message
365     bus.
366
367 **PARTIAL SUCCESS**
368
369     The request processing resulted in partial success where at least
370     one step in a longer process completed successfully.
371
372     A PARTIAL SUCCESS response is always returned asynchronously via the
373     message bus.
374
375 **PARTIAL FAILURE**
376
377     The request processing resulted in partial failure.
378
379     A PARTIAL FAILURE response is always returned asynchronously via the
380     message bus.
381
382 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
383 |     **Category**      |     **Code**   |     **Message / Description**                                                                                                        |
384 +=======================+================+======================================================================================================================================+
385 |     ACCEPTED          |     100        |     ACCEPTED - Request accepted                                                                                                      |
386 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
387 |     ERROR             |     200        |     UNEXPECTED ERROR - ${detailedErrorMsg}                                                                                           |
388 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
389 |     REJECT            |     300        |     REJECTED - ${detailedErrorMsg}                                                                                                   |
390 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
391 |                       |     301        |     INVALID INPUT PARAMETER -${detailedErrorMsg}                                                                                     |
392 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
393 |                       |     302        |     MISSING MANDATORY PARAMETER - Parameter ${paramName} is missing                                                                  |
394 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
395 |                       |     303        |     REQUEST PARSING FAILED - ${detailedErrorMsg}                                                                                     |
396 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
397 |                       |     304        |     NO TRANSITION DEFINED - No Transition Defined for ${actionName} action and ${currentState} state                                 |
398 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
399 |                       |     305        |     ACTION NOT SUPPORTED - ${actionName} action is not supported                                                                     |
400 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
401 |                       |     306        |     VNF NOT FOUND - VNF with ID ${vnfId} was not found                                                                               |
402 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
403 |                       |     307        |     DG WORKFLOW NOT FOUND - No DG workflow found for the combination of ${dgModule} module ${dgName} name and ${dgVersion} version   |
404 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
405 |                       |     308        |     WORKFLOW NOT FOUND - No workflow found for VNF type                                                                              |
406 |                       |                |                                                                                                                                      |
407 |                       |                |     ${vnfTypeVersion} and ${actionName} action                                                                                       |
408 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
409 |                       |     309        |     UNSTABLE VNF - VNF ${vnfId} is not stable to accept the command                                                                  |
410 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
411 |                       |     310        |     LOCKING FAILURE -${detailedErrorMsg}                                                                                             |
412 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
413 |                       |     311        |     EXPIREDREQUEST. The request processing time exceeded the maximum available time                                                  |
414 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
415 |                       |     312        |     DUPLICATEREQUEST. The request already exists                                                                                     |
416 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
417 |                       |     313        |     MISSING VNF DATA IN A&AI - ${attributeName} not found for VNF ID =                                                               |
418 |                       |                |                                                                                                                                      |
419 |                       |                |     ${vnfId}                                                                                                                         |
420 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
421 |     SUCCESS           |     400        |     The request was processed successfully                                                                                           |
422 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
423 |     FAILURE           |     401        |     DG FAILURE - ${ detailedErrorMsg }                                                                                               |
424 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
425 |                       |     402        |     NO TRANSITION DEFINED - No Transition Defined for ${ actionName} action and ${currentState} state                                |
426 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
427 |                       |     403        |     UPDATE\_AAI\_FAILURE - failed to update AAI. ${errorMsg}                                                                         |
428 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
429 |                       |     404        |     EXPIRED REQUEST FAILURE - failed during processing because TTL expired                                                           |
430 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
431 |                       |     405        |     UNEXPECTED FAILURE - ${detailedErrorMsg}                                                                                         |
432 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
433 |                       |     406        |     UNSTABLE VNF FAILURE - VNF ${vnfId} is not stable to accept the command                                                          |
434 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
435 |                       |     450        |     Requested action is not supported on the VNF                                                                                     |
436 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
437 |     PARTIAL SUCCESS   |     500        |     PARTIAL SUCCESS                                                                                                                  |
438 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
439 |     PARTIAL FAILURE   |     501 -      |     PARTIAL FAILURE                                                                                                                  |
440 |                       |                |                                                                                                                                      |
441 |                       |     599        |                                                                                                                                      |
442 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
443
444
445 Malformed Message Response
446 --------------------------
447
448 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.
449
450 **Response Format for Malformed Requests**::
451
452     {
453       "errors": {
454                   "error": [
455                             {   
456                               "error-type": "protocol",
457                               "error-tag": "malformed-message",
458                               "error-message": "<ERROR-MESSAGE>",
459                               "error-info": "<ERROR-INFO>"
460                             }
461                            ]
462                 }
463     }
464
465
466 **Example Response**::
467
468     {
469       "errors": {
470                   "error": [
471                             {
472                               "error-type": "protocol",
473                               "error-tag": "malformed-message",
474                               "error-message": "Error parsing input: Invalid value 'Stopp' for
475                                enum type. Allowed values are: [Sync, Audit, Stop, Terminate]",
476                               "error-info": "java.lang.IllegalArgumentException: Invalid value
477                                 'Stopp' for enum type. Allowed values are: [Sync, Audit, Stop,
478                                 Terminate]..."
479                             }
480                            ]
481                 }
482     }
483
484
485
486 API Scope
487 =========
488
489 Defines the level at which the LCM command operates for the current release of APPC and the VNF types which are supported for each command.
490
491
492 Commands, or actions, can be performed at one or more of the following scope levels:
493
494
495 +-----------------+----------------------------------------------------------------------------------------+
496 | **VNF**         | Commands can be applied at the level of a specific VNF instance using the vnf-id.      |
497 +-----------------+----------------------------------------------------------------------------------------+
498 | **VF-Module**   | Commands can be applied at the level of a specific VF-Module using the vf-module-id.   |
499 +-----------------+----------------------------------------------------------------------------------------+
500 | **VNFC**        | Commands can be applied at the level of a specific VNFC instance using a vnfc-name.    |
501 +-----------------+----------------------------------------------------------------------------------------+
502 | **VM**          | Commands can be applied at the level of a specific VM instance using a vserver-id.     |
503 +-----------------+----------------------------------------------------------------------------------------+
504
505
506 **VNF’s Types Supported**
507
508 Commands, or actions, may be currently supported on all VNF types or a limited set of VNF types. Note that the intent in the 1710 release is to support all actions on all VNF types which have been successfully onboarded in a self-service mode.
509
510 **Any -** Currently supported on any vnf-type.
511
512 **Any (requires self-service onboarding) –** Currently supported on any vnf-type which has been onboarded using the APPC self-service onboarding process. See further discussion on self-service onboarding below.
513
514
515 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
516 |     **Command**        |     **VNF**   |     **VF-Module**   |     **VNFC**   |     **VM**   |     **VNF/VM Types Supported**                                 |
517 +========================+===============+=====================+================+==============+================================================================+
518 |     Audit              |     Yes       |                     |                |              |     Any (requires self-service onboarding)                     |
519 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
520 |     CheckLock          |     Yes       |                     |                |              |     Any (APPC internal command)                                |
521 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
522 |     Configure          |     Yes       |                     |     Yes        |              |     Any (requires self-service onboarding)                     |
523 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
524 |     ConfigModify       |     Yes       |                     |     Yes        |              |     Any (requires self-service onboarding)                     |
525 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
526 |     ConfigBackup       |     Yes       |                     |                |              |     Chef and Ansible only (requires self-service onboarding)   |
527 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
528 |     ConfigRestore      |     Yes       |                     |                |              |     Chef and Ansible only (requires self-service onboarding)   |
529 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
530 |     Evacuate           |               |                     |                |     Yes      | Any (uses OpenStack Evacuate command)                          |
531 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
532 |     HealthCheck        |     Yes       |                     |                |              |     Any (requires self-service onboarding)                     |
533 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
534 |     Lock               |     Yes       |                     |                |              |     Any (APPC internal command)                                |
535 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
536 |     Migrate            |               |                     |                |     Yes      |     Any (uses OpenStack Migrate command)                       |
537 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
538 |     Rebuild            |               |                     |                |     Yes      |     Any (uses OpenStack Rebuild command)                       |
539 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
540 |     Restart            |     Yes       |                     |                |     Yes      |     Any (uses OpenStack Start and Stop commands)               |
541 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
542 |     Snapshot           |               |                     |                |     Yes      |     Any (uses OpenStack Snapshot command)                      |
543 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
544 |     Start              |     Yes       |     Yes             |                |     Yes      |     Any (uses OpenStack Start command)                         |
545 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
546 |     StartApplication   |     Yes       |                     |                |              |     Chef and Ansible only (requires self-service onboarding)   |
547 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
548 |     Stop               |     Yes       |     Yes             |                |     Yes      |     Any (uses OpenStack Stop command)                          |
549 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
550 |     StopApplication    |     Yes       |                     |                |              |     Chef and Ansible only (requires self-service onboarding)   |
551 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
552 |     Sync               |     Yes       |                     |                |              |     Any (requires self-service onboarding)                     |
553 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
554 |     Unlock             |     Yes       |                     |                |              |     Any (APPC internal command)                                |
555 +------------------------+---------------+---------------------+----------------+--------------+----------------------------------------------------------------+
556
557
558
559 Self-Service VNF Onboarding
560 ---------------------------
561
562 The APPC architecture is designed for VNF self-service onboarding (i.e., a VNF owner or vendor through the use of tools can enable a new VNF to support the LCM API actions that are designate as self-service). The VNF must support one or more of the following interface protocols:
563
564 -  Netconf with uploadable Yang model (requires a Netconf server running
565    on the VNF)
566
567 -  Chef (requires a Chef client running on the VNF)
568
569 -  Ansible (does not require any changes to the VNF software)
570
571 The self-service onboarding process is done using an APPC Design GUI which interacts with an APPC instance which is dedicated to self-service onboarding. The steps in the onboarding process using the APPC Design GUI are:
572
573 -  Define the VNF capabilities (set of actions that the VNF can
574    support).
575
576 -  Create a template and parameter definitions for actions which use the
577    Netconf, Chef, or Ansible protocols. The template is an xml or JSON
578    block which defines the “payload” which is included in the request
579    that is downloaded the VNF (if Netconf) or Chef/Ansible server.
580
581 -  Test actions which have templates/parameter definitions.
582
583 -  Upload the VNF definition, template, and parameter definition
584    artifacts to SDC which distributes them to all APPC instances in the
585    same environment (e.g., production).
586
587 For more details, see the APPC Self-Service VNF Onboarding Guide.
588
589
590
591 LCM Commands
592 ============
593
594 The LCM commands that are valid for the current release.
595
596
597 Audit
598 -----
599
600 The Audit command compares the configuration of the VNF associated with the current request against the most recent configuration that is stored in APPC's configuration database.
601
602 A successful Audit means that the current VNF configuration matches the latest APPC stored configuration.
603
604 A failed Audit indicates that the configurations do not match.
605
606 This command can be applied to any VNF type. The only restriction is that the VNF has been onboarded in self-service mode (which requires that the VNF supports a request to return the running configuration).
607
608 The Audit action does not require any payload parameters.
609
610 **NOTE:** Audit does not return a payload containing details of the comparison, only the Success/Failure status.
611
612
613 +------------------------------+------------------------------------------------------+
614 |     **Target URL**           |     /restconf /operations/ appc-provider-lcm:audit   |
615 +------------------------------+------------------------------------------------------+
616 |     **Action**               |     Audit                                            |
617 +------------------------------+------------------------------------------------------+
618 |     **Action-Identifiers**   |     vnf-id                                           |
619 +------------------------------+------------------------------------------------------+
620 |     **Payload Parameters**   |     See below                                        |
621 +------------------------------+------------------------------------------------------+
622 |     **Revision History**     |     Unchanged in this version.                       |
623 +------------------------------+------------------------------------------------------+
624
625 |
626
627 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
628 |     **Parameter**    |     **Description**                                                                                                                                       |     **Required?**   |     **Example**                  |
629 +======================+===========================================================================================================================================================+=====================+==================================+
630 |     publish-config   |     \* If the publish\_config field is set to Y in the payload, then always send the running configuration from the VNF using the Data Router             |     Yes             |     "publish-config": "<Y\|N>"   |
631 |                      |                                                                                                                                                           |                     |                                  |
632 |                      |     \* If the publish\_config field is set to N in the payload, then:                                                                                     |                     |                                  |
633 |                      |                                                                                                                                                           |                     |                                  |
634 |                      |     - If the result of the audit is ‘match’ (latest APPC config and the running config match), do not send the running configuration in the Data Router   |                     |                                  |
635 |                      |                                                                                                                                                           |                     |                                  |
636 |                      |     - If the result of the audit is ‘no match’, then send the running configuration on the Data Router                                                    |                     |                                  |
637 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
638
639 Audit Response
640 ^^^^^^^^^^^^^^
641
642 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.
643
644
645 CheckLock
646 ---------
647
648 The CheckLock command returns true if the specified VNF is locked; otherwise, false is returned.
649
650 A CheckLock command is deemed successful if the processing completes without error, whether the VNF is locked or not. The command returns only a single response with a final status.
651
652 Note that APPC locks the target VNF during any VNF command processing, so a VNF can have a locked status even if no Lock command has been explicitly called.
653
654 The CheckLock command returns a specific response structure that extends the default LCM response.
655
656 The CheckLock action does not require any payload parameters.
657
658 +------------------------------+--------------------------------------------------------+
659 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:checklock   |
660 +------------------------------+--------------------------------------------------------+
661 |     **Action**               |     CheckLock                                          |
662 +------------------------------+--------------------------------------------------------+
663 |     **Action-Identifiers**   |     vnf-id                                             |
664 +------------------------------+--------------------------------------------------------+
665 |     **Payload Parameters**   |     None                                               |
666 +------------------------------+--------------------------------------------------------+
667 |     **Revision History**     |     Unchanged in this version.                         |
668 +------------------------------+--------------------------------------------------------+
669
670 CheckLock Response
671 ^^^^^^^^^^^^^^^^^^
672
673 The CheckLock command returns a customized version of the LCM
674 response.
675
676
677 +---------------------+---------------------------------------------------------------------------------------+--------------------+---------------------------------+
678 |     **Parameter**   |     **Description**                                                                   |     **Required**   | **?Example**                    |
679 +=====================+=======================================================================================+====================+=================================+
680 |     locked          |     "TRUE"\|"FALSE" - returns TRUE if the specified VNF is locked, otherwise FALSE.   |     No             |     "locked": "<TRUE\|FALSE>"   |
681 +---------------------+---------------------------------------------------------------------------------------+--------------------+---------------------------------+
682
683
684 **Example**::
685
686     {
687       "output": {
688                   "status": {
689                               "code": <RESULT\_CODE>, "message": "<RESULT\_MESSAGE>"
690                             },
691                   "common-header": {
692                                      "api-ver": "<API\_VERSION>",
693                                      "request-id": "<ECOMP\_REQUEST\_ID>", "originator-id":
694                                      "<ECOMP\_SYSTEM\_ID>",
695                                      "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>", "timestamp":
696                                      "2016-08-08T23:09:00.11Z",
697                                      "flags": {
698                                                 "ttl": <TTL\_VALUE>, "force": "<TRUE\|FALSE>",
699                                                 "mode": "<EXCLUSIVE\|NORMAL>"
700                                               }
701                                    },
702                   "locked": "<TRUE\|FALSE>"
703     }
704
705
706 Configure
707 ---------
708
709 Configure a VNF or a VNFC on the VNF after instantiation.
710
711 A set of configuration parameter values specified in the configuration template is included in the request. Other configuration parameter values may be obtained from an external system.
712
713 A successful Configure request returns a success response.
714
715 A failed Configure action returns a failure response and the specific failure messages in the response block.
716
717 +------------------------------+--------------------------------------------------------+
718 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configure   |
719 +------------------------------+--------------------------------------------------------+
720 |     **Action**               |     Configure                                          |
721 +------------------------------+--------------------------------------------------------+
722 |     **Action-Identifiers**   |     vnf-id                                             |
723 +------------------------------+--------------------------------------------------------+
724 |     **Payload Parameters**   |     See below                                          |
725 +------------------------------+--------------------------------------------------------+
726 |     **Revision History**     |     Unchanged in this version.                         |
727 +------------------------------+--------------------------------------------------------+
728
729 |
730
731 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
732 |     **Payload Parameter**       |     **Description**                                                                                                                                                                                                                                                                                        |     **Required?**   |     **Example**                                                 |
733 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
734 +=================================+============================================================================================================================================================================================================================================================================================================+=====================+=================================================================+
735 |     request- parameters         |     The parameters required to process the request must include the host-ip-address to connect to the VNF, if Netconf. A template-name may also be included in the event that a specific configuration template needs to be identified. If the request is vnfc-specific, the vnfc-type must be included.   |     Yes             |                                                                 |
736 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     "payload":                                                  |
737 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
738 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     "{\"request-parameters                                      |
739 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
740 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \": {                                                       |
741 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
742 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \"host-ip-address\": \”value\”,                             |
743 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
744 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”vnfc-type\”: \”value\”’,                                  |
745 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
746 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”template-name\”: \”name\”                                 |
747 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
748 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     }                                                           |
749 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
750 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \"configuration- parameters\": {\"<CONFIG- PARAMS>\"}       |
751 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
752 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
753 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified. If provided, APPC replaces variables in the configuration template with the values supplied.                                                                                                                                  |     No              |                                                                 |
754 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
755
756
757 Configure Response
758 ^^^^^^^^^^^^^^^^^^
759
760 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.
761
762 SO is creating the VNFC records in A&AI. APPC is updating the VNFC status.
763
764 ConfigModify
765 ------------
766
767 Modifies the configuration on a VNF or VNFC in service.
768
769 A successful ConfigModify request returns a success response.
770
771 A failed ConfigModify action returns a failure response code and the specific failure message in the response block.
772
773 **NOTE:** See also `Configure <#_bookmark35>`__
774
775 +------------------------------+-----------------------------------------------------------+
776 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configmodify   |
777 +------------------------------+-----------------------------------------------------------+
778 |     **Action**               |     ConfigModify                                          |
779 +------------------------------+-----------------------------------------------------------+
780 |     **Action-Identifiers**   |     Vnf-id                                                |
781 +------------------------------+-----------------------------------------------------------+
782 |     **Payload Parameters**   |     See below                                             |
783 +------------------------------+-----------------------------------------------------------+
784 |     **Revision History**     |     Unchanged in this version.                            |
785 +------------------------------+-----------------------------------------------------------+
786
787 |
788
789 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
790 |     **Payload Parameter**       |     **Description**                                                                                                                                                                                                                                                                                        |     **Required?**   |     **Example**                                                 |
791 +=================================+============================================================================================================================================================================================================================================================================================================+=====================+=================================================================+
792 |     request- parameters         |     The parameters required to process the request must include the host-ip-address to connect to the VNF, if Netconf. A template-name may also be included in the event that a specific configuration template needs to be identified. If the request is vnfc-specific, the vnfc-type must be included.   |     Yes             |     "payload":                                                  |
793 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
794 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     "{\"request-parameters                                      |
795 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
796 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \": {                                                       |
797 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
798 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \"host-ip-address\": \”value\”,                             |
799 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
800 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”vnfc-type\”: \”value\”’                                   |
801 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
802 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”template-name\”: \”name\”,                                |
803 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
804 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     }                                                           |
805 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
806 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \"configuration- parameters\": {\"<CONFIG- PARAMS>\"}       |
807 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
808 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified. If provided, APPC replaces variables in the configuration template with the values supplied.                                                                                                                                  |     No              |                                                                 |
809 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
810
811 If successful, this request returns a success response.
812
813 A failed Configure action returns a failure response and the specific failure message in the response block.
814
815 ConfigModify Response
816 ^^^^^^^^^^^^^^^^^^^^^
817
818 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.
819
820 ConfigBackup
821 ------------
822
823 Stores the current VNF configuration on a local file system (not in APPC). This is limited to Ansible and Chef. There can only be one stored configuration (if there is a previously saved configuration, it is replaced with the current VNF configuration).
824
825 A successful ConfigBackup request returns a success response.
826
827 A failed ConfigBackup action returns a failure response code and the specific failure message in the response block.
828
829 +------------------------------+-----------------------------------------------------------+
830 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configbackup   |
831 +------------------------------+-----------------------------------------------------------+
832 |     **Action**               |     ConfigBackup                                          |
833 +------------------------------+-----------------------------------------------------------+
834 |     **Action-Identifiers**   |     Vnf-id                                                |
835 +------------------------------+-----------------------------------------------------------+
836 |     **Payload Parameters**   |     See below                                             |
837 +------------------------------+-----------------------------------------------------------+
838 |     **Revision History**     |     New in this version.                                  |
839 +------------------------------+-----------------------------------------------------------+
840
841 |
842
843 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
844 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
845 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
846 |     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":                                                      |
847 |                                 |                                                                                                                                                                                    |                     |                                                                 |
848 |                                 |                                                                                                                                                                                    |                     |     "{\"request-parameters                                      |
849 |                                 |                                                                                                                                                                                    |                     |                                                                 |
850 |                                 |                                                                                                                                                                                    |                     |     \": {                                                       |
851 |                                 |                                                                                                                                                                                    |                     |                                                                 |
852 |                                 |                                                                                                                                                                                    |                     |     \"host-ip-address\": \”value\”                              |
853 |                                 |                                                                                                                                                                                    |                     |                                                                 |
854 |                                 |                                                                                                                                                                                    |                     |     }                                                           |
855 |                                 |                                                                                                                                                                                    |                     |                                                                 |
856 |                                 |                                                                                                                                                                                    |                     |     \"configuration- parameters\": {\"<CONFIG- PARAMS>\"}       |
857 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
858 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
859 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
860
861 ConfigBackup Response
862 ^^^^^^^^^^^^^^^^^^^^^
863
864 The ConfigBackup response returns an indication of success or failure of the request.
865
866 ConfigRestore
867 -------------
868
869 Applies a previously saved configuration to the active VNF configuration. This is limited to Ansible and Chef. There can only be one stored configuration.
870
871 A successful ConfigRestore request returns a success response.
872
873 A failed ConfigRestore action returns a failure response code and the specific failure message in the response block.
874
875 +------------------------------+------------------------------------------------------------------------------------------+
876 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configrestore                                 |
877 +------------------------------+------------------------------------------------------------------------------------------+
878 |     **Action**               |     ConfigRestore                                                                        |
879 +------------------------------+------------------------------------------------------------------------------------------+
880 |     **Action-Identifiers**   |     Vnf-id                                                                               |
881 +------------------------------+------------------------------------------------------------------------------------------+
882 |     **Payload Parameters**   |     `request-parameters <#_bookmark24>`__, `configuration-parameters <#_bookmark26>`__   |
883 +------------------------------+------------------------------------------------------------------------------------------+
884 |     **Revision History**     |     New in this version.                                                                 |
885 +------------------------------+------------------------------------------------------------------------------------------+
886
887 |
888
889 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
890 |     **Parameter**               |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
891 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
892 |     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":                                                  |
893 |                                 |                                                                                                                                                                                    |                     |                                                                 |
894 |                                 |                                                                                                                                                                                    |                     |     "{\"request-parameters                                      |
895 |                                 |                                                                                                                                                                                    |                     |                                                                 |
896 |                                 |                                                                                                                                                                                    |                     |     \": {                                                       |
897 |                                 |                                                                                                                                                                                    |                     |                                                                 |
898 |                                 |                                                                                                                                                                                    |                     |     \"host-ip-address\\": \”value\”                             |
899 |                                 |                                                                                                                                                                                    |                     |                                                                 |
900 |                                 |                                                                                                                                                                                    |                     |     }                                                           |
901 |                                 |                                                                                                                                                                                    |                     |                                                                 |
902 |                                 |                                                                                                                                                                                    |                     |     \"configuration- parameters\": {\"<CONFIG- PARAMS>\"}       |
903 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
904 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
905 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
906
907 ConfigRestore Response
908 ^^^^^^^^^^^^^^^^^^^^^^
909
910 The ConfigRestore response returns an indication of success or failure of the request.
911
912 Evacuate
913 --------
914
915 Evacuates a specified VM from its current host to another. After a successful evacuate, a rebuild VM is performed if a snapshot is available (and the VM boots from a snapshot.
916
917 The host on which the VM resides needs to be down.
918
919 If the node is not specified in the request, it will be selected by relying on internal rules to evacuate. The Evacuate action will fail if the specified target host is not UP/ENABLED.
920
921 After Evacuate, the rebuild VM can be disabled by setting the optional `rebuild-vm <#_bookmark43>`__ parameter to false.
922
923 A successful Evacuate action returns a success response. A failed Evacuate action returns a failure.
924
925 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
926
927 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
928 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:evacuate                                                                                                            |
929 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
930 |     **Action**               |     Evacuate                                                                                                                                                   |
931 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
932 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                                                                                                         |
933 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
934 |     **Payload Parameters**   |     `vm-id <#_bookmark40>`__, `identity-url <#_bookmark41>`__, `tenant-id <#_bookmark42>`__, `rebuild-vm <#_bookmark43>`__, `targethost-id <#_bookmark44>`__   |
935 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
936 |     **Revision History**     |     Unchanged in this version.                                                                                                                                 |
937 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
938
939 |
940
941 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
942 |     **Parameter**    |     **Description**                                                                                                                                                              |     **Required?**   |     **Example**                       |
943 +======================+==================================================================================================================================================================================+=====================+=======================================+
944 |     vm-id            |     The unique identifier (UUID) of the resource. For backwards- compatibility, this can be the self- link URL of the VM.                                                        |     Yes             |     "payload":                        |
945 |                      |                                                                                                                                                                                  |                     |                                       |
946 |                      |                                                                                                                                                                                  |                     |     "{\"vm-id\": \"<VM-ID>            |
947 |                      |                                                                                                                                                                                  |                     |                                       |
948 |                      |                                                                                                                                                                                  |                     |     \",                               |
949 |                      |                                                                                                                                                                                  |                     |                                       |
950 |                      |                                                                                                                                                                                  |                     |     \"identity-url\":                 |
951 |                      |                                                                                                                                                                                  |                     |                                       |
952 |                      |                                                                                                                                                                                  |                     |     \"<IDENTITY-URL>\",               |
953 |                      |                                                                                                                                                                                  |                     |                                       |
954 |                      |                                                                                                                                                                                  |                     |     \"tenant-id\\": \"<TENANT-ID>     |
955 |                      |                                                                                                                                                                                  |                     |                                       |
956 |                      |                                                                                                                                                                                  |                     |     \",                               |
957 |                      |                                                                                                                                                                                  |                     |                                       |
958 |                      |                                                                                                                                                                                  |                     |     \"rebuild-vm\": \"false\",        |
959 |                      |                                                                                                                                                                                  |                     |                                       |
960 |                      |                                                                                                                                                                                  |                     |     \"targethost-id\":                |
961 |                      |                                                                                                                                                                                  |                     |                                       |
962 |                      |                                                                                                                                                                                  |                     |     \"nodeblade7\"}"                  |
963 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
964 |     identity- url    |     The identity URL used to access the resource                                                                                                                                 |     No              |                                       |
965 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
966 |     tenant-id        |     The id of the provider tenant that owns the resource                                                                                                                         |     No              |                                       |
967 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
968 |     rebuild- vm      |     A boolean flag indicating if a Rebuild is to be performed after an Evacuate. The default action is to do a Rebuild. It can be switched off by setting the flag to "false".   |     No              |                                       |
969 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
970 |     targethost- id   |     A target hostname indicating the host the VM is evacuated to. By default, the cloud determines the target host.                                                              |     No              |                                       |
971 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
972
973 HealthCheck
974 -----------
975
976 This command runs a VNF health check and returns the result.
977
978 A health check is VNF-specific. For a complex VNF, APPC initiates further subordinate health checks.
979
980 HealthCheck is a VNF level command which interrogates the VNF in order to determine the health of the VNF and the VNFCs. The HealthCheck will be implemented differently for each VNF.
981
982
983 +------------------------------+-----------------------------------------------------------+
984 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:health-check   |
985 +------------------------------+-----------------------------------------------------------+
986 |     **Action**               |     HealthCheck                                           |
987 +------------------------------+-----------------------------------------------------------+
988 |     **Action-Identifiers**   |     Vnf-id                                                |
989 +------------------------------+-----------------------------------------------------------+
990 |     **Payload Parameters**   |     `vnf-host-ip-address <#_bookmark46>`__                |
991 +------------------------------+-----------------------------------------------------------+
992 |     **Revision History**     |     Changed in this version.                              |
993 +------------------------------+-----------------------------------------------------------+
994
995 |
996
997 +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+-------------------------------------+
998 |     **Paramete**            |     **Description**                                                                                                                                            |  **Required?**   | **Example**                         |
999 +=============================+================================================================================================================================================================+==================+=====================================+
1000 |     vnf- host-ip- address   |     The IP address used to connect to the VNF, using a protocol such as SSH. For example, for a vSCP VNF, the floating IP address of the SMP should be used.   |     Yes          |     "payload":                      |
1001 |                             |                                                                                                                                                                |                  |                                     |
1002 |                             |                                                                                                                                                                |                  |     "{\"vnf-host-ip-address\":      |
1003 |                             |                                                                                                                                                                |                  |                                     |
1004 |                             |                                                                                                                                                                |                  |     \"10.222.22.2\"}"               |
1005 +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+-------------------------------------+
1006
1007 Lock
1008 ----
1009
1010 Use the Lock command to ensure exclusive access during a series of critical LCM commands.
1011
1012 The Lock action will return a successful result if the VNF is not already locked or if it was locked with the same request-id, otherwise the action returns a response with a reject status code.
1013
1014 Lock is a command intended for APPC and does not execute an actual VNF command. Instead, lock will ensure that ONAP is granted exclusive access to the VNF.
1015
1016 When a VNF is locked, any subsequent sequential commands with same request-id will be accepted. Commands associated with other request-ids will be rejected.
1017
1018 The Lock command returns only one final response with the status of the request processing.
1019
1020 APPC locks the target VNF during any VNF command processing. If a lock action is then requested on that VNF, it will be rejected because the VNF was already locked, even though no actual lock command was explicitly invoked.
1021
1022 +------------------------------+---------------------------------------------------+
1023 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:lock   |
1024 +------------------------------+---------------------------------------------------+
1025 |     **Action**               |     Lock                                          |
1026 +------------------------------+---------------------------------------------------+
1027 |     **Action-Identifier**    |     Vnf-id                                        |
1028 +------------------------------+---------------------------------------------------+
1029 |     **Payload Parameters**   |     None                                          |
1030 +------------------------------+---------------------------------------------------+
1031 |     **Revision History**     |     Unchanged in this version.                    |
1032 +------------------------------+---------------------------------------------------+
1033
1034 Migrate
1035 -------
1036
1037 Migrates a running target VM from its current host to another.
1038
1039 A destination node will be selected by relying on internal rules to migrate. Migrate calls a command in order to perform the operation.
1040
1041 Migrate suspends the guest virtual machine, and moves an image of the guest virtual machine's disk to the destination host physical machine. The guest virtual machine is then resumed on the destination host physical machine and the disk storage that it used on the source host physical machine is freed.
1042
1043 The migrate action will leave the VM in the same Openstack state the VM had been in prior to the migrate action. If a VM was stopped before migration, a separate VM-level restart command would be needed to restart the VM after migration.
1044
1045 A successful Migrate action returns a success response and the new node identity in the response payload block.
1046
1047 A failed Migrate action returns a failure and the failure messages in the response payload block.
1048
1049 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1050
1051 +--------------------------------+-----------------------------------------------------------------------------------------------+
1052 |     **Target URL**             |     /restconf/operations/appc-provider-lcm:migrate                                            |
1053 +--------------------------------+-----------------------------------------------------------------------------------------------+
1054 |     **Action**                 |     Migrate                                                                                   |
1055 +--------------------------------+-----------------------------------------------------------------------------------------------+
1056 |     **Action-Identifiers**     |     Vnf-id, vserver-id                                                                        |
1057 +--------------------------------+-----------------------------------------------------------------------------------------------+
1058 |     \ **Payload Parameters**   |     `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__   |
1059 +--------------------------------+-----------------------------------------------------------------------------------------------+
1060 |     **Revision History**       |     Unchanged in this version.                                                                |
1061 +--------------------------------+-----------------------------------------------------------------------------------------------+
1062
1063 Payload Parameters
1064
1065 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1066 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                    |
1067 +=====================+=========================================================================+=====================+====================================+
1068 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                    |
1069 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |     "payload":                     |
1070 |                     |     link URL of the VM.                                                 |                     |                                    |
1071 |                     |                                                                         |                     |     "{\\"vm-id\": \\"<VM-ID>\\",   |
1072 |                     |                                                                         |                     |     \\"identity-url\\":            |
1073 |                     |                                                                         |                     |                                    |
1074 |                     |                                                                         |                     |     \\"<IDENTITY-URL>\\",          |
1075 +---------------------+-------------------------------------------------------------------------+---------------------+                                    +
1076 |     identity- url   |     The identity url used to access the resource                        |     No              |     \\"tenant-id\\": \\"<TENANT-   |
1077 |                     |                                                                         |                     |     ID>\\"}"                       |
1078 +---------------------+-------------------------------------------------------------------------+---------------------+                                    +
1079 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                    |
1080 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1081
1082 Rebuild
1083 -------
1084
1085 Recreates a target VM instance to a known, stable state.
1086
1087 Rebuild calls an OpenStack command immediately and therefore does not expect any prerequisite operations to be performed, such as shutting off a VM.
1088
1089 APPC only supports the rebuild operation for a VM that boots from image (snapshot), i.e., APPC rejects a rebuild request if it determines the VM boots from volume (disk).
1090
1091 A successful rebuild returns a success response and the rebuild details in the response payload block. A failed rebuild returns a failure and the failure messages in the response payload block.
1092
1093 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1094
1095 +------------------------------+-----------------------------------------------------------------------------------------------+
1096 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:rebuild                                            |
1097 +------------------------------+-----------------------------------------------------------------------------------------------+
1098 |     **Action**               |     Rebuild                                                                                   |
1099 +------------------------------+-----------------------------------------------------------------------------------------------+
1100 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                                        |
1101 +------------------------------+-----------------------------------------------------------------------------------------------+
1102 |     **Payload Parameters**   |     `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__   |
1103 +------------------------------+-----------------------------------------------------------------------------------------------+
1104 |     **Revision History**     |     Unchanged in this version.                                                                |
1105 +------------------------------+-----------------------------------------------------------------------------------------------+
1106
1107 Restart
1108 -------
1109
1110 Use the Restart command to restart a VNF or a single VM. The generic VNF Restart uses a simple restart logic where all VM’s are stopped and re-started.
1111
1112 The generic Restart operation is invoked either for the VM or the VNF level.
1113
1114 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1115 |     **Input Block**          |     api-ver must be set to 2.00 for *VNF Restart*                                                               |
1116 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1117 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:restart                                                              |
1118 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1119 |     **Action**               |     Restart                                                                                                     |
1120 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1121 |     **Action-identifiers**   |     Vnf-id is required; if restart is for a single VM, then vserver-id is also required.                        |
1122 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1123 |     **Payload Parameters**   |     For *VNF* Restart: `host Identity <#_bookmark57>`__, `vnf-host-ip-address <#_bookmark58>`__                 |
1124 |                              |                                                                                                                 |
1125 |                              |     For *VM* Restart: `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__   |
1126 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1127 |     **Revision History**     |     Revised in this version.                                                                                    |
1128 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1129
1130 Payload Parameters for **VNF Restart**
1131
1132 +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1133 |     **Parameter**           |     **Description**                                                                                                                                               |     **Required?**   |     **Example**                       |
1134 +=============================+===================================================================================================================================================================+=====================+=======================================+
1135 |     Cloud Identity          |     The identity URL of the OpenStack host on which the VNF resource was created. If not provided, this information will be retrieved from the properties file.   |     No              |     "payload":                        |
1136 |                             |                                                                                                                                                                   |                     |     "{\\" vnf-host-ip-address \\":    |
1137 |                             |                                                                                                                                                                   |                     |                                       |
1138 |                             |                                                                                                                                                                   |                     |     \\"<VNF\_FLOATING\_IP\_ADDRESS>   |
1139 |                             |                                                                                                                                                                   |                     |     \\",                              |
1140 |                             |                                                                                                                                                                   |                     |     \\" hostIdentity \\":             |
1141 |                             |                                                                                                                                                                   |                     |     \\"<OpenStack IP Address>\\"      |
1142 |                             |                                                                                                                                                                   |                     |     }"                                |
1143 +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1144 |     vnf- host-ip- address   |     The IP address used to connect to the VNF, using a protocol such as SSH. For example, for a vSCP VNF, the floating IP address of the SMP should be used.      |     Yes             |                                       |
1145 +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1146
1147 Payload Parameters for **VM Restart**
1148
1149 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1150 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                    |
1151 +=====================+=========================================================================+=====================+====================================+
1152 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                    |
1153 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |     "payload":                     |
1154 |                     |     link URL of the VM.                                                 |                     |                                    |
1155 |                     |                                                                         |                     |     "{\\"vm-id\\": \\"<VM-ID>\\",  |
1156 |                     |                                                                         |                     |     \\"identity-url\\":            |
1157 |                     |                                                                         |                     |                                    |
1158 +---------------------+-------------------------------------------------------------------------+---------------------+     \\"<IDENTITY-URL>\\",          |
1159 |     identity- url   |     The identity url used to access the resource                        |     No              |     \"tenant-id\": \"<TENANT-      |
1160 |                     |                                                                         |                     |     ID>\"}"                        |
1161 +---------------------+-------------------------------------------------------------------------+---------------------+                                    +
1162 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                    |
1163 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1164
1165 Snapshot
1166 --------
1167
1168 Creates a snapshot of a VM.
1169
1170 The Snapshot command returns a customized response containing a reference to the newly created snapshot instance if the action is successful.
1171
1172 This command can be applied to any VNF type. The only restriction is that the particular VNF should be built based on the generic heat stack.
1173
1174 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1175
1176 +------------------------------+-----------------------------------------------------------------------------------------------------+
1177 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:snapshot                                                 |
1178 +------------------------------+-----------------------------------------------------------------------------------------------------+
1179 |     **Action**               |     Snapshot                                                                                        |
1180 +------------------------------+-----------------------------------------------------------------------------------------------------+
1181 |     **Action-identifiers**   |     Vnf-id is required. If the snapshot is for a single VM, then the vserver-id is also required.   |
1182 +------------------------------+-----------------------------------------------------------------------------------------------------+
1183 |     **Payload Parameters**   |     `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__         |
1184 +------------------------------+-----------------------------------------------------------------------------------------------------+
1185 |     **Revision History**     |     Unchanged in this version.                                                                      |
1186 +------------------------------+-----------------------------------------------------------------------------------------------------+
1187
1188 Payload Parameters
1189
1190 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1191 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                    |
1192 +=====================+=========================================================================+=====================+====================================+
1193 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                    |
1194 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1195 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |     "payload":                     |
1196 |                     |     link URL of the VM.                                                 |                     |                                    |
1197 |                     |                                                                         |                     |     "{\\"vm-id\": \\"<VM-ID>       |
1198 |                     |                                                                         |                     |                                    |
1199 |                     |                                                                         |                     |     \\",                           |
1200 |                     |     link URL of the VM.                                                 |                     |     \\"identity-url\\":            |
1201 |                     |                                                                         |                     |                                    |
1202 |                     |                                                                         |                     |     \\"<IDENTITY-URL>\\",          |
1203 +---------------------+-------------------------------------------------------------------------+---------------------+                                    +
1204 |     identity- url   |     The identity url used to access the resource                        |     No              |     \\"tenant-id\\": \\"<TENANT-   |
1205 |                     |                                                                         |                     |     ID>\\"}"                       |
1206 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1207 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                    |
1208 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1209
1210 Snapshot Response
1211 ^^^^^^^^^^^^^^^^^
1212
1213 The Snapshot command returns an extended version of the LCM response.
1214
1215 The Snapshot response conforms to the `standard response format <#_bookmark5>`__, but has the following additional field.
1216
1217 Additional Parameters
1218
1219 +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------------------------+
1220 |     **Parameter**   |     **Description**                                                                                                                                    |     **Required**   | **?Example**                          |
1221 +=====================+========================================================================================================================================================+====================+=======================================+
1222 |     snapshot-id     |     The snapshot identifier created by cloud host. This identifier will be returned only in the final success response returned via the message bus.   |     No             |     "snapshot-id": "<SNAPSHOT\_ID>"   |
1223 +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------------------------+
1224
1225 Start
1226 -----
1227
1228 Use the Start command to start a VNF, VF-Module, or VM that is stopped or not running.
1229
1230 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1231
1232 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1233 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:start                                                                               |
1234 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1235 |     **Action**               |     Start                                                                                                                      |
1236 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1237 |     **Action-identifiers**   |     Vnf-id is required; vf-module-id or vserver-id is also required if the action is at vf-module or vm level, respectively.   |
1238 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1239 |     **Payload Parameters**   |     None                                                                                                                       |
1240 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1241 |     **Revision History**     |     Revised in this version.                                                                                                   |
1242 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1243
1244 StartApplication
1245 ----------------
1246
1247 Starts the VNF application, if needed, after a VM is instantiated/configured or after VM start or restart. Supported using Chef cookbook or Ansible playbook only.
1248
1249 A successful StartApplication request returns a success response.
1250
1251 A failed StartApplication action returns a failure response code and the specific failure message in the response block.
1252
1253 +------------------------------+---------------------------------------------------------------+
1254 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:startapplication   |
1255 +------------------------------+---------------------------------------------------------------+
1256 |     **Action**               |     StartApplication                                          |
1257 +------------------------------+---------------------------------------------------------------+
1258 |     **Action-Identifiers**   |     Vnf-id                                                    |
1259 +------------------------------+---------------------------------------------------------------+
1260 |     **Payload Parameters**   |     See below                                                 |
1261 +------------------------------+---------------------------------------------------------------+
1262 |     **Revision History**     |     New in this version.                                      |
1263 +------------------------------+---------------------------------------------------------------+
1264
1265 |
1266
1267 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1268 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1269 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1270 |     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":                                                  |
1271 |                                 |                                                                                                                                                                                    |                     |                                                                 |
1272 |                                 |                                                                                                                                                                                    |                     |     "{\\"request-parameters                                     |
1273 |                                 |                                                                                                                                                                                    |                     |     \\": {                                                      |
1274 |                                 |                                                                                                                                                                                    |                     |     \\"host-ip-address\\": \\”value\\”                          |
1275 |                                 |                                                                                                                                                                                    |                     |     }                                                           |
1276 |                                 |                                                                                                                                                                                    |                     |     \\"configuration- parameters\\": {\\"<CONFIG- PARAMS>\\"}   |
1277 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1278 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1279 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1280
1281 StartApplication Response
1282 ^^^^^^^^^^^^^^^^^^^^^^^^^
1283
1284 The StartApplication response returns an indication of success or failure of the request.
1285
1286 Stop
1287 ----
1288
1289 Use the Stop command to start a VNF, VF-Module, or VM that is stopped or not running.
1290
1291 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1292
1293 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1294 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:stop                                                                                |
1295 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1296 |     **Action**               |     Stop                                                                                                                       |
1297 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1298 |     **Action-identifiers**   |     Vnf-id is required; vf-module-id or vserver-id is also required if the action is at vf-module or vm level, respectively.   |
1299 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1300 |     **Payload Parameters**   |     None                                                                                                                       |
1301 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1302 |     **Revision History**     |     Revised in this version.                                                                                                   |
1303 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1304
1305 StopApplication
1306 ---------------
1307
1308 Stops the VNF application gracefully (not lost traffic), if needed, prior to a Stop command. Supported using Chef cookbook or Ansible playbook only.
1309
1310 A successful StopApplication request returns a success response.
1311
1312 A failed StopApplication action returns a failure response code and the specific failure message in the response block.
1313
1314 +------------------------------+--------------------------------------------------------------+
1315 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:stopapplication   |
1316 +------------------------------+--------------------------------------------------------------+
1317 |     **Action**               |     StopApplication                                          |
1318 +------------------------------+--------------------------------------------------------------+
1319 |     **Action-Identifiers**   |     Vnf-id                                                   |
1320 +------------------------------+--------------------------------------------------------------+
1321 |     **Payload Parameters**   |     See below                                                |
1322 +------------------------------+--------------------------------------------------------------+
1323 |     **Revision History**     |     New in this version.                                     |
1324 +------------------------------+--------------------------------------------------------------+
1325
1326 |
1327
1328 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1329 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1330 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1331 |     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":                                                  |
1332 |                                 |                                                                                                                                                                                    |                     |     "{\\"request-parameters                                     |
1333 |                                 |                                                                                                                                                                                    |                     |     \\": {                                                      |
1334 |                                 |                                                                                                                                                                                    |                     |     \\"host-ip-address\\": \\”va lue\\”                         |
1335 |                                 |                                                                                                                                                                                    |                     |     }                                                           |
1336 |                                 |                                                                                                                                                                                    |                     |     \\"configuration- parameters\\": {\\"<CONFIG- PARAMS>\\"}   |
1337 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1338 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1339 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1340
1341 StopApplication Response
1342 ^^^^^^^^^^^^^^^^^^^^^^^^
1343
1344 The StopApplication response returns an indication of success or failure of the request.
1345
1346 Sync
1347 ----
1348
1349 The Sync action updates the current configuration in the APPC store with the running configuration from the device.
1350
1351 A successful Sync returns a success status.
1352
1353 A failed Sync returns a failure response status and failure messages in the response payload block.
1354
1355 This command can be applied to any VNF type. The only restriction is that the VNF has been onboarded in self-service mode (which requires that the VNF supports a request to return the running configuration).
1356
1357 +------------------------------+---------------------------------------------------+
1358 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:sync   |
1359 +------------------------------+---------------------------------------------------+
1360 |     **Action**               |     Sync                                          |
1361 +------------------------------+---------------------------------------------------+
1362 |     **Action-identifiers**   |     Vnf-id                                        |
1363 +------------------------------+---------------------------------------------------+
1364 |     **Payload Parameters**   |     None                                          |
1365 +------------------------------+---------------------------------------------------+
1366 |     **Revision History**     |     Unchanged in this version.                    |
1367 +------------------------------+---------------------------------------------------+
1368
1369 Unlock
1370 ------
1371
1372 Run the Unlock command to release the lock on a VNF and allow other clients to perform LCM commands on that VNF.
1373
1374 Unlock is a command intended for APPC and does not execute an actual VNF command. Instead, unlock will release the VNF from the exclusive access held by the specific request-id allowing other requests for the VNF to be accepted.
1375
1376 The Unlock command will result in success if the VNF successfully unlocked or if it was already unlocked, otherwise commands will be rejected.
1377
1378 The Unlock command will only return success if the VNF was locked with same `request-id <#_bookmark4>`__.
1379
1380 The Unlock command returns only one final response with the status of the request processing.
1381
1382 Note: APPC locks the target VNF during any command processing. If an Unlock action is then requested on that VNF with a different request-id, it will be rejected because the VNF is already locked for another process, even though no actual lock command was explicitly invoked.
1383
1384 +------------------------------+-----------------------------------------------------+
1385 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:unlock   |
1386 +------------------------------+-----------------------------------------------------+
1387 |     **Action**               |     Unlock                                          |
1388 +------------------------------+-----------------------------------------------------+
1389 |     **Action-identifiers**   |     Vnf-id                                          |
1390 +------------------------------+-----------------------------------------------------+
1391 |     **Payload Parameters**   |     None                                            |
1392 +------------------------------+-----------------------------------------------------+
1393 |     **Revision History**     |     Unchanged in this version.                      |
1394 +------------------------------+-----------------------------------------------------+
1395