Fix for documentation of DistributeTrafficCheck
[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 APPC 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 APPC. The model allows some non-disruptive actions such as Lock, Unlock, CheckLock, and ActionStatus to be performed in conjunction with other actions.  |                     |
212 |                           |                                                                                                                                                                                                                                                                                                                                                                             |                     |
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:                                                                                                                                                                                                          |                     |
239 |                           |                                                                                                                                                                                                                                                                                                                                                                             |                     |
240 |                           |        ``"{\" vnf-host-ip-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 (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. 
278
279    b. If there is overlap, then only special cases are allowed in
280       parallel (for example, Audit and HealthCheck are allowed).
281
282
283 Generic Response Format
284 -----------------------
285
286
287 This section describes the generic response format.
288
289 The response format is applicable for both POST HTTP API and for the message body received via the message bus.
290
291
292 LCM Response
293 ^^^^^^^^^^^^
294
295 The LCM response comprises a common header and a section containing the payload and action details.
296
297 The LCM response conforms to the following structure::
298
299     {
300         "output": {
301                     "common-header": {
302                                         "api-ver": "<API_VERSION>",
303                                         "flags": {
304                                                    "ttl": <TTL_VALUE>,
305                                                    "force": "<TRUE|FALSE>",
306                                                    "mode": "<EXCLUSIVE|NORMAL>"
307                                                  },
308                                         "originator-id": "<SYSTEM_ID>",
309                                         "request-id": "<REQUEST_ID>",
310                                         "sub-request-id": "<SUBREQUEST_ID>",
311                                         "timestamp": "2016-08-08T23:09:00.11Z",
312                                      },
313                     "payload": "<PAYLOAD>",
314                     [Additional fields],
315                     "status": {
316                                 "code": <RESULT_CODE>,
317                                 "message": "<RESULT_MESSAGE>"
318                               }
319                   }
320     }
321
322
323 Table 3 LCM Response Fields
324
325 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
326 |     **Field**        |     **Description**                                                                                                                                                                                                       |     **Required?**   |
327 +======================+===========================================================================================================================================================================================================================+=====================+
328 |     output           |     The block that defines the details of the output of the command processing. Contains the ``common-header`` details.                                                                                                   |     Yes             |
329 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
330 |     common- header   |     The block that contains the generic details about a request.                                                                                                                                                          |     Yes             |
331 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
332 |     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             |
333 |                      |                                                                                                                                                                                                                           |                     |
334 |                      |     -  2.00 should be used for all LCM API requests                                                                                                                                                                       |                     |
335 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
336 |     originator-id    |     An identifier of the calling system limited to a length of 40 characters.                                                                                                                                             |     Yes             |
337 |                      |                                                                                                                                                                                                                           |                     |
338 |                      |     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.                                         |                     |
339 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
340 |     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             |
341 |                      |                                                                                                                                                                                                                           |                     |
342 |                      |     The request-id is stored throughout the operations performed during a single request.                                                                                                                                 |                     |
343 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
344 |     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              |
345 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
346 |     timestamp        |     The time of the request, in ISO 8601 format, ZULU offset. For example: ``2016-08-03T08:50:18.97Z``.                                                                                                                   |     Yes             |
347 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
348 |     status           |     The status describes the outcome of the command processing. Contains a ``code`` and a ``message`` providing success or failure details.                                                                               |     Yes             |
349 |                      |                                                                                                                                                                                                                           |                     |
350 |                      |     ***NOTE:** See* status *for code values.*                                                                                                                                                                             |                     |
351 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
352 |     payload          |     An open-format field.                                                                                                                                                                                                 |     No              |
353 |                      |                                                                                                                                                                                                                           |                     |
354 |                      |     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\\"}"``.        |                     |
355 |                      |                                                                                                                                                                                                                           |                     |
356 |                      |     The payload is typically used to provide parametric data associated with the response to the command.                                                                                                                 |                     |
357 |                      |                                                                                                                                                                                                                           |                     |
358 |                      |     Note that not all LCM commands need have a payload.                                                                                                                                                                   |                     |
359 |                      |                                                                                                                                                                                                                           |                     |
360 |                      |     ***NOTE:** The specific value(s) for the response payload, where relevant, is provided for in each* command *description.*                                                                                            |                     |
361 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
362 |     [Field name]     |     Additional fields can be provided in the response, if needed, by specific commands.                                                                                                                                   |     No              |
363 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
364 |     code             |     A unique pre-defined value that identifies the exact nature of the success or failure status.                                                                                                                         |     No              |
365 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
366 |     message          |     The description of the success or failure status.                                                                                                                                                                     |     No              |
367 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
368
369
370 Status Codes
371 ------------
372
373 The status code is returned in the response message as the ``code`` parameter, and the description as the message parameter.
374
375 The different responses are categorized as follows:
376
377 **ACCEPTED**
378
379     Request is valid and accepted for processing.
380
381 **ERROR**
382
383     Request invalid or incomplete.
384
385 **REJECT**
386
387     Request rejected during processing due to invalid data, such as an
388     unsupported command.
389
390 **SUCCESS**
391
392     Request is valid and completes successfully.
393
394 **FAILURE**
395
396     The request processing resulted in failure.
397
398     A FAILURE response is always returned asynchronously via the message
399     bus.
400
401 **PARTIAL SUCCESS**
402
403     The request processing resulted in partial success where at least
404     one step in a longer process completed successfully.
405
406     A PARTIAL SUCCESS response is always returned asynchronously via the
407     message bus.
408
409 **PARTIAL FAILURE**
410
411     The request processing resulted in partial failure.
412
413     A PARTIAL FAILURE response is always returned asynchronously via the
414     message bus.
415
416 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
417 |     **Category**      |     **Code**   |     **Message / Description**                                                                                                        |
418 +=======================+================+======================================================================================================================================+
419 |     ACCEPTED          |     100        |     ACCEPTED - Request accepted                                                                                                      |
420 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
421 |     ERROR             |     200        |     UNEXPECTED ERROR - ${detailedErrorMsg}                                                                                           |
422 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
423 |     REJECT            |     300        |     REJECTED - ${detailedErrorMsg}                                                                                                   |
424 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
425 |                       |     301        |     INVALID INPUT PARAMETER -${detailedErrorMsg}                                                                                     |
426 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
427 |                       |     302        |     MISSING MANDATORY PARAMETER - Parameter ${paramName} is missing                                                                  |
428 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
429 |                       |     303        |     REQUEST PARSING FAILED - ${detailedErrorMsg}                                                                                     |
430 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
431 |                       |     304        |     NO TRANSITION DEFINED - No Transition Defined for ${actionName} action and ${currentState} state                                 |
432 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
433 |                       |     305        |     ACTION NOT SUPPORTED - ${actionName} action is not supported                                                                     |
434 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
435 |                       |     306        |     VNF NOT FOUND - VNF with ID ${vnfId} was not found                                                                               |
436 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
437 |                       |     307        |     DG WORKFLOW NOT FOUND - No DG workflow found for the combination of ${dgModule} module ${dgName} name and ${dgVersion} version   |
438 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
439 |                       |     308        |     WORKFLOW NOT FOUND - No workflow found for VNF type                                                                              |
440 |                       |                |                                                                                                                                      |
441 |                       |                |     ${vnfTypeVersion} and ${actionName} action                                                                                       |
442 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
443 |                       |     309        |     UNSTABLE VNF - VNF ${vnfId} is not stable to accept the command                                                                  |
444 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
445 |                       |     310        |     LOCKING FAILURE -${detailedErrorMsg}                                                                                             |
446 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
447 |                       |     311        |     EXPIREDREQUEST. The request processing time exceeded the maximum available time                                                  |
448 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
449 |                       |     312        |     DUPLICATEREQUEST. The request already exists                                                                                     |
450 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
451 |                       |     313        |     MISSING VNF DATA IN A&AI - ${attributeName} not found for VNF ID =                                                               |
452 |                       |                |                                                                                                                                      |
453 |                       |                |     ${vnfId}                                                                                                                         |
454 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
455 |                       |     315        |     MULTIPLE REQUESTS USING SEARCH CRITERIA: ${parameters}                                                                           |
456 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
457 |                       |     316        |     POLICY VALIDATION FAILURE - Request rejected as per the request validation policy                                                |
458 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
459 |     SUCCESS           |     400        |     The request was processed successfully                                                                                           |
460 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
461 |     FAILURE           |     401        |     DG FAILURE - ${ detailedErrorMsg }                                                                                               |
462 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
463 |                       |     402        |     NO TRANSITION DEFINED - No Transition Defined for ${ actionName} action and ${currentState} state                                |
464 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
465 |                       |     403        |     UPDATE\_AAI\_FAILURE - failed to update AAI. ${errorMsg}                                                                         |
466 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
467 |                       |     404        |     EXPIRED REQUEST FAILURE - failed during processing because TTL expired                                                           |
468 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
469 |                       |     405        |     UNEXPECTED FAILURE - ${detailedErrorMsg}                                                                                         |
470 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
471 |                       |     406        |     UNSTABLE VNF FAILURE - VNF ${vnfId} is not stable to accept the command                                                          |
472 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
473 |                       |     450        |     REQUEST NOT SUPPORTED                                                                                                            |
474 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
475 |     PARTIAL SUCCESS   |     500        |     PARTIAL SUCCESS                                                                                                                  |
476 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
477 |     PARTIAL FAILURE   |     501 -      |     PARTIAL FAILURE                                                                                                                  |
478 |                       |     599        |                                                                                                                                      |
479 +-----------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------+
480
481
482 Malformed Message Response
483 --------------------------
484
485 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.
486
487 **Response Format for Malformed Requests**::
488
489     {
490       "errors": {
491                   "error": [
492                             {
493                               "error-type": "protocol",
494                               "error-tag": "malformed-message",
495                               "error-message": "<ERROR-MESSAGE>",
496                               "error-info": "<ERROR-INFO>"
497                             }
498                            ]
499                 }
500     }
501
502
503 **Example Response**::
504
505     {
506       "errors": {
507                   "error": [
508                             {
509                               "error-type": "protocol",
510                               "error-tag": "malformed-message",
511                               "error-message": "Error parsing input: Invalid value 'Stopp' for
512                                enum type. Allowed values are: [Sync, Audit, Stop, Terminate]",
513                               "error-info": "java.lang.IllegalArgumentException: Invalid value
514                                 'Stopp' for enum type. Allowed values are: [Sync, Audit, Stop,
515                                 Terminate]..."
516                             }
517                            ]
518                 }
519     }
520
521
522
523 API Scope
524 =========
525
526 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.
527
528
529 Commands, or actions, can be performed at one or more of the following scope levels:
530
531
532 +-----------------+----------------------------------------------------------------------------------------+
533 | **VNF**         | Commands can be applied at the level of a specific VNF instance using the vnf-id.      |
534 +-----------------+----------------------------------------------------------------------------------------+
535 | **VF-Module**   | Commands can be applied at the level of a specific VF-Module using the vf-module-id.   |
536 +-----------------+----------------------------------------------------------------------------------------+
537 | **VNFC**        | Commands can be applied at the level of a specific VNFC instance using a vnfc-name.    |
538 +-----------------+----------------------------------------------------------------------------------------+
539 | **VM**          | Commands can be applied at the level of a specific VM instance using a vserver-id.     |
540 +-----------------+----------------------------------------------------------------------------------------+
541
542
543 **VNF/VM Types Supported**
544
545 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.
546
547   - **Any** Currently supported on any vnf-type.
548
549   - **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.
550
551
552 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
553 |     **Command**             | **VNF**   |  **VF-Module**   |     **VNFC**   | **VM**   |     **VNF/VM Types Supported**                             |
554 +=============================+===========+==================+================+==========+============================================================+
555 |     ActionStatus            | Yes       |                  |                |          |     Any                                                    |
556 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
557 |     AttachVolume            |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
558 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
559 |     Audit                   | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
560 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
561 |     CheckLock               | Yes       |                  |                |          |     Any                                                    |
562 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
563 |     Configure               | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
564 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
565 |     ConfigBackup            | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
566 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
567 |     ConfigModify            | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
568 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
569 |     ConfigRestore           | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
570 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
571 |     ConfigScaleOut          | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
572 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
573 |     DetachVolume            |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
574 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
575 |     DistributeTraffic       | Yes       |                  | Yes            | Yes      | Chef and Ansible only (requires self-service onboarding)   |
576 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
577 |     DistributeTrafficCheck  | Yes       |                  | Yes            | Yes      | Chef and Ansible only (requires self-service onboarding)   |
578 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
579 |     Evacuate                |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
580 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
581 |     HealthCheck             | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
582 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
583 |     Lock                    | Yes       |                  |                |          |     Any                                                    |
584 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
585 |     Migrate                 |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
586 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
587 |     QuiesceTraffic          | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
588 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
589 |     Reboot                  |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
590 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
591 |     Rebuild                 |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
592 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
593 |     Restart                 |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
594 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
595 |     ResumeTraffic           | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
596 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
597 |     Snapshot                |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
598 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
599 |     Start                   |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
600 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
601 |     StartApplication        | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
602 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
603 |     Stop                    |           |                  |                | Yes      |     Any (uses OpenStack command)                           |
604 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
605 |     StopApplication         | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
606 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
607 |     Sync                    | Yes       |                  |                |          |     Any (requires self-service onboarding)                 |
608 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
609 |     Unlock                  | Yes       |                  |                |          |     Any                                                    |
610 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
611 |     UpgradeBackout          | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
612 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
613 |     UpgradeBackup           | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
614 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
615 |     UpgradePostCheck        | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
616 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
617 |     UpgradePreCheck         | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
618 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
619 |     UpgradeSoftware         | Yes       |                  |                |          | Chef and Ansible only (requires self-service onboarding)   |
620 +-----------------------------+-----------+------------------+----------------+----------+------------------------------------------------------------+
621
622
623
624 Self-Service VNF Onboarding
625 ---------------------------
626
627 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:
628
629 -  Netconf with uploadable Yang model (requires a Netconf server running
630    on the VNF)
631
632 -  Chef (requires a Chef client running on the VNF)
633
634 -  Ansible (does not require any changes to the VNF software)
635
636 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:
637
638 -  Define the VNF capabilities (set of actions that the VNF can
639    support).
640
641 -  Create a template and parameter definitions for actions which use the
642    Netconf, Chef, or Ansible protocols. The template is an xml or JSON
643    block which defines the “payload” which is included in the request
644    that is downloaded the VNF (if Netconf) or Chef/Ansible server.
645
646 -  Test actions which have templates/parameter definitions.
647
648 -  Upload the VNF definition, template, and parameter definition
649    artifacts to SDC which distributes them to all APPC instances in the
650    same environment (e.g., production).
651
652 For more details, see the APPC CDT Onboarding User Guide.
653
654
655
656 LCM Commands
657 ============
658
659 The LCM commands that are valid for the current release.
660
661 ActionStatus
662 ------------
663
664 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.
665
666 +--------------------------+----------------------------------------------------------+
667 | **Target URL**           | /restconf /operations/ appc-provider-lcm:action-status   |
668 +--------------------------+----------------------------------------------------------+
669 | **Action**               | ActionStatus                                             |
670 +--------------------------+----------------------------------------------------------+
671 | **Action-Identifiers**   | vnf-id                                                   |
672 +--------------------------+----------------------------------------------------------+
673 | **Payload Parameters**   | See below                                                |
674 +--------------------------+----------------------------------------------------------+
675 | **Revision History**     | New in Beijing                                           |
676 +--------------------------+----------------------------------------------------------+
677
678 |
679
680 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
681 |     **Payload Parameter**   |     **Description**                                        |     **Required**   |     **Example**                     |
682 +=============================+============================================================+====================+=====================================+
683 | request-id                  |     Request id from the previously submitted request       | Yes                |     "request-id": "123456789"       |
684 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
685 | sub-request ID              |     Sub-Request id from the previously submitted request   | optional           |     "sub-request-id": "123456789"   |
686 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
687 | originator-id               |     Originator id from the previously submitted request    | optional           |     "originator-id": "123456789"    |
688 +-----------------------------+------------------------------------------------------------+--------------------+-------------------------------------+
689
690
691 ActionStatus Response:
692 ^^^^^^^^^^^^^^^^^^^^^^
693
694 A successful response contains a payload with the following:
695
696 +-----------------------------+-----------------------------------------------------------------------+--------------------+------------------------------+
697 |     **Payload Parameter**   |     **Description**                                                   |     **Required**   |     **Example**              |
698 +=============================+=======================================================================+====================+==============================+
699 | status-reason               |     Contains more details about status                                | No                 |                              |
700 +-----------------------------+-----------------------------------------------------------------------+--------------------+------------------------------+
701 | status                      |     IN_PROGRESS – The request has been accepted and is in progress    | No                 |     "status": "SUCCESSFUL"   |
702 |                             |                                                                       |                    |                              |
703 |                             |     SUCCESSFUL – The request returned success message                 |                    |                              |
704 |                             |                                                                       |                    |                              |
705 |                             |     FAILED – The request failed and returned an error message         |                    |                              |
706 |                             |                                                                       |                    |                              |
707 |                             |     ABORTED – the request aborted                                     |                    |                              |
708 |                             |                                                                       |                    |                              |
709 |                             |     NOT_FOUND – The request is not found                              |                    |                              |
710 +-----------------------------+-----------------------------------------------------------------------+--------------------+------------------------------+
711
712 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:
713
714     ``"message": "MULTIPLE REQUESTS FOUND - using search criteria:
715     request- id=c09ac7d1-de62-0016-2000-e63701125559 AND
716     vnf-id=ctsf0007v", "code": 315``
717
718 AttachVolume
719 ------------
720
721 The AttachVolume command attaches a cinder volume to a VM via an Openstack command.
722
723 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.
724
725     NOTE: The command implementation is based on Openstack
726     functionality. For further details, see
727     http://developer.openstack.org/api-ref/compute/.
728
729 +--------------------------+----------------------------------------------------------+
730 | **Target URL**           | /restconf/operations/appc-provider-lcm:attach-volume     |
731 +--------------------------+----------------------------------------------------------+
732 | **Action**               | AttachVolume                                             |
733 +--------------------------+----------------------------------------------------------+
734 | **Action-Identifiers**   | vnf-id, vserver-id                                       |
735 +--------------------------+----------------------------------------------------------+
736 | **Payload Parameters**   | See table                                                |
737 +--------------------------+----------------------------------------------------------+
738 | **Revision History**     | New in Beijing                                           |
739 +--------------------------+----------------------------------------------------------+
740
741 |
742
743 +-----------------------------+------------------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------------------+
744 |     **Payload Parameter**   |     **Description**                                  |     **Required**   |     **Example**                                                                                                           |
745 +=============================+======================================================+====================+===========================================================================================================================+
746 | volumeId                    |     The UUID of the volume to attach.                | Yes                |     "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803",                                                                   |
747 +-----------------------------+------------------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------------------+
748 | device                      |     The device identifier                            | Yes                |     "device": "/dev/vdb"                                                                                                  |
749 +-----------------------------+------------------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------------------+
750 | vm-id                       |     TThe self- link URL of the VM.                   | Yes                |     "vm-id": http://135.25.246.162:8774/v2/64af07e991424b8e9e54eca27d5c0d48/servers/b074cd1b-8d53-412e-a102-351cc51ac10a" |
751 +-----------------------------+------------------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------------------+
752 | Identity-url                |     The identity URL used to access the resource     | Yes                |     "identity-url": "http://135.25.246.162:5000/v2.0"                                                                     |
753 +-----------------------------+------------------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------------------+
754
755 AttachVolume Response:
756 ^^^^^^^^^^^^^^^^^^^^^^
757
758 Success: A successful AttachVolume returns a success status code 400.
759
760 Failure: A failed AttachVolume returns a failure code 401 and the failure message. Failure messages can include:
761
762 -  badRequest
763 -  unauthorized
764 -  forbidden
765 -  itemNotFound
766
767
768 Audit
769 -----
770
771 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.
772
773 A successful Audit means that the current VNF configuration matches the latest APPC stored configuration.
774
775 A failed Audit indicates that the configurations do not match.
776
777 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).
778
779 The Audit action does not require any payload parameters.
780
781 **NOTE:** Audit does not return a payload containing details of the comparison, only the Success/Failure status.
782
783
784 +------------------------------+------------------------------------------------------+
785 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:audit     |
786 +------------------------------+------------------------------------------------------+
787 |     **Action**               |     Audit                                            |
788 +------------------------------+------------------------------------------------------+
789 |     **Action-Identifiers**   |     vnf-id                                           |
790 +------------------------------+------------------------------------------------------+
791 |     **Payload Parameters**   |     See below                                        |
792 +------------------------------+------------------------------------------------------+
793 |     **Revision History**     |     Unchanged in this release.                       |
794 +------------------------------+------------------------------------------------------+
795
796 |
797
798 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
799 |     **Parameter**    |     **Description**                                                                                                                                       |     **Required?**   |     **Example**                  |
800 +======================+===========================================================================================================================================================+=====================+==================================+
801 |     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>"   |
802 |                      |                                                                                                                                                           |                     |                                  |
803 |                      |     \* If the publish\-config field is set to N in the payload, then:                                                                                     |                     |                                  |
804 |                      |                                                                                                                                                           |                     |                                  |
805 |                      |     - If the result of the audit is ‘match’ (latest APPC config and the running config match), do not send the running configuration                      |                     |                                  |
806 |                      |                                                                                                                                                           |                     |                                  |
807 |                      |     - If the result of the audit is ‘no match’, then send the running configuration                                                                       |                     |                                  |
808 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
809
810 Audit Response
811 ^^^^^^^^^^^^^^
812
813 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.
814
815
816 CheckLock
817 ---------
818
819 The CheckLock command returns true if the specified VNF is locked; otherwise, false is returned.
820
821 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.
822
823 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.
824
825 The CheckLock command returns a specific response structure that extends the default LCM response.
826
827 The CheckLock action does not require any payload parameters.
828
829 +------------------------------+--------------------------------------------------------+
830 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:checklock   |
831 +------------------------------+--------------------------------------------------------+
832 |     **Action**               |     CheckLock                                          |
833 +------------------------------+--------------------------------------------------------+
834 |     **Action-Identifiers**   |     vnf-id                                             |
835 +------------------------------+--------------------------------------------------------+
836 |     **Payload Parameters**   |     None                                               |
837 +------------------------------+--------------------------------------------------------+
838 |     **Revision History**     |     Unchanged in this release.                         |
839 +------------------------------+--------------------------------------------------------+
840
841 CheckLock Response
842 ^^^^^^^^^^^^^^^^^^
843
844 The CheckLock command returns a customized version of the LCM
845 response.
846
847
848 +---------------------+---------------------------------------------------------------------------------------+--------------------+---------------------------------+
849 |     **Parameter**   |     **Description**                                                                   |     **Required**   | **?Example**                    |
850 +=====================+=======================================================================================+====================+=================================+
851 |     locked          |     "TRUE"\|"FALSE" - returns TRUE if the specified VNF is locked, otherwise FALSE.   |     No             |     "locked": "<TRUE\|FALSE>"   |
852 +---------------------+---------------------------------------------------------------------------------------+--------------------+---------------------------------+
853
854
855 **Example**::
856
857     {
858       "output": {
859                   "status": {
860                               "code": <RESULT_CODE>, "message": "<RESULT_MESSAGE>"
861                             },
862                   "common-header": {
863                                      "api-ver": "<API_VERSION>",
864                                      "request-id": "<ECOMP\_REQUEST_ID>", "originator-id":
865                                      "<ECOMP_SYSTEM_ID>",
866                                      "sub-request-id": "<ECOMP_SUBREQUEST_ID>", "timestamp":
867                                      "2016-08-08T23:09:00.11Z",
868                                      "flags": {
869                                                 "ttl": <TTL_VALUE>, "force": "<TRUE|FALSE>",
870                                                 "mode": "<EXCLUSIVE|NORMAL>"
871                                               }
872                                    },
873                   "locked": "<TRUE|FALSE>"
874     }
875
876
877 Configure
878 ---------
879
880 Configure a VNF or a VNFC on the VNF after instantiation.
881
882 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.
883
884 A successful Configure request returns a success response.
885
886 A failed Configure action returns a failure response and the specific failure messages in the response block.
887
888 +------------------------------+--------------------------------------------------------+
889 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:configure   |
890 +------------------------------+--------------------------------------------------------+
891 |     **Action**               |     Configure                                          |
892 +------------------------------+--------------------------------------------------------+
893 |     **Action-Identifiers**   |     vnf-id                                             |
894 +------------------------------+--------------------------------------------------------+
895 |     **Payload Parameters**   |     See below                                          |
896 +------------------------------+--------------------------------------------------------+
897 |     **Revision History**     |     Unchanged in this release.                         |
898 +------------------------------+--------------------------------------------------------+
899
900 |
901
902 +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
903 |     **Payload Parameter**       |     **Description**                                                                                                                                                                                            |     **Required?**   |     **Example**                                                 |
904 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
905 +=================================+================================================================================================================================================================================================================+=====================+=================================================================+
906 |     request-parameters          |     vnf-host-ip-address: optional if Netconf or other direct interface to the VNF.   If not provided, APPC will look for the host-ip-address in the A&AI VNF oam ipv4 address field.                           |     No              |                                                                 |
907 |                                 |                                                                                                                                                                                                                |                     |     "payload":                                                  |
908 |                                 |     vnfc-type:  must be included if template is vnfc specific                                                                                                                                                  |                     |     "{ \\"request-parameters                                    |
909 |                                 |                                                                                                                                                                                                                |                     |     \\": {                                                      |
910 |                                 |                                                                                                                                                                                                                |                     |     \\"vnf-host-ip-address\\":                                  |
911 |                                 |                                                                                                                                                                                                                |                     |     \\”value\\”,                                                |
912 |                                 |                                                                                                                                                                                                                |                     |     \\”vnfc-type\\”: \\”value\\”’                               |
913 |                                 |                                                                                                                                                                                                                |                     |     }                                                           |
914 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
915 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
916 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
917 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
918 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
919 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
920 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
921 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
922 |                                 |                                                                                                                                                                                                                |                     |                                                                 |
923 +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                 |
924 |     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>\\"}  |
925 +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
926
927
928 Configure Response
929 ^^^^^^^^^^^^^^^^^^
930
931 The Configure response returns an indication of success or failure of the request. 
932
933 **Success:** A successful Configure returns a success status code 400.
934 **Failure:** A failed Configure returns a failure code 401 and the failure message.  
935
936 If successful, the return payload contains the ‘upload_config_id’ and values for any records created in the APPC DB. In addition, the configuration is sent to the ONAP Data Router bus  which may be received by an external configuration storage system.
937
938 If APPC in unable to update A&AI with the VNFC records, a 501 intermediate error message returned prior to the final 400 or 401 success message.
939
940 ConfigModify
941 ------------
942
943 Modifies the configuration on a VNF or VNFC in service.
944
945 This command is executed either directly on the VNF (such as for Netconf) or using an Ansible playbook or Chef cookbook.
946
947 Request Structure:
948
949 +--------------------------+--------------------------------------------------------+
950 | **Target URL**           | /restconf/operations/appc-provider-lcm:config-modify   |
951 +--------------------------+--------------------------------------------------------+
952 | **Action**               | ConfigModify                                           |
953 +--------------------------+--------------------------------------------------------+
954 | **Action-Identifiers**   | vnf-id                                                 |
955 +--------------------------+--------------------------------------------------------+
956 | **Payload Parameters**   | request-parameters, configuration-parameters           |
957 +--------------------------+--------------------------------------------------------+
958 | **Revision History**     | Unchanged in this release.                             |
959 +--------------------------+--------------------------------------------------------+
960
961 Request Payload Parameters:
962
963 +-------------------------+----------------------------------------+-----------------+-------------------------------------------------------+
964 | **Payload Parameter**   | **Description**                        | **Required?**   |     **Example**                                       |
965 +=========================+========================================+=================+=======================================================+
966 | request-parameters      | vnf-host-ip-address: optional if       | No              |     "payload":                                        |
967 |                         | Netconf or other direct interface      |                 |     "{\\"request-parameters \\":                      |
968 |                         | to the VNF. If not provided, it is     |                 |     {\\"vnf-host-ip-address\\": \\”value\\",          |
969 |                         | obtained from A&AI                     |                 |     \\”vnfc-type\\”: \\”value\\”                      |
970 |                         |                                        |                 |     }                                                 |
971 |                         |                                        |                 |                                                       |
972 |                         | vnfc-type: must be included if template|                 |                                                       |
973 |                         | is vnfc specific                       |                 |                                                       |
974 |                         |                                        |                 |     \\"configuration- parameters\\": {\\"name1\\":    |
975 |                         |                                        |                 |     \\”value1\\”,\\"name2\\":                         |
976 |                         |                                        |                 |     \\”value2\\”                                      |
977 |                         |                                        |                 |     }                                                 |
978 |                         |                                        |                 |     }                                                 |
979 +-------------------------+----------------------------------------+-----------------+                                                       |
980 | configuration-          | A set of instance specific             | No              |                                                       |
981 | parameters              | configuration parameters should        |                 |                                                       |
982 |                         | be specified.                          |                 |                                                       |
983 +-------------------------+----------------------------------------+-----------------+-------------------------------------------------------+
984
985 ConfigModify Request
986 ^^^^^^^^^^^^^^^^^^^^
987
988     Examples::
989
990               {
991                      "input": {
992                           "common-header": {
993                               "timestamp": "2017-10-25T11:10:04.244Z",
994                               "api-ver": "2.00",
995                               "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
996                               "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
997                               "sub-request-id": "1",
998                               "flags": {
999                                   "force": "TRUE",
1000                                   "ttl": 60000
1001                               }
1002                           },
1003                           "action": "ConfigModify",
1004                           "action-identifiers": {
1005                               "vnf-id": "<VNF_ID>"
1006                           },
1007                           "payload": "{ \"config-url\":\"5f517fd4-bf3d-43bc-8147-1b61776d7ded\",
1008                                         \"config-json\": \"{\"pg-streams\":{
1009                                         \"pg-stream\": [{ \"id\":\"fw_udp1\", \"is-enabled\": \"true\" }, 
1010                                         {\"id\": \"fw_udp2\", \"is-enabled\":\"true\" }, 
1011                                         { \"id\": \"fw_udp3\",\"is-enabled\": \"true\" },
1012                                         { \"id\":\"fw_udp4\", \"is-enabled\": \"true\" }, 
1013                                         {\"id\": \"fw_udp5\", \"is-enabled\":\"true\" }]}}"
1014                           }
1015                       }
1016              }
1017
1018
1019 ConfigModify Response
1020 ^^^^^^^^^^^^^^^^^^^^^
1021
1022 **Success:** A successful ConfigModify returns a success status code 400.
1023
1024 If successful, 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.
1025
1026 **Failure:** A failed ConfigModify returns a failure code 401 and the failure message.
1027
1028 ConfigBackup
1029 ------------
1030
1031 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).
1032
1033 A successful ConfigBackup request returns a success response.
1034
1035 A failed ConfigBackup action returns a failure response code and the specific failure message in the response block.
1036
1037 +------------------------------+-----------------------------------------------------------+
1038 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:config-backup  |
1039 +------------------------------+-----------------------------------------------------------+
1040 |     **Action**               |     ConfigBackup                                          |
1041 +------------------------------+-----------------------------------------------------------+
1042 |     **Action-Identifiers**   |     Vnf-id                                                |
1043 +------------------------------+-----------------------------------------------------------+
1044 |     **Payload Parameters**   |     See below                                             |
1045 +------------------------------+-----------------------------------------------------------+
1046 |     **Revision History**     |     Unchanged in this release.                            |
1047 +------------------------------+-----------------------------------------------------------+
1048
1049 |
1050
1051 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-------------------------------------------------------------------+
1052 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                   |
1053 +=================================+====================================================================================================================================================================================+=====================+===================================================================+
1054 |     request-parameters          |     Not used. This request is limited to Ansible and Chef only.                                                                                                                    |     No              | "payload": \\"configuration-parameters\\": {\\"<CONFIG-PARAMS>\\"}|
1055 |                                 |                                                                                                                                                                                    |                     |                                                                   |
1056 |                                 |                                                                                                                                                                                    |                     |                                                                   |
1057 |                                 |                                                                                                                                                                                    |                     |                                                                   |
1058 |                                 |                                                                                                                                                                                    |                     |                                                                   |
1059 |                                 |                                                                                                                                                                                    |                     |                                                                   |
1060 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                   |
1061 |     configuration-parameters    |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                   |
1062 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-------------------------------------------------------------------+
1063
1064 ConfigBackup Response
1065 ^^^^^^^^^^^^^^^^^^^^^
1066
1067 The ConfigBackup response returns an indication of success or failure of the request.
1068
1069 **Success:** A successful ConfigBackup returns a success status code 400.
1070 **Failure:** A failed ConfigBackup returns a failure code 401 and the failure message.  
1071
1072
1073 ConfigRestore
1074 -------------
1075
1076 Applies a previously saved configuration to the active VNF configuration. This is limited to Ansible and Chef. There can only be one stored configuration.
1077
1078 A successful ConfigRestore request returns a success response.
1079
1080 A failed ConfigRestore action returns a failure response code and the specific failure message in the response block.
1081
1082 +------------------------------+------------------------------------------------------------------------------------------+
1083 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:config-restore                                |
1084 +------------------------------+------------------------------------------------------------------------------------------+
1085 |     **Action**               |     ConfigRestore                                                                        |
1086 +------------------------------+------------------------------------------------------------------------------------------+
1087 |     **Action-Identifiers**   |     Vnf-id                                                                               |
1088 +------------------------------+------------------------------------------------------------------------------------------+
1089 |     **Payload Parameters**   |     See below                                                                            |
1090 +------------------------------+------------------------------------------------------------------------------------------+
1091 |     **Revision History**     |     Unchanged in this release.                                                           |
1092 +------------------------------+------------------------------------------------------------------------------------------+
1093
1094 |
1095
1096 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1097 |     **Parameter**               |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1098 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1099 |     request-parameters          |     Not used. This request is limited to Ansible and Chef only.                                                                                                                    |     No              |     "payload":                                                  |
1100 |                                 |                                                                                                                                                                                    |                     |     \\"configuration-parameters\\": {\\"<CONFIG- PARAMS>\\"}    |
1101 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                                                 |
1102 |     configuration-parameters    |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |                                                                 |
1103 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1104
1105 ConfigRestore Response
1106 ^^^^^^^^^^^^^^^^^^^^^^
1107
1108 **Success:** A successful ConfigRestore returns a success status code 400.
1109
1110 If successful, 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 ONAP Data Router bus which may be received by an external configuration storage system.
1111
1112 **Failure:** A failed ConfigRestore returns a failure code 401 and the failure message.
1113
1114
1115
1116 ConfigScaleOut
1117 --------------
1118
1119 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.
1120
1121 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.
1122 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.
1123
1124 This action is supported via the Netconf (limited to configuration changes), Chef, and Ansible protocols.
1125
1126 |
1127
1128 +------------------------------+------------------------------------------------------------------------------------------+
1129 |     **Target URL**           |     /restconf /operations/appc-provider-lcm:config-scale-out                             |
1130 +------------------------------+------------------------------------------------------------------------------------------+
1131 |     **Action**               |     ConfigScaleOut                                                                       |
1132 +------------------------------+------------------------------------------------------------------------------------------+
1133 |     **Action-Identifiers**   |     Vnf-id                                                                               |
1134 +------------------------------+------------------------------------------------------------------------------------------+
1135 |     **Payload Parameters**   |     See below                                                                            |
1136 +------------------------------+------------------------------------------------------------------------------------------+
1137 |     **Revision History**     |     New in Beijing                                                                       |
1138 +------------------------------+------------------------------------------------------------------------------------------+
1139
1140 |
1141
1142 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------------+
1143 |     **Payload Parameter**       |     **Description**                                                                                                                                              |     **Required?**   |     **Example**                             |
1144 +=================================+==================================================================================================================================================================+=====================+=============================================+
1145 |     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":                             |
1146 |                                 +------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+      "{\\"request-parameters \\":           |
1147 |                                 |     vf-module-id:  used to determine the A&AI VM inventory associated with ConfigScaleOut.                                                                       |     Yes             |      {                                      |
1148 |                                 +------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+      \\"vnf-host-ip-address\\":             |
1149 |                                 |     controller-template-id: optional. This is a unique identifier that will identify the template associated with the ConfigScaleOut.                            |                     |      \\”value\\”,                           |
1150 |                                 |     Will be needed if A&AI does not contain the template identifier.                                                                                             |     No              |      \\”vf-module-id\\”: \\”value\\”,       |
1151 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+      \\”controller-template-id\\”:          |                                                         
1152 |     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\\”                            |
1153 |                                 |     values supplied.                                                                                                                                             |                     |      }                                      |
1154 |                                 |                                                                                                                                                                  |                     |                                             |
1155 |                                 |                                                                                                                                                                  |                     |      \\"configuration-parameters\\":        |
1156 |                                 |                                                                                                                                                                  |                     |        {\\"<CONFIG- PARAMS>\\"}             |
1157 |                                 |                                                                                                                                                                  |                     |                                             |
1158 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------------+
1159
1160 ConfigScaleOut Response
1161 ^^^^^^^^^^^^^^^^^^^^^^^
1162
1163 **Success:**  
1164
1165  - A successful ConfigScaleOut returns a success status code 400 when completed.
1166  
1167 **Failure:** 
1168
1169  - A failed ConfigScaleOut returns a failure code 401 and the failure message. 
1170  - 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.
1171
1172
1173 DetachVolume
1174 ------------
1175
1176 The DetachVolume command detaches a cinder volume from a VM via an Openstack command.
1177
1178 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.
1179
1180 NOTE: The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1181
1182 +--------------------------+----------------------------------------------------------+
1183 | **Target URL**           | /restconf/operations/appc-provider-lcm:detach-volume     |
1184 +--------------------------+----------------------------------------------------------+
1185 | **Action**               | DetachVolume                                             |
1186 +--------------------------+----------------------------------------------------------+
1187 | **Action-Identifiers**   | vnf-id, vserver-id                                       |
1188 +--------------------------+----------------------------------------------------------+
1189 | **Payload Parameters**   | See table                                                |
1190 +--------------------------+----------------------------------------------------------+
1191 | **Revision History**     | New in Beijing                                           |
1192 +--------------------------+----------------------------------------------------------+
1193
1194 Request Payload Parameters:
1195
1196 +-----------------------------+----------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1197 |     **Payload Parameter**   |     **Description**                                            |     **Required**   |     **Example**                                                                                                                |
1198 +=============================+================================================================+====================+================================================================================================================================+
1199 | volumeId                    |     The UUID of the volume to detach.                          | Yes                |     "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"                                                                         |
1200 +-----------------------------+----------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1201 | vm-id                       |     The self- link URL of the VM.                              | Yes                |     "vm-id": http://135.25.246.162:8774/v2/64af07e991424b8e9e54eca27d5c0d48/servers/b074cd1b-8d53-412e-a102-351cc51ac10a"      |
1202 +-----------------------------+----------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1203 | Identity-url                |     The identity URL used to access the resource               | Yes                |     "identity-url": "http://135.25.246.162:5000/v2.0"                                                                          |
1204 +-----------------------------+----------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------+
1205
1206 DetachVolume Response:
1207 ^^^^^^^^^^^^^^^^^^^^^^
1208
1209 **Success:** A successful DetachVolume returns a success status code 400.
1210
1211 **Failure:** A failed DetachVolume returns a failure code 401 and the failure message. Failure messages can include:
1212
1213         -  badRequest
1214         -  unauthorized
1215         -  forbidden
1216         -  itemNotFound
1217         -  conflict
1218
1219 DistributeTraffic
1220 -----------------
1221
1222 The Distribute Traffic LCM action is used to distribute traffic across different instances of VNF, VNFC or VM.
1223 The entity for which Distribute Traffic LCM action is being invoked is called an anchor point that is responsible for final
1224 realization of request. Parameters present in configuration file specify where and how traffic should be distributed,
1225 including: traffic destination points like VNFs, VNFCs or VMs; distribution weights; rollback strategy.
1226 Format of configuration file is specific to each VNF type. The Optimization Framework component and Homing, Allocation and
1227 Placement mechanism can be used to retrieve instances of vf-modules of anchor points and destination points with
1228 corresponding policies.
1229
1230 This command is executed using an Ansible playbook or Chef cookbook.
1231
1232 Request Structure:
1233
1234 +--------------------------+--------------------------------------------------------------+
1235 | **Target URL**           | /restconf/operations/appc-provider-lcm:distribute-traffic    |
1236 +--------------------------+--------------------------------------------------------------+
1237 | **Action**               | DistributeTraffic                                            |
1238 +--------------------------+--------------------------------------------------------------+
1239 | **Action-identifiers**   | vnf-id, vserver-id, vnfc-name                                |
1240 +--------------------------+--------------------------------------------------------------+
1241 | **Payload Parameters**   | See below                                                    |
1242 +--------------------------+--------------------------------------------------------------+
1243 | **Revision History**     | New in Casablanca                                            |
1244 +--------------------------+--------------------------------------------------------------+
1245
1246 Request Payload Parameters:
1247
1248 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------+
1249 | **Parameter**                   |     **Description**                                                                                                                                              |     **Required?**   |     **Example**                                                              |
1250 +=================================+==================================================================================================================================================================+=====================+==============================================================================+
1251 |     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              | "payload": "{\"configuration-parameters\": {\"file_parameter_content\":      |
1252 |                                 |     values supplied. The parameters are associated with request template defined with CDT                                                                        |                     | \"{\\\"destinations\\\": [{\\\"locationType\\\": \\\"att_aic\\\",            |
1253 |                                 |                                                                                                                                                                  |                     | \\\"isRehome\\\": \\\"false\\\", \\\"aic_version\\\": \\\"1\\\",             |
1254 |                                 |                                                                                                                                                                  |                     | \\\"ipv4-oam-address\\\": \\\"\\\", \\\"nf-name\\\":                         |
1255 |                                 |                                                                                                                                                                  |                     | \\\"Ete_vFWDTvFWSNK_ccc04407_1\\\", \\\"cloudOwner\\\":                      |
1256 |                                 |                                                                                                                                                                  |                     | \\\"CloudOwner\\\", \\\"service_instance_id\\\":                             |
1257 |                                 |                                                                                                                                                                  |                     | \\\"319e60ef-08b1-47aa-ae92-51b97f05e1bc\\\",                                |
1258 |                                 |                                                                                                                                                                  |                     | \\\"vf-module-id\\\": \\\"0dce0e61-9309-449a-8e3e-f001635aaab1\\\",          |
1259 |                                 |                                                                                                                                                                  |                     | \\\"cloudClli\\\": \\\"clli1\\\", \\\"ipv6-oam-address\\\": \\\"\\\",        |
1260 |                                 |                                                                                                                                                                  |                     | \\\"vf-module-name\\\": \\\"Vfmodule_Ete_vFWDTvFWSNK_ccc04407_1\\\",         |
1261 |                                 |                                                                                                                                                                  |                     | \\\"vnfHostName\\\": \\\"Ete_vFWDTvFWSNK_ccc04407_1\\\", \\\"nf-id\\\":      |
1262 |                                 |                                                                                                                                                                  |                     | (...)                                                                        |
1263 |                                 |                                                                                                                                                                  |                     | \\\"Vfmodule_Ete_vFWDTvFWSNK_ccc04407_1-vfw_private_1_port-6yfzndtyjzfz\\\", |
1264 |                                 |                                                                                                                                                                  |                     | \\\"ipv4-addresses\\\": [\\\"192.168.20.100\\\"], \\\"interface-id\\\":      |
1265 |                                 |                                                                                                                                                                  |                     | \\\"0a1d0300-de02-46e8-99f6-e786f1ba407a\\\", \\\"network-name\\\":          |
1266 |                                 |                                                                                                                                                                  |                     | \\\"\\\", \\\"ipv6-addresses\\\": []}]}], \\\"nf-type\\\": \\\"vnf\\\"}]}\", |
1267 |                                 |                                                                                                                                                                  |                     | \"fixed_ip_address\": \"10.0.210.103\", \"book_name\":                       |
1268 |                                 |                                                                                                                                                                  |                     | \"vpgn/latest/ansible/distributetraffic/site.yml\",                          |
1269 |                                 |                                                                                                                                                                  |                     | \"ne_id\": \"vofwl01pgn4407\"}}",                                            |
1270 |                                 |                                                                                                                                                                  |                     |                                                                              |
1271 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------+
1272
1273 Exemplary CDT template for Ansible protocol::
1274
1275     {
1276         "InventoryNames": "VM",
1277         "PlaybookName": "${()=(book_name)}",
1278         "NodeList": [{
1279             "vm-info": [{
1280                 "ne_id": "${()=(ne_id)}",
1281                 "fixed_ip_address": "${()=(fixed_ip_address)}"
1282             }],
1283             "site": "site",
1284             "vnfc-type": "some-vnfc"
1285         }],
1286         "EnvParameters": {
1287             "ConfigFileName": "../traffic_distribution_config.json",
1288             "vnf_instance": "instance",
1289         },
1290         "FileParameters": {
1291             "traffic_distribution_config.json": "${()=(file_parameter_content)}"
1292         },
1293         "Timeout": 3600
1294     }
1295
1296 EnvParameters includes protocol specific parameters, here with name of configuration file having additional parameters for Ansible playbook or Chef cookbook.
1297 Distribute Traffic config file can have such parameters like traffic destinations, distribution weights or rollback strategy.
1298
1299 DistributeTraffic Response
1300 ^^^^^^^^^^^^^^^^^^^^^^^^^^
1301
1302 The response does not include any payload parameters.
1303
1304 **Success:** A successful distribute returns a success status code 400 after all traffic has been distributed.
1305
1306 **Failure:** A failed distribute returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1307
1308
1309 DistributeTrafficCheck
1310 ----------------------
1311
1312 The Distribute Traffic Check LCM action complements Distribute Traffic LCM action with capabilities to test if destination point
1313 is ready to handle traffic or if anchor point accepts the configuration of destinations for traffic distribution. Finally,
1314 this action can be used to check if destination points handle traffic accordingly with the configuration.
1315
1316 This command is executed using an Ansible playbook or Chef cookbook.
1317
1318 Request Structure:
1319
1320 +--------------------------+--------------------------------------------------------------------+
1321 | **Target URL**           | /restconf/operations/appc-provider-lcm:distribute-traffic-check    |
1322 +--------------------------+--------------------------------------------------------------------+
1323 | **Action**               | DistributeTrafficCheck                                             |
1324 +--------------------------+--------------------------------------------------------------------+
1325 | **Action-identifiers**   | vnf-id, vserver-id, vnfc-name                                      |
1326 +--------------------------+--------------------------------------------------------------------+
1327 | **Payload Parameters**   | See below                                                          |
1328 +--------------------------+--------------------------------------------------------------------+
1329 | **Revision History**     | New in Dublin                                                      |
1330 +--------------------------+--------------------------------------------------------------------+
1331
1332 Request Payload Parameters:
1333
1334 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------------------------------+
1335 | **Parameter**                   |     **Description**                                                                                                                                              |     **Required?**   |     **Example**                                               |
1336 +=================================+==================================================================================================================================================================+=====================+===============================================================+
1337 |     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              |  "payload": "{\"configuration-parameters\":                   |
1338 |                                 |     values supplied. The parameters are associated with request template defined with CDT                                                                        |                     |  {\"file_parameter_content\": \"{\\\"destinations\\\":        |
1339 |                                 |                                                                                                                                                                  |                     |  [                                                            |
1340 |                                 |                                                                                                                                                                  |                     |  {\\\"locationType\\\": \\\"att_aic\\\",                      |
1341 |                                 |                                                                                                                                                                  |                     |  \\\"isRehome\\\": \\\"false\\\",                             |
1342 |                                 |                                                                                                                                                                  |                     |  \\\"aic_version\\\": \\\"1\\\",                              |
1343 |                                 |                                                                                                                                                                  |                     |  \\\"ipv4-oam-address\\\": \\\"\\\",                          |
1344 |                                 |                                                                                                                                                                  |                     |  \\\"nf-name\\\": \\\"Ete_vFWDTvFWSNK_ccc04407_1\\\",         |
1345 |                                 |                                                                                                                                                                  |                     |  \\\"cloudOwner\\\": \\\"CloudOwner\\\",                      |
1346 |                                 |                                                                                                                                                                  |                     |  \\\"service_instance_id\\\":                                 |
1347 |                                 |                                                                                                                                                                  |                     |  \\\"319e60ef-08b1-47aa-ae92-51b97f05e1bc\\\",                |
1348 |                                 |                                                                                                                                                                  |                     |  \\\"vf-module-id\\\":                                        |
1349 |                                 |                                                                                                                                                                  |                     |  \\\"0dce0e61-9309-449a-8e3e-f001635aaab1\\\",                |
1350 |                                 |                                                                                                                                                                  |                     |  \\\"cloudClli\\\": \\\"clli1\\\",                            |
1351 |                                 |                                                                                                                                                                  |                     |  \\\"ipv6-oam-address\\\": \\\"\\\",                          |
1352 |                                 |                                                                                                                                                                  |                     |  \\\"vf-module-name\\\":                                      |
1353 |                                 |                                                                                                                                                                  |                     |  \\\"Vfmodule_Ete_vFWDTvFWSNK_ccc04407_1\\\",                 |
1354 |                                 |                                                                                                                                                                  |                     |  \\\"vnfHostName\\\":                                         |
1355 |                                 |                                                                                                                                                                  |                     |  \\\"Ete_vFWDTvFWSNK_ccc04407_1\\\",                          |
1356 |                                 |                                                                                                                                                                  |                     |  \\\"nf-id\\\": \\\"909d396b-4d99-4c6a-a59b-abe948873303\\\", |
1357 |                                 |                                                                                                                                                                  |                     |  (...)                                                        |
1358 |                                 |                                                                                                                                                                  |                     |  \\\"trafficPresence\\\": true}\",                            |
1359 |                                 |                                                                                                                                                                  |                     |  \"fixed_ip_address\": \"10.0.110.1\", \"book_name\":         |
1360 |                                 |                                                                                                                                                                  |                     |  \"vfw-sink/latest/ansible/distributetrafficcheck/site.yml\", |
1361 |                                 |                                                                                                                                                                  |                     |  \"ne_id\": \"vofwl02vfw4407\"}}"                             |
1362 |                                 |                                                                                                                                                                  |                     |                                                               |
1363 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------------------------------+
1364
1365 Exemplary CDT template for Ansible protocol::
1366
1367     {
1368         "InventoryNames": "VM",
1369         "PlaybookName": "${()=(book_name)}",
1370         "NodeList": [{
1371             "vm-info": [{
1372                 "ne_id": "${()=(ne_id)}",
1373                 "fixed_ip_address": "${()=(fixed_ip_address)}"
1374             }],
1375             "site": "site",
1376             "vnfc-type": "some-vnfc"
1377         }],
1378         "EnvParameters": {
1379             "ConfigFileName": "../traffic_distribution_config.json",
1380             "vnf_instance": "instance",
1381         },
1382         "FileParameters": {
1383             "traffic_distribution_config.json": "${()=(file_parameter_content)}"
1384         },
1385         "Timeout": 3600
1386     }
1387
1388 EnvParameters includes protocol specific parameters, here with name of configuration file having additional parameters for Ansible playbook or Chef cookbook.
1389 Distribute Traffic config file can have similar parameters like the one Distribute Traffic action and can have some extra information like the type of check to
1390 be performed. In the payload example there is a trafficPresence parameter that emphasises if the traffic is expected on vFW instance.
1391
1392 DistributeTrafficCheck Response
1393 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1394
1395 The response does not include any payload parameters.
1396
1397 **Success:** A successful distribute traffic check returns a success status code 400 when conditions are satisfied.
1398
1399 **Failure:** A failed check returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1400
1401
1402
1403 Evacuate
1404 --------
1405
1406 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).
1407
1408 The host on which the VM resides needs to be down.
1409
1410 If the target host 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.
1411
1412 After Evacuate, the rebuild VM can be disabled by setting the optional `rebuild-vm` parameter to false.
1413
1414 A successful Evacuate action returns a success response. A failed Evacuate action returns a failure.
1415
1416 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1417
1418 +------------------------------+-------------------------------------------------------------------------+
1419 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:evacuate                     |
1420 +------------------------------+-------------------------------------------------------------------------+
1421 |     **Action**               |     Evacuate                                                            |
1422 +------------------------------+-------------------------------------------------------------------------+
1423 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                  |
1424 +------------------------------+-------------------------------------------------------------------------+
1425 |     **Payload Parameters**   |     vm-id, identity-url, tenant-id, rebuild-vm, targethost-id           |
1426 +------------------------------+-------------------------------------------------------------------------+
1427 |     **Revision History**     |     Unchanged in this release.                                          |
1428 +------------------------------+-------------------------------------------------------------------------+
1429
1430 |
1431
1432 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1433 |     **Parameter**    |     **Description**                                                                                                                                                              |     **Required?**   |     **Example**                       |
1434 +======================+==================================================================================================================================================================================+=====================+=======================================+
1435 |     vm-id            |     The unique identifier (UUID) of the resource. For backwards- compatibility, this can be the self-link URL of the VM.                                                         |     Yes             |     "payload":                        |
1436 |                      |                                                                                                                                                                                  |                     |     "{\\"vm-id\\": \\"<VM-ID>         |
1437 |                      |                                                                                                                                                                                  |                     |     \\",                              |
1438 |                      |                                                                                                                                                                                  |                     |     \\"identity-url\\":               |
1439 |                      |                                                                                                                                                                                  |                     |     \\"<IDENTITY-URL>\\",             |
1440 |                      |                                                                                                                                                                                  |                     |     \\"tenant-id\\": \\"<TENANT-ID>   |
1441 |                      |                                                                                                                                                                                  |                     |     \\",                              |
1442 |                      |                                                                                                                                                                                  |                     |     \\"rebuild-vm\\": \\"false\\",    |
1443 |                      |                                                                                                                                                                                  |                     |     \\"targethost-id\\":              |
1444 |                      |                                                                                                                                                                                  |                     |     \\"nodeblade7\\"}"                |
1445 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1446 |     identity-url     |     The identity URL used to access the resource                                                                                                                                 |     Yes             |                                       |
1447 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1448 |     tenant-id        |     The id of the provider tenant that owns the resource                                                                                                                         |     Yes             |                                       |
1449 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1450 |     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              |                                       |
1451 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+                                       |
1452 |     targethost- id   |     A target hostname indicating the host the VM is evacuated to. By default, the cloud determines the target host.                                                              |     No              |                                       |
1453 +----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------------------------+
1454
1455 Evacuate Response:
1456 ^^^^^^^^^^^^^^^^^^
1457 **Success:** A successful Evacuate returns a success status code 400.
1458 **Failure:** A failed Evacuate returns a failure code 401 and the failure message.
1459
1460
1461
1462 HealthCheck
1463 -----------
1464
1465 This command runs a VNF health check and returns the result.
1466
1467 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.
1468
1469
1470 +------------------------------+-----------------------------------------------------------+
1471 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:health-check   |
1472 +------------------------------+-----------------------------------------------------------+
1473 |     **Action**               |     HealthCheck                                           |
1474 +------------------------------+-----------------------------------------------------------+
1475 |     **Action-Identifiers**   |     Vnf-id                                                |
1476 +------------------------------+-----------------------------------------------------------+
1477 |     **Payload Parameters**   |     See below                                             |
1478 +------------------------------+-----------------------------------------------------------+
1479 |     **Revision History**     |     Unchanged in this release                             |
1480 +------------------------------+-----------------------------------------------------------+
1481
1482
1483 Request Payload Parameters:
1484
1485 +---------------------+-----------------------------------+---------------------+-------------------------------------+
1486 |     **Parameter**   |     **Description**               |     **Required?**   |     **Example**                     |
1487 +=====================+===================================+=====================+=====================================+
1488 | request-parameters  |     host-ip-address -             |     No              |  "payload":                         |
1489 |                     |     Required only if REST         |                     |  "{\\"request-parameters \\":       |
1490 |                     |     service. This is the ip       |                     |  "{\\"host-ip-address\\":           |
1491 |                     |     address associated with the   |                     |  \\"10.222.22.2\\" }"               |
1492 |                     |     VM running the REST           |                     |                                     |
1493 |                     |     service.                      |                     |                                     |
1494 +---------------------+-----------------------------------+---------------------+-------------------------------------+
1495
1496
1497 HealthCheck Response
1498 ^^^^^^^^^^^^^^^^^^^^
1499
1500 **Success:** The HealthCheck returns a 400 success message if the test completes. A JSON payload is returned indicating state (healthy, unhealthy), scope identifier, time-stamp and one or more blocks containing info and fault information.
1501
1502     Examples::
1503
1504                 {
1505                   "identifier": "scope represented", 
1506                   "state": "healthy",
1507                   "time": "01-01-1000:0000"
1508
1509                 }
1510
1511                 {
1512                    "identifier": "scope represented", 
1513                    "state": "unhealthy",
1514                         {[
1515                    "info": "System threshold exceeded details", 
1516                    "fault":
1517                          {
1518                            "cpuOverall": 0.80,
1519                            "cpuThreshold": 0.45
1520                          }
1521                         ]},
1522                    "time": "01-01-1000:0000"
1523                 }
1524
1525 **Failure:** If the VNF is unable to run the HealthCheck. APP-C returns the error code 401 and the http error message.
1526
1527
1528 Lock
1529 ----
1530
1531 Use the Lock command to ensure exclusive access during a series of critical LCM commands.
1532
1533 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.
1534
1535 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.
1536
1537 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.
1538
1539 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.
1540
1541 The lock automatically clears after 900 seconds (15 minutes). This 900 second value can be adjusted in the properties file
1542
1543 +------------------------------+---------------------------------------------------+
1544 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:lock   |
1545 +------------------------------+---------------------------------------------------+
1546 |     **Action**               |     Lock                                          |
1547 +------------------------------+---------------------------------------------------+
1548 |     **Action-Identifier**    |     Vnf-id                                        |
1549 +------------------------------+---------------------------------------------------+
1550 |     **Payload Parameters**   |     None                                          |
1551 +------------------------------+---------------------------------------------------+
1552 |     **Revision History**     |     Unchanged in this release.                    |
1553 +------------------------------+---------------------------------------------------+
1554
1555 Lock Response
1556 ^^^^^^^^^^^^^
1557
1558 The Lock returns a 400 Success response if the Lock is successfully applied.
1559
1560 The Lock returns a 401 Failure response with the failure message if the Lock is not successful.
1561
1562
1563 Migrate
1564 -------
1565
1566 Migrates a running target VM from its current host to another.
1567
1568 A destination node will be selected by relying on internal rules to migrate. Migrate calls a command in order to perform the operation.
1569
1570 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.
1571
1572 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.
1573
1574
1575 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1576
1577
1578 +--------------------------------+-----------------------------------------------------------------------------------------------+
1579 | **Input Block**                | api-ver should be set to 2.00 for current version of Migrate                                  |
1580 +--------------------------------+-----------------------------------------------------------------------------------------------+
1581 |     **Target URL**             |     /restconf/operations/appc-provider-lcm:migrate                                            |
1582 +--------------------------------+-----------------------------------------------------------------------------------------------+
1583 |     **Action**                 |     Migrate                                                                                   |
1584 +--------------------------------+-----------------------------------------------------------------------------------------------+
1585 |     **Action-Identifiers**     |     Vnf-id, vserver-id                                                                        |
1586 +--------------------------------+-----------------------------------------------------------------------------------------------+
1587 |     **Payload Parameters**     |     vm-id, identity-url, tenant-id                                                            |
1588 +--------------------------------+-----------------------------------------------------------------------------------------------+
1589 |     **Revision History**       |     Unchanged in this release.                                                                |
1590 +--------------------------------+-----------------------------------------------------------------------------------------------+
1591
1592 Payload Parameters
1593
1594 +---------------------+-------------------------------------------------------------------------+---------------------+-----------------------------------------------+
1595 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                               |
1596 +=====================+=========================================================================+=====================+===============================================+
1597 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                               |
1598 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |                                               |
1599 |                     |     link URL of the VM.                                                 |                     |     "payload":                                |
1600 |                     |                                                                         |                     |     "{\\"vm-id\\": \\"<VM-ID>\\",             |
1601 |                     |                                                                         |                     |     \\"identity-url\\":                       |
1602 |                     |                                                                         |                     |     \\"<IDENTITY-URL>\\",                     |
1603 +---------------------+-------------------------------------------------------------------------+---------------------+     \\"tenant-id\\": \\"<TENANT-ID>\\"}"      |
1604 |     identity- url   |     The identity url used to access the resource                        |     Yes             |                                               |
1605 |                     |                                                                         |                     |                                               |
1606 +---------------------+-------------------------------------------------------------------------+---------------------+                                               |
1607 |     tenant-id       |     The id of the provider tenant that owns the resource                |     Yes             |                                               |
1608 +---------------------+-------------------------------------------------------------------------+---------------------+-----------------------------------------------+
1609
1610
1611 Migrate Response
1612 ^^^^^^^^^^^^^^^^
1613
1614 **Success:** A successful Migrate returns a success status code 400.
1615
1616 **Failure:** A failed Migrate returns a failure code 401 and the failure message.
1617
1618
1619 QuiesceTraffic
1620 --------------
1621
1622 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.
1623
1624 This command is executed using an Ansible playbook or Chef cookbook.
1625     
1626 Request Structure:
1627
1628 +--------------------------+----------------------------------------------------------+
1629 | **Target URL**           | /restconf/operations/appc-provider-lcm:quiesce-traffic   |
1630 +--------------------------+----------------------------------------------------------+
1631 | **Action**               | QuiesceTraffic                                           |
1632 +--------------------------+----------------------------------------------------------+
1633 | **Action-identifiers**   | vnf-id                                                   |
1634 +--------------------------+----------------------------------------------------------+
1635 | **Payload Parameters**   | operations-timeout                                       |
1636 +--------------------------+----------------------------------------------------------+
1637 | **Revision History**     | New in Beijing                                           |
1638 +--------------------------+----------------------------------------------------------+
1639
1640 Request Payload Parameters:
1641
1642 +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+------------------------------------------------+
1643 | **Parameter**         |     **Description**                                                                                                                                                                                  |     **Required?**   |     **Example**                                |
1644 +=======================+======================================================================================================================================================================================================+=====================+================================================+
1645 | 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":                                 |
1646 |                       |                                                                                                                                                                                                      |                     |     "{\\"operations-timeout\\": \\"3600\\"}”   |
1647 +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+------------------------------------------------+
1648
1649 QuiesceTraffic Response
1650 ^^^^^^^^^^^^^^^^^^^^^^^
1651
1652 The response does not include any payload parameters.
1653
1654 **Success:** A successful quiesce returns a success status code 400 after all traffic has been quiesced.
1655
1656    If a quiesce command is executed and the traffic has been previously quiesced, it should return a success status.
1657
1658 **Failure:** A failed quiesce returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1659
1660     A specific error message is returned if there is a timeout error.
1661
1662 Reboot
1663 -------
1664
1665 The Reboot is used to reboot a VM.
1666
1667  
1668 There are two types supported: HARD and SOFT. A SOFT reboot attempts a graceful shutdown and restart of the server. A HARD reboot attempts a forced shutdown and restart of the server. The HARD reboot corresponds to the power cycles of the server.
1669
1670 **NOTE:** The command implementation is based on OpenStack functionality.  For further details, see http://developer.openstack.org/api-ref/compute/.
1671
1672 +------------------------------+-----------------------------------------------------------------------------------------------+
1673 | **Input Block**              | api-ver should be set to 2.00 for current version of Reboot                                   |
1674 +------------------------------+-----------------------------------------------------------------------------------------------+
1675 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:reboot                                             |
1676 +------------------------------+-----------------------------------------------------------------------------------------------+
1677 |     **Action**               |     Reboot                                                                                    |
1678 +------------------------------+-----------------------------------------------------------------------------------------------+
1679 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                                        |
1680 +------------------------------+-----------------------------------------------------------------------------------------------+
1681 |     **Payload Parameters**   |     See table below                                                                           |
1682 +------------------------------+-----------------------------------------------------------------------------------------------+
1683 |     **Revision History**     |     New in R3 release.                                                                        |
1684 +------------------------------+-----------------------------------------------------------------------------------------------+
1685
1686 Payload Parameters
1687
1688 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1689 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1690 +=================+===============================================+=================+=========================================+
1691 | type            |     The type of reboot.  Values are           | No              |                                         |
1692 |                 |     HARD and SOFT.  If not                    |                 |                                         |
1693 |                 |     specified, SOFT reboot is                 |                 | "payload":                              |
1694 |                 |     performed.                                |                 | "{\\"type\\": \\"HARD\\",               |
1695 |                 |                                               |                 |   \\"vm-id\\": \\"<VM-ID>\\",           |
1696 |                 |                                               |                 | \\"identity-url\\":                     |
1697 |                 |                                               |                 | \\"<IDENTITY-URL>\\"                    |
1698 |                 |                                               |                 | }"                                      | 
1699 +-----------------+-----------------------------------------------+-----------------+                                         |
1700 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1701 |                 |     the resource. For backwards-              |                 |                                         |
1702 |                 |     compatibility, this can be the self-      |                 |                                         |
1703 |                 |     link URL of the VM.                       |                 |                                         |
1704 |                 |                                               |                 |                                         |
1705 |                 |                                               |                 |                                         |
1706 |                 |                                               |                 |                                         |
1707 |                 |                                               |                 |                                         |
1708 +-----------------+-----------------------------------------------+-----------------+                                         |
1709 | identity-url    |     The identity url used to access the       | Yes             |                                         |
1710 |                 |     resource.                                 |                 |                                         |
1711 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1712
1713 Reboot Response
1714 ^^^^^^^^^^^^^^^
1715
1716 **Success:** A successful Rebuild returns a success status code 400.  
1717
1718 **Failure:** A failed Rebuild returns a failure code 401 and the failure message.
1719
1720 Rebuild
1721 -------
1722
1723 Recreates a target VM instance to a known, stable state.
1724
1725 Rebuild calls an OpenStack command immediately and therefore does not expect any prerequisite operations to be performed, such as shutting off a VM.
1726
1727 Rebuild VM uses the snapshot provided by the snapshot-id (if provided).  If not provided, the latest snapshot is used.  If there are no snapshots, it uses the (original) Glance image.
1728
1729 APPC rejects a rebuild request if it determines the VM boots from a Cinder Volume
1730
1731
1732 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1733
1734
1735 +------------------------------+-----------------------------------------------------------------------------------------------+
1736 | **Input Block**              | api-ver should be set to 2.00 for current version of Rebuild                                  |
1737 +------------------------------+-----------------------------------------------------------------------------------------------+
1738 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:rebuild                                            |
1739 +------------------------------+-----------------------------------------------------------------------------------------------+
1740 |     **Action**               |     Rebuild                                                                                   |
1741 +------------------------------+-----------------------------------------------------------------------------------------------+
1742 |     **Action-identifiers**   |     Vnf-id, vserver-id                                                                        |
1743 +------------------------------+-----------------------------------------------------------------------------------------------+
1744 |     **Payload Parameters**   |     See table below                                                                           |
1745 +------------------------------+-----------------------------------------------------------------------------------------------+
1746 |     **Revision History**     |     Unchanged in this release.                                                                |
1747 +------------------------------+-----------------------------------------------------------------------------------------------+
1748
1749
1750 Payload Parameters
1751
1752 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1753 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1754 +=================+===============================================+=================+=========================================+
1755 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1756 |                 |     the resource. For backwards-              |                 |                                         |
1757 |                 |     compatibility, this can be the self-      |                 | "payload":                              |
1758 |                 |     link URL of the VM.                       |                 | "{\\"vm-id\\": \\"<VM-ID>               |
1759 |                 |                                               |                 | \\",                                    |
1760 |                 |                                               |                 | \\"identity-url\\":                     |
1761 |                 |                                               |                 | \\"<IDENTITY-URL>\\",                   |
1762 |                 |                                               |                 | \\"tenant-id\\": \\"<TENANT- ID>\\"}"   |
1763 +-----------------+-----------------------------------------------+-----------------+ \\"snapshot-id\\": \\"<SNAPSHOT- ID>\\" |
1764 | identity- url   |     The identity url used to access the       | Yes             | }"                                      |
1765 |                 |     resource.                                 |                 |                                         |
1766 +-----------------+-----------------------------------------------+-----------------+                                         |
1767 | tenant-id       |     The id of the provider tenant that owns   | Yes             |                                         |
1768 |                 |     the resource.                             |                 |                                         |
1769 +-----------------+-----------------------------------------------+-----------------+                                         |
1770 | snapshot-id     |  The snapshot-id of a previously saved image. | No              |                                         |       
1771 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1772
1773 Rebuild Response
1774 ^^^^^^^^^^^^^^^^
1775
1776 **Success:** A successful Rebuild returns a success status code 400.  
1777
1778 **Failure:** A failed Rebuild returns a failure code 401 and the failure message.
1779
1780 Restart
1781 -------
1782
1783 Use the Restart command to restart a VM.    
1784
1785 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1786 |     **Input Block**          |     api-ver should be set to 2.00 for current version of Restart                                                |
1787 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1788 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:restart                                                              |
1789 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1790 |     **Action**               |     Restart                                                                                                     |
1791 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1792 |     **Action-identifiers**   |     vnf-id and vserver-id are required                                                                          |
1793 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1794 |     **Payload Parameters**   |     See table below                                                                                             |
1795 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1796 |     **Revision History**     |     Unchanged in this release                                                                                   |
1797 +------------------------------+-----------------------------------------------------------------------------------------------------------------+
1798
1799 Payload Parameters for **VM Restart**
1800
1801 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1802 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                    |
1803 +=====================+=========================================================================+=====================+====================================+
1804 |     vm-id           |     The unique identifier (UUID) of                                     |     Yes             |                                    |
1805 |                     |     the resource. For backwards- compatibility, this can be the self-   |                     |                                    |
1806 |                     |     link URL of the VM                                                  |                     |     "payload":                     |
1807 |                     |                                                                         |                     |     "{\\"vm-id\\": \\"<VM-ID>\\",  |
1808 |                     |                                                                         |                     |     \\"identity-url\\":            |
1809 +---------------------+-------------------------------------------------------------------------+---------------------+     \\"<IDENTITY-URL>\\",          |
1810 |     identity- url   |     The identity url used to access the resource                        |     No              |     \\"tenant-id\\": \\"<TENANT-   |
1811 |                     |                                                                         |                     |     ID>\\"}"                       |
1812 +---------------------+-------------------------------------------------------------------------+---------------------+                                    |
1813 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                    |
1814 +---------------------+-------------------------------------------------------------------------+---------------------+------------------------------------+
1815
1816 ResumeTraffic
1817 -------------
1818
1819 The ResumeTraffic LCM action resumes processing traffic on a VNF that has been previously quiesced.
1820
1821 This command is executed using an Ansible playbook or Chef cookbook.
1822
1823 Request Structure: The payload does not have any parameters.
1824
1825 +--------------------------+---------------------------------------------------------+
1826 | **Target URL**           | /restconf/operations/appc-provider-lcm:resume-traffic   |
1827 +--------------------------+---------------------------------------------------------+
1828 | **Action**               | ResumeTraffic                                           |
1829 +--------------------------+---------------------------------------------------------+
1830 | **Action-identifiers**   | vnf-id                                                  |
1831 +--------------------------+---------------------------------------------------------+
1832 | **Payload Parameters**   |                                                         |
1833 +--------------------------+---------------------------------------------------------+
1834 | **Revision History**     | New in Beijing                                          |
1835 +--------------------------+---------------------------------------------------------+
1836
1837 ResumeTraffic Response
1838 ^^^^^^^^^^^^^^^^^^^^^^
1839
1840 **Success:** A successful ResumeTraffic returns a success status code 400 after traffic has been resumed.
1841
1842 If a ResumeTraffic command is executed and the traffic is currently being processed, it should return a success status
1843
1844 **Failure:** A failed ResumeTraffic returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
1845
1846
1847 Snapshot
1848 --------
1849
1850 Creates a snapshot of a VM.
1851
1852 The Snapshot command returns a customized response containing a reference to the newly created snapshot instance if the action is successful.
1853
1854 This command can be applied to a VM in any VNF type. The only restriction is that the particular VNF should be built based on the generic heat stack.
1855
1856 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.
1857
1858 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1859
1860 +------------------------------+-----------------------------------------------------------------------------------------------------+
1861 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:snapshot                                                 |
1862 +------------------------------+-----------------------------------------------------------------------------------------------------+
1863 |     **Action**               |     Snapshot                                                                                        |
1864 +------------------------------+-----------------------------------------------------------------------------------------------------+
1865 |     **Action-identifiers**   |     vnf-id, vserver-id                                                                              |
1866 +------------------------------+-----------------------------------------------------------------------------------------------------+
1867 |     **Payload Parameters**   |     vm-id, identity-url, tenant-id                                                                  |
1868 +------------------------------+-----------------------------------------------------------------------------------------------------+
1869 |     **Revision History**     |     Unchanged in this release.                                                                      |
1870 +------------------------------+-----------------------------------------------------------------------------------------------------+
1871
1872 Payload Parameters
1873
1874 +---------------------+-------------------------------------------------------------------------+---------------------+----------------------------------------+
1875 | **Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                        |
1876 +=====================+=========================================================================+=====================+========================================+
1877 |     vm-id           |     The self-link URL of the VM                                         |     Yes             |                                        |
1878 |                     |                                                                         |                     |     "payload":                         |
1879 |                     |                                                                         |                     |     "{\\"vm-id\\": \\"<VM-ID>\\",      |
1880 |                     |                                                                         |                     |     \\"identity-url\\":                |
1881 |                     |                                                                         |                     |     \\"<IDENTITY-URL>\\",              |
1882 |                     |                                                                         |                     |     \\"tenant-id\\":\\"<TENANT-ID>\\"}"|
1883 +---------------------+-------------------------------------------------------------------------+---------------------+                                        |
1884 |     identity- url   |     The identity url used to access the resource                        |     No              |                                        |
1885 |                     |                                                                         |                     |                                        |
1886 +---------------------+-------------------------------------------------------------------------+---------------------+                                        |
1887 |     tenant-id       |     The id of the provider tenant that owns the resource                |     No              |                                        |
1888 +---------------------+-------------------------------------------------------------------------+---------------------+----------------------------------------+
1889
1890 Snapshot Response
1891 ^^^^^^^^^^^^^^^^^
1892
1893 The Snapshot command returns an extended version of the LCM response.
1894
1895 The Snapshot response conforms to the standard response format.
1896
1897
1898 Start
1899 -----
1900
1901 Use the Start command to start a VM that is stopped.
1902
1903 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1904
1905 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1906 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:start                                                                               |
1907 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1908 |     **Action**               |     Start                                                                                                                      |
1909 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1910 |     **Action-identifiers**   |     vnf-id and vserver-id are required                                                                                         |
1911 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1912 |     **Payload Parameters**   |     See table below                                                                                                            |
1913 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1914 |     **Revision History**     |     Unchanged in this release                                                                                                  |
1915 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1916
1917 Payload Parameters
1918
1919 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1920 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1921 +=================+===============================================+=================+=========================================+
1922 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1923 |                 |     the resource. For backwards-              |                 | "payload":                              |
1924 |                 |     compatibility, this can be the self-      |                 | "{\\"vm-id\\": \\"<VM-ID>               |
1925 |                 |     link URL of the VM.                       |                 | \\",                                    |
1926 |                 |                                               |                 | \\"identity-url\\":                     |
1927 |                 |                                               |                 | \\"<IDENTITY-URL>\\",                   |
1928 |                 |                                               |                 | \\"tenant-id\\": \\"<TENANT- ID>\\"}"   |
1929 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1930 | identity- url   |     The identity url used to access the       | No              |                                         |
1931 |                 |     resource                                  |                 |                                         |
1932 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1933 | tenant-id       |     The id of the provider tenant that owns   | No              |                                         |
1934 |                 |     the resource                              |                 |                                         |
1935 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1936
1937
1938 StartApplication
1939 ----------------
1940
1941 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.
1942
1943 A successful StartApplication request returns a success response.
1944
1945 A failed StartApplication action returns a failure response code and the specific failure message in the response block.
1946
1947 +------------------------------+---------------------------------------------------------------+
1948 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:start-application  |
1949 +------------------------------+---------------------------------------------------------------+
1950 |     **Action**               |     StartApplication                                          |
1951 +------------------------------+---------------------------------------------------------------+
1952 |     **Action-Identifiers**   |     Vnf-id                                                    |
1953 +------------------------------+---------------------------------------------------------------+
1954 |     **Payload Parameters**   |     See table below                                           |
1955 +------------------------------+---------------------------------------------------------------+
1956 |     **Revision History**     |     Unchanged in this release.                                |
1957 +------------------------------+---------------------------------------------------------------+
1958
1959 |
1960
1961 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1962 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
1963 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
1964 |                                 |                                                                                                                                                                                    |                     |  "payload":                                                     |
1965 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |  "{\\"configuration- parameters\\": {\\"<CONFIG- PARAMS>\\"}    |
1966 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
1967
1968 StartApplication Response
1969 ^^^^^^^^^^^^^^^^^^^^^^^^^
1970
1971 The StartApplication response returns an indication of success or failure of the request.
1972
1973 Stop
1974 ----
1975
1976 Use the Stop command to stop a VM that was running.
1977
1978 **NOTE:** The command implementation is based on Openstack functionality. For further details, see http://developer.openstack.org/api-ref/compute/.
1979
1980 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1981 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:stop                                                                                |
1982 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1983 |     **Action**               |     Stop                                                                                                                       |
1984 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1985 |     **Action-identifiers**   |     vnf-id and vserver-id are required.                                                                                        |
1986 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1987 |     **Payload Parameters**   |     See table below                                                                                                            |
1988 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1989 |     **Revision History**     |     Unchanged in this release                                                                                                  |
1990 +------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
1991
1992 Payload Parameters
1993
1994 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
1995 | **Parameter**   |     **Description**                           | **Required?**   | **Example**                             |
1996 +=================+===============================================+=================+=========================================+
1997 | vm-id           |     The unique identifier (UUID) of           | Yes             |                                         |
1998 |                 |     the resource. For backwards-              |                 | "payload":                              |
1999 |                 |     compatibility, this can be the self-      |                 | "{\\"vm-id\\": \\"<VM-ID>               |
2000 |                 |     link URL of the VM.                       |                 | \\",                                    |
2001 |                 |                                               |                 | \\"identity-url\\":                     |
2002 |                 |                                               |                 | \\"<IDENTITY-URL>\\",                   |
2003 |                 |                                               |                 | \\"tenant-id\\": \\"<TENANT- ID>\\"}"   |
2004 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
2005 | identity- url   |     The identity url used to access the       | No              |                                         |
2006 |                 |     resource                                  |                 |                                         |
2007 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
2008 | tenant-id       |     The id of the provider tenant that owns   | No              |                                         |
2009 |                 |     the resource                              |                 |                                         |
2010 +-----------------+-----------------------------------------------+-----------------+-----------------------------------------+
2011
2012
2013 StopApplication
2014 ---------------
2015
2016 Stops the VNF application gracefully (not lost traffic), if needed, prior to a Stop command. Supported using Chef cookbook or Ansible playbook only.
2017
2018 A successful StopApplication request returns a success response.
2019
2020 A failed StopApplication action returns a failure response code and the specific failure message in the response block.
2021
2022 +------------------------------+--------------------------------------------------------------+
2023 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:stop-application  |
2024 +------------------------------+--------------------------------------------------------------+
2025 |     **Action**               |     StopApplication                                          |
2026 +------------------------------+--------------------------------------------------------------+
2027 |     **Action-Identifiers**   |     Vnf-id                                                   |
2028 +------------------------------+--------------------------------------------------------------+
2029 |     **Payload Parameters**   |     See table below                                          |
2030 +------------------------------+--------------------------------------------------------------+
2031 |     **Revision History**     |     Unchanged in this release                                |
2032 +------------------------------+--------------------------------------------------------------+
2033
2034 |
2035
2036 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
2037 |     **Payload Parameter**       |     **Description**                                                                                                                                                                |     **Required?**   |     **Example**                                                 |
2038 +=================================+====================================================================================================================================================================================+=====================+=================================================================+
2039 |     configuration- parameters   |     A set of instance specific configuration parameters should be specified, as required by the Chef cookbook or Ansible playbook.                                                 |     No              |     "payload":                                                  |
2040 |                                 |                                                                                                                                                                                    |                     |     \\"configuration- parameters\\": {\\"<CONFIG- PARAMS>\\"}   |
2041 +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------------------+
2042
2043
2044 StopApplication Response
2045 ^^^^^^^^^^^^^^^^^^^^^^^^
2046
2047 The StopApplication response returns an indication of success or failure of the request.
2048
2049 Sync
2050 ----
2051
2052 The Sync action updates the current configuration in the APPC store with the running configuration from the device.
2053
2054 A successful Sync returns a success status.
2055
2056 A failed Sync returns a failure response status and failure messages in the response payload block.
2057
2058 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).
2059
2060 +------------------------------+---------------------------------------------------+
2061 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:sync   |
2062 +------------------------------+---------------------------------------------------+
2063 |     **Action**               |     Sync                                          |
2064 +------------------------------+---------------------------------------------------+
2065 |     **Action-identifiers**   |     Vnf-id                                        |
2066 +------------------------------+---------------------------------------------------+
2067 |     **Payload Parameters**   |     See below                                     |
2068 +------------------------------+---------------------------------------------------+
2069 |     **Revision History**     |     Unchanged in this release.                    |
2070 +------------------------------+---------------------------------------------------+
2071
2072 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
2073 |     **Parameter**    |     **Description**                                                                                                                                       |     **Required?**   |     **Example**                  |
2074 +======================+===========================================================================================================================================================+=====================+==================================+
2075 |     publish-config   |     \* If the publish\-config field is set to Y in the payload, then always write the running configuration to file                                       |     Yes             |     "publish-config": "<Y\|N>"   |
2076 |                      |                                                                                                                                                           |                     |                                  |
2077 |                      |     \* If the publish\-config field is set to N in the payload, then running configuration is not written to the file                                     |                     |                                  |
2078 |                      |                                                                                                                                                           |                     |                                  |
2079 +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------+
2080
2081
2082 Unlock
2083 ------
2084
2085 Run the Unlock command to release the lock on a VNF and allow other clients to perform LCM commands on that VNF.
2086
2087 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.
2088
2089 The Unlock command will result in success if the VNF successfully unlocked or if it was already unlocked, otherwise commands will be rejected.
2090
2091 The Unlock command will only return success if the VNF was locked with same request-id.
2092
2093 The Unlock command returns only one final response with the status of the request processing.
2094
2095 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.
2096
2097 +------------------------------+-----------------------------------------------------+
2098 |     **Target URL**           |     /restconf/operations/appc-provider-lcm:unlock   |
2099 +------------------------------+-----------------------------------------------------+
2100 |     **Action**               |     Unlock                                          |
2101 +------------------------------+-----------------------------------------------------+
2102 |     **Action-identifiers**   |     Vnf-id                                          |
2103 +------------------------------+-----------------------------------------------------+
2104 |     **Payload Parameters**   |     see table below                                 |
2105 +------------------------------+-----------------------------------------------------+
2106 |     **Revision History**     |     Unchanged in this release.                      |
2107 +------------------------------+-----------------------------------------------------+
2108
2109 |
2110
2111 +---------------------------------+-------------------------------------------------------------------------+---------------------+----------------------------------+
2112 |     **Payload Parameter**       |     **Description**                                                     |     **Required?**   |     **Example**                  |
2113 +=================================+=========================================================================+=====================+==================================+
2114 |     request-id                  |     Request id from the previously submitted request                    |     Yes             |    "request-id": "123456789"     |
2115 +---------------------------------+-------------------------------------------------------------------------+---------------------+----------------------------------+
2116
2117
2118 UpgradeBackout
2119 --------------
2120
2121 The UpgradeBackout LCM action does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).
2122
2123 This command is executed using an Ansible playbook or Chef cookbook.
2124
2125 Request Structure: The request payload includes an upgrade identifier.
2126
2127 +--------------------------+----------------------------------------------------------+
2128 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-backout   |
2129 +--------------------------+----------------------------------------------------------+
2130 | **Action**               | UpgradeBackout                                           |
2131 +--------------------------+----------------------------------------------------------+
2132 | **Action-identifiers**   | vnf-id                                                   |
2133 +--------------------------+----------------------------------------------------------+
2134 | **Payload Parameters**   | existing-software-version, new-software-version          |
2135 +--------------------------+----------------------------------------------------------+
2136 | **Revision History**     | New in Beijing                                           |
2137 +--------------------------+----------------------------------------------------------+
2138
2139 Request Payload Parameters:
2140
2141 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2142 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
2143 +=======================+=====================================+=====================+===============================================================================================+
2144 | existing-software-    |     The existing software version   |     Yes             |     "payload":                                                                                |
2145 | version               |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
2146 +-----------------------+-------------------------------------+---------------------+                                                                                               |
2147 | new-software-         |     The new software                |     Yes             |                                                                                               |
2148 | version               |     version after the               |                     |                                                                                               |
2149 |                       |     upgrade                         |                     |                                                                                               |
2150 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2151
2152 UpgradeBackout Response
2153 ^^^^^^^^^^^^^^^^^^^^^^^
2154
2155 **Success:** A successful backout returns a success status code 400.
2156
2157 **Failure:** A failed backout returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
2158
2159 UpgradeBackup
2160 -------------
2161
2162 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.
2163
2164 This command is executed using an Ansible playbook or Chef cookbook.
2165   
2166 Request Structure: The payload does not have any parameters required.
2167
2168 +--------------------------+---------------------------------------------------------+
2169 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-backup   |
2170 +--------------------------+---------------------------------------------------------+
2171 | **Action**               | UpgradeBackup                                           |
2172 +--------------------------+---------------------------------------------------------+
2173 | **Action-identifiers**   | vnf-id                                                  |
2174 +--------------------------+---------------------------------------------------------+
2175 | **Payload Parameters**   | existing-software-version, new-software-version         |
2176 +--------------------------+---------------------------------------------------------+
2177 | **Revision History**     | New in Beijing.                                         |
2178 +--------------------------+---------------------------------------------------------+
2179
2180 Request Payload Parameters:
2181
2182 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2183 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
2184 +=======================+=====================================+=====================+===============================================================================================+
2185 | existing-software-    |     The existing software version   |     Yes             |     "payload":                                                                                |
2186 | version               |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
2187 +-----------------------+-------------------------------------+---------------------+                                                                                               |
2188 | new-software-         |     The new software                |     Yes             |                                                                                               |
2189 | version               |     version after the               |                     |                                                                                               |
2190 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2191
2192 UpgradeBackup Response
2193 ^^^^^^^^^^^^^^^^^^^^^^
2194
2195 **Success:** A successful backup returns a success status code 400.
2196
2197 **Failure:** A failed backup returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
2198
2199 UpgradePostCheck
2200 ----------------
2201
2202 The UpgradePostCheck LCM action checks that the VNF upgrade has been successful completed and all processes are running properly.
2203
2204 This command is executed using an Ansible playbook or Chef cookbook.
2205
2206 Request Structure:
2207
2208 +--------------------------+-------------------------------------------------------------+
2209 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-post-check   |
2210 +--------------------------+-------------------------------------------------------------+
2211 | **Action**               | UpgradePostCheck                                            |
2212 +--------------------------+-------------------------------------------------------------+
2213 | **Action-identifiers**   | vnf-id                                                      |
2214 +--------------------------+-------------------------------------------------------------+
2215 | **Payload Parameters**   | existing-software-version, new-software-version             |
2216 +--------------------------+-------------------------------------------------------------+
2217 | **Revision History**     | New in Beijing                                              |
2218 +--------------------------+-------------------------------------------------------------+
2219
2220 Request Payload Parameters:
2221
2222 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2223 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
2224 +=======================+=====================================+=====================+===============================================================================================+
2225 | existing- software-   |     The existing software version   |     Yes             |     "payload":                                                                                |
2226 |  version              |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
2227 +-----------------------+-------------------------------------+---------------------+                                                                                               |
2228 | new-software-         |     The new software                |     Yes             |                                                                                               |
2229 | version               |     version after the               |                     |                                                                                               |
2230 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2231
2232 UpgradePostCheck Response
2233 ^^^^^^^^^^^^^^^^^^^^^^^^^
2234
2235 **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).
2236
2237 Response Payload Parameters:
2238
2239 +---------------+-----------------------------+-------------+------------------------------------------------------------------------------+
2240 | **Parameter** |     **Description**         |**Required?**|     **Example**                                                              |
2241 +===============+=============================+=============+==============================================================================+
2242 | Upgrade-      |     Returns the status      |     Yes     |                                                                              |
2243 | Status        |     of the upgradw          |             |     "payload":                                                               |
2244 |               |     post-check. Indicates   |             |     "{\\"upgrade-status\\": \\"Completed\\"}”                                |
2245 |               |     Completed or Failed     |             |     "payload": "{\\"upgrade-status\\":                                       |
2246 |               |                             |             |     \\"Failed\\",\\"message\\": \\"Version 3.2 is not running properly\\" }” |
2247 +---------------+-----------------------------+-------------+                                                                              |
2248 | Message       |     If Not Available,       |             |                                                                              |
2249 |               |     message contains        |             |                                                                              |
2250 |               |     explanation.            |             |                                                                              |
2251 +---------------+-----------------------------+-------------+------------------------------------------------------------------------------+
2252
2253 **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.
2254
2255 UpgradePreCheck
2256 ---------------
2257
2258 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).
2259
2260 This command is executed using an Ansible playbook or Chef cookbook.
2261
2262 Request Structure:
2263
2264 +--------------------------+------------------------------------------------------------+
2265 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-pre-check   |
2266 +--------------------------+------------------------------------------------------------+
2267 | **Action**               | UpgradePreCheck                                            |
2268 +--------------------------+------------------------------------------------------------+
2269 | **Action-identifiers**   | vnf-id                                                     |
2270 +--------------------------+------------------------------------------------------------+
2271 | **Payload Parameters**   | existing-software-version, new-software-version            |
2272 +--------------------------+------------------------------------------------------------+
2273 | **Revision History**     | New in Beijing                                             |
2274 +--------------------------+------------------------------------------------------------+
2275
2276 Request Payload Parameters:
2277
2278 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2279 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
2280 +=======================+=====================================+=====================+===============================================================================================+
2281 | existing-software-    |     The existing software version   |     Yes             |     "payload":                                                                                |
2282 | version               |     prior to the upgrade            |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
2283 +-----------------------+-------------------------------------+---------------------+                                                                                               |
2284 | new-software-         |     The new software                |     Yes             |                                                                                               |
2285 | version               |     version after the               |                     |                                                                                               |
2286 |                       |     upgrade                         |                     |                                                                                               |
2287 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2288
2289 UpgradePreCheck Response
2290 ^^^^^^^^^^^^^^^^^^^^^^^^
2291
2292 **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).
2293
2294 Response Payload Parameters:
2295
2296 +-----------------+---------------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------+
2297 | **Parameter**   |     **Description**       |     **Required?**   |     **Example**                                                                                                                  |
2298 +=================+===========================+=====================+==================================================================================================================================+
2299 | upgrade-status  |     Returns the status    |     Yes             |                                                                                                                                  |
2300 |                 |     of the upgrade pre-   |                     |     "payload":                                                                                                                   |
2301 |                 |     check. Indicates      |                     |     "{\\"upgrade-status\\": \\"Available\\"}”                                                                                    |
2302 |                 |     Available or Not      |                     |                                                                                                                                  |
2303 |                 |     Available             |                     |     "payload":                                                                                                                   |
2304 |                 |                           |                     |     "{\\"upgrade-status\\": \\"Not Available\\",\\"message\\": \\"Current software version 2.9 cannot be upgraded to 3.1\\" }”   |
2305 +-----------------+---------------------------+---------------------+                                                                                                                                  |
2306 |     message     |     If Not Available,     |                     |                                                                                                                                  |
2307 |                 |     message contains      |                     |                                                                                                                                  |
2308 |                 |     explanation.          |                     |                                                                                                                                  |
2309 +-----------------+---------------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------+
2310
2311 **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.
2312
2313 UpgradeSoftware
2314 ---------------
2315
2316 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).
2317
2318 This command is executed using an Ansible playbook or Chef cookbook.
2319   
2320 Request Structure: The request payload includes the new-software-version.
2321
2322 +--------------------------+-----------------------------------------------------------+
2323 | **Target URL**           | /restconf/operations/appc-provider-lcm:upgrade-software   |
2324 +--------------------------+-----------------------------------------------------------+
2325 | **Action**               | UpgradeSoftware                                           |
2326 +--------------------------+-----------------------------------------------------------+
2327 | **Action-identifiers**   | vnf-id                                                    |
2328 +--------------------------+-----------------------------------------------------------+
2329 | **Payload Parameters**   | existing-software-version, new-software-version           |
2330 +--------------------------+-----------------------------------------------------------+
2331 | **Revision History**     | New in Beijing                                            |
2332 +--------------------------+-----------------------------------------------------------+
2333
2334  Request Payload Parameters:
2335
2336 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2337 | **Parameter**         |     **Description**                 |     **Required?**   |     **Example**                                                                               |
2338 +=======================+=====================================+=====================+===============================================================================================+
2339 | existing- software-   |     The existing software version   |     Yes             |     "payload":                                                                                |
2340 | version               |      prior to the upgrade           |                     |     "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}”   |
2341 +-----------------------+-------------------------------------+---------------------+                                                                                               |
2342 | new-software          |     The new software                |     Yes             |                                                                                               |
2343 | version               |     version after the               |                     |                                                                                               |
2344 |                       |     upgrade                         |                     |                                                                                               |
2345 +-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
2346
2347 UpgradeSoftware Response
2348 ^^^^^^^^^^^^^^^^^^^^^^^^
2349
2350 **Success:** A successful upgrade returns a success status code 400.
2351
2352 If an UpgradeSoftware command is executed and the software has been previously upgraded to this version, it should return a success status.
2353
2354 **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.
2355
2356 Notes regarding the Upgrade commands
2357 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2358 Ansible playbooks / Chef cookbooks:
2359
2360 -  All Ansible playbooks/cookbooks for the Upgrade commands will be
2361    stored in the same directory on the server. The directory name will
2362    be of the format: 
2363    
2364         {existing-software-version_new-software-version}. 
2365                 
2366                 The path to the directory is the same for all upgrades (for example: vnf-type/softwareupgrade).
2367
2368 -  The playbooks for upgrades should use a standard naming convention
2369    (for example: SoftwareUpgrade_{existing-software-version_new-software-version}).
2370
2371 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.
2372
2373 -  The template will contain the directory path/playbook name which
2374    would be parameterized.
2375
2376     {vnf-type}/UpgradeSoftware/${existing_software_version}_${new-software-version}/
2377     SoftwareUpgrade_{existing-software-version_new-software-version}.
2378
2379