Update vLB ScaleOut use case doc
[integration.git] / docs / docs_scaleout.rst
1 .. _docs_scaleout:
2
3 :orphan:
4
5 VF Module Scale Out Use Case
6 ----------------------------
7
8 Source files
9 ~~~~~~~~~~~~
10 - Heat templates directory: https://git.onap.org/demo/tree/heat/vLB_CDS?h=guilin
11
12 Additional files
13 ~~~~~~~~~~~~~~~~
14 - TOSCA model template: https://git.onap.org/integration/tree/docs/files/scaleout/service-Vloadbalancercds-template.yml
15 - Naming policy script: :download:`push_naming_poliy.sh <files/scaleout/push_naming_policy.sh>`
16 - Controller Blueprint Archive (to use with CDS) : https://git.onap.org/ccsdk/cds/tree/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_Kotlin?h=guilin
17 - TCA blueprint : :download:`guilin-tca.yaml <files/scaleout/latest-tca-guilin.yaml>`
18
19 Useful tool
20 ~~~~~~~~~~~
21
22 - Postman collection that can be used to simulate all inter process queries : https://www.getpostman.com/collections/878061d291f9efe55463
23
24 Description
25 ~~~~~~~~~~~
26 The scale out use case uses a VNF composed of three virtual functions. A traffic generator (vPacketGen), a load balancer (vLB), and a DNS (vDNS). Communication between the vPacketGen and the vLB, and the vLB and the vDNS occurs via two separate private networks. In addition, all virtual functions have an interface to the ONAP OAM private network, as shown in the topology below.
27
28 .. figure:: files/scaleout/topology.png
29    :align: center
30
31 The vPacketGen issues DNS lookup queries that reach the DNS server via the vLB. vDNS replies reach the packet generator via the vLB as well. The vLB reports the average amount of traffic per vDNS instances over a given time interval (e.g. 10 seconds) to the DCAE collector via the ONAP OAM private network.
32
33 To run the use case, make sure that the security group in OpenStack has ingress/egress entries for protocol 47 (GRE). Users can test the VNF by running DNS queries from the vPakcketGen:
34
35 ::
36
37   dig @vLoadBalancer_IP host1.dnsdemo.onap.org
38
39 The output below means that the vLB has been set up correctly, has forwarded the DNS queries to a vDNS instance, and the vPacketGen has received the vDNS reply message.
40
41 ::
42
43     ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @192.168.9.111 host1.dnsdemo.onap.org
44     ; (1 server found)
45     ;; global options: +cmd
46     ;; Got answer:
47     ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31892
48     ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
49     ;; WARNING: recursion requested but not available
50
51     ;; OPT PSEUDOSECTION:
52     ; EDNS: version: 0, flags:; udp: 4096
53     ;; QUESTION SECTION:
54     ;host1.dnsdemo.onap.org.            IN      A
55
56     ;; ANSWER SECTION:
57     host1.dnsdemo.onap.org.     604800  IN      A       10.0.100.101
58
59     ;; AUTHORITY SECTION:
60     dnsdemo.onap.org.   604800  IN      NS      dnsdemo.onap.org.
61
62     ;; ADDITIONAL SECTION:
63     dnsdemo.onap.org.   604800  IN      A       10.0.100.100
64
65     ;; Query time: 0 msec
66     ;; SERVER: 192.168.9.111#53(192.168.9.111)
67     ;; WHEN: Fri Nov 10 17:39:12 UTC 2017
68     ;; MSG SIZE  rcvd: 97
69
70
71 The Scale Out Use Case
72 ~~~~~~~~~~~~~~~~~~~~~~
73 The Scale Out use case shows how users/network operators can add Virtual Network Function Components (VNFCs) as part of a VF Module that has been instantiated in the Service model, in order to increase capacity of the network. ONAP Frankfurt release supports scale out with manual trigger by directly calling SO APIs and closed-loop-enabled automation from Policy. For Frankfurt, the APPC controller is used to demonstrate post-scaling VNF reconfiguration operations. APPC can handle different VNF types, not only the VNF described in this document.
74
75 The figure below shows all the interactions that take place during scale out operations.
76
77 .. figure:: files/scaleout/scaleout.png
78    :align: center
79
80 There are four different message flows:
81   - Gray: This communication happens internally to the VNF and it is described in the section above.
82   - Green: Scale out with manual trigger.
83   - Red: Closed-loop enabled scale out.
84   - Black: Orchestration and VNF lifecycle management (LCM) operations.
85
86 The numbers in the figure represent the sequence of steps within a given flow. Note that interactions between the components in the picture and AAI, SDNC, and DMaaP are not shown for clarity's sake.
87
88 Scale out with manual trigger (green flow) and closed-loop-enabled scale out (red flow) are mutually exclusive. When the manual trigger is used, VID directly triggers the appropriate workflow in SO (step 1 of the green flow in the figure above). See Section 4 for more details.
89
90 When closed-loop enabled scale out is used, Policy triggers the SO workflow. The closed loop starts with the vLB periodically reporting telemetry about traffic patterns to the VES collector in DCAE (step 1 of the red flow). When the amount of traffic exceeds a given threshold (which the user defines during closed loop creation in CLAMP - see Section 1-4), DCAE notifies Policy (step 2), which in turn triggers the appropriate action. For this use case, the action is contacting SO to augment resource capacity in the network (step 3).
91
92 At high level, once SO receives a call for scale out actions, it first creates a new VF module (step 1 of the black flow), then calls APPC to trigger some LCM actions (step 2). APPC runs VNF health check and configuration scale out as part of LCM actions (step 3). At this time, the VNF health check only reports the health status of the vLB, while the configuration scale out operation adds a new vDNS instance to the vLB internal state. As a result of configuration scale out, the vLB opens a connection towards the new vDNS instance.
93
94 At deeper level, the SO workflow works as depicted below:
95
96 .. figure:: files/scaleout/so-blocks.png
97    :align: center
98
99 SO first contacts APPC to run VNF health check and proceeds on to the next block of the workflow only if the vLB is healthy (not shown in the previous figure for simplicity's sake). Then, SO assigns resources, instantiates, and activates the new VF module. Finally, SO calls APPC again for configuration scale out and VNF health check. The VNF health check at the end of the workflow validates that the vLB health status hasn't been negatively affected by the scale out operation.
100
101 PART 1 - Service Definition and Onboarding
102 ------------------------------------------
103 This use-case requires operations on several ONAP components to perform service definition and onboarding.
104
105
106 1-1 VNF Configuration Modeling and Upload with CDS
107 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108 Since Dublin, the scale out use case integrates with the Controller Design Studio (CDS) ONAP component to automate the generation of cloud configuration at VNF instantiation time. The user interested in running the use case only with manual preload can skip this section and start from Section 1-2. The description of the use case with manual preload is provided in Section5.
109
110 Users can model this configuration at VNF design time and onboard the blueprint to CDS via the CDS GUI. The blueprint includes naming policies and network configuration details (e.g. IP address families, network names, etc.) that CDS will use during VNF instantiation to generate resource names and assign network configuration to VMs through the cloud orchestrator.
111
112 Please look at the CDS documentation for details about how to create configuration models, blueprints, and use the CDS tool: https://wiki.onap.org/display/DW/Modeling+Concepts. For running the use case, users can use the standard model package that CDS provides out of the box, which can be found here: https://wiki.onap.org/pages/viewpage.action?pageId=64007442
113
114 The provided CBA blueprint (see top of this documentation) can also be loaded to CDS using the sample POSTMAN collection
115
116 1-2 VNF Onboarding and Service Creation with SDC
117 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118 Once the configuration blueprint is uploaded to CDS, users can define and onboard a service using SDC. SDC requires users to onboard a VNF descriptor that contains the definition of all the resources (private networks, compute nodes, keys, etc.) with their parameters that compose a VNF. The VNF used to demonstrate the scale out use case supports Heat templates as VNF descriptor, and hence requires OpenStack as cloud layer. Users can use the Heat templates linked at the top of the page to create a zip file that can be uploaded to SDC during service creation. To create a zip file, the user must be in the same folder that contains the Heat templates and the Manifest file that describes the content of the package. To create a zip file from command line, type:
119 ::
120
121     zip ../vLB.zip *
122
123 For a complete description of service design and creation, please refer to the SDC documentation.
124
125 During the creation of the service in SDC, there are a few extra steps that need to be executed to make the VNF ready for scale out. These require users to login to the SDC Portal as service designer user (username: cs0008, password: demo123456!).
126
127 After importing the Vendor Software Package (VSP), as described in the SDC wiki page, users need to set property values in the Property Assignment window, as shown below:
128
129 .. figure:: files/scaleout/9.png
130    :align: center
131
132 These properties include parameters in the Heat template (which will be overridden by CDS and then don't need to be changed) and other parameters that describe the VNF type or are used to link the service to the configuration in the CDS package.
133
134 Users can search for parameter names starting with "nf" to assign values that describe the VNF type, such as nf_type, nf_function, and nf_role. Users are free to choose the values they like. Users should also set "skip_post_instantiation" to "TRUE", as for Dublin CDS is not used for post-instantiation configuration.
135
136 .. figure:: files/scaleout/10.png
137    :align: center
138
139 For CDS parameters, users can search for names starting with "sdnc". These parameters have to match the configuration blueprint in CDS. To use the standard blueprint shipped with CDS, please set the parameters as below. For further details, please refer to the CDS documentation.
140
141 .. figure:: files/scaleout/11.png
142    :align: center
143
144
145 After importing the VSP, users need to onboard the DCAE blueprint used to design closed loops in CLAMP. This step is only required for users that want to run closed loop; users interested in manual scale out only can skip the remainder of the section. Note that since Frankfurt users are not required to upload a Policy model from SDC, as Policy models are now managed by the Policy Engine.
146
147 To upload a DCAE blueprint, from the "Composition" tab in the service menu, select the artifact icon on the right, as shown below:
148
149 .. figure:: files/scaleout/1.png
150    :align: center
151
152 Upload the DCAE blueprint (choose the one depending on your ONAP release, as the orginal TCA was depecrated in Guilin a new one is available to use) linked at the top of the page using the pop-up window.
153
154 .. figure:: files/scaleout/2.png
155    :align: center
156
157 The blueprint will appear in the artifacts section on the right.
158
159 .. figure:: files/scaleout/3.png
160    :align: center
161
162 Finally, users need to provide the maximum number of VNF instances that ONAP is allowed to create as part of the scale out use case by setting up deployment properties.
163
164 .. figure:: files/scaleout/7.png
165    :align: center
166
167 This VNF only supports scaling the vDNS, so users should select the vDNS module from the right panel and then click the "max_vf_module_instance" link. The maximum number of VNF instances to scale can be set to an arbitrary number higher than zero.
168
169 .. figure:: files/scaleout/8.png
170    :align: center
171
172 At this point, users can complete the service creation in SDC by testing, accepting, and distributing the Service Models as described in the SDC user manual.
173
174
175
176 1-3 Deploy Naming Policy
177 ~~~~~~~~~~~~~~~~~~~~~~~~
178 This step is only required if CDS is used.
179
180 In order to instantiate the VNF using CDS features, users need to deploy the naming policy that CDS uses for resource name generation to the Policy Engine. User can copy and run the script at the top of the page from any ONAP pod, for example Robot or Drools. The script uses the Policy endpoint defined in the Kubernetes domain, so the execution has to be triggered from some pod in the Kubernetes space.
181
182 ::
183
184     kubectl exec -it dev-policy-drools-0
185     ./push_naming_policy.sh
186
187 Note that in Guilin, the default naming policy is already deployed in policy so this step is optional
188
189 1-4 Closed Loop Design with CLAMP
190 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191 This step is only required if closed loop is used.
192
193 Once the service model is distributed, users can design the closed loop from CLAMP, using the GUI at https://clamp.api.simpledemo.onap.org:30258
194
195 Use the "Loop Instance" link to create a closed loop using a distributed model.
196
197 .. figure:: files/scaleout/clamp/1.png
198    :align: center
199
200 Select the distributed service model.
201
202 .. figure:: files/scaleout/clamp/2.png
203    :align: center
204
205 The closed loop main page for TCA microservices is shown below.
206
207 .. figure:: files/scaleout/clamp/3.png
208    :align: center
209
210 Click on the TCA box to create a configuration policy. From the pop-up window, users need to click "Add" to create a new policy and fill it in with specific information, as shown below.
211
212 .. figure:: files/scaleout/clamp/4.png
213    :align: center
214
215 For this use case, the control loop schema type is "VM", while the event name has to match the event name reported in the VNF telemetry, which is "vLoadBalancer".
216
217 Once the policy item has been created, users can define a threshold that will be used at runtime to evaluate telemetry reported by the vLB. When the specified threshold is crossed, DCAE generates an ONSET event that will tell Policy Engine which closed loop to activate.
218
219 .. figure:: files/scaleout/clamp/5.png
220    :align: center
221
222 Since Frankfurt, users are required to define the PDP group for the configuration policy, as shown in the figure below.
223
224 .. figure:: files/scaleout/clamp/6.png
225    :align: center
226
227 After the configuration policy is created, users need to create the operational policy, which the Policy Engine uses to determine which actions and parameters should be used during closed loop. From the "Loop Instance" tab, users can select "Modify" to add a new Policy Model of type Drools:
228
229 .. figure:: files/scaleout/clamp/7.png
230    :align: center
231
232 Users are required to provide basic closed loop information, like ID, timeout, and trigger, as shown in the example below. The trigger name, in particular, must match the name of the root operational policy created during the next step.
233
234 .. figure:: files/scaleout/clamp/8.png
235    :align: center
236
237 To create a new operational policy, users can use the "Add" button below, and fill up the fields in the CLAMP GUI as shown in the example below, making sure that the "id" matches the "trigger" field defined before:
238
239 .. figure:: files/scaleout/clamp/9.png
240    :align: center
241
242 During creation of the operational policy, the user should select "VF Module Create" recipe and "SO" actor. The payload section is a JSON object like below:
243
244 ::
245
246     {"requestParameters":"{\"usePreload\":true,\"userParams\":[]}",
247    "configurationParameters":"[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[30]\"}]"}
248
249 Users can use the "Edit JSON" button to upload the payload.
250
251 .. figure:: files/scaleout/clamp/10.png
252    :align: center
253
254 The Policy Engine passes the payload to SO, which will then use it during VF module instantiation to resolve configuration parameters. The JSON path
255
256 ::
257
258     "ip-addr":"$.vf-module-topology.vf-module-parameters.param[16].value"
259
260 indicates that resolution for parameter "ip-addr" is available at "$.vf-module-topology.vf-module-parameters.param[16].value" in the JSON object linked by the VF module self-link in AAI. See section 1-7 for an example of how to determine the right path to configuration parameters.
261
262 The "targetType" tab allows users to select the target type for the closed loop. For this use case, the user should select VF module as target type, as we are scaling a VF module. Please select the vDNS module as target resource ID.
263
264 .. figure:: files/scaleout/clamp/11.png
265    :align: center
266
267 As with configuration policy, users need to assign the PDP group to the operational policy.
268
269 .. figure:: files/scaleout/clamp/12.png
270    :align: center
271
272 For what regards guard policies, either "Frequency Limiter", or "MinMax", or both can be used for the scale out use case. They can be added using the "Modify" item in the "Loop Instance" tab.
273
274 .. figure:: files/scaleout/clamp/13.png
275    :align: center
276
277 The example below shows the definition of a "Frequency Limiter" guard policy. Note that some optional fields, such as id and time interval, should be added to the policy using the "Object Properties" button:
278
279 .. figure:: files/scaleout/clamp/14.png
280    :align: center
281
282 The user needs to manually insert id, actor, and operation so as to match the same fields defined in the operational policy.
283
284 .. figure:: files/scaleout/clamp/15.png
285    :align: center
286
287 Once the operational policy design is completed, users can submit and then deploy the closed loop clicking the "Submit" and "Deploy" buttons from the "Loop Operations" tab, as shown below.
288
289 .. figure:: files/scaleout/clamp/16.png
290    :align: center
291
292 At this point, the closed loop is deployed to Policy Engine and DCAE, and a new microservice will be deployed to the DCAE platform.
293
294
295 1-5 Creating a VNF Template with CDT
296 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297 Before running scale out use case, the users need to create a VNF template using the Controller Design Tool (CDT), a design-time tool that allows users to create and on-board VNF templates into APPC. The template describes which control operation can be executed against the VNF (e.g. scale out, health check, modify configuration, etc.), the protocols that the VNF supports, port numbers, VNF APIs, and credentials for authentication. Being VNF agnostic, APPC uses these templates to "learn" about specific VNFs and the supported operations.
298 CDT requires two input:
299
300 1) the list of parameters that APPC will receive (ip-addr, oam-ip-addr, enabled in the example above);
301
302 2) the VNF API that APPC will use to reconfigure the VNF.
303
304 Below is an example of the parameters file (yaml format), which we call parameters.yaml:
305 ::
306
307     version: V1
308     vnf-parameter-list:
309     - name: ip-addr
310       type: null
311       description: null
312       required: "true"
313       default: null
314       source: Manual
315       rule-type: null
316       request-keys: null
317       response-keys: null
318     - name: oam-ip-addr
319       type: null
320       description: null
321       required: "true"
322       default: null
323       source: Manual
324       rule-type: null
325       request-keys: null
326       response-keys: null
327     - name: enabled
328       type: null
329       description: null
330       required: "false"
331       default: null
332       source: Manual
333       rule-type: null
334       request-keys: null
335       response-keys: null
336
337 Here is an example of API for the vLB VNF used for this use case. We name the file after the vnf-type contained in SDNC (i.e. Vloadbalancerms..vdns..module-3):
338 ::
339
340     <vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
341         <vdns-instances>
342             <vdns-instance>
343                 <ip-addr>${ip-addr}</ip-addr>
344                 <oam-ip-addr>${oam-ip-addr}</oam-ip-addr>
345                 <enabled>true</enabled>
346             </vdns-instance>
347         </vdns-instances>
348     </vlb-business-vnf-onap-plugin>
349
350 To create the VNF template in CDT, the following steps are required:
351
352 - Connect to the CDT GUI: http://ANY_K8S_IP:30289
353 - Click "My VNF" Tab. Create your user ID, if necessary
354 - Click "Create new VNF" entering the VNF type as reported in VID or AAI, e.g. vLoadBalancerMS/vLoadBalancerMS 0
355 - Select "ConfigScaleOut" action
356 - Create a new template identifier using the VNF type name in service model as template name, e.g. Vloadbalancerms..vdns..module-3
357 - Select protocol (Netconf-XML), VNF username (admin), and VNF port number (2831 for NETCONF)
358 - Click "Parameter Definition" Tab and upload the parameters (.yaml) file
359 - Click "Template Tab" and upload API template (.yaml) file
360 - Click "Reference Data" Tab
361 - Click "Save All to APPC"
362
363 Note, if a user gets an error when saving to Appc (cannot connect to AppC network), he should open a browser to http://ANY_K8S_IP:30211 to accept AppC proxy certificate
364
365 For health check operation, we just need to specify the protocol, the port number and username of the VNF (REST, 8183, and "admin" respectively, in the case of vLB/vDNS) and the API. For the vLB/vDNS, the API is:
366 ::
367
368   restconf/operational/health-vnf-onap-plugin:health-vnf-onap-plugin-state/health-check
369
370 Note that we don't need to create a VNF template for health check, so the "Template" flag can be set to "N". Again, the user has to click "Save All to APPC" to update the APPC database.
371 At this time, CDT doesn't allow users to provide VNF password from the GUI. To update the VNF password we need to log into the APPC Maria DB container and change the password manually:
372 ::
373
374   mysql -u sdnctl -p (type "gamma" when password is prompted)
375   use sdnctl;
376   UPDATE DEVICE_AUTHENTICATION SET PASSWORD='admin' WHERE
377   VNF_TYPE='vLoadBalancerMS/vLoadBalancerMS 0'; (use your VNF type)
378
379
380 1-6 Setting the Controller Type in SO Database
381 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
382 Users need to specify which controller to use for the scale out use case. For Dublin, the supported controller is APPC. Users need to create an association between the controller and the VNF type in the SO database.
383
384 To do so:
385
386 - Connect to one of the replicas of the MariaDB database
387 - Type
388
389 ::
390
391     mysql -ucataloguser -pcatalog123
392
393 - Use catalogdb databalse
394
395 ::
396
397     use catalogdb;
398
399 - Create an association between APPC and the VNF type, for example:
400
401 ::
402
403     INSERT INTO controller_selection_reference (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES ('<VNF Type>', 'APPC', 'ConfigScaleOut');
404     INSERT INTO controller_selection_reference (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES ('<VNF Type>', 'APPC', 'HealthCheck');
405
406 SO has a default entry for VNF type "vLoadBalancerMS/vLoadBalancerMS 0"
407
408
409 1-7 Determining VNF reconfiguration parameters
410 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 The post scale out VNF reconfiguration is VNF-independent but the parameters used for VNF reconfiguration depend on the specific use case. For example, the vLB-vDNS-vPacketGenerator VNF described in this documentation use the vLB as "anchor" point. The vLB maintains the state of the VNF, which, for this use case is the list of active vDNS instances. After creating a new vDNS instance, the vLB needs to know the IP addresses (of the internal private network and management network) of the new vDNS. The reconfiguration action is executed by APPC, which receives those IP addresses from SO during the scale out workflow execution. Note that different VNFs may have different reconfiguration actions. A parameter resolution is expressed as JSON path to the SDNC VF module topology parameter array. For each reconfiguration parameter, the user has to specify the array location that contains the corresponding value (IP address in the specific case). For example, the "configurationParameters" section of the input request to SO during scale out with manual trigger (see Section 4) contains the resolution path to "ip-addr" and "oam-ip-addr" parameters used by the VNF.
412
413 ::
414
415     "configurationParameters": [
416             {
417                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
418                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
419             }
420     ]
421
422 The same resolution path needs to be provided for the closed-loop enabled use case during the closed loop design phase in CLAMP (see Section 1-4). The reconfiguration parameters and their resolution path will be pushed to the Policy Engine during closed loop deployment. Policy will eventually push them to SO during closed loop execution.
423
424 Users can determine the correct location by querying the SDNC topology object. The URL can be obtained from AAI following these steps:
425
426 1) Retrieve the list of VNF instances in AAI using the following link:
427
428 ::
429
430     curl -k -X GET \
431   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs \
432   -H 'Accept: application/json' \
433   -H 'Authorization: Basic QUFJOkFBSQ==' \
434   -H 'Content-Type: application/json' \
435   -H 'X-FromAppId: AAI' \
436   -H 'X-TransactionId: get_aai_subscr'
437
438 2) From the returned JSON object, search for the generic VNF object related to the VNF of interest (for example by using the VNF name defined during VNF instantiation). Then, select the "vnf-id" value to build a request to AAI to list all the VF modules of that VNF:
439
440 ::
441
442     curl -k -X GET \
443   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs/generic-vnf/0e905228-c719-489a-9bcc-4470f3254e87/vf-modules \
444   -H 'Accept: application/json' \
445   -H 'Authorization: Basic QUFJOkFBSQ==' \
446   -H 'Content-Type: application/json' \
447   -H 'X-FromAppId: AAI' \
448   -H 'X-TransactionId: get_aai_subscr'
449
450 3) From the returned list of VF modules, select the "selflink" URL of the VF module type that is target of the scaling action. This object refers to an existing instance of that VF module type, which could have been created either as part of regular VNF instantiation process or scaling action. The selflink points to the topology of that VF module instance in SDNC. A new instance of this VF module type will have a topology of the same form, just different parameter values. As such, the existing topology pointed by the selflink in AAI can be used to determine the resolution path to configuration parameters for future instantiation of that VF module type.
451
452 The selflink has the following structure:
453
454 ::
455
456     restconf/config/GENERIC-RESOURCE-API:services/service/4545562a-cbe3-409a-8227-0b863f5bc34e/service-data/vnfs/vnf/0e905228-c719-489a-9bcc-4470f3254e87/vnf-data/vf-modules/vf-module/793df714-106e-40a6-a28a-746b65f9e247/vf-module-data/vf-module-topology/
457
458 The complete URL to access the VF module topology in SDNC becomes:
459
460 ::
461
462     http://<Any_K8S_Node_IP_Address>:30202/restconf/config/GENERIC-RESOURCE-API:services/service/4545562a-cbe3-409a-8227-0b863f5bc34e/service-data/vnfs/vnf/0e905228-c719-489a-9bcc-4470f3254e87/vnf-data/vf-modules/vf-module/793df714-106e-40a6-a28a-746b65f9e247/vf-module-data/vf-module-topology/
463
464 See below an example of VF module topology. It can be stored in SDNC either using CDS (see Section 2) or manual preload (see Section 5).
465
466 ::
467
468     {
469     "vf-module-topology": {
470         "onap-model-information": {
471             "model-name": "VlbCds..vdns..module-3",
472             "model-invariant-uuid": "b985f371-4c59-45f7-b53e-36f970946469",
473             "model-version": "1",
474             "model-customization-uuid": "613b6877-0231-4ca4-90e4-4aa3374674ef",
475             "model-uuid": "739e4a32-f744-47be-9208-5dcf15772306"
476         },
477         "vf-module-parameters": {
478             "param": [
479                 {
480                     "name": "vfc_customization_uuid",
481                     "value": "770af15f-564d-438c-ba3e-6df318c2b1fe",
482                     "resource-resolution-data": {
483                         "capability-name": "RA Resolved",
484                         "status": "SUCCESS"
485                     }
486                 },
487                 {
488                     "name": "key_name",
489                     "value": "${key_name}",
490                     "resource-resolution-data": {
491                         "capability-name": "RA Resolved",
492                         "status": "SUCCESS"
493                     }
494                 },
495                 {
496                     "name": "vdns_flavor_name",
497                     "value": "m1.medium",
498                     "resource-resolution-data": {
499                         "capability-name": "RA Resolved",
500                         "status": "SUCCESS"
501                     }
502                 },
503                 {
504                     "name": "cloud_env",
505                     "value": "openstack",
506                     "resource-resolution-data": {
507                         "capability-name": "RA Resolved",
508                         "status": "SUCCESS"
509                     }
510                 },
511                 {
512                     "name": "vnfc-model-customization-uuid",
513                     "value": "770af15f-564d-438c-ba3e-6df318c2b1fe",
514                     "resource-resolution-data": {
515                         "capability-name": "RA Resolved",
516                         "status": "SUCCESS"
517                     }
518                 },
519                 {
520                     "name": "vf-module-name",
521                     "value": "RegionOne_ONAP-NF_20191010T013003141Z_vdns_Expansion_003",
522                     "resource-resolution-data": {
523                         "capability-name": "generate-name",
524                         "resource-key": [
525                             {
526                                 "name": "VF_MODULE_LABEL",
527                                 "value": "vdns"
528                             },
529                             {
530                                 "name": "resource-name",
531                                 "value": "vf-module-name"
532                             },
533                             {
534                                 "name": "resource-value",
535                                 "value": "${vf-module-name}"
536                             },
537                             {
538                                 "name": "naming-type",
539                                 "value": "VF-MODULE"
540                             },
541                             {
542                                 "name": "VNF_NAME",
543                                 "value": "RegionOne_ONAP-NF_20191010T013003141Z"
544                             },
545                             {
546                                 "name": "external-key",
547                                 "value": "793df714-106e-40a6-a28a-746b65f9e247_vf-module-name"
548                             },
549                             {
550                                 "name": "policy-instance-name",
551                                 "value": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP"
552                             },
553                             {
554                                 "name": "VF_MODULE_TYPE",
555                                 "value": "Expansion"
556                             }
557                         ],
558                         "status": "SUCCESS"
559                     }
560                 },
561                 {
562                     "name": "vnfc-model-version",
563                     "value": "1.0",
564                     "resource-resolution-data": {
565                         "capability-name": "RA Resolved",
566                         "status": "SUCCESS"
567                     }
568                 },
569                 {
570                     "name": "pktgen_private_net_cidr",
571                     "value": "${pktgen_private_net_cidr}",
572                     "resource-resolution-data": {
573                         "capability-name": "RA Resolved",
574                         "status": "SUCCESS"
575                     }
576                 },
577                 {
578                     "name": "vnf_model_customization_uuid",
579                     "value": "c7be2fca-9a5c-4364-8c32-801e64f90ccd",
580                     "resource-resolution-data": {
581                         "capability-name": "RA Resolved",
582                         "status": "SUCCESS"
583                     }
584                 },
585                 {
586                     "name": "service-instance-id",
587                     "value": "4545562a-cbe3-409a-8227-0b863f5bc34e",
588                     "resource-resolution-data": {
589                         "capability-name": "RA Resolved",
590                         "status": "SUCCESS"
591                     }
592                 },
593                 {
594                     "name": "vlb_private_net_cidr",
595                     "value": "192.168.10.0/24",
596                     "resource-resolution-data": {
597                         "capability-name": "RA Resolved",
598                         "status": "SUCCESS"
599                     }
600                 },
601                 {
602                     "name": "install_script_version",
603                     "value": "1.5.0-SNAPSHOT",
604                     "resource-resolution-data": {
605                         "capability-name": "RA Resolved",
606                         "status": "SUCCESS"
607                     }
608                 },
609                 {
610                     "name": "vlb_int_private_ip_0",
611                     "value": "192.168.10.50",
612                     "resource-resolution-data": {
613                         "capability-name": "RA Resolved",
614                         "status": "SUCCESS"
615                     }
616                 },
617                 {
618                     "name": "vnfc-model-invariant-uuid",
619                     "value": "49e70b6f-87e7-4f68-b1ec-958e68c7cbf5",
620                     "resource-resolution-data": {
621                         "capability-name": "RA Resolved",
622                         "status": "SUCCESS"
623                     }
624                 },
625                 {
626                     "name": "pub_key",
627                     "value": "${pub_key}",
628                     "resource-resolution-data": {
629                         "capability-name": "RA Resolved",
630                         "status": "SUCCESS"
631                     }
632                 },
633                 {
634                     "name": "onap_private_net_cidr",
635                     "value": "10.0.0.0/8",
636                     "resource-resolution-data": {
637                         "capability-name": "RA Resolved",
638                         "status": "SUCCESS"
639                     }
640                 },
641                 {
642                     "name": "vdns_int_private_ip_0",
643                     "value": "192.168.10.54",
644                     "resource-resolution-data": {
645                         "capability-name": "netbox-ip-assign",
646                         "resource-key": [
647                             {
648                                 "name": "external_key",
649                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87-vdns_int_private_ip_0"
650                             },
651                             {
652                                 "name": "vnf-id",
653                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87"
654                             },
655                             {
656                                 "name": "service-instance-id",
657                                 "value": "4545562a-cbe3-409a-8227-0b863f5bc34e"
658                             },
659                             {
660                                 "name": "prefix-id",
661                                 "value": "2"
662                             }
663                         ],
664                         "status": "SUCCESS"
665                     }
666                 },
667                 {
668                     "name": "vnf_id",
669                     "value": "0e905228-c719-489a-9bcc-4470f3254e87",
670                     "resource-resolution-data": {
671                         "capability-name": "RA Resolved",
672                         "status": "SUCCESS"
673                     }
674                 },
675                 {
676                     "name": "nfc-naming-code",
677                     "value": "vdns",
678                     "resource-resolution-data": {
679                         "capability-name": "RA Resolved",
680                         "status": "SUCCESS"
681                     }
682                 },
683                 {
684                     "name": "onap_private_subnet_id",
685                     "value": "oam_network_qXyY",
686                     "resource-resolution-data": {
687                         "capability-name": "RA Resolved",
688                         "status": "SUCCESS"
689                     }
690                 },
691                 {
692                     "name": "vf_module_customization_uuid",
693                     "value": "613b6877-0231-4ca4-90e4-4aa3374674ef",
694                     "resource-resolution-data": {
695                         "capability-name": "RA Resolved",
696                         "status": "SUCCESS"
697                     }
698                 },
699                 {
700                     "name": "vf_module_type",
701                     "value": "Expansion",
702                     "resource-resolution-data": {
703                         "capability-name": "RA Resolved",
704                         "status": "SUCCESS"
705                     }
706                 },
707                 {
708                     "name": "vlb_onap_private_ip_0",
709                     "value": "10.0.101.32",
710                     "resource-resolution-data": {
711                         "capability-name": "RA Resolved",
712                         "status": "SUCCESS"
713                     }
714                 },
715                 {
716                     "name": "vf_module_id",
717                     "value": "793df714-106e-40a6-a28a-746b65f9e247",
718                     "resource-resolution-data": {
719                         "capability-name": "RA Resolved",
720                         "status": "SUCCESS"
721                     }
722                 },
723                 {
724                     "name": "vdns_name_0",
725                     "value": "RegionOne_ONAP-NF_20191010T013003141Z_vdns_003",
726                     "resource-resolution-data": {
727                         "capability-name": "generate-name",
728                         "resource-key": [
729                             {
730                                 "name": "resource-name",
731                                 "value": "vdns_name_0"
732                             },
733                             {
734                                 "name": "resource-value",
735                                 "value": "${vdns_name_0}"
736                             },
737                             {
738                                 "name": "naming-type",
739                                 "value": "VNFC"
740                             },
741                             {
742                                 "name": "VNF_NAME",
743                                 "value": "RegionOne_ONAP-NF_20191010T013003141Z"
744                             },
745                             {
746                                 "name": "external-key",
747                                 "value": "793df714-106e-40a6-a28a-746b65f9e247_vdns_name_0"
748                             },
749                             {
750                                 "name": "policy-instance-name",
751                                 "value": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP"
752                             },
753                             {
754                                 "name": "NFC_NAMING_CODE",
755                                 "value": "vdns"
756                             }
757                         ],
758                         "status": "SUCCESS"
759                     }
760                 },
761                 {
762                     "name": "vm-type",
763                     "value": "vdns",
764                     "resource-resolution-data": {
765                         "capability-name": "RA Resolved",
766                         "status": "SUCCESS"
767                     }
768                 },
769                 {
770                     "name": "vlb_int_pktgen_private_ip_0",
771                     "value": "192.168.20.35",
772                     "resource-resolution-data": {
773                         "capability-name": "RA Resolved",
774                         "status": "SUCCESS"
775                     }
776                 },
777                 {
778                     "name": "onap_private_net_id",
779                     "value": "oam_network_qXyY",
780                     "resource-resolution-data": {
781                         "capability-name": "RA Resolved",
782                         "status": "SUCCESS"
783                     }
784                 },
785                 {
786                     "name": "nb_api_version",
787                     "value": "1.2.0",
788                     "resource-resolution-data": {
789                         "capability-name": "RA Resolved",
790                         "status": "SUCCESS"
791                     }
792                 },
793                 {
794                     "name": "vdns_image_name",
795                     "value": "${image_name}",
796                     "resource-resolution-data": {
797                         "capability-name": "RA Resolved",
798                         "status": "SUCCESS"
799                     }
800                 },
801                 {
802                     "name": "vdns_onap_private_ip_0",
803                     "value": "10.0.101.35",
804                     "resource-resolution-data": {
805                         "capability-name": "netbox-ip-assign",
806                         "resource-key": [
807                             {
808                                 "name": "external_key",
809                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87-vdns_onap_private_ip_0"
810                             },
811                             {
812                                 "name": "vnf-id",
813                                 "value": "0e905228-c719-489a-9bcc-4470f3254e87"
814                             },
815                             {
816                                 "name": "service-instance-id",
817                                 "value": "4545562a-cbe3-409a-8227-0b863f5bc34e"
818                             },
819                             {
820                                 "name": "prefix-id",
821                                 "value": "3"
822                             }
823                         ],
824                         "status": "SUCCESS"
825                     }
826                 },
827                 {
828                     "name": "aai-vf-module-put",
829                     "value": "SUCCESS",
830                     "resource-resolution-data": {
831                         "capability-name": "aai-vf-module-put",
832                         "resource-key": [
833                             {
834                                 "name": "vf-module",
835                                 "value": "vf-module"
836                             }
837                         ],
838                         "status": "SUCCESS"
839                     }
840                 },
841                 {
842                     "name": "aic-cloud-region",
843                     "value": "${aic-cloud-region}",
844                     "resource-resolution-data": {
845                         "capability-name": "RA Resolved",
846                         "status": "SUCCESS"
847                     }
848                 },
849                 {
850                     "name": "nfc-function",
851                     "value": "${nf-role}",
852                     "resource-resolution-data": {
853                         "capability-name": "RA Resolved",
854                         "status": "SUCCESS"
855                     }
856                 },
857                 {
858                     "name": "sec_group",
859                     "value": "onap_sg_qXyY",
860                     "resource-resolution-data": {
861                         "capability-name": "RA Resolved",
862                         "status": "SUCCESS"
863                     }
864                 },
865                 {
866                     "name": "vnf_name",
867                     "value": "RegionOne_ONAP-NF_20191010T013003141Z",
868                     "resource-resolution-data": {
869                         "capability-name": "RA Resolved",
870                         "status": "SUCCESS"
871                     }
872                 },
873                 {
874                     "name": "nexus_artifact_repo",
875                     "value": "https://nexus.onap.org",
876                     "resource-resolution-data": {
877                         "capability-name": "RA Resolved",
878                         "status": "SUCCESS"
879                     }
880                 },
881                 {
882                     "name": "public_net_id",
883                     "value": "external",
884                     "resource-resolution-data": {
885                         "capability-name": "RA Resolved",
886                         "status": "SUCCESS"
887                     }
888                 }
889             ]
890         },
891         "tenant": "41d6d38489bd40b09ea8a6b6b852dcbd",
892         "sdnc-generated-cloud-resources": true,
893         "vf-module-topology-identifier": {
894             "vf-module-id": "793df714-106e-40a6-a28a-746b65f9e247",
895             "vf-module-name": "vfModuleName",
896             "vf-module-type": "VlbCds..vdns..module-3"
897         },
898         "aic-cloud-region": "RegionOne"
899     }}
900
901 Search for the reconfiguration parameters in the vf-module-topology.vf-module-parameters.param array. The user should count (starting from 0, as in most programming languages) the number of array elements to determine the exact location of the parameters of interest. For the VNF described in this documentation, the parameters of interest are "vdns_int_private_ip_0" and "vdns_onap_private_ip_0", which correspond to "ip-addr" and "onap-ip-addr" in the scale out request, respectively. As the user can see by counting the number of array locations (starting from 0), "vdns_int_private_ip_0" and "vdns_onap_private_ip_0" are stored at locations 16 and 30, respectively. As such, the complete resolution path to reconfiguration parameters for the VNF described in this documentation is:
902
903 ::
904
905     [{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[16].value","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[30].value"}]
906
907 In future releases, we plan to leverage CDS to model post scaling VNF reconfiguration, so as to remove the dependency from JSON paths and simplify the overall process.
908
909
910 PART 2 - Scale Out Use Case Instantiation
911 -----------------------------------------
912 Note that the postman collection linked at the top of this page, does provide some level of automatic scripting that will automatically get values between request and provision the following queries
913
914 This step is only required if CDS is used.
915
916 GET information from SDC catalogdb
917
918 ::
919
920   curl -X GET \
921     'https://{{k8s}}:30204/sdc/v1/catalog/services' \
922     -H 'Authorization: Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \
923     -H 'X-ECOMP-InstanceID: VID' \
924     -H 'cache-control: no-cache'
925
926
927 In the response you should find values for:
928
929 * service-uuid
930 * service-invariantUUID
931 * service-name
932
933
934 GET informations from SO catalogdb.
935
936 ::
937
938   curl -X GET \
939     'http://{{k8s}}:30744/ecomp/mso/catalog/v2/serviceVnfs?serviceModelName={{service-name}}' \
940     -H 'Authorization: Basic YnBlbDpwYXNzd29yZDEk' \
941     -H 'cache-control: no-cache'
942
943
944 In the response you should find values for:
945
946 * vnf-modelinfo-modelname
947 * vnf-modelinfo-modeluuid
948 * vnf-modelinfo-modelinvariantuuid
949 * vnf-modelinfo-modelcustomizationuuid
950 * vnf-modelinfo-modelinstancename
951 * vnf-vfmodule-0-modelinfo-modelname
952 * vnf-vfmodule-0-modelinfo-modeluuid
953 * vnf-vfmodule-0-modelinfo-modelinvariantuuid
954 * vnf-vfmodule-0-modelinfo-modelcustomizationuuid
955 * vnf-vfmodule-1-modelinfo-modelname
956 * vnf-vfmodule-1-modelinfo-modeluuid
957 * vnf-vfmodule-1-modelinfo-modelinvariantuuid
958 * vnf-vfmodule-1-modelinfo-modelcustomizationuuid
959 * vnf-vfmodule-2-modelinfo-modelname
960 * vnf-vfmodule-2-modelinfo-modeluuid
961 * vnf-vfmodule-2-modelinfo-modelinvariantuuid
962 * vnf-vfmodule-2-modelinfo-modelcustomizationuuid
963 * vnf-vfmodule-3-modelinfo-modelname
964 * vnf-vfmodule-3-modelinfo-modeluuid
965 * vnf-vfmodule-3-modelinfo-modelinvariantuuid
966 * vnf-vfmodule-3-modelinfo-modelcustomizationuuid
967
968
969 Note : all those informations are also available in the TOSCA service template in the SDC
970
971 You need after:
972
973 * the SSH public key value that will allow you to connect to the VM.
974 * the cloudSite name and TenantId where to deploy the service
975 * the name of the security group that will be used in the tenant for your service
976 * the name of the network that will be used to connect your VM
977 * the name of your OpenStack image
978 * the name of your OpenStack VM flavor
979
980 We supposed here that we are using some already declared informations:
981
982 * customer named "Demonstration"
983 * subscriptionServiceType named "vLB"
984 * projectName named "Project-Demonstration"
985 * owningEntityName named "OE-Demonstration"
986 * platformName named "test"
987 * lineOfBusinessName named "someValue"
988
989 Having all those information, you are now able to build the SO Macro request
990 that will instantiate Service, VNF, VF modules and Heat stacks:
991
992 ::
993
994   curl -X POST \
995   'http://{{k8s}}:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances' \
996   -H 'Content-Type: application/json' \
997   -H 'cache-control: no-cache' \
998   -d '{
999    "requestDetails":{
1000       "subscriberInfo":{
1001          "globalSubscriberId":"Demonstration"
1002       },
1003       "requestInfo":{
1004          "suppressRollback":false,
1005          "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
1006          "requestorId":"adt",
1007          "instanceName":"{{cds-instance-name}}",
1008          "source":"VID"
1009       },
1010       "cloudConfiguration":{
1011          "lcpCloudRegionId":"RegionOne",
1012          "tenantId":"41d6d38489bd40b09ea8a6b6b852dcbd",
1013          "cloudOwner":"CloudOwner"
1014       },
1015       "requestParameters":{
1016          "subscriptionServiceType":"vLB",
1017          "userParams":[
1018             {
1019                "Homing_Solution":"none"
1020             },
1021             {
1022                "service":{
1023                   "instanceParams":[
1024
1025                   ],
1026                   "instanceName":"{{cds-instance-name}}",
1027                   "resources":{
1028                      "vnfs":[
1029                         {
1030                            "modelInfo":{
1031                               "modelName":"{{vnf-modelinfo-modelname}}",
1032                               "modelVersionId":"{{vnf-modelinfo-modeluuid}}",
1033                               "modelInvariantUuid":"{{vnf-modelinfo-modelinvariantuuid}}",
1034                               "modelVersion":"1.0",
1035                               "modelCustomizationId":"{{vnf-modelinfo-modelcustomizationuuid}}",
1036                               "modelInstanceName":"{{vnf-modelinfo-modelinstancename}}"
1037                            },
1038                            "cloudConfiguration":{
1039                               "lcpCloudRegionId":"RegionOne",
1040                               "tenantId":"41d6d38489bd40b09ea8a6b6b852dcbd"
1041                            },
1042                            "platform":{
1043                               "platformName":"test"
1044                            },
1045                            "lineOfBusiness":{
1046                               "lineOfBusinessName":"LOB-Demonstration"
1047                            },
1048                            "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
1049                            "instanceName":"{{vnf-modelinfo-modelinstancename}}",
1050                            "instanceParams":[
1051                               {
1052                                  "onap_private_net_id":"oam_network_qXyY",
1053                                  "dcae_collector_ip":"10.12.5.214",
1054                                  "onap_private_subnet_id":"oam_network_qXyY",
1055                                  "pub_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh",
1056                                  "sec_group":"onap_sg_qXyY",
1057                                  "install_script_version":"1.5.0",
1058                                  "demo_artifacts_version":"1.5.0",
1059                                  "cloud_env":"openstack",
1060                                  "flavor_name":"m1.medium",
1061                                  "public_net_id":"external",
1062                                  "image_name":"ubuntu-16-04-cloud-amd64"
1063                               }
1064                            ],
1065                            "vfModules":[
1066                               {
1067                                  "modelInfo":{
1068                                     "modelName":"{{vnf-vfmodule-0-modelinfo-modelname}}",
1069                                     "modelVersionId":"{{vnf-vfmodule-0-modelinfo-modeluuid}}",
1070                                     "modelInvariantUuid":"{{vnf-vfmodule-0-modelinfo-modelinvariantuuid}}",
1071                                     "modelVersion":"1",
1072                                     "modelCustomizationId":"{{vnf-vfmodule-0-modelinfo-modelcustomizationuuid}}"
1073                                  },
1074                                  "instanceName":"{{vnf-vfmodule-0-modelinfo-modelname}}",
1075                                  "instanceParams":[
1076                                     {
1077                                        "sec_group":"onap_sg_imAd",
1078                                        "public_net_id":"external"
1079                                     }
1080                                  ]
1081                               },
1082                               {
1083                                  "modelInfo":{
1084                                     "modelName":"{{vnf-vfmodule-1-modelinfo-modelname}}",
1085                                     "modelVersionId":"{{vnf-vfmodule-1-modelinfo-modeluuid}}",
1086                                     "modelInvariantUuid":"{{vnf-vfmodule-1-modelinfo-modelinvariantuuid}}",
1087                                     "modelVersion":"1",
1088                                     "modelCustomizationId":"{{vnf-vfmodule-1-modelinfo-modelcustomizationuuid}}"
1089                                  },
1090                                  "instanceName":"{{vnf-vfmodule-1-modelinfo-modelname}}",
1091                                  "instanceParams":[
1092                                     {
1093                                        "sec_group":"onap_sg_imAd",
1094                                        "public_net_id":"external"
1095                                     }
1096                                  ]
1097                               },
1098                               {
1099                                  "modelInfo":{
1100                                     "modelName":"{{vnf-vfmodule-2-modelinfo-modelname}}",
1101                                     "modelVersionId":"{{vnf-vfmodule-2-modelinfo-modeluuid}}",
1102                                     "modelInvariantUuid":"{{vnf-vfmodule-2-modelinfo-modelinvariantuuid}}",
1103                                     "modelVersion":"1",
1104                                     "modelCustomizationId":"{{vnf-vfmodule-2-modelinfo-modelcustomizationuuid}}"
1105                                  },
1106                                  "instanceName":"{{vnf-vfmodule-2-modelinfo-modelname}}",
1107                                  "instanceParams":[
1108                                     {
1109                                        "sec_group":"onap_sg_imAd",
1110                                        "public_net_id":"external"
1111                                     }
1112                                  ]
1113                               },
1114                               {
1115                                  "modelInfo":{
1116                                     "modelName":"{{vnf-vfmodule-3-modelinfo-modelname}}",
1117                                     "modelVersionId":"{{vnf-vfmodule-3-modelinfo-modeluuid}}",
1118                                     "modelInvariantUuid":"{{vnf-vfmodule-3-modelinfo-modelinvariantuuid}}",
1119                                     "modelVersion":"1",
1120                                     "modelCustomizationId":"{{vnf-vfmodule-3-modelinfo-modelcustomizationuuid}}"
1121                                  },
1122                                  "instanceName":"{{vnf-vfmodule-3-modelinfo-modelname}}",
1123                                  "instanceParams":[
1124                                     {
1125                                        "sec_group":"onap_sg_imAd",
1126                                        "public_net_id":"external"
1127                                     }
1128                                  ]
1129                               }
1130                            ]
1131                         }
1132                      ]
1133                   },
1134                   "modelInfo":{
1135                      "modelVersion":"1.0",
1136                      "modelVersionId":"{{service-uuid}}",
1137                      "modelInvariantId":"{{service-invariantUUID}}",
1138                      "modelName":"{{service-name}}",
1139                      "modelType":"service"
1140                   }
1141                }
1142             }
1143          ],
1144          "aLaCarte":false
1145       },
1146       "project":{
1147          "projectName":"Project-Demonstration"
1148       },
1149       "owningEntity":{
1150         "owningEntityId":"6f6c49d0-8a8c-4704-9174-321bcc526cc0",
1151         "owningEntityName":"OE-Demonstration"
1152       },
1153       "modelInfo":{
1154         "modelVersion":"1.0",
1155         "modelVersionId":"{{service-uuid}}",
1156         "modelInvariantId":"{{service-invariantUUID}}",
1157         "modelName":"{{service-name}}",
1158         "modelType":"service"}}}'
1159
1160 Note that the "dcae_collector_ip" parameter has to contain the IP address of one of the Kubernetes cluster nodes, 10.12.5.214 in the example above. In the response to the Macro request, the user will obtain a requestId that will be usefulto follow the instantiation request status in the ONAP SO:
1161
1162 ::
1163
1164   curl -X GET \
1165     'http://{{k8s}}:30086/infraActiveRequests/{{requestid}}' \
1166     -H 'cache-control: no-cache'
1167
1168
1169
1170
1171
1172 PART 3 - Post Instantiation Operations
1173 --------------------------------------
1174
1175 3-1 Post Instantiation VNF configuration
1176 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1177 CDS executes post-instantiation VNF configuration if the "skip-post-instantiation" flag in the SDC service model is set to false, which is the default behavior. Manual post-instantiation configuration is necessary if the "skip-post-instantiation" flag in the service model is set to true or if the VNF is instantiated using the preload approach, which doesn't include CDS. Regardless, this step is NOT required during scale out operations, as VNF reconfiguration will be triggered by SO and executed by APPC.
1178
1179 If VNF post instantiation is executed manually, in order to change the state of the vLB the users should run the following REST call, replacing the IP addresses in the VNF endpoint and JSON object to match the private IP addresses of their vDNS instance:
1180
1181 ::
1182
1183   curl -X PUT \
1184   http://10.12.5.78:8183/restconf/config/vlb-business-vnf-onap-plugin:vlb-business-vnf-onap-plugin/vdns-instances/vdns-instance/192.168.10.59 \
1185   -H 'Accept: application/json' \
1186   -H 'Content-Type: application/json' \
1187   -H 'Postman-Token: a708b064-adb1-4804-89a7-ee604f5fe76f' \
1188   -H 'cache-control: no-cache' \
1189   -d '{
1190     "vdns-instance": [
1191         {
1192             "ip-addr": "192.168.10.59",
1193             "oam-ip-addr": "10.0.101.49",
1194             "enabled": true
1195         }
1196     ]
1197   }'
1198
1199 At this point, the VNF is fully set up.
1200
1201
1202 3-2 Updating AAI with VNF resources
1203 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1204 To allow automated scale out via closed loop, the users need to inventory the VNF resources in AAI. This is done by running the heatbridge python script in /root/oom/kubernetes/robot in the Rancher VM in the Kubernetes cluster:
1205
1206 ::
1207
1208     ./demo-k8s.sh onap heatbridge <vLB stack_name in OpenStack> <service_instance_id> vLB vlb_onap_private_ip_0
1209
1210 Note that "vlb_onap_private_ip_0" used in the heatbridge call is the actual parameter name, not its value (e.g. the actual IP address). Heatbridge is needed for control loops because DCAE and Policy runs queries against AAI using vServer names as key.
1211
1212
1213 PART 4 - Triggering Scale Out Manually
1214 --------------------------------------
1215
1216 For scale out with manual trigger, VID is not supported at this time. Users can run the use case by directly calling SO APIs:
1217
1218 ::
1219
1220   curl -X POST \
1221   http://<Any_K8S_Node_IP_Address>:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances/7d3ca782-c486-44b3-9fe5-39f322d8ee80/vnfs/9d33cf2d-d6aa-4b9e-a311-460a6be5a7de/vfModules/scaleOut \
1222   -H 'Accept: application/json' \
1223   -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
1224   -H 'Cache-Control: no-cache' \
1225   -H 'Connection: keep-alive' \
1226   -H 'Content-Type: application/json' \
1227   -H 'Postman-Token: 12f2601a-4eb2-402c-a51a-f29502359501,9befda68-b2c9-4e7a-90ca-1be9c24ef664' \
1228   -H 'User-Agent: PostmanRuntime/7.15.0' \
1229   -H 'accept-encoding: gzip, deflate' \
1230   -H 'cache-control: no-cache' \
1231   -H 'content-length: 2422' \
1232   -H 'cookie: JSESSIONID=B3BA24216367F9D39E3DF5E8CBA4BC64' \
1233   -b JSESSIONID=B3BA24216367F9D39E3DF5E8CBA4BC64 \
1234   -d '{
1235     "requestDetails": {
1236         "modelInfo": {
1237             "modelCustomizationName": "VdnsloadbalancerCds..vdns..module-3",
1238             "modelCustomizationId": "ded42059-2f35-42d4-848b-16e1ab1ad197",
1239             "modelInvariantId": "2815d321-c6b4-4f21-b7f7-fa5adf8ed7d9",
1240             "modelVersionId": "524e34ed-9789-453e-ab73-8eff30eafef3",
1241             "modelName": "VdnsloadbalancerCds..vdns..module-3",
1242             "modelType": "vfModule",
1243             "modelVersion": "1"
1244         },
1245         "cloudConfiguration": {
1246             "lcpCloudRegionId": "RegionOne",
1247             "tenantId": "d570c718cbc545029f40e50b75eb13df",
1248             "cloudOwner": "CloudOwner"
1249         },
1250         "requestInfo": {
1251             "instanceName": "vDNS-VM-02",
1252             "source": "VID",
1253             "suppressRollback": false,
1254             "requestorId": "demo"
1255         },
1256         "requestParameters": {
1257             "userParams": []
1258         },
1259         "relatedInstanceList": [
1260             {
1261                 "relatedInstance": {
1262                     "instanceId": "7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1263                     "modelInfo": {
1264                         "modelType": "service",
1265                         "modelInvariantId": "dfabdcae-cf50-4801-9885-9a3a9cc07e6f",
1266                         "modelVersionId": "ee55b537-7be5-4377-93c1-5d92931b6a78",
1267                         "modelName": "vLoadBalancerCDS",
1268                         "modelVersion": "1.0"
1269                     }
1270                 }
1271             },
1272             {
1273                 "relatedInstance": {
1274                     "instanceId": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1275                     "modelInfo": {
1276                         "modelType": "vnf",
1277                         "modelInvariantId": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1278                         "modelVersionId": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1279                         "modelName": "vLoadBalancerCDS",
1280                         "modelVersion": "1.0",
1281                         "modelCustomizationId": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7"
1282                     }
1283                 }
1284             }
1285         ],
1286         "configurationParameters": [
1287             {
1288                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[17].value",
1289                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[31].value"
1290             }
1291         ]
1292     }
1293   }'
1294
1295
1296 To fill in the JSON object, users need to download the Service Model TOSCA template from the SDC Portal using one of the standard SDC users (for example user: cs0008, password: demo123456!). After logging to SDC, the user should select from the catalog the vLB service that they created, click the "TOSCA Artifacts" link on the left, and finally the download button on the right, as shown in the figure below:
1297
1298 .. figure:: files/scaleout/tosca_template_fig.png
1299    :align: center
1300
1301 For the example described below, users can refer to the TOSCA template linked at the top of the page. The template contains all the model (invariant/version/customization) IDs of service, VNF, and VF modules that the input request to SO needs.
1302
1303 The values of modelInvariantId, modelVersionId, and modelName in the relatedInstance item identified by "modelType": "service" in the JSON request to SO have to match invariantUUID, UUID, and name, respectively, in the TOSCA template:
1304 ::
1305
1306             {
1307                 "relatedInstance": {
1308                     "instanceId": "7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1309                     "modelInfo": {
1310                         "modelType": "service",
1311                         "modelInvariantId": "dfabdcae-cf50-4801-9885-9a3a9cc07e6f",
1312                         "modelVersionId": "ee55b537-7be5-4377-93c1-5d92931b6a78",
1313                         "modelName": "vLoadBalancerCDS",
1314                         "modelVersion": "1.0"
1315                     }
1316                 }
1317             }
1318
1319 .. figure:: files/scaleout/service.png
1320    :align: center
1321
1322
1323 The values of modelInvariantId, modelVersionId, modelName, and modelVersion in the relatedInstance item identified by "modelType": "vnf" in the JSON request to SO have to match invariantUUID, UUID, name, and version, respectively, in the TOSCA template:
1324
1325 ::
1326
1327             {
1328                 "relatedInstance": {
1329                     "instanceId": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1330                     "modelInfo": {
1331                         "modelType": "vnf",
1332                         "modelInvariantId": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1333                         "modelVersionId": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1334                         "modelName": "vLoadBalancerCDS",
1335                         "modelVersion": "1.0",
1336                         "modelCustomizationId": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7"
1337                     }
1338                 }
1339             }
1340
1341 .. figure:: files/scaleout/vnf.png
1342    :align: center
1343
1344
1345 The modelCustomizationId, modelInvariantId, modelVersionId, modelName, and modelVersion in the modelInfo item identified by "modelType": "vfModule" in the JSON request to SO have to match vfModuleModelCustomizationUUID, vfModuleModelInvariantUUID, vfModuleModelUUID, vfModuleModelName, and vfModuleModelVersion, respectively, in the TOSCA template. The modelCustomizationName parameter in the SO object can be set as the modelName parameter in the same JSON object:
1346
1347 ::
1348
1349         "modelInfo": {
1350             "modelCustomizationName": "Vloadbalancercds..vdns..module-3",
1351             "modelCustomizationId": "ded42059-2f35-42d4-848b-16e1ab1ad197",
1352             "modelInvariantId": "2815d321-c6b4-4f21-b7f7-fa5adf8ed7d9",
1353             "modelVersionId": "524e34ed-9789-453e-ab73-8eff30eafef3",
1354             "modelName": "Vloadbalancercds..vdns..module-3",
1355             "modelType": "vfModule",
1356             "modelVersion": "1"
1357         }
1358
1359 The vLB-vDNS-vPacketGenerator VNF that we use to describe the scale out use case supports the scaling of the vDNS VF module only. As such, in the TOSCA template users should refer to the section identified by "vfModuleModelName": "Vloadbalancercds..vdns..module-3", as highlighted below:
1360
1361 .. figure:: files/scaleout/service.png
1362    :align: center
1363
1364
1365 Note that both Service and VNF related instances have a field called "instanceId" that represent the Service and VNF instance ID, respectively. These IDs are assigned at Service and VNF instantiation time and can be retrieved from AAI, querying for generic VNF objects:
1366
1367 ::
1368
1369     curl -k -X GET \
1370   https://<Any_K8S_Node_IP_Address>:30233/aai/v16/network/generic-vnfs \
1371   -H 'Accept: application/json' \
1372   -H 'Authorization: Basic QUFJOkFBSQ==' \
1373   -H 'Content-Type: application/json' \
1374   -H 'X-FromAppId: AAI' \
1375   -H 'X-TransactionId: get_aai_subscr'
1376
1377 From the list of VNFs reported by AAI, search for the name of the VNF that was previously instantiated, for example "vLB_VNF_01" in the example below:
1378
1379 ::
1380
1381         {
1382             "vnf-id": "9d33cf2d-d6aa-4b9e-a311-460a6be5a7de",
1383             "vnf-name": "vLB_VNF_01",
1384             "vnf-type": "vLoadBalancer/vLoadBalancer 0",
1385             "prov-status": "ACTIVE",
1386             "equipment-role": "",
1387             "orchestration-status": "Active",
1388             "ipv4-oam-address": "10.0.220.10",
1389             "in-maint": true,
1390             "is-closed-loop-disabled": false,
1391             "resource-version": "1565817789379",
1392             "model-invariant-id": "a77f9280-5c02-46cd-b1fc-855975db9df9",
1393             "model-version-id": "ff0e99ce-a521-44b5-b11b-da7e07ac83fc",
1394             "model-customization-id": "b8b8a25d-19de-4581-bb63-f2dc8c0d79a7",
1395             "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/7d3ca782-c486-44b3-9fe5-39f322d8ee80/service-data/vnfs/vnf/9d33cf2d-d6aa-4b9e-a311-460a6be5a7de/vnf-data/vnf-topology/",
1396             "relationship-list": {
1397                 "relationship": [
1398                     {
1399                         "related-to": "service-instance",
1400                         "relationship-label": "org.onap.relationships.inventory.ComposedOf",
1401                         "related-link": "/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vRAR/service-instances/service-instance/7d3ca782-c486-44b3-9fe5-39f322d8ee80",
1402                         "relationship-data": [
1403                             {
1404                                 "relationship-key": "customer.global-customer-id",
1405                                 "relationship-value": "Demonstration"
1406                             },
1407                             {
1408                                 "relationship-key": "service-subscription.service-type",
1409                                 "relationship-value": "vLB"
1410                             },
1411                             {
1412                                 "relationship-key": "service-instance.service-instance-id",
1413                                 "relationship-value": "7d3ca782-c486-44b3-9fe5-39f322d8ee80"
1414                             }
1415                         ],
1416                         "related-to-property": [
1417                             {
1418                                 "property-key": "service-instance.service-instance-name",
1419                                 "property-value": "vLB-Service-0814-1"
1420                             }
1421                         ]
1422                     }
1423                     ...
1424          }
1425
1426 To identify the VNF ID, look for the "vnf-id" parameter at the top of the JSON object, while to determine the Service ID, look for the "relationship-value" parameter corresponding to the "relationship-key": "service-instance.service-instance-id" item in the "relationship-data" list. In the example above, the Service instance ID is 7d3ca782-c486-44b3-9fe5-39f322d8ee80, while the VNF ID is 9d33cf2d-d6aa-4b9e-a311-460a6be5a7de.
1427
1428 These IDs are also used in the URL request to SO:
1429
1430 ::
1431
1432     http://<Any_K8S_Node_IP_Address>:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances/7d3ca782-c486-44b3-9fe5-39f322d8ee80/vnfs/9d33cf2d-d6aa-4b9e-a311-460a6be5a7de/vfModules/scaleOut
1433
1434
1435 Finally, the "configurationParameters" section in the JSON request to SO contains the parameters that will be used to reconfigure the VNF after scaling. Please see Section 1-7 for an in-depth description of how to set the parameters correctly.
1436
1437 ::
1438
1439     "configurationParameters": [
1440             {
1441                 "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
1442                 "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
1443             }
1444     ]
1445
1446
1447 PART 5 - Running the Scale Out Use Case with Configuration Preload
1448 ------------------------------------------------------------------
1449
1450 While CDS can be used to model and automate the generation of cloud configuration for VNF instantiation, the manual preload approach is still supported for scale out with manual trigger (no closed loop). Note that preload operations must be executed before VF modules are created or scaled, as the instantiation process will use the preload to determine the VF module configuration.
1451
1452 The procedure is similar to one described above, with some minor changes:
1453
1454 1) **Service Design and Creation**: The heat template used to create a vendor software product in SDC is the same. However, during property assignment (Section 1-2) "sdnc_artifact_name", "sdnc_model_version", "sdnc_model_name" **must be** left blank, as they are used for CDS only.
1455
1456 2) As closed loop with preload is not supported for scale out, DCAE blueprint and Policy onboarding (Section 1-2), deployment of naming policy (Section 1-3), and closed loop design and deployment from CLAMP (Section 1-4) are not necessary.
1457
1458 3) **Creation of VNF template with CDT** works as described in Section 1-5.
1459
1460 4) **Controller type selection** in SO works as described in Section 1-6.
1461
1462 5) **VNF instantiation from VID**: users can use VID to create the service, the VNF, and instantiate the VF modules. In the VID main page, users should select GR API (this should be the default option).
1463
1464 .. figure:: files/scaleout/vid.png
1465    :align: center
1466
1467 Based on the Heat template structure, there are four VF modules:
1468
1469   * module-0: base module that contains resources, such as internal private networks and public key, shared across the VNF elements
1470   * module-1: vLB resource descriptor
1471   * module-2: vPacketGen resource descriptor
1472   * module-3: vDNS resource descriptor
1473
1474 These VF modules have to be installed in the following order, so as to satisfy heat dependencies: module-0, module-1, module-2, module-3. The parameters defined in the Heat environment files can be overridden by loading cloud configuration to SDNC before the VF modules are instantiated. See example of preloads below. They need to be customized based on the OpenStack cloud and execution environment in which the VF modules are going to be instantiated.
1475
1476 Module-0 Preload
1477 ~~~~~~~~~~~~~~~~
1478
1479 ::
1480
1481     curl -X POST \
1482   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1483   -H 'Content-Type: application/json' \
1484   -H 'Postman-Token: 0a7abc62-9d8f-4f63-8b05-db7cc4c3e28b' \
1485   -H 'cache-control: no-cache' \
1486   -d '{
1487     "input": {
1488         "preload-vf-module-topology-information": {
1489             "vf-module-topology": {
1490                 "vf-module-topology-identifier": {
1491                     "vf-module-name": "vNetworks-0211-1"
1492                 },
1493                 "vf-module-parameters": {
1494                     "param": [
1495                         {
1496                             "name": "vlb_private_net_id",
1497                             "value": "vLBMS_zdfw1lb01_private_ms"
1498                         },
1499                         {
1500                             "name": "pktgen_private_net_id",
1501                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1502                         },
1503                         {
1504                             "name": "vlb_private_net_cidr",
1505                             "value": "192.168.10.0/24"
1506                         },
1507                         {
1508                             "name": "pktgen_private_net_cidr",
1509                             "value": "192.168.9.0/24"
1510                         },
1511                         {
1512                             "name": "vlb_0_int_pktgen_private_port_0_mac",
1513                             "value": "fa:16:3e:00:01:10"
1514                         },
1515                         {
1516                             "name": "vpg_0_int_pktgen_private_port_0_mac",
1517                             "value": "fa:16:3e:00:01:20"
1518                         },
1519                         {
1520                             "name": "vnf_id",
1521                             "value": "vLoadBalancerMS"
1522                         },
1523                         {
1524                             "name": "vnf_name",
1525                             "value": "vLBMS"
1526                         },
1527                         {
1528                             "name": "key_name",
1529                             "value": "vlb_key"
1530                         },
1531                         {
1532                             "name": "pub_key",
1533                             "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN"
1534                         }
1535                     ]
1536                 }
1537             },
1538             "vnf-topology-identifier-structure": {
1539                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1540                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1541             },
1542             "vnf-resource-assignments": {
1543                 "availability-zones": {
1544                     "availability-zone": [
1545                         "nova"
1546                     ],
1547                     "max-count": 1
1548                 },
1549                 "vnf-networks": {
1550                     "vnf-network": []
1551                 }
1552             }
1553         },
1554         "request-information": {
1555             "request-id": "robot12",
1556             "order-version": "1",
1557             "notification-url": "openecomp.org",
1558             "order-number": "1",
1559             "request-action": "PreloadVfModuleRequest"
1560         },
1561         "sdnc-request-header": {
1562             "svc-request-id": "robot12",
1563             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1564             "svc-action": "reserve"
1565         }
1566     }
1567   }'
1568
1569
1570 Module-1 Preload
1571 ~~~~~~~~~~~~~~~~
1572
1573 ::
1574
1575     curl -X POST \
1576   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1577   -H 'Content-Type: application/json' \
1578   -H 'Postman-Token: 662914ac-29fc-414d-8823-1691fb2c718a' \
1579   -H 'cache-control: no-cache' \
1580   -d '{
1581     "input": {
1582         "preload-vf-module-topology-information": {
1583             "vf-module-topology": {
1584                 "vf-module-topology-identifier": {
1585                     "vf-module-name": "vLoadBalancer-0211-1"
1586                 },
1587                 "vf-module-parameters": {
1588                     "param": [
1589                         {
1590                             "name": "vlb_image_name",
1591                             "value": "ubuntu-16-04-cloud-amd64"
1592                         },
1593                         {
1594                             "name": "vlb_flavor_name",
1595                             "value": "m1.medium"
1596                         },
1597                         {
1598                             "name": "public_net_id",
1599                             "value": "public"
1600                         },
1601                         {
1602                             "name": "int_private_net_id",
1603                             "value": "vLBMS_zdfw1lb01_private_ms"
1604                         },
1605                         {
1606                             "name": "int_private_subnet_id",
1607                             "value": "vLBMS_zdfw1lb01_private_sub_ms"
1608                         },
1609                         {
1610                             "name": "int_pktgen_private_net_id",
1611                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1612                         },
1613                         {
1614                             "name": "int_pktgen_private_subnet_id",
1615                             "value": "vLBMS_zdfw1pktgen01_private_sub_ms"
1616                         },
1617                         {
1618                             "name": "onap_private_net_id",
1619                             "value": "oam_onap_vnf_test"
1620                         },
1621                         {
1622                             "name": "onap_private_subnet_id",
1623                             "value": "oam_onap_vnf_test"
1624                         },
1625                         {
1626                             "name": "vlb_private_net_cidr",
1627                             "value": "192.168.10.0/24"
1628                         },
1629                         {
1630                             "name": "pktgen_private_net_cidr",
1631                             "value": "192.168.9.0/24"
1632                         },
1633                         {
1634                             "name": "onap_private_net_cidr",
1635                             "value": "10.0.0.0/16"
1636                         },
1637                         {
1638                             "name": "vlb_int_private_ip_0",
1639                             "value": "192.168.10.111"
1640                         },
1641                         {
1642                             "name": "vlb_onap_private_ip_0",
1643                             "value": "10.0.150.1"
1644                         },
1645                         {
1646                             "name": "vlb_int_pktgen_private_ip_0",
1647                             "value": "192.168.9.111"
1648                         },
1649                         {
1650                             "name": "vdns_int_private_ip_0",
1651                             "value": "192.168.10.211"
1652                         },
1653                         {
1654                             "name": "vdns_onap_private_ip_0",
1655                             "value": "10.0.150.3"
1656                         },
1657                         {
1658                             "name": "vpg_int_pktgen_private_ip_0",
1659                             "value": "192.168.9.110"
1660                         },
1661                         {
1662                             "name": "vpg_onap_private_ip_0",
1663                             "value": "10.0.150.2"
1664                         },
1665                         {
1666                             "name": "vlb_name_0",
1667                             "value": "vlb-0211-1"
1668                         },
1669                         {
1670                             "name": "vlb_0_mac_address",
1671                             "value": "fa:16:3e:00:01:10"
1672                         },
1673                         {
1674                             "name": "vpg_0_mac_address",
1675                             "value": "fa:16:3e:00:01:20"
1676                         },
1677                         {
1678                             "name": "vip",
1679                             "value": "192.168.9.112"
1680                         },
1681                         {
1682                             "name": "gre_ipaddr",
1683                             "value": "192.168.10.112"
1684                         },
1685                         {
1686                             "name": "vnf_id",
1687                             "value": "vLoadBalancerMS"
1688                         },
1689                         {
1690                             "name": "vf_module_id",
1691                             "value": "vLoadBalancerMS"
1692                         },
1693                         {
1694                             "name": "vnf_name",
1695                             "value": "vLBMS"
1696                         },
1697                         {
1698                             "name": "dcae_collector_ip",
1699                             "value": "10.12.5.20"
1700                         },
1701                         {
1702                             "name": "dcae_collector_port",
1703                             "value": "30235"
1704                         },
1705                         {
1706                             "name": "demo_artifacts_version",
1707                             "value": "1.6.0-SNAPSHOT"
1708                         },
1709                         {
1710                             "name": "install_script_version",
1711                             "value": "1.6.0-SNAPSHOT"
1712                         },
1713                         {
1714                             "name": "nb_api_version",
1715                             "value": "1.2.0"
1716                         },
1717                         {
1718                             "name": "keypair",
1719                             "value": "vlb_key"
1720                         },
1721                         {
1722                             "name": "cloud_env",
1723                             "value": "openstack"
1724                         },
1725                         {
1726                             "name": "nexus_artifact_repo",
1727                             "value": "https://nexus.onap.org"
1728                         },
1729                         {
1730                             "name": "sec_group",
1731                             "value": "default"
1732                         }
1733                     ]
1734                 }
1735             },
1736             "vnf-topology-identifier-structure": {
1737                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1738                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1739             },
1740             "vnf-resource-assignments": {
1741                 "availability-zones": {
1742                     "availability-zone": [
1743                         "nova"
1744                     ],
1745                     "max-count": 1
1746                 },
1747                 "vnf-networks": {
1748                     "vnf-network": []
1749                 }
1750             }
1751         },
1752         "request-information": {
1753             "request-id": "robot12",
1754             "order-version": "1",
1755             "notification-url": "openecomp.org",
1756             "order-number": "1",
1757             "request-action": "PreloadVfModuleRequest"
1758         },
1759         "sdnc-request-header": {
1760             "svc-request-id": "robot12",
1761             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1762             "svc-action": "reserve"
1763         }
1764     }
1765   }'
1766
1767
1768 Module-2 Preload
1769 ~~~~~~~~~~~~~~~~
1770 ::
1771
1772
1773     curl -X POST \
1774   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1775   -H 'Content-Type: application/json' \
1776   -H 'Postman-Token: 5f2490b3-6e4a-4512-9a0d-0aa6f6fa0ea8' \
1777   -H 'cache-control: no-cache' \
1778   -d '{
1779     "input": {
1780         "preload-vf-module-topology-information": {
1781             "vf-module-topology": {
1782                 "vf-module-topology-identifier": {
1783                     "vf-module-name": "vPacketGen-0211-1"
1784                 },
1785                 "vf-module-parameters": {
1786                     "param": [
1787                         {
1788                             "name": "vpg_image_name",
1789                             "value": "ubuntu-16-04-cloud-amd64"
1790                         },
1791                         {
1792                             "name": "vpg_flavor_name",
1793                             "value": "m1.medium"
1794                         },
1795                         {
1796                             "name": "public_net_id",
1797                             "value": "public"
1798                         },
1799                         {
1800                             "name": "int_pktgen_private_net_id",
1801                             "value": "vLBMS_zdfw1pktgen01_private_ms"
1802                         },
1803                         {
1804                             "name": "int_pktgen_private_subnet_id",
1805                             "value": "vLBMS_zdfw1pktgen01_private_sub_ms"
1806                         },
1807                         {
1808                             "name": "onap_private_net_id",
1809                             "value": "oam_onap_vnf_test"
1810                         },
1811                         {
1812                             "name": "onap_private_subnet_id",
1813                             "value": "oam_onap_vnf_test"
1814                         },
1815                         {
1816                             "name": "pktgen_private_net_cidr",
1817                             "value": "192.168.9.0/24"
1818                         },
1819                         {
1820                             "name": "onap_private_net_cidr",
1821                             "value": "10.0.0.0/16"
1822                         },
1823                         {
1824                             "name": "vlb_int_pktgen_private_ip_0",
1825                             "value": "192.168.9.111"
1826                         },
1827                         {
1828                             "name": "vpg_int_pktgen_private_ip_0",
1829                             "value": "192.168.9.110"
1830                         },
1831                         {
1832                             "name": "vpg_onap_private_ip_0",
1833                             "value": "10.0.150.2"
1834                         },
1835                         {
1836                             "name": "vpg_name_0",
1837                             "value": "vpg-0211-1"
1838                         },
1839                         {
1840                             "name": "vlb_0_mac_address",
1841                             "value": "fa:16:3e:00:01:10"
1842                         },
1843                         {
1844                             "name": "vpg_0_mac_address",
1845                             "value": "fa:16:3e:00:01:20"
1846                         },
1847                         {
1848                             "name": "pg_int",
1849                             "value": "192.168.9.109"
1850                         },
1851                         {
1852                             "name": "vnf_id",
1853                             "value": "vLoadBalancerMS"
1854                         },
1855                         {
1856                             "name": "vf_module_id",
1857                             "value": "vLoadBalancerMS"
1858                         },
1859                         {
1860                             "name": "vnf_name",
1861                             "value": "vLBMS"
1862                         },
1863                         {
1864                             "name": "demo_artifacts_version",
1865                             "value": "1.6.0-SNAPSHOT"
1866                         },
1867                         {
1868                             "name": "install_script_version",
1869                             "value": "1.6.0-SNAPSHOT"
1870                         },
1871                         {
1872                             "name": "nb_api_version",
1873                             "value": "1.2.0"
1874                         },
1875                         {
1876                             "name": "keypair",
1877                             "value": "vlb_key"
1878                         },
1879                         {
1880                             "name": "cloud_env",
1881                             "value": "openstack"
1882                         },
1883                         {
1884                             "name": "nexus_artifact_repo",
1885                             "value": "https://nexus.onap.org"
1886                         },
1887                         {
1888                             "name": "sec_group",
1889                             "value": "default"
1890                         }
1891                     ]
1892                 }
1893             },
1894             "vnf-topology-identifier-structure": {
1895                 "vnf-name": "vLoadBalancer-Vnf-0211-1",
1896                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
1897             },
1898             "vnf-resource-assignments": {
1899                 "availability-zones": {
1900                     "availability-zone": [
1901                         "nova"
1902                     ],
1903                     "max-count": 1
1904                 },
1905                 "vnf-networks": {
1906                     "vnf-network": []
1907                 }
1908             }
1909         },
1910         "request-information": {
1911             "request-id": "robot12",
1912             "order-version": "1",
1913             "notification-url": "openecomp.org",
1914             "order-number": "1",
1915             "request-action": "PreloadVfModuleRequest"
1916         },
1917         "sdnc-request-header": {
1918             "svc-request-id": "robot12",
1919             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
1920             "svc-action": "reserve"
1921         }
1922     }
1923  }'
1924
1925
1926 Module-3 Preload
1927 ~~~~~~~~~~~~~~~~
1928
1929 ::
1930
1931     curl -X POST \
1932   http://<Any_K8S_Node_IP_Address>:30202/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
1933   -H 'Content-Type: application/json' \
1934   -H 'Postman-Token: fd0a4706-f955-490a-875e-08ddd8fe002e' \
1935   -H 'cache-control: no-cache' \
1936   -d '{
1937     "input": {
1938         "preload-vf-module-topology-information": {
1939             "vf-module-topology": {
1940                 "vf-module-topology-identifier": {
1941                     "vf-module-name": "vDNS-0125-1"
1942                 },
1943                 "vf-module-parameters": {
1944                     "param": [
1945                         {
1946                             "name": "vdns_image_name",
1947                             "value": "ubuntu-16-04-cloud-amd64"
1948                         },
1949                         {
1950                             "name": "vdns_flavor_name",
1951                             "value": "m1.medium"
1952                         },
1953                         {
1954                             "name": "public_net_id",
1955                             "value": "public"
1956                         },
1957                         {
1958                             "name": "int_private_net_id",
1959                             "value": "vLBMS_zdfw1lb01_private"
1960                         },
1961                         {
1962                             "name": "int_private_subnet_id",
1963                             "value": "vLBMS_zdfw1lb01_private_sub_ms"
1964                         },
1965                         {
1966                             "name": "onap_private_net_id",
1967                             "value": "oam_onap_vnf_test"
1968                         },
1969                         {
1970                             "name": "onap_private_subnet_id",
1971                             "value": "oam_onap_vnf_test"
1972                         },
1973                         {
1974                             "name": "vlb_private_net_cidr",
1975                             "value": "192.168.10.0/24"
1976                         },
1977                         {
1978                             "name": "onap_private_net_cidr",
1979                             "value": "10.0.0.0/16"
1980                         },
1981                         {
1982                             "name": "vlb_int_private_ip_0",
1983                             "value": "192.168.10.111"
1984                         },
1985                         {
1986                             "name": "vlb_onap_private_ip_0",
1987                             "value": "10.0.150.1"
1988                         },
1989                         {
1990                             "name": "vlb_int_pktgen_private_ip_0",
1991                             "value": "192.168.9.111"
1992                         },
1993                         {
1994                             "name": "vdns_int_private_ip_0",
1995                             "value": "192.168.10.212"
1996                         },
1997                         {
1998                             "name": "vdns_onap_private_ip_0",
1999                             "value": "10.0.150.4"
2000                         },
2001                         {
2002                             "name": "vdns_name_0",
2003                             "value": "vdns-0211-1"
2004                         },
2005                         {
2006                             "name": "vnf_id",
2007                             "value": "vLoadBalancerMS"
2008                         },
2009                         {
2010                             "name": "vf_module_id",
2011                             "value": "vLoadBalancerMS"
2012                         },
2013                         {
2014                             "name": "vnf_name",
2015                             "value": "vLBMS"
2016                         },
2017                         {
2018                             "name": "install_script_version",
2019                             "value": "1.6.0-SNAPSHOT"
2020                         },
2021                         {
2022                             "name": "nb_api_version",
2023                             "value": "1.2.0"
2024                         },
2025                         {
2026                             "name": "keypair",
2027                             "value": "vlb_key"
2028                         },
2029                         {
2030                             "name": "cloud_env",
2031                             "value": "openstack"
2032                         },
2033                         {
2034                             "name": "sec_group",
2035                             "value": "default"
2036                         },
2037                         {
2038                             "name": "nexus_artifact_repo",
2039                             "value": "https://nexus.onap.org"
2040                         }
2041                     ]
2042                 }
2043             },
2044             "vnf-topology-identifier-structure": {
2045                 "vnf-name": "vLoadBalancer-Vnf-0125-1",
2046                 "vnf-type": "vLoadBalancer/vLoadBalancer 0"
2047             },
2048             "vnf-resource-assignments": {
2049                 "availability-zones": {
2050                     "availability-zone": [
2051                         "nova"
2052                     ],
2053                     "max-count": 1
2054                 },
2055                 "vnf-networks": {
2056                     "vnf-network": []
2057                 }
2058             }
2059         },
2060         "request-information": {
2061             "request-id": "robot12",
2062             "order-version": "1",
2063             "notification-url": "openecomp.org",
2064             "order-number": "1",
2065             "request-action": "PreloadVfModuleRequest"
2066         },
2067         "sdnc-request-header": {
2068             "svc-request-id": "robot12",
2069             "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
2070             "svc-action": "reserve"
2071         }
2072     }
2073  }'
2074
2075 The Heat environment files already set many parameters used for VF module instantiation. Those parameters can be reused in the SDNC preload too, while placeholders like "PUT THE IP ADDRESS HERE" or "PUT THE PUBLIC KEY HERE" must be overridden.
2076
2077 To instantiate VF modules, please refer to this wiki page: https://wiki.onap.org/display/DW/Tutorial+vIMS%3A+VID+Instantiate+the+VNF using vLB as ServiceType.
2078
2079 6) **Post Instantiation Actions**: Please refer to Sections 3-1 for vLB configuration and Section 3-2 for resource orchestration with heatbridge.
2080
2081 7) **Triggering Scale Out Manually**: Please refer to Section 4 to trigger scale out manually with direct API call to SO.
2082
2083
2084 PART 6 - Known Issues and Resolutions
2085 -------------------------------------
2086 1) When running closed loop-enabled scale out, the closed loop designed in CLAMP conflicts with the default closed loop defined for the old vLB/vDNS use case
2087
2088 Resolution: Change TCA configuration for the old vLB/vDNS use case
2089
2090 - Connect to Consul: http://ANY_K8S_IP:30270 and click on "Key/Value" → "dcae-tca-analytics"
2091 - Change "eventName" in the vLB default policy to something different, for example "vLB" instead of the default value "vLoadBalancer"
2092 - Change "subscriberConsumerGroup" in the TCA configuration to something different, for example "OpenDCAE-c13" instead of the default value "OpenDCAE-c12"
2093 - Click "UPDATE" to upload the new TCA configuration
2094
2095 2) During Guilin testing, it has been noticed that there is an issue between SO and APPC for Healthcheck queries, this does not prevent the use case to proceed but limit APPC capabilities
2096