83427f95b17c6f08021ef0af39791e6cb7297eb2
[appc.git] / docs / APPC LCM API Guide / APPC LCM API Guide.rst
1 .. ============LICENSE_START==========================================
2 .. ===================================================================
3 .. Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
4 .. ===================================================================
5 .. Licensed under the Creative Commons License, Attribution 4.0 Intl.  (the "License");
6 .. you may not use this documentation except in compliance with the License.
7 .. You may obtain a copy of the License at
8 .. 
9 ..  https://creativecommons.org/licenses/by/4.0/
10 .. 
11 .. Unless required by applicable law or agreed to in writing, software
12 .. distributed under the License is distributed on an "AS IS" BASIS,
13 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 .. See the License for the specific language governing permissions and
15 .. limitations under the License.
16 .. ============LICENSE_END============================================
17 .. ECOMP is a trademark and service mark of AT&T Intellectual Property.
18
19 .. _appc_api_guide:
20
21 ==================
22 APPC LCM API Guide
23 ==================
24
25 Introduction
26 ============
27
28 This guide describes the APPC API that allows you to manage and control the life cycle of controlled virtual network functions (VNFs).
29
30
31 Target Audience
32 ---------------
33 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.
34
35
36 Life Cycle Management Commands
37 ==============================
38
39 APPC receives commands from external ONAP components, such as SO, Policy, DCAE, or the Portal, to manage the life cycle of virtual applications and their components.
40
41 A virtual application is composed of the following layers of network technology:
42
43 - Virtual Network Function (VNF)
44 - Virtual Network Function Component (VNFC)
45 - Virtual Machine (VM)
46
47 A Life Cycle Management (LCM) command may affect one or more of these layers.
48
49 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).  A request may result in either a single synchronous response or multiple asynchronous responses:
50
51 - An **asynchronous** command, which is sent as an authorized and valid request, results in at least two discrete response events:
52     - an accept response, to indicate that the request is accepted for processing
53     - a final response to indicate the status and outcome of the request processing
54     - An unauthorized or invalid request results in a single ERROR response.
55
56 - A **synchronous** command, such as Lock or Unlock, results in a single response that is either SUCCESS or ERROR.
57
58 **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.
59
60
61 Message Bus and the LCM API Client Library
62 ------------------------------------------
63
64 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.
65
66 For more details, see the APPC Client Library Guide at:
67
68   :ref:`appc_client_library`
69
70
71 The client library supports both synchronous and asynchronous flows as follows.
72
73 Asynchronous Flow
74 ^^^^^^^^^^^^^^^^^
75
76 - The APPC Client Library is called via an asynchronous API using a full command object, which is mapped to a JSON representation.
77 - The APPC client calls the message bus client and sends the JSON command to a configured topic.
78 - The APPC client pulls response messages from the configured topic.
79 - On receiving the response for the command, APPC client runs the relevant callback method of the consumer ResponseHandler.
80
81 Synchronous Flow
82 ^^^^^^^^^^^^^^^^
83
84 - The APPC Client Library is called via a synchronous API using a full command object, which is mapped to a JSON representation.
85 - The APPC client calls the message bus client and sends the JSON command to a configured topic.
86 - The APPC client pulls response messages from the configured topic.
87 - On receiving the final response for the command, the APPC client returns the response object with a final status.
88
89 The client library adds the following wrapper around request and responses to the LCM API (described below)::
90
91     {
92         "version" : "2.0",
93         "cambria.partition" : "<TOPIC>",
94         "correlation-id" :"<CORRELATION_ID>",
95         "rpc-name" : "<RPC_NME>",
96         "type" : <MESSAGE_TYPE>
97         "body" : <RPC_SPECIFIC_BODY>
98     }
99
100
101
102 Table 1 Request / Response Message Fields
103
104 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
105 | **Field**            | **Description**                                                                                                | **Required**        |
106 +======================+================================================================================================================+=====================+
107 | version              | Indicates the version of the message bus protocol with APPC. Version 2.0 should be used.                       |     Yes             |
108 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
109 | cambria. partition   | Indicates the specific topic partition that the message is intended for. For example:                          |     No              |
110 |                      |                                                                                                                |                     |
111 |                      | -  For incoming messages, this value should be ``APPC``.                                                       |                     |
112 |                      |                                                                                                                |                     |
113 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
114 | correlation- id      | Correlation ID used for associating responses in APPC Client Library.                                          |     Yes             |
115 |                      | Built as: ``<request-id>-<sub-request-id>``                                                                    |                     |
116 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
117 | rpc-name             | The target Remote Processing Call (RPC) name which should match the LCM command name. For example:``configure``|     Yes             |
118 |                      |                                                                                                                |                     |
119 |                      | The convention for RPC names and the target URL is that multi-word command names should have a dash between    |                     |
120 |                      | words, e.g.,                                                                                                   |                     |
121 |                      | /restconf/operations/appc-provider-lcm:action-status                                                           |                     |
122 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
123 | type                 | Message type: request, response or error                                                                       |     Yes             |
124 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
125 | body                 | Contains the input or output LCM command content, which is either the request or response                      |                     |
126 |                      | The body field format is identical to the equivalent HTTP Rest API command based on the specific RPC name.     |     Yes             |
127 |                      | For example::                                                                                                  |                     |
128 |                      |                                                                                                                |                     |
129 |                      |     {                                                                                                          |                     |
130 |                      |     "input" : {                                                                                                |                     |
131 |                      |                 "common-header" : {...}                                                                        |                     |
132 |                      |                 "action" : "configure",                                                                        |                     |
133 |                      |                                 "action-identifiers" : {...},                                                  |                     |
134 |                      |                 "payload": "..."                                                                               |                     |
135 |                      |     }                                                                                                          |                     |
136 +----------------------+----------------------------------------------------------------------------------------------------------------+---------------------+
137
138
139 Generic Request Format
140 ----------------------
141
142 The LCM API general request format is applicable for both POST HTTP API and for the message body received via the message bus.
143
144 LCM Request
145 ^^^^^^^^^^^
146
147 The LCM request comprises a common header and a section containing the details of the LCM action.
148 The LCM request conforms to the following structure::
149
150     {
151     "input": {
152                 "common-header": {"timestamp": "<TIMESTAMP>",
153                                         "api-ver": "<API_VERSION>",
154                                         "originator-id": "<SYSTEM_ID>",
155                                         "request-id": "<REQUEST_ID>",
156                                         "sub-request-id": "<SUBREQUEST_ID>",
157                                         "flags": {
158                                                    "mode": "<EXCLUSIVE|NORMAL>",
159                                                    "force": "<TRUE|FALSE>",
160                                                    "ttl": "<TTL_VALUE>"
161                                                  }
162                                  },
163                 "action": "<COMMAND_ACTION>",
164                 "action-identifiers": {
165                                         "vnf-id": "<VNF_ID>",
166                                         "vnfc-name": "<VNFC_NAME>",
167                                         "vserver-id": "VSERVER_ID"
168                                       },
169                 ["payload": "<PAYLOAD>"]
170              }
171     }
172
173
174 Table 2 LCM Request Fields
175
176 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
177 |     **Field**             |     **Description**                                                                                                                                                                                                                                                                                                    |     **Required?**   |
178 +===========================+========================================================================================================================================================================================================================================================================================================================+=====================+
179 |     input                 |     The block that defines the details of the input to the command processing. Contains the common-header details.                                                                                                                                                                                                     |     Yes             |
180 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
181 |     common- header        |     The block that contains the generic details about a request.                                                                                                                                                                                                                                                       |     Yes             |
182 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
183 |     timestamp             |     The time of the request, in ISO 8601 format, ZULU offset. For example: 2016-08-03T08:50:18.97Z.                                                                                                                                                                                                                    |     Yes             |
184 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
185 |                           |     APPC will reject the request if timestamp is in the future (due to clock error), or timestamp is too old (compared to TTL flag)                                                                                                                                                                                    |                     |
186 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
187 |     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.                                                                                                                                                               |     Yes             |
188 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
189 |                           |     2.00 should be used for all LCM API requests                                                                                                                                                                                                                                                                       |                     |
190 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
191 |     originator-id         |     An identifier of the calling system limited to a length of 40 characters.                                                                                                                                                                                                                                          |     Yes             |
192 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
193 |                           |     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.                                                                                                                                      |                     |
194 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
195 |     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             |
196 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
197 |                           |     The request-id is stored throughout the operations performed during a single request.                                                                                                                                                                                                                              |                     |
198 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
199 |     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              |
200 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
201 |     flags                 | Generic flags that apply to all LCM actions:                                                                                                                                                                                                                                                                           |     No              |
202 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
203 |                           | -  "MODE" :                                                                                                                                                                                                                                                                                                            |                     |
204 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
205 |                           |    -  "EXCLUSIVE" - reject requests on this VNF while another request is in progress, or                                                                                                                                                                                                                               |                     |
206 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
207 |                           |    -  "NORMAL" - allow requests (pending additional validations) on this VNF if there is another request is in progress.                                                                                                                                                                                               |                     |
208 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
209 |                           | -  "FORCE" :                                                                                                                                                                                                                                                                                                           |                     |
210 |                           |    -  TRUE – forces APP-C to process the request regardless of whether there is another request for the VNF or VM in progress.                                                                                                                                                                                         |                     |
211 |                           |    -  FALSE – default value. Will return an error if there is another action in progress on the same VNF or VM, unless the two actions are allowed in parallel based on a Request Management Model stored in APP-C.                                                                                                    |                     |
212 |                           |       The model allows some non-disruptive actions such as Lock, Unlock, CheckLock, and ActionStatus to be performed in conjunction with other actions.                                                                                                                                                                |                     |
213 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
214 |                           | -  "TTL": <0....N> - The timeout value is used to determine if the request timeout has been exceeded (i.e., if the TTL value is less than the current time minus the timestamp, the request is rejected). The value is in seconds.                                                                                     |                     |
215 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
216 |                           |     If no TTL value provided, the default/configurable TTL value is to be used.                                                                                                                                                                                                                                        |                     |
217 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
218 |     action                |     The action to be taken by APPC, for example: Test, Start                                                                                                                                                                                                                                                           |     Yes             |
219 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
220 |                           |     These are case-sensitive; e.g.,”Restart” is correct; “restart” is incorrect.                                                                                                                                                                                                                                       |                     | 
221 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
222 |                           |     ***NOTE:** The specific value for the action parameter is provided for each command.                                                                                                                                                                                                                               |                     |
223 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
224 |     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             |
225 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
226 |     service-instance-id   |     Identifies a specific service instance that the command refers to. When multiple APPC instances are used and applied to a subset of services, this will become significant. The field is mandatory when the vnf-id is empty. Currently not used.                                                                   |     No              |
227 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
228 |     vnf-id                |     Identifies the VNF instance to which this action is to be applied. Required for actions.                                                                                                                                                                                                                           |     Yes             |
229 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
230 |     vnfc-name             |     Identifies the VNFC instance to which this action is to be applied. Required if the action applied to a specific VNFC. Currently not used.                                                                                                                                                                         |     No              |
231 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
232 |     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              |
233 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
234 |     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              |
235 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
236 |     payload               |     An action-specific open-format field.                                                                                                                                                                                                                                                                              |     No              |
237 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
238 |                           |     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                                                                                                                               |                     |
239 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
240 |                           |     -address\\": \\"<VNF-HOST-IP-ADDRESS>\\"}"``.                                                                                                                                                                                                                                                                      |                     |
241 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
242 |                           |     The payload is typically used to provide parametric data associated with the command, such as a list of configuration parameters.                                                                                                                                                                                  |                     |
243 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
244 |                           |     Note that not all LCM commands need have a payload.                                                                                                                                                                                                                                                                |                     |
245 |                           |                                                                                                                                                                                                                                                                                                                        |                     |
246 |                           |     ***NOTE:** See discussion below on the use of payloads for self-service actions.                                                                                                                                                                                                                                   |                     |
247 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
248
249 Request Processing and Validation Logic
250 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
251
252 When a new request is received, APPC applies the following validation logic. For any failure, the request is rejected and an error (300 range) is returned.
253
254 1. If the request has timeout out (i.e., the difference between current
255    time and the request timestamp value is greater than TTL value in
256    request), a timeout error is returned.
257
258 2. If the request is a duplicate of an existing request in progress
259    (same request-id, sub-request-id, originator-id), a duplicate error
260    is returned.
261
262 3. If there is a Lock on the vnf-id, reject any new action if it is not
263    associated with the locking request-id, a lockout error is returned.
264
265 4. If the Force flag = Y, then allow the new action regardless of
266    whether there is an action in progress.
267
268 5. If the Mode flag = Exclusive on a request in progress, any new
269    request is rejected until the request in progress is completed.
270
271 6. If request is received and there are one or more requests in
272    progress, then the new request is evaluated to determine if there is
273    any overlap in scope with the existing requests (for example, a new
274    VNF level request would overlap with another request in progress).
275
276    a. If there is no overlap between the new request and requests in
277       progress, the new request is accepted. For example, a Start
278       request on VM1 and a Stop request on VM2 can be running in
279       parallel.
280
281    b. If there is overlap, then only special cases are allowed in
282       parallel (for example, Audit and HealthCheck are allowed).
283
284
285 Generic Response Format
286 -----------------------
287
288
289 This section describes the generic response format.
290
291 The response format is applicable for both POST HTTP API and for the message body received via the message bus.
292
293
294 LCM Response
295 ^^^^^^^^^^^^
296
297 The LCM response comprises a common header and a section containing the payload and action details.
298
299 The LCM response conforms to the following structure::
300
301     {
302         "output": {
303                     "common-header": {
304                                         "api-ver": "<API_VERSION>",
305                                         "flags": {
306                                                    "ttl": <TTL_VALUE>,
307                                                    "force": "<TRUE|FALSE>",
308                                                    "mode": "<EXCLUSIVE|NORMAL>"
309                                                  },
310                                         "originator-id": "<SYSTEM_ID>",
311                                         "request-id": "<REQUEST_ID>",
312                                         "sub-request-id": "<SUBREQUEST_ID>",
313                                         "timestamp": "2016-08-08T23:09:00.11Z",
314                                      },
315                     "payload": "<PAYLOAD>",
316                     [Additional fields],
317                     "status": {
318                                 "code": <RESULT_CODE>,
319                                 "message": "<RESULT_MESSAGE>"
320                               }
321                   }
322     }
323
324
325 Table 3 LCM Response Fields
326
327 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
328 |     **Field**        |     **Description**                                                                                                                                                                                                       |     **Required?**   |
329 +======================+===========================================================================================================================================================================================================================+=====================+
330 |     output           |     The block that defines the details of the output of the command processing. Contains the ``common-header`` details.                                                                                                   |     Yes             |
331 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
332 |     common- header   |     The block that contains the generic details about a request.                                                                                                                                                          |     Yes             |
333 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
334 |     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.                                                                  |     Yes             |
335 |                      |                                                                                                                                                                                                                           |                     |
336 |                      |     -  2.00 should be used for all LCM API requests                                                                                                                                                                       |                     |
337 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
338 |     originator-id    |     An identifier of the calling system limited to a length of 40 characters.                                                                                                                                             |     Yes             |
339 |                      |                                                                                                                                                                                                                           |                     |
340 |                      |     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.                                         |                     |
341 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
342 |     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             |
343 |                      |                                                                                                                                                                                                                           |                     |
344 |                      |     The request-id is stored throughout the operations performed during a single request.                                                                                                                                 |                     |
345 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
346 |     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              |
347 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
348 |     timestamp        |     The time of the request, in ISO 8601 format, ZULU offset. For example: ``2016-08-03T08:50:18.97Z``.                                                                                                                   |     Yes             |
349 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
350 |     status           |     The status describes the outcome of the command processing. Contains a ``code`` and a ``message`` providing success or failure details.                                                                               |     Yes             |
351 |                      |                                                                                                                                                                                                                           |                     |
352 |                      |     ***NOTE:** See* status *for code values.*                                                                                                                                                                             |                     |
353 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
354 |     payload          |     An open-format field.                                                                                                                                                                                                 |     No              |
355 |                      |                                                                                                                                                                                                                           |                     |
356 |                      |     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\\"}"``.        |                     |
357 |                      |                                                                                                                                                                                                                           |                     |
358 |                      |     The payload is typically used to provide parametric data associated with the response to the command.                                                                                                                 |                     |
359 |                      |                                                                                                                                                                                                                           |                     |
360 |                      |     Note that not all LCM commands need have a payload.                                                                                                                                                                   |                     |
361 |                      |                                                                                                                                                                                                                           |                     |
362 |                      |     ***NOTE:** The specific value(s) for the response payload, where relevant, is provided for in each* command *description.*                                                                                            |                     |
363 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
364 |     [Field name]     |     Additional fields can be provided in the response, if needed, by specific commands.                                                                                                                                   |     No              |
365 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
366 |     code             |     A unique pre-defined value that identifies the exact nature of the success or failure status.                                                                                                                         |     No              |
367 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
368 |     message          |     The description of the success or failure status.                                                                                                                                                                     |     No              |
369 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
370
371
372 Status Codes
373 ------------
374
375 The status code is returned in the response message as the ``code`` parameter, and the description as the message parameter.
376
377 The different responses are categorized as follows:
378
379 **ACCEPTED**
380
381     Request is valid and accepted for processing.
382
383 **ERROR**
384
385     Request invalid or incomplete.
386
387 **REJECT**
388
389     Request rejected during processing due to invalid data, such as an
390     unsupported command or a non-existent service-instance-id.
391
392 **SUCCESS**
393
394     Request is valid and completes successfully.
395
396 **FAILURE**
397
398     The request processing resulted in failure.
399
400     A FAILURE response is always returned asynchronously via the message
401     bus.
402
403 **PARTIAL SUCCESS**
404
405     The request processing resulted in partial success where at least
406     one step in a longer process completed successfully.
407
408     A PARTIAL SUCCESS response is always returned asynchronously via the
409     message bus.
410
411 **PARTIAL FAILURE**
412
413     The request processing resulted in partial failure.
414
415     A PARTIAL FAILURE response is always returned asynchronously via the
416     message bus.
417
418 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
419 |     **Category**      |     **Code**   |     **Message / Description**                                                                                                        |
420 +=======================+================+======================================================================================================================================+
421 |     ACCEPTED          |     100        |     ACCEPTED - Request accepted                                                                                                      |
422 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
423 |     ERROR             |     200        |     UNEXPECTED ERROR - ${detailedErrorMsg}                                                                                           |
424 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
425 |     REJECT            |     300        |     REJECTED - ${detailedErrorMsg}                                                                                                   |
426 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
427 |                       |     301        |     INVALID INPUT PARAMETER -${detailedErrorMsg}                                                                                     |
428 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
429 |                       |     302        |     MISSING MANDATORY PARAMETER - Parameter ${paramName} is missing                                                                  |
430 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
431 |                       |     303        |     REQUEST PARSING FAILED - ${detailedErrorMsg}                                                                                     |
432 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
433 |                       |     304        |     NO TRANSITION DEFINED - No Transition Defined for ${actionName} action and ${currentState} state                                 |
434 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
435 |                       |     305        |     ACTION NOT SUPPORTED - ${actionName} action is not supported                                                                     |
436 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
437 |                       |     306        |     VNF NOT FOUND - VNF with ID ${vnfId} was not found                                                                               |
438 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
439 |                       |     307        |     DG WORKFLOW NOT FOUND - No DG workflow found for the combination of ${dgModule} module ${dgName} name and ${dgVersion} version   |
440 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
441 |                       |     308        |     WORKFLOW NOT FOUND - No workflow found for VNF type                                                                              |
442 |                       |                |                                                                                                                                      |
443 |                       |                |     ${vnfTypeVersion} and ${actionName} action                                                                                       |
444 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
445 |                       |     309        |     UNSTABLE VNF - VNF ${vnfId} is not stable to accept the command                                                                  |
446 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
447 |                       |     310        |     LOCKING FAILURE -${detailedErrorMsg}                                                                                             |
448 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
449 |                       |     311        |     EXPIREDREQUEST. The request processing time exceeded the maximum available time                                                  |
450 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
451 |                       |     312        |     DUPLICATEREQUEST. The request already exists                                                                                     |
452 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
453 |                       |     313        |     MISSING VNF DATA IN A&AI - ${attributeName} not found for VNF ID =                                                               |
454 |                       |                |                                                                                                                                      |
455 |                       |                |     ${vnfId}                                                                                                                         |
456 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
457 |                       |     315        |     MULTIPLE REQUESTS USING SEARCH CRITERIA: ${parameters}                                                                           |
458 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
459 |                       |     316        |     POLICY VALIDATION FAILURE - Request rejected as per the request validation policy                                                |
460 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
461 |     SUCCESS           |     400        |     The request was processed successfully                                                                                           |
462 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
463 |     FAILURE           |     401        |     DG FAILURE - ${ detailedErrorMsg }                                                                                               |
464 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
465 |                       |     402        |     NO TRANSITION DEFINED - No Transition Defined for ${ actionName} action and ${currentState} state                                |
466 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
467 |                       |     403        |     UPDATE\_AAI\_FAILURE - failed to update AAI. ${errorMsg}                                                                         |
468 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
469 |                       |     404        |     EXPIRED REQUEST FAILURE - failed during processing because TTL expired                                                           |
470 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
471 |                       |     405        |     UNEXPECTED FAILURE - ${detailedErrorMsg}                                                                                         |
472 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
473 |                       |     406        |     UNSTABLE VNF FAILURE - VNF ${vnfId} is not stable to accept the command                                                          |
474 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
475 |                       |     450        |     REQUEST NOT SUPPORTED                                                                                                            |
476 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
477 |     PARTIAL SUCCESS   |     500        |     PARTIAL SUCCESS                                                                                                                  |
478 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
479 |     PARTIAL FAILURE   |     501 -      |     PARTIAL FAILURE                                                                                                                  |
480 |                       |     599        |                                                                                                                                      |
481 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
482
483
484 Malformed Message Response
485 --------------------------
486
487 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.
488
489 **Response Format for Malformed Requests**::
490
491     {
492       "errors": {
493                   "error": [
494                             {
495                               "error-type": "protocol",
496                               "error-tag": "malformed-message",
497                               "error-message": "<ERROR-MESSAGE>",
498                               "error-info": "<ERROR-INFO>"
499                             }
500                            ]
501                 }
502     }
503
504
505 **Example Response**::
506
507     {
508       "errors": {
509                   "error": [
510                             {
511                               "error-type": "protocol",
512                               "error-tag": "malformed-message",
513                               "error-message": "Error parsing input: Invalid value 'Stopp' for
514                                enum type. Allowed values are: [Sync, Audit, Stop, Terminate]",
515                               "error-info": "java.lang.IllegalArgumentException: Invalid value
516                                 'Stopp' for enum type. Allowed values are: [Sync, Audit, Stop,
517                                 Terminate]..."
518                             }
519                            ]
520                 }
521     }
522
523
524
525 API Scope
526 =========
527
528 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.
529
530
531 Commands, or actions, can be performed at one or more of the following scope levels:
532
533
534 +-----------------+----------------------------------------------------------------------------------------+
535 | **VNF**         | Commands can be applied at the level of a specific VNF instance using the vnf-id.      |
536 +-----------------+----------------------------------------------------------------------------------------+
537 | **VF-Module**   | Commands can be applied at the level of a specific VF-Module using the vf-module-id.   |
538 +-----------------+----------------------------------------------------------------------------------------+
539 | **VNFC**        | Commands can be applied at the level of a specific VNFC instance using a vnfc-name.    |
540 +-----------------+----------------------------------------------------------------------------------------+
541 | **VM**          | Commands can be applied at the level of a specific VM instance using a vserver-id.     |
542 +-----------------+----------------------------------------------------------------------------------------+
543
544
545 **VNF/VM Types Supported**
546
547 Commands, or actions, may be currently supported on all VNF types or a limited set of VNF types. Note that the intent is to support all actions on all VNF types which have been successfully onboarded in a self-service mode.
548
549   - **Any** Currently supported on any vnf-type.
550
551   - **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.
552
553
554 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
555 |     **Command**        | **VNF**   |  **VF-Module**   |     **VNFC**   | **VM**   |     **VNF/VM Types Supported**                             |
556 +========================+===========+==================+================+==========+============================================================+
557 |     ActionStatus       | Yes       |                  |                |          |     Any                                                    |
558 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
559 |     AttachVolume       |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
560 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
561 |     Audit              | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
562 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
563 |     CheckLock          | Yes       |                  |                |          |     Any                                                    |
564 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
565 |     Configure          | Yes       |                  |     Yes        |          |     Any (requires self-service onboarding)                 |
566 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
567 |     ConfigBackup       | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
568 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
569 |     ConfigModify       | Yes       |                  |     Yes        |          |     Any (requires self-service onboarding)                 |
570 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
571 |     ConfigRestore      | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
572 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
573 |     ConfigScaleOut     | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
574 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
575 |     DetachVolume       |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
576 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
577 |     Evacuate           |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
578 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
579 |     HealthCheck        | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
580 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
581 |     Lock               | Yes       |                  |                |          |     Any                                                    |
582 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
583 |     Migrate            |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
584 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
585 |     QuiesceTraffic     | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
586 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
587 |     Rebuild            |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
588 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
589 |     Restart            |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
590 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
591 |     ResumeTraffic      | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
592 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
593 |     Snapshot           |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
594 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
595 |     Start              |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
596 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
597 |     StartApplication   | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
598 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
599 |     Stop               |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
600 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
601 |     StopApplication    | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
602 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
603 |     Sync               | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
604 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
605 |     Unlock             | Yes       |                  |                |          |     Any                                                    |
606 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
607 |     UpgradeBackout     | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
608 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
609 |     UpgradeBackup      | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
610 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
611 |     UpgradePostCheck   | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
612 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
613 |     UpgradePreCheck    | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
614 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
615 |     UpgradeSoftware    | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
616 +------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
617
618
619
620 Self-Service VNF Onboarding
621 ---------------------------
622
623 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:
624
625 -  Netconf with uploadable Yang model (requires a Netconf server running
626    on the VNF)
627
628 -  Chef (requires a Chef client running on the VNF)
629
630 -  Ansible (does not require any changes to the VNF software)
631
632 The self-service onboarding process is done using an APPC Design GUI (also referred to as CDT) 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:
633
634 -  Define the VNF capabilities (set of actions that the VNF can
635    support).
636
637 -  Create a template and parameter definitions for actions which use the
638    Netconf, Chef, or Ansible protocols. The template is an xml or JSON
639    block which defines the “payload” which is included in the request
640    that is downloaded the VNF (if Netconf) or Chef/Ansible server.
641
642 -  Test actions which have templates/parameter definitions.
643
644 -  Upload the VNF definition, template, and parameter definition
645    artifacts to SDC which distributes them to all APPC instances in the
646    same environment (e.g., production).
647
648 For more details, see the APPC CDT Onboarding User Guide.
649
650
651
652 LCM Commands
653 ============
654
655 The LCM commands that are valid for the current release.
656
657 ActionStatus
658 ------------
659
660 The ActionStatus command returns that state of any action request that has been previously submitted to an APPC instance for a specified VNF. This enables the client to know the status of a previous request and helps them decide if they should reissue a request.
661
662 +--------------------------+----------------------------------------------------------+
663 | **Target URL**           | /restconf /operations/ appc-provider-lcm:action-status   |
664 +--------------------------+----------------------------------------------------------+
665 | **Action**               | ActionStatus                                             |
666 +--------------------------+----------------------------------------------------------+
667 | **Action-Identifiers**   | vnf-id                                                   |
668 +--------------------------+----------------------------------------------------------+
669 | **Payload Parameters**   | See below                                                |
670 +--------------------------+----------------------------------------------------------+
671 | **Revision History**     | New in Beijing                                           |
672 +--------------------------+----------------------------------------------------------+
673
674 |
675
676 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
677 |     **Payload Parameter**   |     **Description**                                        |     **Required**   |     **Example**                     |
678 +=============================+============================================================+====================+=====================================+
679 | request-id                  |     Request id from the previously submitted request       | Yes                |     "request-id": "123456789"       |
680 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
681 | sub-request ID              |     Sub-Request id from the previously submitted request   | optional           |     "sub-request-id": "123456789"   |
682 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
683 | originator-id               |     Originator id from the previously submitted request    | optional           |     "originator-id": "123456789"    |
684 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
685
686
687 ActionStatus Response:
688 ^^^^^^^^^^^^^^^^^^^^^^
689
690 A successful response contains a payload with the following:
691
692 +-----------------------------+-----------------------------------------------------------------------+--------------------+------------------------------+
693 |     **Payload Parameter**   |     **Description**                                                   |     **Required**   |     **Example**              |
694 +=============================+=======================================================================+====================+==============================+
695 | status-reason               |     Contains more details about status                                | No                 |                              |
696 +-----------------------------+-----------------------------------------------------------------------+--------------------+------------------------------+
697 | status                      |     IN_PROGRESS – The request has been accepted and is in progress    | No                 |     "status": "SUCCESSFUL"   |
698 |                             |                                                                       |                    |                              |
699 |                             |     SUCCESSFUL – The request returned success message                 |                    |                              |
700 |                             |                                                                       |                    |                              |
701 |                             |     FAILED – The request failed and returned an error message         |                    |                              |
702 |                             |                                                                       |                    |                              |
703 |                             |     ABORTED – the request aborted                                     |                    |                              |
704 |                             |                                                                       |                    |                              |
705 |                             |     NOT_FOUND – The request is not found                              |                    |                              |
706 +-----------------------------+-----------------------------------------------------------------------+--------------------+------------------------------+
707
708 If the ActionStatus request was rejected or could not be processed, it returns a valid error code or error message (but no payload).Example below:
709
710     ``"message": "MULTIPLE REQUESTS FOUND - using search criteria:
711     request- id=c09ac7d1-de62-0016-2000-e63701125559 AND
712     vnf-id=ctsf0007v", "code": 315``
713
714 AttachVolume
715 ------------
716
717 The AttachVolume command attaches a cinder volume to a VM via an Openstack command.
718
719 Cinder is a Block Storage service for OpenStack. It's designed to present storage resources to end users that can be consumed by the OpenStack Compute Project (Nova). The short description of Cinder is that it virtualizes the management of block storage devices and provides end users with a self service API to request and consume those resources without requiring any knowledge of where their  storage is actually deployed or on what type of device.
720
721     NOTE: The command implementation is based on Openstack
722     functionality. For further details, see
723     http://developer.openstack.org/api-ref/compute/.
724
725 +--------------------------+----------------------------------------------------------+
726 | **Target URL**           | /restconf /operations/ appc-provider-lcm:attach-volume   |
727 +--------------------------+----------------------------------------------------------+
728 | **Action**               | AttachVolume                                             |
729 +--------------------------+----------------------------------------------------------+
730 | **Action-Identifiers**   | vnf-id, vserver-id                                       |
731 +--------------------------+----------------------------------------------------------+
732 | **Payload Parameters**   | See table                                                |
733 +--------------------------+----------------------------------------------------------+
734 | **Revision History**     | New in Beijing                                           |
735 +--------------------------+----------------------------------------------------------+
736
737 |
738
739 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
740 |     **Payload Parameter**   |     **Description**                                                                                                         |     **Required**   |     **Example**                                                                                                                |
741 +=============================+=============================================================================================================================+====================+================================================================================================================================+
742 | volumeId                    |     The UUID of the volume to attach.                                                                                       | Yes                |     "volumeId": "a26887c6-c47b-4654- abb5-dfadf7d3f803",                                                                       |
743 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
744 | vm-id                       |     The unique identifier (UUID) of the resource. For backwards- compatibility, this can be the self- link URL of the VM.   | Yes                |     "vm-id": http://135.25.246.162:8774/v2/64a f07e991424b8e9e54eca27d5c0d48/ servers/b074cd1b-8d53-412e-a102- 351cc51ac10a"   |
745 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
746 | Identity-url                |     The identity URL used to access the resource                                                                            | No                 |     "identity-url": "http://135.25.246.162:5000/v2.0"                                                                          |
747 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
748
749 AttachVolume Response:
750 ^^^^^^^^^^^^^^^^^^^^^^
751
752 Success: A successful AttachVolume returns a success status code 400.
753
754 Failure: A failed AttachVolume returns a failure code 401 and the failure message. Failure messages can include:
755
756 -  badRequest
757 -  unauthorized
758 -  forbidden
759 -  itemNotFound
760
761
762 Audit
763 -----
764
765 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.
766
767 A successful Audit means that the current VNF configuration matches the latest APPC stored configuration.
768
769 A failed Audit indicates that the configurations do not match.
770
771 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).
772
773 The Audit action does not require any payload parameters.
774
775 **NOTE:** Audit does not return a payload containing details of the comparison, only the Success/Failure status.
776
777
778 +------------------------------+------------------------------------------------------+
779 |     **Target URL**           |     /restconf /operations/ appc-provider-lcm:audit   |
780 +------------------------------+------------------------------------------------------+
781 |     **Action**               |     Audit                                            |
782 +------------------------------+------------------------------------------------------+
783 |     **Action-Identifiers**   |     vnf-id                                           |
784 +------------------------------+------------------------------------------------------+
785 |     **Payload Parameters**   |     See below                                        |
786 +------------------------------+------------------------------------------------------+
787 |     **Revision History**     |     Unchanged in this release.                       |
788 +------------------------------+------------------------------------------------------+
789
790 |
791
792 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
793 |     **Parameter**    |     **Description**                                                                                                                                       |     **Required?**   |     **Example**                  |
794 +======================+===========================================================================================================================================================+=====================+==================================+
795 |     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 message bus             |     Yes             |     "publish-config": "<Y\|N>"   |
796 |                      |                                                                                                                                                           |                     |                                  |
797 |                      |     \* If the publish\_config field is set to N in the payload, then:                                                                                     |                     |                                  |
798 |                      |                                                                                                                                                           |                     |                                  |
799 |                      |     - If the result of the audit is ‘match’ (latest APPC config and the running config match), do not send the running configuration                      |                     |                                  |
800 |                      |                                                                                                                                                           |                     |                                  |
801 |                      |     - If the result of the audit is ‘no match’, then send the running configuration                                                                       |                     |                                  |
802 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
803
804 Audit Response
805 ^^^^^^^^^^^^^^
806
807 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 bus which may be received by an external configuration storage system.
808
809
810 CheckLock
811 ---------
812
813 The CheckLock command returns true if the specified VNF is locked; otherwise, false is returned.
814
815 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.
816
817 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.
818
819 The CheckLock command returns a specific response structure that extends the default LCM response.
820
821 The CheckLock action does not require any payload parameters.
822
823 +------------------------------+--------------------------------------------------------+
824 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:checklock   |
825 +------------------------------+--------------------------------------------------------+
826 |     **Action**               |     CheckLock                                          |
827 +------------------------------+--------------------------------------------------------+
828 |     **Action-Identifiers**   |     vnf-id                                             |
829 +------------------------------+--------------------------------------------------------+
830 |     **Payload Parameters**   |     None                                               |
831 +------------------------------+--------------------------------------------------------+
832 |     **Revision History**     |     Unchanged in this release.                         |
833 +------------------------------+--------------------------------------------------------+
834
835 CheckLock Response
836 ^^^^^^^^^^^^^^^^^^
837
838 The CheckLock command returns a customized version of the LCM
839 response.
840
841
842 +---------------------+---------------------------------------------------------------------------------------+--------------------+---------------------------------+
843 |     **Parameter**   |     **Description**                                                                   |     **Required**   | **?Example**                    |
844 +=====================+=======================================================================================+====================+=================================+
845 |     locked          |     "TRUE"\|"FALSE" - returns TRUE if the specified VNF is locked, otherwise FALSE.   |     No             |     "locked": "<TRUE\|FALSE>"   |
846 +---------------------+---------------------------------------------------------------------------------------+--------------------+---------------------------------+
847
848
849 **Example**::
850
851     {
852       "output": {
853                   "status": {
854                               "code": <RESULT\_CODE>, "message": "<RESULT\_MESSAGE>"
855                             },
856                   "common-header": {
857                                      "api-ver": "<API\_VERSION>",
858                                      "request-id": "<ECOMP\_REQUEST\_ID>", "originator-id":
859                                      "<ECOMP\_SYSTEM\_ID>",
860                                      "sub-request-id": "<ECOMP\_SUBREQUEST\_ID>", "timestamp":
861                                      "2016-08-08T23:09:00.11Z",
862                                      "flags": {
863                                                 "ttl": <TTL\_VALUE>, "force": "<TRUE\|FALSE>",
864                                                 "mode": "<EXCLUSIVE\|NORMAL>"
865                                               }
866                                    },
867                   "locked": "<TRUE\|FALSE>"
868     }
869
870
871 Configure
872 ---------
873
874 Configure a VNF or a VNFC on the VNF after instantiation.
875
876 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.
877
878 A successful Configure request returns a success response.
879
880 A failed Configure action returns a failure response and the specific failure messages in the response block.
881
882 +------------------------------+--------------------------------------------------------+
883 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configure   |
884 +------------------------------+--------------------------------------------------------+
885 |     **Action**               |     Configure                                          |
886 +------------------------------+--------------------------------------------------------+
887 |     **Action-Identifiers**   |     vnf-id                                             |
888 +------------------------------+--------------------------------------------------------+
889 |     **Payload Parameters**   |     See below                                          |
890 +------------------------------+--------------------------------------------------------+
891 |     **Revision History**     |     Unchanged in this release.                         |
892 +------------------------------+--------------------------------------------------------+
893
894 |
895
896 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
897 |     **Payload Parameter**       |     **Description**                                                                                                                                                                                                                                                                                        |     **Required?**   |     **Example**                                                 |
898 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
899 +=================================+============================================================================================================================================================================================================================================================================================================+=====================+=================================================================+
900 |     request- parameters         |     vnf-host-ip-address: required if Netconf or other direct interface to the VNF. Optionally, it can be provided for all requests.                                                                                                                                                                        |     Yes             |                                                                 |
901 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     "payload":                                                  |
902 |                                 |     vnfc-type: if request is vnfc specific                                                                                                                                                                                                                                                                 |                     |     "{\"request-parameters                                      |
903 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \": {                                                       |
904 |                                 |     template-name: if specific template needs to be specified (otherwise, the most recent default template is used).                                                                                                                                                                                       |                     |     \"vnf-host-ip-address\":                                    |
905 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”value\”,                                                  |
906 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”vnfc-type\”: \”value\”’                                   |
907 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     \”template-name\”: \”name\”,                                |
908 |                                 |                                                                                                                                                                                                                                                                                                            |                     |     }                                                           |
909 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
910 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
911 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
912 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
913 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
914 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
915 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
916 |                                 |                                                                                                                                                                                                                                                                                                            |                     |                                                                 |
917 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                 |
918 |     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              |      \"configuration- parameters\": {\"<CONFIG- PARAMS>\"}      |
919 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
920
921
922 Configure Response
923 ^^^^^^^^^^^^^^^^^^
924
925 The Configure response returns an indication of success or failure of the request. If successful, the return payload contains the ‘upload\_config\_id’ and values for any records created. In addition, the configuration is sent to the ONAP Data Router bus  which may be received by an external configuration storage system.
926
927 SO is creating the VNFC records in A&AI. APPC is updating the VNFC status.
928
929 ConfigModify
930 ------------
931
932 Modifies the configuration on a VNF or VNFC in service.
933
934 This command is executed either directly on the VNF (such as for Netconf) or using an Ansible playbook or Chef cookbook.
935
936 Request Structure:
937
938 +--------------------------+--------------------------------------------------------+
939 | **Target URL**           | /restconf/operations/appc-provider-lcm:config-modify   |
940 +--------------------------+--------------------------------------------------------+
941 | **Action**               | ConfigModify                                           |
942 +--------------------------+--------------------------------------------------------+
943 | **Action-Identifiers**   | vnf-id                                                 |
944 +--------------------------+--------------------------------------------------------+
945 | **Payload Parameters**   |     request-parameters, configuration-parameters       |
946 +--------------------------+--------------------------------------------------------+
947 | **Revision History**     | Unchanged in this release.                             |
948 +--------------------------+--------------------------------------------------------+
949
950 Request Payload Parameters:
951
952 +-------------------------+----------------------------------------+-----------------+-------------------------------------------------------+
953 | **Payload Parameter**   | **Description**                        | **Required?**   |     **Example**                                       |
954 +=========================+========================================+=================+=======================================================+
955 | request-parameters      | vnf-host-ip-address: optional if       | No              |     "payload":                                        |
956 |                         | Netconf or other direct interface      |                 |     "{\\"request-parameters                           |
957 |                         | to the VNF. If not provided, it is     |                 |     \\": {                                            |
958 |                         | obtained from A&AI                     |                 |     \\"vnf-host-ip-address\\":                        |
959 |                         |                                        |                 |     \\”value\\                                        |
960 |                         | vnfc-type: if request is vnfc          |                 |      },                                               |
961 |                         | specific                               |                 |                                                       |
962 |                         |                                        |                 |     {\\"configuration- parameters\\": {\\"name1\\":   |
963 |                         |                                        |                 |     \\”value1\\”,\\"name2\\":                         |
964 |                         |                                        |                 |     \\”value2\\”                                      |
965 |                         |                                        |                 |     }                                                 |
966 |                         |                                        |                 |     }                                                 |
967 +-------------------------+----------------------------------------+-----------------+                                                       |
968 | configuration-          | A set of instance specific             | No              |                                                       |
969 | parameters              | configuration parameters should        |                 |                                                       |
970 |                         | be specified.                          |                 |                                                       |
971 +-------------------------+----------------------------------------+-----------------+-------------------------------------------------------+
972
973 ConfigModify Response
974 ^^^^^^^^^^^^^^^^^^^^^
975
976 **Success:** A successful ConfigModify returns a success status code 400.
977
978 Note: The return payload contains the ‘upload_config_id’ and values associated with the configuration stored in the APPC DB. In addition, the configuration is sent to the message bus which may be received by an external configuration storage system.
979
980 **Failure:** A failed ConfigModify returns a failure code 401 and the failure message.
981
982 ConfigBackup
983 ------------
984
985 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).
986
987 A successful ConfigBackup request returns a success response.
988
989 A failed ConfigBackup action returns a failure response code and the specific failure message in the response block.
990
991 +------------------------------+-----------------------------------------------------------+
992 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configbackup   |
993 +------------------------------+-----------------------------------------------------------+
994 |     **Action**               |     ConfigBackup                                          |
995 +------------------------------+-----------------------------------------------------------+
996 |     **Action-Identifiers**   |     Vnf-id                                                |
997 +------------------------------+-----------------------------------------------------------+
998 |     **Payload Parameters**   |     See below                                             |
999 +------------------------------+-----------------------------------------------------------+
1000 |     **Revision History**     |     Unchanged in this release.                            |
1001 +------------------------------+-----------------------------------------------------------+
1002
1003 |
1004
1005 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1006 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1007 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1008 |     request-parameters          |     Not used. This request is limited to Ansible and Chef only.                                                                                                                    |     No              | "payload":                                                      |
1009 |                                 |                                                                                                                                                                                    |                     |     \"configuration-parameters\": {\"<CONFIG-PARAMS>\"}         |
1010 |                                 |                                                                                                                                                                                    |                     |                                                                 |
1011 |                                 |                                                                                                                                                                                    |                     |                                                                 |
1012 |                                 |                                                                                                                                                                                    |                     |                                                                 |
1013 |                                 |                                                                                                                                                                                    |                     |                                                                 |
1014 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                 |
1015 |     configuration-parameters    |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1016 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1017
1018 ConfigBackup Response
1019 ^^^^^^^^^^^^^^^^^^^^^
1020
1021 The ConfigBackup response returns an indication of success or failure of the request.
1022
1023 ConfigRestore
1024 -------------
1025
1026 Applies a previously saved configuration to the active VNF configuration. This is limited to Ansible and Chef. There can only be one stored configuration.
1027
1028 A successful ConfigRestore request returns a success response.
1029
1030 A failed ConfigRestore action returns a failure response code and the specific failure message in the response block.
1031
1032 +------------------------------+------------------------------------------------------------------------------------------+
1033 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configrestore                                 |
1034 +------------------------------+------------------------------------------------------------------------------------------+
1035 |     **Action**               |     ConfigRestore                                                                        |
1036 +------------------------------+------------------------------------------------------------------------------------------+
1037 |     **Action-Identifiers**   |     Vnf-id                                                                               |
1038 +------------------------------+------------------------------------------------------------------------------------------+
1039 |     **Payload Parameters**   |     See below                                                                            |
1040 +------------------------------+------------------------------------------------------------------------------------------+
1041 |     **Revision History**     |     Unchanged in this release.                                                           |
1042 +------------------------------+------------------------------------------------------------------------------------------+
1043
1044 |
1045
1046 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1047 |     **Parameter**               |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1048 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1049 |     request-parameters          |     Not used. This request is limited to Ansible and Chef only.                                                                                                                    |     No              |     "payload":                                                  |
1050 |                                 |                                                                                                                                                                                    |                     |     \"configuration-parameters\": {\"<CONFIG- PARAMS>\"}        |
1051 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                 |
1052 |     configuration-parameters    |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1053 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1054
1055 ConfigRestore Response
1056 ^^^^^^^^^^^^^^^^^^^^^^
1057
1058 The ConfigRestore response returns an indication of success or failure of the request.
1059
1060
1061 ConfigScaleOut
1062 --------------
1063
1064 The ConfigScaleOut command is used to apply any actions on a VNF as part of a ScaleOut flow. Actions could include updating the VNF configuration or running a set of other tasks.
1065
1066 The ConfigScaleOut action can have multiple APPC templates associated with it.  APPC retrieves the VfModuleModelName from A&AI (model.model-vers.model-name), which is used as the unique identifier to select the correct APPC template.
1067 APPC creates or updates VNFC records in A&AI for the newly instantiated VM’s.  The orchestration-status of the VNFC’s is set to CONFIGURED.
1068
1069 This action is supported via the Netconf (limited to configuration changes), Chef, and Ansible protocols.
1070
1071 |
1072
1073 +------------------------------+------------------------------------------------------------------------------------------+
1074 |     **Target URL**           |     /restconf /operations/ appc-provider-lcm: config-scale-out                           |
1075 +------------------------------+------------------------------------------------------------------------------------------+
1076 |     **Action**               |     ConfigScaleOut                                                                       |
1077 +------------------------------+------------------------------------------------------------------------------------------+
1078 |     **Action-Identifiers**   |     Vnf-id                                                                               |
1079 +------------------------------+------------------------------------------------------------------------------------------+
1080 |     **Payload Parameters**   |     See below                                                                            |
1081 +------------------------------+------------------------------------------------------------------------------------------+
1082 |     **Revision History**     |     New in Beijing                                                                       |
1083 +------------------------------+------------------------------------------------------------------------------------------+
1084
1085 |
1086
1087 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------------+
1088 |     **Payload Parameter**       |     **Description**                                                                                                                                              |     **Required?**   |     **Example**                             |
1089 +=================================+==================================================================================================================================================================+=====================+=============================================+
1090 |     request-parameters          |     vnf-host-ip-address: optional if Netconf or other direct interface to the VNF.   If not provided, the vnf-host-ip-address will be obtained from A&AI.        |     No              |      "payload":                             |
1091 |                                 +------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+      "{\"request-parameters \":             |
1092 |                                 |     vf-module-id:  used to determine the A&AI VM inventory associated with ConfigScaleOut.                                                                       |     Yes             |      {                                      |
1093 |                                 +------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+      \"vnf-host-ip-address\":               |
1094 |                                 |     controller-template-id: optional. This is a unique identifier that will identify the template associated with the ConfigScaleOut.                            |                     |      \”value\”,                             |
1095 |                                 |     Will be needed if A&AI does not contain the template identifier.                                                                                             |     No              |      \”vf-module-id\”: \”value\”,           |
1096 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+      \”controller-template-id\”:            |                                                         
1097 |     configuration-parameters    |     A set of instance specific configuration parameters should be specified. If provided, APP-C replaces variables in the configuration template with the        |     No              |      \”value\”                              |
1098 |                                 |     values supplied.                                                                                                                                             |                     |      }                                      |
1099 |                                 |                                                                                                                                                                  |                     |                                             |
1100 |                                 |                                                                                                                                                                  |                     |      \"configuration-parameters\":          |
1101 |                                 |                                                                                                                                                                  |                     |        {\"<CONFIG- PARAMS>\"}               |
1102 |                                 |                                                                                                                                                                  |                     |                                             |
1103 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------------+
1104
1105 ConfigScaleOut Response
1106 ^^^^^^^^^^^^^^^^^^^^^^^
1107
1108 **Success:**  
1109
1110  - A successful ConfigScaleOut returns a success status code 400 when completed.
1111  
1112 **Failure:** 
1113
1114  - A failed ConfigScaleOut returns a failure code 401 and the failure message. 
1115  - If the ConfigScaleOut is successfully performed on the VNF but there is a failure to update A&AI inventory, an intermediate failure message with failure code 501 is returned prior to the final 400 success message.
1116
1117
1118 DetachVolume
1119 ------------
1120
1121 The DetachVolume command detaches a cinder volume from a VM via an Openstack command.
1122
1123 Cinder is a Block Storage service for OpenStack. It's designed to present storage resources to end users that can be consumed by the OpenStack Compute Project (Nova). The short description of Cinder is that it virtualizes the management of block storage devices and provides end users with a self-service API to request and consume those resources without requiring any knowledge of where their storage is actually deployed or on what type of device.
1124
1125 NOTE: The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1126
1127 +--------------------------+----------------------------------------------------------+
1128 | **Target URL**           | /restconf /operations/ appc-provider-lcm:detach-volume   |
1129 +--------------------------+----------------------------------------------------------+
1130 | **Action**               | DetachVolume                                             |
1131 +--------------------------+----------------------------------------------------------+
1132 | **Action-Identifiers**   | vnf-id, vserver-id                                       |
1133 +--------------------------+----------------------------------------------------------+
1134 | **Payload Parameters**   | See table                                                |
1135 +--------------------------+----------------------------------------------------------+
1136 | **Revision History**     | New in Beijing                                           |
1137 +--------------------------+----------------------------------------------------------+
1138
1139 Request Payload Parameters:
1140
1141 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1142 |     **Payload Parameter**   |     **Description**                                                                                                         |     **Required**   |     **Example**                                                                                                                |
1143 +=============================+=============================================================================================================================+====================+================================================================================================================================+
1144 | volumeId                    |     The UUID of the volume to detach.                                                                                       | Yes                |     "volumeId": "a26887c6-c47b-4654- abb5-dfadf7d3f803",                                                                       |
1145 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1146 | vm-id                       |     The unique identifier (UUID) of the resource. For backwards- compatibility, this can be the self- link URL of the VM.   | Yes                |     "vm-id": http://135.25.246.162:8774/v2/64a f07e991424b8e9e54eca27d5c0d48/ servers/b074cd1b-8d53-412e-a102- 351cc51ac10a"   |
1147 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1148 | Identity-url                |     The identity URL used to access the resource                                                                            | No                 |     "identity-url": "http://135.25.246.162:5000/v2.0"                                                                          |
1149 +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1150
1151 DetachVolume Response:
1152 ^^^^^^^^^^^^^^^^^^^^^^
1153
1154 **Success:** A successful DetachVolume returns a success status code 400.
1155
1156 **Failure:** A failed DetachVolume returns a failure code 401 and the failure message. Failure messages can include:
1157
1158 -  badRequest
1159 -  unauthorized
1160 -  forbidden
1161 -  itemNotFound
1162 -  conflict
1163
1164
1165 Evacuate
1166 --------
1167
1168 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.
1169
1170 The host on which the VM resides needs to be down.
1171
1172 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.
1173
1174 After Evacuate, the rebuild VM can be disabled by setting the optional `rebuild-vm <#_bookmark43>`__ parameter to false.
1175
1176 A successful Evacuate action returns a success response. A failed Evacuate action returns a failure.
1177
1178 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1179
1180 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1181 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:evacuate                                                                                                            |
1182 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1183 |     **Action**               |     Evacuate                                                                                                                                                   |
1184 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1185 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                                                                                                         |
1186 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1187 |     **Payload Parameters**   |     `vm-id <#_bookmark40>`__, `identity-url <#_bookmark41>`__, `tenant-id <#_bookmark42>`__, `rebuild-vm <#_bookmark43>`__, `targethost-id <#_bookmark44>`__   |
1188 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1189 |     **Revision History**     |     Unchanged in this release.                                                                                                                                 |
1190 +------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1191
1192 |
1193
1194 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1195 |     **Parameter**    |     **Description**                                                                                                                                                              |     **Required?**   |     **Example**                       |
1196 +======================+==================================================================================================================================================================================+=====================+=======================================+
1197 |     vm-id            |     The unique identifier (UUID) of the resource. For backwards- compatibility, this can be the self- link URL of the VM.                                                        |     Yes             |     "payload":                        |
1198 |                      |                                                                                                                                                                                  |                     |     "{\"vm-id\": \"<VM-ID>            |
1199 |                      |                                                                                                                                                                                  |                     |     \",                               |
1200 |                      |                                                                                                                                                                                  |                     |     \"identity-url\":                 |
1201 |                      |                                                                                                                                                                                  |                     |     \"<IDENTITY-URL>\",               |
1202 |                      |                                                                                                                                                                                  |                     |     \"tenant-id\\": \"<TENANT-ID>     |
1203 |                      |                                                                                                                                                                                  |                     |     \",                               |
1204 |                      |                                                                                                                                                                                  |                     |     \"rebuild-vm\": \"false\",        |
1205 |                      |                                                                                                                                                                                  |                     |     \"targethost-id\":                |
1206 |                      |                                                                                                                                                                                  |                     |     \"nodeblade7\"}"                  |
1207 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1208 |     identity- url    |     The identity URL used to access the resource                                                                                                                                 |     No              |                                       |
1209 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1210 |     tenant-id        |     The id of the provider tenant that owns the resource                                                                                                                         |     No              |                                       |
1211 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1212 |     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              |                                       |
1213 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1214 |     targethost- id   |     A target hostname indicating the host the VM is evacuated to. By default, the cloud determines the target host.                                                              |     No              |                                       |
1215 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1216
1217 HealthCheck
1218 -----------
1219
1220 This command runs a VNF health check and returns the result.
1221
1222 The VNF level HealthCheck is a check over the entire scope of the VNF. The VNF must be 100% healthy, ready to take requests and provide services, with all VNF required capabilities ready to provide services and with all active and standby resources fully ready with no open MINOR, MAJOR or CRITICAL alarms.
1223
1224
1225 +------------------------------+-----------------------------------------------------------+
1226 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:health-check   |
1227 +------------------------------+-----------------------------------------------------------+
1228 |     **Action**               |     HealthCheck                                           |
1229 +------------------------------+-----------------------------------------------------------+
1230 |     **Action-Identifiers**   |     Vnf-id                                                |
1231 +------------------------------+-----------------------------------------------------------+
1232 |     **Payload Parameters**   |     See below                                             |
1233 +------------------------------+-----------------------------------------------------------+
1234 |     **Revision History**     |     Unchanged in this release                             |
1235 +------------------------------+-----------------------------------------------------------+
1236
1237 |
1238
1239 +---------------------+-----------------------------------+---------------------+-------------------------------------+
1240 |     **Parameter**   |     **Description**               |     **Required?**   |     **Example**                     |
1241 +=====================+===================================+=====================+=====================================+
1242 |    host-ip-address  |     Required only if REST         |     No              |                                     |
1243 |                     |     service. This is the ip       |                     |                                     |
1244 |                     |     address associated with the   |                     |                                     |
1245 |                     |     VM running the REST           |                     |                                     |
1246 |                     |     service.                      |                     |                                     |
1247 +---------------------+-----------------------------------+---------------------+                                     |
1248 |     port-number     |     Required only if REST         |     No              |     "payload":                      |
1249 |                     |     service. This is the port     |                     |     "{\\"host-ip-address\\":        |
1250 |                     |     number associated with the    |                     |     \\"10.222.22.2\\",              |
1251 |                     |     REST service.                 |                     |     \\”port-number\\”: \\”32\\”}"   |
1252 |                     |                                   |                     |                                     |
1253 +---------------------+-----------------------------------+---------------------+-------------------------------------+
1254
1255
1256 HealthCheck Response
1257 ^^^^^^^^^^^^^^^^^^^^
1258
1259 The Healthcheck returns a 200 OK if the test completes. A JSON object is returned indicating state (healthy, unhealthy), scope identifier, time-stamp and one or more blocks containing info and fault information.
1260
1261     Examples::
1262
1263                 200
1264                 {
1265                   "identifier": "scope represented", 
1266                   "state": "healthy",
1267                   "time": "01-01-1000:0000"
1268
1269                 }
1270
1271                 200
1272                 {
1273                    "identifier": "scope represented", 
1274                    "state": "unhealthy",
1275                         {[
1276                    "info": "System threshold exceeded details", 
1277                    "fault":
1278                          {
1279                            "cpuOverall": 0.80,
1280                            "cpuThreshold": 0.45
1281                          }
1282                         ]},
1283                    "time": "01-01-1000:0000"
1284                 }
1285
1286 If the VNF is unable to run the HealthCheck, it returns a standard http error code and message. APPC returns the error code 401 and the http error message.
1287
1288
1289 Lock
1290 ----
1291
1292 Use the Lock command to ensure exclusive access during a series of critical LCM commands.
1293
1294 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.
1295
1296 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.
1297
1298 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.
1299
1300 The Lock command returns only one final response with the status of the request processing.
1301
1302 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.
1303
1304 +------------------------------+---------------------------------------------------+
1305 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:lock   |
1306 +------------------------------+---------------------------------------------------+
1307 |     **Action**               |     Lock                                          |
1308 +------------------------------+---------------------------------------------------+
1309 |     **Action-Identifier**    |     Vnf-id                                        |
1310 +------------------------------+---------------------------------------------------+
1311 |     **Payload Parameters**   |     None                                          |
1312 +------------------------------+---------------------------------------------------+
1313 |     **Revision History**     |     Unchanged in this release.                    |
1314 +------------------------------+---------------------------------------------------+
1315
1316 Migrate
1317 -------
1318
1319 Migrates a running target VM from its current host to another.
1320
1321 A destination node will be selected by relying on internal rules to migrate. Migrate calls a command in order to perform the operation.
1322
1323 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.
1324
1325 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.
1326
1327 A successful Migrate action returns a success response.
1328
1329 A failed Migrate action returns a failure and the failure messages in the response payload block.
1330
1331 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1332
1333
1334 +--------------------------------+-----------------------------------------------------------------------------------------------+
1335 | **Input Block**                | api-ver should be set to 2.00 for current version of Migrate                                  |
1336 +--------------------------------+-----------------------------------------------------------------------------------------------+
1337 |     **Target URL**             |     /restconf/operations/appc-provider-lcm:migrate                                            |
1338 +--------------------------------+-----------------------------------------------------------------------------------------------+
1339 |     **Action**                 |     Migrate                                                                                   |
1340 +--------------------------------+-----------------------------------------------------------------------------------------------+
1341 |     **Action-Identifiers**     |     Vnf-id, vserver-id                                                                        |
1342 +--------------------------------+-----------------------------------------------------------------------------------------------+
1343 |     \ **Payload Parameters**   |     `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__   |
1344 +--------------------------------+-----------------------------------------------------------------------------------------------+
1345 |     **Revision History**       |     Unchanged in this release.                                                                |
1346 +--------------------------------+-----------------------------------------------------------------------------------------------+
1347
1348 Payload Parameters
1349
1350 +---------------------+-------------------------------------------------------------------------+---------------------+----------------------------------------+
1351 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                        |
1352 +=====================+=========================================================================+=====================+========================================+
1353 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                        |
1354 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |                                        |
1355 |                     |     link URL of the VM.                                                 |                     |     "payload":                         |
1356 |                     |                                                                         |                     |     "{\\"vm-id\": \\"<VM-ID>\\",       |
1357 |                     |                                                                         |                     |     \\"identity-url\\":                |
1358 |                     |                                                                         |                     |     \\"<IDENTITY-URL>\\",              |
1359 +---------------------+-------------------------------------------------------------------------+---------------------+         \\"tenant-id\\": \\"<TENANT-   |
1360 |     identity- url   |     The identity url used to access the resource                        |     No              |     ID>\\"}"                           |
1361 |                     |                                                                         |                     |                                        |
1362 +---------------------+-------------------------------------------------------------------------+---------------------+                                        |
1363 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                        |
1364 +---------------------+-------------------------------------------------------------------------+---------------------+----------------------------------------+
1365
1366
1367 QuiesceTraffic
1368 --------------
1369
1370 The QuiesceTraffic LCM action gracefully stops the traffic on the VNF (i.e., no service interruption for traffic in progress). All application processes are assumed to be running but no traffic is being processed.
1371
1372 This command is executed using an Ansible playbook or Chef cookbook.
1373     
1374 Request Structure:
1375
1376 +--------------------------+----------------------------------------------------------+
1377 | **Target URL**           | /restconf/operations/appc-provider-lcm:quiesce-traffic   |
1378 +--------------------------+----------------------------------------------------------+
1379 | **Action**               | QuiesceTraffic                                           |
1380 +--------------------------+----------------------------------------------------------+
1381 | **Action-identifiers**   | vnf-id                                                   |
1382 +--------------------------+----------------------------------------------------------+
1383 | **Payload Parameters**   | operations-timeout                                       |
1384 +--------------------------+----------------------------------------------------------+
1385 | **Revision History**     | New in Beijing                                           |
1386 +--------------------------+----------------------------------------------------------+
1387
1388 Request Payload Parameters:
1389
1390 +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+------------------------------------------------+
1391 | **Parameter**         |     **Description**                                                                                                                                                                                  |     **Required?**   |     **Example**                                |
1392 +=======================+======================================================================================================================================================================================================+=====================+================================================+
1393 | operations- timeout   |     This is the maximum time in seconds that the command will run before APPC returns a timeout error. If the APPC template has a lower timeout value, the APPC template timeout value is applied.   |     Yes             |     "payload":                                 |
1394 |                       |                                                                                                                                                                                                      |                     |     "{\\"operations-timeout\\": \\"3600\\"}”   |
1395 +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+------------------------------------------------+
1396
1397 QuiesceTraffic Response
1398 ^^^^^^^^^^^^^^^^^^^^^^^
1399
1400 The response does not include any payload parameters.
1401
1402 **Success:** A successful quiesce returns a success status code 400 after all traffic has been quiesced.
1403
1404    If a quiesce command is executed and the traffic has been previously quiesced, it should return a success status.
1405
1406 **Failure:** A failed quiesce returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1407
1408     A specific error message is returned if there is a timeout error.
1409
1410
1411
1412 Rebuild
1413 -------
1414
1415 Recreates a target VM instance to a known, stable state.
1416
1417 Rebuild calls an OpenStack command immediately and therefore does not expect any prerequisite operations to be performed, such as shutting off a VM.
1418
1419 Rebuild VM uses the latest snapshot by default; if there are no snapshots it uses the (original) Glance image for the rebuild. APPC rejects a rebuild request if it determines the VM boots from a Cinder Volume.
1420
1421 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.
1422
1423 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1424
1425
1426 +------------------------------+-----------------------------------------------------------------------------------------------+
1427 | **Input Block**              | api-ver should be set to 2.00 for current version of Rebuild                                  |
1428 +------------------------------+-----------------------------------------------------------------------------------------------+
1429 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:rebuild                                            |
1430 +------------------------------+-----------------------------------------------------------------------------------------------+
1431 |     **Action**               |     Rebuild                                                                                   |
1432 +------------------------------+-----------------------------------------------------------------------------------------------+
1433 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                                        |
1434 +------------------------------+-----------------------------------------------------------------------------------------------+
1435 |     **Payload Parameters**   |     `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__   |
1436 +------------------------------+-----------------------------------------------------------------------------------------------+
1437 |     **Revision History**     |     Unchanged in this release.                                                                |
1438 +------------------------------+-----------------------------------------------------------------------------------------------+
1439
1440
1441 Payload Parameters
1442
1443 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1444 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1445 +=================+===============================================+=================+=========================================+
1446 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1447 |                 |     the resource. For backwards-              |                 |                                         |
1448 |                 |     compatibility, this can be the self-      |                 | "payload":                              |
1449 |                 |     link URL of the VM.                       |                 | "{\\"vm-id\\": \\"<VM-ID>               |
1450 |                 |                                               |                 | \\",                                    |
1451 |                 |                                               |                 | \\"identity-url\\":                     |
1452 |                 |                                               |                 | \\"<IDENTITY-URL>\\",                   |
1453 |                 |                                               |                 | \\"tenant-id\\": \\"<TENANT- ID>\\"}"   |
1454 +-----------------+-----------------------------------------------+-----------------+                                         |
1455 | identity- url   |     The identity url used to access the       | No              |                                         |
1456 |                 |     resource                                  |                 |                                         |
1457 +-----------------+-----------------------------------------------+-----------------+                                         |
1458 | tenant-id       |     The id of the provider tenant that owns   | No              |                                         |
1459 |                 |     the resource                              |                 |                                         |
1460 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1461
1462
1463
1464 Restart
1465 -------
1466
1467 Use the Restart command to restart a VM.    
1468
1469 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1470 |     **Input Block**          |     api-ver should be set to 2.00 for current version of Restart                                                |
1471 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1472 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:restart                                                              |
1473 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1474 |     **Action**               |     Restart                                                                                                     |
1475 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1476 |     **Action-identifiers**   |     vnf-id and vserver-id are required.                                                                         |
1477 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1478 |     **Payload Parameters**   |     See table below                                                                                             |
1479 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1480 |     **Revision History**     |     Unchanged in this release                                                                                   |
1481 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1482
1483 Payload Parameters for **VM Restart**
1484
1485 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1486 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                    |
1487 +=====================+=========================================================================+=====================+====================================+
1488 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                    |
1489 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |                                    |
1490 |                     |     link URL of the VM.                                                 |                     |     "payload":                     |
1491 |                     |                                                                         |                     |     "{\\"vm-id\\": \\"<VM-ID>\\",  |
1492 |                     |                                                                         |                     |     \\"identity-url\\":            |
1493 +---------------------+-------------------------------------------------------------------------+---------------------+     \\"<IDENTITY-URL>\\",          |
1494 |     identity- url   |     The identity url used to access the resource                        |     No              |     \"tenant-id\": \"<TENANT-      |
1495 |                     |                                                                         |                     |     ID>\"}"                        |
1496 +---------------------+-------------------------------------------------------------------------+---------------------+                                    |
1497 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                    |
1498 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1499
1500 ResumeTraffic
1501 -------------
1502
1503 The ResumeTraffic LCM action resumes processing traffic on a VNF that has been previously quiesced.
1504
1505 This command is executed using an Ansible playbook or Chef cookbook.
1506
1507 Request Structure: The payload does not have any parameters.
1508
1509 +--------------------------+---------------------------------------------------------+
1510 | **Target URL**           | /restconf/operations/appc-provider-lcm:resume-traffic   |
1511 +--------------------------+---------------------------------------------------------+
1512 | **Action**               | ResumeTraffic                                           |
1513 +--------------------------+---------------------------------------------------------+
1514 | **Action-identifiers**   | vnf-id                                                  |
1515 +--------------------------+---------------------------------------------------------+
1516 | **Payload Parameters**   |                                                         |
1517 +--------------------------+---------------------------------------------------------+
1518 | **Revision History**     | New in Beijing                                          |
1519 +--------------------------+---------------------------------------------------------+
1520
1521 ResumeTraffic Response
1522 ^^^^^^^^^^^^^^^^^^^^^^
1523
1524 **Success:** A successful ResumeTraffic returns a success status code 400 after traffic has been resumed.
1525
1526 If a ResumeTraffic command is executed and the traffic is currently being processed, it should return a success status
1527
1528 **Failure:** A failed ResumeTraffic returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1529
1530
1531 Snapshot
1532 --------
1533
1534 Creates a snapshot of a VM.
1535
1536 The Snapshot command returns a customized response containing a reference to the newly created snapshot instance if the action is successful.
1537
1538 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.
1539
1540 Note: Snapshot is not reliable unless the VM is in a stopped, paused, or quiesced (no traffic being processed) status. It is up to the caller to ensure that the VM is in one of these states.
1541
1542 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1543
1544 +------------------------------+-----------------------------------------------------------------------------------------------------+
1545 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:snapshot                                                 |
1546 +------------------------------+-----------------------------------------------------------------------------------------------------+
1547 |     **Action**               |     Snapshot                                                                                        |
1548 +------------------------------+-----------------------------------------------------------------------------------------------------+
1549 |     **Action-identifiers**   |     Vnf-id is required. If the snapshot is for a single VM, then the vserver-id is also required.   |
1550 +------------------------------+-----------------------------------------------------------------------------------------------------+
1551 |     **Payload Parameters**   |     `vm-id <#_bookmark52>`__, `identity-url <#_bookmark54>`__, `tenant-id <#_bookmark55>`__         |
1552 +------------------------------+-----------------------------------------------------------------------------------------------------+
1553 |     **Revision History**     |     Unchanged in this release.                                                                      |
1554 +------------------------------+-----------------------------------------------------------------------------------------------------+
1555
1556 Payload Parameters
1557
1558 +---------------------+-------------------------------------------------------------------------+---------------------+----------------------------------------+
1559 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                        |
1560 +=====================+=========================================================================+=====================+========================================+
1561 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                        |
1562 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |     "payload":                         |
1563 |                     |     link URL of the VM.                                                 |                     |     "{\\"vm-id\": \\"<VM-ID>           |
1564 |                     |                                                                         |                     |     \\",                               |
1565 |                     |                                                                         |                     |     \\"identity-url\\":                |
1566 |                     |                                                                         |                     |     \\"<IDENTITY-URL>\\",              |
1567 +---------------------+-------------------------------------------------------------------------+---------------------+         \\"tenant-id\\": \\"<TENANT-   |
1568 |     identity- url   |     The identity url used to access the resource                        |     No              |     ID>\\"}"                           |
1569 |                     |                                                                         |                     |                                        |
1570 +---------------------+-------------------------------------------------------------------------+---------------------+                                        |
1571 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                        |
1572 +---------------------+-------------------------------------------------------------------------+---------------------+----------------------------------------+
1573
1574 Snapshot Response
1575 ^^^^^^^^^^^^^^^^^
1576
1577 The Snapshot command returns an extended version of the LCM response.
1578
1579 The Snapshot response conforms to the `standard response format <#_bookmark5>`__, but has the following additional field.
1580
1581 Additional Parameters
1582
1583 +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------------------------+
1584 |     **Parameter**   |     **Description**                                                                                                                                    |     **Required**   | **?Example**                          |
1585 +=====================+========================================================================================================================================================+====================+=======================================+
1586 |     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>"   |
1587 +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+---------------------------------------+
1588
1589 Start
1590 -----
1591
1592 Use the Start command to start a VNF, VF-Module, or VM that is stopped or not running.
1593
1594 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1595
1596 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1597 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:start                                                                               |
1598 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1599 |     **Action**               |     Start                                                                                                                      |
1600 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1601 |     **Action-identifiers**   |     vnf-id and vserver-id are required                                                                                         |
1602 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1603 |     **Payload Parameters**   |     See below                                                                                                                  |
1604 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1605 |     **Revision History**     |     Unchanged in this release                                                                                                  |
1606 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1607
1608 Payload Parameters
1609
1610 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1611 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1612 +=================+===============================================+=================+=========================================+
1613 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1614 |                 |     the resource. For backwards-              |                 | "payload":                              |
1615 |                 |     compatibility, this can be the self-      |                 | "{\\"vm-id\\": \\"<VM-ID>               |
1616 |                 |     link URL of the VM.                       |                 | \\",                                    |
1617 |                 |                                               |                 | \\"identity-url\\":                     |
1618 |                 |                                               |                 | \\"<IDENTITY-URL>\\",                   |
1619 |                 |                                               |                 | \\"tenant-id\\": \\"<TENANT- ID>\\"}"   |
1620 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1621 | identity- url   |     The identity url used to access the       | No              |                                         |
1622 |                 |     resource                                  |                 |                                         |
1623 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1624 | tenant-id       |     The id of the provider tenant that owns   | No              |                                         |
1625 |                 |     the resource                              |                 |                                         |
1626 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1627
1628
1629 StartApplication
1630 ----------------
1631
1632 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.
1633
1634 A successful StartApplication request returns a success response.
1635
1636 A failed StartApplication action returns a failure response code and the specific failure message in the response block.
1637
1638 +------------------------------+---------------------------------------------------------------+
1639 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:startapplication   |
1640 +------------------------------+---------------------------------------------------------------+
1641 |     **Action**               |     StartApplication                                          |
1642 +------------------------------+---------------------------------------------------------------+
1643 |     **Action-Identifiers**   |     Vnf-id                                                    |
1644 +------------------------------+---------------------------------------------------------------+
1645 |     **Payload Parameters**   |     See below                                                 |
1646 +------------------------------+---------------------------------------------------------------+
1647 |     **Revision History**     |     Unchanged in this release.                                |
1648 +------------------------------+---------------------------------------------------------------+
1649
1650 |
1651
1652 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1653 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1654 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1655 |     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":                                                  |
1656 |                                 |                                                                                                                                                                                    |                     |     "{\\"request-parameters                                     |
1657 |                                 |                                                                                                                                                                                    |                     |     \\": {                                                      |
1658 |                                 |                                                                                                                                                                                    |                     |     \\"host-ip-address\\": \\”value\\”                          |
1659 |                                 |                                                                                                                                                                                    |                     |     }                                                           |
1660 |                                 |                                                                                                                                                                                    |                     |     \\"configuration- parameters\\": {\\"<CONFIG- PARAMS>\\"}   |
1661 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                 |
1662 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1663 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1664
1665 StartApplication Response
1666 ^^^^^^^^^^^^^^^^^^^^^^^^^
1667
1668 The StartApplication response returns an indication of success or failure of the request.
1669
1670 Stop
1671 ----
1672
1673 Use the Stop command to stop a VM.
1674
1675 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1676
1677 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1678 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:stop                                                                                |
1679 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1680 |     **Action**               |     Stop                                                                                                                       |
1681 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1682 |     **Action-identifiers**   |     vnf-id and vserver-id are required.                                                                                        |
1683 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1684 |     **Payload Parameters**   |     See below                                                                                                                  |
1685 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1686 |     **Revision History**     |     Unchanged in this release                                                                                                  |
1687 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1688
1689 Payload Parameters
1690
1691 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1692 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1693 +=================+===============================================+=================+=========================================+
1694 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1695 |                 |     the resource. For backwards-              |                 | "payload":                              |
1696 |                 |     compatibility, this can be the self-      |                 | "{\\"vm-id\\": \\"<VM-ID>               |
1697 |                 |     link URL of the VM.                       |                 | \\",                                    |
1698 |                 |                                               |                 | \\"identity-url\\":                     |
1699 |                 |                                               |                 | \\"<IDENTITY-URL>\\",                   |
1700 |                 |                                               |                 | \\"tenant-id\\": \\"<TENANT- ID>\\"}"   |
1701 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1702 | identity- url   |     The identity url used to access the       | No              |                                         |
1703 |                 |     resource                                  |                 |                                         |
1704 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1705 | tenant-id       |     The id of the provider tenant that owns   | No              |                                         |
1706 |                 |     the resource                              |                 |                                         |
1707 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1708
1709
1710 StopApplication
1711 ---------------
1712
1713 Stops the VNF application gracefully (not lost traffic), if needed, prior to a Stop command. Supported using Chef cookbook or Ansible playbook only.
1714
1715 A successful StopApplication request returns a success response.
1716
1717 A failed StopApplication action returns a failure response code and the specific failure message in the response block.
1718
1719 +------------------------------+--------------------------------------------------------------+
1720 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:stopapplication   |
1721 +------------------------------+--------------------------------------------------------------+
1722 |     **Action**               |     StopApplication                                          |
1723 +------------------------------+--------------------------------------------------------------+
1724 |     **Action-Identifiers**   |     Vnf-id                                                   |
1725 +------------------------------+--------------------------------------------------------------+
1726 |     **Payload Parameters**   |     See below                                                |
1727 +------------------------------+--------------------------------------------------------------+
1728 |     **Revision History**     |     Unchanged in this release                                |
1729 +------------------------------+--------------------------------------------------------------+
1730
1731 |
1732
1733 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1734 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1735 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1736 |     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":                                                  |
1737 |                                 |                                                                                                                                                                                    |                     |     "{\\"request-parameters                                     |
1738 |                                 |                                                                                                                                                                                    |                     |     \\": {                                                      |
1739 |                                 |                                                                                                                                                                                    |                     |     \\"host-ip-address\\": \\”va lue\\”                         |
1740 |                                 |                                                                                                                                                                                    |                     |     }                                                           |
1741 |                                 |                                                                                                                                                                                    |                     |     \\"configuration- parameters\\": {\\"<CONFIG- PARAMS>\\"}   |
1742 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1743 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1744 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1745
1746 StopApplication Response
1747 ^^^^^^^^^^^^^^^^^^^^^^^^
1748
1749 The StopApplication response returns an indication of success or failure of the request.
1750
1751 Sync
1752 ----
1753
1754 The Sync action updates the current configuration in the APPC store with the running configuration from the device.
1755
1756 A successful Sync returns a success status.
1757
1758 A failed Sync returns a failure response status and failure messages in the response payload block.
1759
1760 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).
1761
1762 +------------------------------+---------------------------------------------------+
1763 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:sync   |
1764 +------------------------------+---------------------------------------------------+
1765 |     **Action**               |     Sync                                          |
1766 +------------------------------+---------------------------------------------------+
1767 |     **Action-identifiers**   |     Vnf-id                                        |
1768 +------------------------------+---------------------------------------------------+
1769 |     **Payload Parameters**   |     None                                          |
1770 +------------------------------+---------------------------------------------------+
1771 |     **Revision History**     |     Unchanged in this release.                    |
1772 +------------------------------+---------------------------------------------------+
1773
1774 Unlock
1775 ------
1776
1777 Run the Unlock command to release the lock on a VNF and allow other clients to perform LCM commands on that VNF.
1778
1779 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.
1780
1781 The Unlock command will result in success if the VNF successfully unlocked or if it was already unlocked, otherwise commands will be rejected.
1782
1783 The Unlock command will only return success if the VNF was locked with same `request-id <#_bookmark4>`__.
1784
1785 The Unlock command returns only one final response with the status of the request processing.
1786
1787 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.
1788
1789 +------------------------------+-----------------------------------------------------+
1790 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:unlock   |
1791 +------------------------------+-----------------------------------------------------+
1792 |     **Action**               |     Unlock                                          |
1793 +------------------------------+-----------------------------------------------------+
1794 |     **Action-identifiers**   |     Vnf-id                                          |
1795 +------------------------------+-----------------------------------------------------+
1796 |     **Payload Parameters**   |     None                                            |
1797 +------------------------------+-----------------------------------------------------+
1798 |     **Revision History**     |     Unchanged in this release.                      |
1799 +------------------------------+-----------------------------------------------------+
1800
1801
1802 UpgradeBackout
1803 --------------
1804
1805 The UpgradeBackout LCM action does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).
1806
1807 This command is executed using an Ansible playbook or Chef cookbook.
1808
1809 Request Structure: The request payload includes an upgrade identifier.
1810
1811 +--------------------------+----------------------------------------------------------+
1812 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-backout   |
1813 +--------------------------+----------------------------------------------------------+
1814 | **Action**               | UpgradeBackout                                           |
1815 +--------------------------+----------------------------------------------------------+
1816 | **Action-identifiers**   | vnf-id                                                   |
1817 +--------------------------+----------------------------------------------------------+
1818 | **Payload Parameters**   | existing-software-version, new-software-version          |
1819 +--------------------------+----------------------------------------------------------+
1820 | **Revision History**     | New in Beijing                                           |
1821 +--------------------------+----------------------------------------------------------+
1822
1823 Request Payload Parameters:
1824
1825 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1826 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
1827 +=======================+=====================================+=====================+===============================================================================================+
1828 | existing-software-    |     The existing software version   |     Yes             |     "payload":                                                                                |
1829 | version               |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
1830 +-----------------------+-------------------------------------+---------------------+                                                                                               |
1831 | new-software-         |     The new software                |     Yes             |                                                                                               |
1832 | version               |     version after the               |                     |                                                                                               |
1833 |                       |     upgrade                         |                     |                                                                                               |
1834 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1835
1836 UpgradeBackout Response
1837 ^^^^^^^^^^^^^^^^^^^^^^^
1838
1839 **Success:** A successful backout returns a success status code 400.
1840
1841 **Failure:** A failed backout returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1842
1843 UpgradeBackup
1844 -------------
1845
1846 The UpgradeBackup LCM action does a full backup of the VNF data prior to an upgrade. The backup is done on the Ansible or Chef server in a location that is specified in the playbook or cookbook. If there is an existing backup, it is overwritten by the new backup.
1847
1848 This command is executed using an Ansible playbook or Chef cookbook.
1849   
1850 Request Structure: The payload does not have any parameters required.
1851
1852 +--------------------------+---------------------------------------------------------+
1853 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-backup   |
1854 +--------------------------+---------------------------------------------------------+
1855 | **Action**               | UpgradeBackup                                           |
1856 +--------------------------+---------------------------------------------------------+
1857 | **Action-identifiers**   | vnf-id                                                  |
1858 +--------------------------+---------------------------------------------------------+
1859 | **Payload Parameters**   | existing-software-version, new-software-version         |
1860 +--------------------------+---------------------------------------------------------+
1861 | **Revision History**     | New in Beijing.                                         |
1862 +--------------------------+---------------------------------------------------------+
1863
1864 Request Payload Parameters:
1865
1866 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1867 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
1868 +=======================+=====================================+=====================+===============================================================================================+
1869 | existing-software-    |     The existing software version   |     Yes             |     "payload":                                                                                |
1870 | version               |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
1871 +-----------------------+-------------------------------------+---------------------+                                                                                               |
1872 | new-software-         |     The new software                |     Yes             |                                                                                               |
1873 | version               |     version after the               |                     |                                                                                               |
1874 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1875
1876 UpgradeBackup Response
1877 ^^^^^^^^^^^^^^^^^^^^^^
1878
1879 **Success:** A successful backup returns a success status code 400.
1880
1881 **Failure:** A failed backup returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1882
1883 UpgradePostCheck
1884 ----------------
1885
1886 The UpgradePostCheck LCM action checks that the VNF upgrade has been successful completed and all processes are running properly.
1887
1888 This command is executed using an Ansible playbook or Chef cookbook.
1889
1890 Request Structure:
1891
1892 +--------------------------+-------------------------------------------------------------+
1893 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-post-check   |
1894 +--------------------------+-------------------------------------------------------------+
1895 | **Action**               | UpgradePostCheck                                            |
1896 +--------------------------+-------------------------------------------------------------+
1897 | **Action-identifiers**   | vnf-id                                                      |
1898 +--------------------------+-------------------------------------------------------------+
1899 | **Payload Parameters**   | existing-software-version, new-software-version             |
1900 +--------------------------+-------------------------------------------------------------+
1901 | **Revision History**     | New in Beijing                                              |
1902 +--------------------------+-------------------------------------------------------------+
1903
1904 Request Payload Parameters:
1905
1906 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1907 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
1908 +=======================+=====================================+=====================+===============================================================================================+
1909 | existing- software-   |     The existing software version   |     Yes             |     "payload":                                                                                |
1910 |  version              |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
1911 +-----------------------+-------------------------------------+---------------------+                                                                                               |
1912 | new-software-         |     The new software                |     Yes             |                                                                                               |
1913 | version               |     version after the               |                     |                                                                                               |
1914 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1915
1916 UpgradePostCheck Response
1917 ^^^^^^^^^^^^^^^^^^^^^^^^^
1918
1919 **Success:** If the UpgradePostCheck run successfully, it returns a success status code 400. The response payload contains the results of the check (Completed or Failed).
1920
1921 Response Payload Parameters:
1922
1923 +---------------+-----------------------------+-------------+------------------------------------------------------------------------------+
1924 | **Parameter** |     **Description**         |**Required?**|     **Example**                                                              |
1925 +===============+=============================+=============+==============================================================================+
1926 | Upgrade-      |     Returns the status      |     Yes     |                                                                              |
1927 | Status        |     of the upgradw          |             |     "payload":                                                               |
1928 |               |     post-check. Indicates   |             |     "{\\"upgrade-status\\": \\"Completed\\"}”                                |
1929 |               |     Completed or Failed     |             |     "payload": "{\\"upgrade-status\\":                                       |
1930 |               |                             |             |     \\"Failed\\",\\"message\\": \\"Version 3.2 is not running properly\\" }” |
1931 +---------------+-----------------------------+-------------+                                                                              |
1932 | Message       |     If Not Available,       |             |                                                                              |
1933 |               |     message contains        |             |                                                                              |
1934 |               |     explanation.            |             |                                                                              |
1935 +---------------+-----------------------------+-------------+------------------------------------------------------------------------------+
1936
1937 **Failure:** If the UpgradePostCheck could not be run, it returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1938
1939 UpgradePreCheck
1940 ---------------
1941
1942 The UpgradePreCheck LCM action checks that the VNF has the correct software version needed for a software upgrade. This command can be executed on a running VNF (i.e. processing traffic).
1943
1944 This command is executed using an Ansible playbook or Chef cookbook.
1945
1946 Request Structure:
1947
1948 +--------------------------+------------------------------------------------------------+
1949 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-pre-check   |
1950 +--------------------------+------------------------------------------------------------+
1951 | **Action**               | UpgradePreCheck                                            |
1952 +--------------------------+------------------------------------------------------------+
1953 | **Action-identifiers**   | vnf-id                                                     |
1954 +--------------------------+------------------------------------------------------------+
1955 | **Payload Parameters**   | existing-software-version, new-software-version            |
1956 +--------------------------+------------------------------------------------------------+
1957 | **Revision History**     | New in Beijing                                             |
1958 +--------------------------+------------------------------------------------------------+
1959
1960 Request Payload Parameters:
1961
1962 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1963 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
1964 +=======================+=====================================+=====================+===============================================================================================+
1965 | existing-software-    |     The existing software version   |     Yes             |     "payload":                                                                                |
1966 | version               |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
1967 +-----------------------+-------------------------------------+---------------------+                                                                                               |
1968 | new-software-         |     The new software                |     Yes             |                                                                                               |
1969 | version               |     version after the               |                     |                                                                                               |
1970 |                       |     upgrade                         |                     |                                                                                               |
1971 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
1972
1973 UpgradePreCheck Response
1974 ^^^^^^^^^^^^^^^^^^^^^^^^
1975
1976 **Success:** If the UpgradePreCheck runs successfully, it returns a success status code 400. The response payload contains the results of the check (Available or Not Available for upgrade).
1977
1978 Response Payload Parameters:
1979
1980 +-----------------+---------------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------+
1981 | **Parameter**   |     **Description**       |     **Required?**   |     **Example**                                                                                                                  |
1982 +=================+===========================+=====================+==================================================================================================================================+
1983 | upgrade-status  |     Returns the status    |     Yes             |                                                                                                                                  |
1984 |                 |     of the upgrade pre-   |                     |     "payload":                                                                                                                   |
1985 |                 |     check. Indicates      |                     |     "{\\"upgrade-status\\": \\"Available\\"}”                                                                                    |
1986 |                 |     Available or Not      |                     |                                                                                                                                  |
1987 |                 |     Available             |                     |     "payload":                                                                                                                   |
1988 |                 |                           |                     |     "{\\"upgrade-status\\": \\"Not Available\\",\\"message\\": \\"Current software version 2.9 cannot be upgraded to 3.1\\" }”   |
1989 +-----------------+---------------------------+---------------------+                                                                                                                                  |
1990 |     message     |     If Not Available,     |                     |                                                                                                                                  |
1991 |                 |     message contains      |                     |                                                                                                                                  |
1992 |                 |     explanation.          |                     |                                                                                                                                  |
1993 +-----------------+---------------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------+
1994
1995 **Failure:** If an UpgradePreCheck fails to run, it returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1996
1997 UpgradeSoftware
1998 ---------------
1999
2000 The UpgradeSoftware LCM action upgrades the target VNF to a new version. It is expected that the VNF is in a quiesced status (not processing traffic).
2001
2002 This command is executed using an Ansible playbook or Chef cookbook.
2003   
2004 Request Structure: The request payload includes the new-software-version.
2005
2006 +--------------------------+-----------------------------------------------------------+
2007 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-software   |
2008 +--------------------------+-----------------------------------------------------------+
2009 | **Action**               | UpgradeSoftware                                           |
2010 +--------------------------+-----------------------------------------------------------+
2011 | **Action-identifiers**   | vnf-id                                                    |
2012 +--------------------------+-----------------------------------------------------------+
2013 | **Payload Parameters**   | existing-software-version, new-software-version           |
2014 +--------------------------+-----------------------------------------------------------+
2015 | **Revision History**     | New in Beijing                                            |
2016 +--------------------------+-----------------------------------------------------------+
2017
2018  Request Payload Parameters:
2019
2020 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2021 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
2022 +=======================+=====================================+=====================+===============================================================================================+
2023 | existing- software-   |     The existing software version   |     Yes             |     "payload":                                                                                |
2024 | version               |      prior to the upgrade           |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
2025 +-----------------------+-------------------------------------+---------------------+                                                                                               |
2026 | new-software          |     The new software                |     Yes             |                                                                                               |
2027 | version               |     version after the               |                     |                                                                                               |
2028 |                       |     upgrade                         |                     |                                                                                               |
2029 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2030
2031 UpgradeSoftware Response
2032 ^^^^^^^^^^^^^^^^^^^^^^^^
2033
2034 **Success:** A successful upgrade returns a success status code 400.
2035
2036 If an UpgradeSoftware command is executed and the software has been previously upgraded to this version, it should return a success status.
2037
2038 **Failure:** A failed upgrade returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block. A failure does not assume that the software upgrade has been rolled back.
2039
2040 Notes regarding the Upgrade commands
2041 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2042 Ansible playbooks / Chef cookbooks:
2043
2044 -  All Ansible playbooks/cookbooks for the Upgrade commands will be
2045    stored in the same directory on the server. The directory name will
2046    be of the format: 
2047    
2048         {existing-software-version\_new-software-version}. 
2049                 
2050                 The path to the directory is the same for all upgrades (for example: vnf-type/softwareupgrade).
2051
2052 -  The playbooks for upgrades should use a standard naming convention
2053    (for example: SoftwareUpgrade\_{existing-software-version\_new-software-version}).
2054
2055 APPC template: The APPC templates for the Upgrade commands can be common across upgrades for the vnf-type if the path and filenames are standardized.
2056
2057 -  The template will contain the directory path/playbook name which
2058    would be parameterized.
2059
2060     {vnf-type}/UpgradeSoftware/${existing\_software\_version}\_${new-software-version}/
2061     SoftwareUpgrade\_{existing-software-version\_new-software-version}.
2062