1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
14 Overview of APPC LCM Actor
15 ##########################
16 ONAP Policy Framework enables APPC as one of the supported actors. The APPC LCM Actor
17 contains operations supporting both the LCM interface and the legacy interface.
18 As such, this actor supersedes the APPC Legacy actor. Its sequence number is lower
19 than the APPC Legacy actor's sequence number, which ensures that it is loaded
22 APPC Legacy uses a single DMaaP topic for both requests and responses. The class(es)
23 supporting this interface are described in :ref:`appc-legacy-label`. The APPC LCM
24 Actor only supports the APPC Legacy operation, *ModifyConfig*.
26 The APPC LCM interface, on the other hand, uses two DMaaP topics, one to which requests
27 are published, and another from which responses are received. Similar to the legacy
28 interface, APPC LCM may generate more than one response for a particular request, the
29 first response simply indicating that the request was accepted, while the second
30 response indicates completion of the request.
32 For each request, a unique sub-request ID is generated. This is used to match the
33 received responses with the published requests. (APPC LCM also has a "correlation-id"
34 field, which could potentially be used to match the response to the request, but
35 apparently APPC LCM has not implemented that capability yet.)
37 All APPC LCM operations are currently supported by a single java class,
38 *AppcLcmOperation*, which is responsible for populating the request structure
39 appropriately. This class is derived from *BidirectionalTopicOperation*.
42 **The remainder of this discussion describes the operations that are specific to APPC
52 The "common-header" field in the request is built by policy.
54 =============================== =========== ==================================================================
55 "common-header" field name type Description
56 =============================== =========== ==================================================================
57 sub-request-id string Generated by Policy. Is a UUID and used internally by policy
58 to match the response with the request.
59 request-id string Inserted by Policy. Maps to the UUID sent by DCAE i.e. the ID
60 used throughout the closed loop lifecycle to identify a request.
61 originator-id string Copy of the request-id.
62 =============================== =========== ==================================================================
68 The "action" field uniquely identifies the operation to perform. Currently, the
69 following operations are supported:
76 The valid operations are listed in *AppcLcmConstants*. These are the values that must
77 be specified in the policy. However, before being stuffed into the "action" field,
78 they are converted to camel case, stripping any hyphens, and translating the first
79 character to upper case, if it isn't already.
85 Currently, the "action-identifiers" field contains only the VNF ID, which should be the
86 *targetEntity* specified within the *ControlLoopOperationParams*.
92 The "payload" field is populated based on the *payload* specified within the
93 *ControlLoopOperationParams*. Unlike the APPC Legacy operations, which inject POJOs
94 into the "payload" field, the APPC LCM operations simply encode the entire
95 parameter *payload* into a JSON string, and then place the encoded string into the
96 "payload" field of the request.
102 Suppose the *ControlLoopOperationParams* were populated as follows:
108 "operation": "Restart",
109 "targetEntity": "my-target",
116 "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200"
121 An example of a request constructed by the actor using the above parameters, published
122 to the APPC LCM request topic:
128 "rpc-name": "restart",
129 "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-8c4c1914-00ed-4be0-ae3b-49dd22e8f461",
134 "timestamp": "2020-05-14T19:19:32.619890900Z",
136 "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
137 "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
138 "sub-request-id": "8c4c1914-00ed-4be0-ae3b-49dd22e8f461",
142 "action-identifiers": {
143 "vnf-id": "my-target"
145 "payload": "{\"my-key-A\":\"hello\", \"my-key-B\":\"world\"}"
151 An example initial response received from the APPC LCM response topic:
159 "timestamp": "2020-05-14T19:19:32.619897000Z",
161 "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
162 "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
163 "sub-request-id": "8c4c1914-00ed-4be0-ae3b-49dd22e8f461",
168 "message": "Restart accepted"
173 "rpc-name": "restart",
174 "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1",
179 An example final response received from the APPC LCM on the same response topic:
187 "timestamp": "2020-05-14T19:19:32.619898000Z",
189 "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
190 "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
191 "sub-request-id": "8c4c1914-00ed-4be0-ae3b-49dd22e8f461",
196 "message": "Restart Successful"
201 "rpc-name": "restart",
202 "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1",
207 Configuration of the APPC LCM Actor
208 ###################################
210 The following table specifies the fields that should be provided to configure the APPC
213 =============================== ==================== ==================================================================
214 Field name type Description
215 =============================== ==================== ==================================================================
216 sinkTopic string Name of the topic to which the request should be published.
217 sourceTopic string Name of the topic from which the response should be read.
218 This must not be the same as the *sinkTopic*.
219 timeoutSec integer (optional) Maximum time, in seconds, to wait for a response to be received
221 =============================== ==================== ==================================================================
223 The individual operations are configured using these same field names. However, all
224 of them are optional, as they inherit their values from the corresponding actor-level
225 fields. That being said, the APPC Legacy operation(s) use a different topic than the
226 APPC LCM operations. As a result, the sink and source topics should be specified for
227 each APPC Legacy operation supported by this actor.