Adding APPC CDT Guide
[appc.git] / docs / APPC CDT Guide / APPC CDT Guide.rst
1 .. ============LICENSE_START==========================================\r
2 .. ===================================================================\r
3 .. Copyright © 2018 AT&T Intellectual Property. All rights reserved.\r
4 .. ===================================================================\r
5 .. Licensed under the Creative Commons License, Attribution 4.0 Intl.  (the "License");\r
6 .. you may not use this documentation except in compliance with the License.\r
7 .. You may obtain a copy of the License at\r
8 .. \r
9 ..  https://creativecommons.org/licenses/by/4.0/\r
10 .. \r
11 .. Unless required by applicable law or agreed to in writing, software\r
12 .. distributed under the License is distributed on an "AS IS" BASIS,\r
13 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 .. See the License for the specific language governing permissions and\r
15 .. limitations under the License.\r
16 .. ============LICENSE_END============================================\r
17 .. ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
18 \r
19 .. _appc_cdt_guide:\r
20 \r
21 ===================\r
22 APPC CDT User Guide\r
23 ===================\r
24 \r
25 Introduction\r
26 ============\r
27 \r
28 This document is the APPC Controller Design Tool (CDT) User Guide for self-service\r
29 onboarding of VNF’s. VNF owners can create templates and other artifacts\r
30 for APPC Configure command (used to apply a post-instantiation\r
31 configuration) as well as other life cycle commands.\r
32 \r
33 A complete list of all APPC supported commands is contained in the\r
34 APPC LCM API Guide available on onap.readthedocs.io.\r
35 \r
36 Overview of APPC Support for VNF Configuration and Lifecycle Commands\r
37 ======================================================================\r
38 \r
39 APPC is an ONAP component that performs functions to manage the\r
40 lifecycle of VNF’s and their component. The picture below summarizes the\r
41 APP-C design intent.\r
42 \r
43 |image0|\r
44 \r
45 Some lifecycle commands are supported on any VNF type, such as commands\r
46 executed using OpenStack or for generic REST calls such as for\r
47 HealthCheck. Other commands require models called templates to be\r
48 created in the APPC Controller Design Tool(CDT) by the VNF owner.\r
49 \r
50 Templates are needed for lifecycle commands such as for\r
51 post-instantiation configuration and for passing payloads to a Chef or\r
52 Ansible server. Templates contain static and instance-specific\r
53 parameters in a structured language (currently limited to xml and JSON).\r
54 The APPC CDT allows a VNF technology owner to identify the\r
55 instance specific parameters with a unique name.\r
56 \r
57 At run time, the instance specific parameter values are populated in the\r
58 template to replace the parameter name.\r
59 \r
60 |image1|\r
61 \r
62 |image2|\r
63 \r
64 |image3|\r
65 \r
66 Overview of the Onboarding Process\r
67 ==================================\r
68 \r
69 Pre-Requisites for Onboarding:\r
70 ------------------------------\r
71 \r
72 -  The VNF must support the below listed device protocols along with OpenStack for VM-level commands:\r
73    - Netconf, \r
74    - Chef, \r
75    - Ansible,\r
76    - REST  - The REST protocol is used for REST interfaces to a VNF. Currently, the only action that can use REST is HealthCheck.\r
77    - RESTCONF - The RESTCONF protocal is used only for VNFs that support Netconf and are able to be mounted in OpenDayLight (ODL). Use the protocal NETCONF-XML if the VNF is not ODL mountable.\r
78    \r
79 -  In order to build the templates needed for lifecycle commands, the\r
80    VNF owner will be asked to upload either an xml file (for Netconf) or\r
81    a JSON file (for Chef or Ansible). This file contains the parameter\r
82    values in a valid schema that would be sent to either the VNF or the\r
83    Chef/Ansible server to execute the action. For more detail on\r
84    Netconf, Chef, or Ansible, see the ONAP vendor guidelines at:\r
85 \r
86    https://wiki.onap.org/pages/viewpage.action?pageId=1015852&preview=/1015849/1017888/VNF%20Management%20Requirements%20for%20OpenECOMP.pdf\r
87 \r
88 -  The VNF related key identifiers (vnf-type, vnfc-type,\r
89    vnfc-function-code) that will be stored in A&AI have been defined.\r
90 \r
91 Onboarding Process Steps:\r
92 -------------------------\r
93 \r
94 1. Use the APPC CDT GUI to populate **reference data**\r
95    describing the VNF and action to be onboarded.\r
96 \r
97     -  Select the VNF, action, and protocol to be on-boarded.\r
98 \r
99     -  Describe the VM/VNFC components that comprise the VNF’s. APPC\r
100        will use this VM/VNFC data to update A&AI when configuring the VNF\r
101        at run time.\r
102 \r
103 2. Create a **template** from a “golden” configuration file.\r
104 \r
105         -  Upload a “golden configuration” file (described later) into the APPC CDT GUI.\r
106 \r
107         -  Manually edit the configuration file to associate parameter names\r
108            with instance-specific values you wish to parameterize (e.g., IP addresses).\r
109 \r
110         -  This creates a template file, which will be used at run-time to\r
111            create the payload that APPC sends to the VNF or to Ansible/Chef.\r
112 \r
113         -  Alternative: If the golden configuration changes, rather than\r
114            manually re-creating an updated template, you can *automatically*\r
115            create an updated template by **Merging** a current parameter\r
116            name-value pairs file with the new configuration file. APPC will\r
117            scan the new configuration file, and automatically replace values\r
118            with parameter names.\r
119 \r
120 3. Create a **parameter definition** file describing instance-specific\r
121    parameters in the template.\r
122 \r
123         -  Once you have a template, use the **Synchronize** button to\r
124            automatically create/update a parameter definition file (and a\r
125            parameter name-value pair file) based on the template.\r
126 \r
127         -  You can then populate/update the fields describing each parameter.\r
128 \r
129         -  If the parameters will be populated from external systems (such as INSTAR), you can upload\r
130            a “key file” that automatically populates key fields used to retrieve\r
131            data from the external system.\r
132 \r
133         -  If the parameters will be populated from A&AI, you can select the\r
134            rules and key fields used to retrieve data from A&AI.\r
135 \r
136         -  The parameter definition file will be used at run time to\r
137            automatically obtain parameter values from external system, A&AI, or a user\r
138            input spreadsheet for insertion into the template.\r
139 \r
140 4. Create a **parameter name-value pair file** for those parameters.\r
141 \r
142         -  Once you have a template, use the **Synchronize** button to\r
143            automatically create a parameter name-value pair file (and a\r
144            parameter definition file) based on the template.\r
145 \r
146         -  The parameter name-value file serves as a guide for populating\r
147            instance-specific data into the user input spreadsheet used at run\r
148            time. The parameter name-value file can also be used to automatically\r
149            create a template via the **Merge** function as described in step 2.\r
150 \r
151 5. **Test** the template in your test environment using the **TEST** function of APPC CDT\r
152 \r
153         -  Use the **Save to APP-C** button in the CDT GUI to save the\r
154            artifacts for your VNF to APPC.  \r
155 \r
156         -  Prepare a “user input” excel file on your PC and upload it to the\r
157            **TEST** function in the APPC CDT.\r
158 \r
159         -  Use the **TEST** function in the APPC CDT to execute the on-boarded action on the VNF. Verify the VNF works as expected. \r
160         \r
161         **NOTE** The **TEST** function is currently being developed as part of Beijing release and screen shots in this document are not yet updated to show this new function yet. \r
162 \r
163 The screen shots in following sections illustrate how to use the APPC CDT GUI for each step.\r
164 \r
165 Artifacts used for Onboarding:\r
166 ------------------------------\r
167 \r
168 For a given VNF, each action must be on-boarded separately. Actions can\r
169 be on-boarded in any order; it is not required that “Configure” be the first action onboarded.\r
170 \r
171 You will create 1 Reference Data file for each VNF, and a set of up to 3\r
172 files for each action you are onboarding:\r
173 \r
174         1. Template\r
175         2. Parameter definition file (pd\_configure)\r
176         3. Parameter name-value pair file (param\_configure)\r
177 \r
178 For example, onboarding the “vABC” VNF for 2 actions (Configure and\r
179 ConfigModify) may result in these 7 files:\r
180 \r
181         1. reference\_AllAction\_vABC\_0.0.1V\r
182         2. template\_Configure\_vABC\_0.0.1V\r
183         3. pd\_Configure\_vABC\_0.0.1V\r
184         4. param\_Configure\_vABC\_0.0.1V\r
185         5. template\_ConfigModify\_vABC\_0.0.1V\r
186         6. pd\_ConfigModify\_vABC\_0.0.1V\r
187         7. param\_ConfigModify\_vABC\_0.0.1V\r
188 \r
189 A **Template** is required for the Ansible, Chef and Netconf protocols.\r
190 \r
191 The **Parameter Definition** and **Parameter Name-Value Pair** artifacts\r
192 are typically used with the Configure and ConfigModify templates and are\r
193 optional for templates of other actions.\r
194 \r
195 OpenStack and REST protocols do not use a template or parameter\r
196 definitions or name-value pairs.\r
197 \r
198 Using the APPC Design Tool for VNF Onboarding\r
199 =============================================\r
200 \r
201 Go to the APPC CDT GUI in the test environment using a Firefox browser.\r
202 \r
203 http://<server>:8080/config-design-tool/index.html#/home\r
204 \r
205 |image4|\r
206 \r
207 Clicking on “About Us” will display the current software version and who to contact for support. The contact information is configurable. What is display in diagram is just an example.\r
208 \r
209 |image5|\r
210 \r
211 Choose “My VNF’s”.\r
212 \r
213 If you have not used APPC CDT previously, you will be asked to\r
214 enter your user id. Your work will be stored under this user id. There\r
215 is no password required at this time.\r
216 \r
217 Note: If multiple self-service users will be working on a set of VNF’s,\r
218 it is suggested that you enter a group\_name rather than your user\_id.\r
219 This group name would be used by all users in the group so that all\r
220 users can view/edit the same set of artifacts.\r
221 \r
222 If you have previously used APPC CDT, you user id will\r
223 automatically be selected.\r
224 \r
225 |image6|\r
226 \r
227 The “My VNFs” GUI displays a list of the vnf-type/vnfc-types which are\r
228 stored under your userid in the APPC database. You can choose either\r
229 “Create New VNF” or “View/Edit” for one of your existing VNF’s.\r
230 \r
231 |image7|\r
232 \r
233 If you have not created any VNF artifacts in the current release of the\r
234 APPC CDT, you will see a screen like this; click “Create new\r
235 VNF” to begin.\r
236 \r
237 VNF artifacts created using earlier versions of the APPC CDT\r
238 can be uploaded and then edited/saved, as shown on later screens. You\r
239 should not have to re-create these VNF artifacts.\r
240 \r
241 |image8|\r
242 \r
243 If you choose to create a new VNF, you will see a pop-up box like this.\r
244 \r
245 |image9|\r
246 \r
247 Enter the VNF Type (and optional VNFC Type) and click next.\r
248 \r
249 Alternatively, you can leave the VNF type blank and choose “PROCEED\r
250 ANYWAY” if you want to proceed to the Reference Data screen where you\r
251 can populate the VNF reference data by uploading an existing Reference\r
252 File or by manually entering it.\r
253 \r
254 You must populate the VNF field if uploading the existing file does not\r
255 populate it.\r
256 \r
257 Populate reference data describing the VNF and action to be onboarded\r
258 ---------------------------------------------------------------------\r
259 \r
260 |image10|\r
261 \r
262 |image11|\r
263 \r
264 |image12|\r
265 \r
266 |image13|\r
267 \r
268 |image14|\r
269 \r
270 Note 1: When downloading your work to APPC; the system will download\r
271 only the artifacts that have been updated in the current session. You\r
272 may not see all 4 artifacts unless you visit/edit the reference,\r
273 template, parameter and parameter definition screens.\r
274 \r
275 Note 2: When downloading files, the system will display a pop-up window\r
276 for each file, but the windows are all placed on top of each other. You\r
277 can drag the pop-up windows if you want to see them all at the same\r
278 time.\r
279 \r
280 |image15|\r
281 \r
282 Populate OpenStack actions for a VM\r
283 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
284 \r
285 You can also onboard OpenStack commands for the VM level components of\r
286 the VNF\r
287 \r
288 Under ‘Action’, select “OpenStack Actions” and then under ‘Protocol’\r
289 select “OpenStack”.\r
290 \r
291 You must populate the ‘VNF type’ if it is not already populated.\r
292 \r
293 |image16|\r
294 \r
295 Next, upload an excel file of VM capabilities for your VNF. The excel\r
296 must list OpenStack actions in the first column, and then have a column\r
297 for each VM type (i.e., VNFC Function Code) showing which actions are\r
298 applicable for that VM type, as shown Excel sample below:\r
299 \r
300 |imageA|\r
301 \r
302 APPC will import the data from the excel and display the results.\r
303 \r
304 |image17|\r
305 \r
306 The Template and Parameter Definition tabs do not apply to OpenStack\r
307 commands.\r
308 \r
309 REFERENCE DATA SCREEN HELP\r
310 \r
311 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
312 | **Field/Object**         | **Description**                                                                                                  |\r
313 +==========================+==================================================================================================================+\r
314 |                                                     **VNF Reference Data**                                                                  |\r
315 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
316 | Action                   | The action to be executed on the VNF, e.g., “CONFIGURE” (see table below).                                       |\r
317 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
318 | VNF Type                 | The name of the VNF, e.g. vDBE.                                                                                  |\r
319 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
320 | VNFC Type                | NA when describing a VNF; When describing a VNFC, enter the VNFC name e.g.,MSC, SSC, MMC, etc.                   |\r
321 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
322 | Device Protocol          | Choose desired protocol e.g., NETCONF-XML (see table below).                                                     |\r
323 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
324 | Template                 | Will there be a template created for this VNF and action? Yes/No.                                                |\r
325 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
326 | User Name                | Enter the user name used to configure the VNF e.g., “admin” or “root”.                                           |\r
327 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
328 | Port Number              | Enter the port number used to configure the VNF, e.g., 22.                                                       |\r
329 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
330 | Context URL              | Enter the context portion of the REST URL (Currently used only for the HealthCheck action with REST protocol).   |\r
331 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
332 |                                                      **VNFC information**                                                                   |\r
333 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
334 | VNFC Type                | Enter the VNFC name e.g. MSC, SSC, MMC, etc.                                                                     |\r
335 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
336 | VNFC Function Code       | Enter the standard 3 character value for the VNFC.                                                               |\r
337 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
338 | IP Address V4 OAM VIP    | Select Y to store the O&AM VIP address with the VNFC record; otherwise select N.                                 |\r
339 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
340 | Group Notation Type      | Select the naming scheme for VNFC/VM instances (first-vnfc-name, fixed value, relative value)                    |\r
341 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
342 | Group Notation Value     | For first-vnfc-name type, enter text such as “pair” or “group”.                                                  |\r
343 |                          |                                                                                                                  |\r
344 |                          | For fixed value type, enter any alpha-numeric text “1”, “test” etc.                                              |\r
345 |                          |                                                                                                                  |\r
346 |                          | For relative value type, enter a number “1”, “2”, “4”, etc                                                       |\r
347 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
348 | Number of VM’s           | Enter the # of VM’s for this VNFC.                                                                               |\r
349 +--------------------------+------------------------------------------------------------------------------------------------------------------+\r
350 \r
351 |\r
352 \r
353 This table shows which actions and protocols are currently available for\r
354 on-boarding with the Beijing release.\r
355 \r
356 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
357 |  **Action**                            | **Netconf/   | **Ansible**   | **Chef**   | **REST**   | **OpenStack    |\r
358 |                                        | Restconf**   |               |            |            | (VM Level)**   |\r
359 +========================================+==============+===============+============+============+================+\r
360 | **AttachVolume**                       |              |               |            |            | YES            |\r
361 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
362 | **Configure**                          | YES          | YES           | YES        |            |                |\r
363 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
364 | **Config Modify**                      | YES          | YES           | YES        |            |                |\r
365 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
366 | **Config Backup**                      |              | YES           | YES        |            |                |\r
367 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
368 | **Config Restore**                     |              | YES           | YES        |            |                |\r
369 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
370 | **ConfigScaleOut**                     | YES          | YES           | YES        |            |                |\r
371 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
372 | **DetachVolume**                       |              |               |            |            | YES            |\r
373 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
374 | **Evacuate**                           |              |               |            |            | YES            |\r
375 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
376 | **GetRunning Config\***                | YES          | YES           | YES        |            |                |\r
377 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
378 | **HealthCheck**                        |              | YES           | YES        | YES        |                |\r
379 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
380 | **Migrate**                            |              |               |            |            | YES            |\r
381 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
382 | **QuiesceTraffic**                     |              | YES           | YES        |            |                |\r
383 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
384 | **Rebuild**                            |              |               |            |            | YES            |\r
385 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
386 | **Restart**                            |              |               |            |            | YES            |\r
387 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
388 | **ResumeTraffic**                      |              | YES           | YES        |            |                |\r
389 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
390 | **Snapshot**                           |              |               |            |            | YES            |\r
391 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
392 | **Start**                              |              |               |            |            | YES            |\r
393 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
394 | **Start Application**                  |              | YES           | YES        |            |                |\r
395 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
396 | **Stop**                               |              |               |            |            | YES            |\r
397 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
398 | **Stop Application**                   |              | YES           | YES        |            |                |\r
399 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
400 | **UpgradeBackout**                     |              | YES           | YES        |            |                |\r
401 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
402 | **UpgradeBackup**                      |              | YES           | YES        |            |                |\r
403 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
404 | **UpgradePostCheck**                   |              | YES           | YES        |            |                |\r
405 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
406 | **UpgradePreCheck**                    |              | YES           | YES        |            |                |\r
407 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
408 | **UpgradeSoftware**                    |              | YES           | YES        |            |                |\r
409 +----------------------------------------+--------------+---------------+------------+------------+----------------+\r
410  \r
411  \* GetRunningConfig is used internally by APP-C and is not callable by clients via the APP-C API.   \r
412 \r
413 \r
414 \r
415 Create a template from a “golden” configuration file\r
416 ----------------------------------------------------\r
417 \r
418 There are several ways to create a template in APPC CDT:\r
419 \r
420 -  Start from golden instance config file; manually add parameters\r
421    (described in this section)\r
422 \r
423 -  Start with a template file, manually add more parameters. (described\r
424    in section Synchronizing a Template)\r
425 \r
426 -  Start with config file; create updated template by **merging**\r
427    name-value pairs. (described in Create a file containing name-value pairs for parameters section)\r
428 \r
429 Start with a working configuration for a “golden instance” of the VNF\r
430 (xml if Netconf) or the payload to be downloaded to the Chef or Ansible\r
431 server (JSON).\r
432 \r
433 Open the XML or JSON file in Notepad ++ and verify that the format is\r
434 schema compliant. If the xml file is for a post-instantiation\r
435 configuration, then modify the config to include only statements that\r
436 are to be added (merged) with any configuration that is on the VNF\r
437 instance after instantiation. For example, remove statements that might\r
438 change root passwords, etc.\r
439 \r
440 Optionally, add Velocity statements to the file, if desired, to handle\r
441 special constructs such as variable lists, template defined constants,\r
442 conditional statements, etc.\r
443 \r
444 Here are links with more information about the Velocity java-based\r
445 template engine:\r
446 \r
447     http://velocity.apache.org/engine/2.0/vtl-reference.html\r
448 \r
449     http://velocity.apache.org/engine/2.0/user-guide.html\r
450 \r
451 This screen shows a sample Golden Configuration file that has been\r
452 uploaded to APP-C CDT.\r
453 \r
454 |image18|\r
455 \r
456 Next, designate instance-specific values as parameters, using this\r
457 procedure:\r
458 \r
459     1) Highlight the instance-specific value with the cursor\r
460 \r
461     |image19|\r
462 \r
463     2) Type “CTRL” and “4” to insert a parameter name.\r
464 \r
465     |image20|\r
466 \r
467     3) Type the parameter name in the parentheses\r
468 \r
469     |image21|\r
470 \r
471     4) Type “CTRL” and “S” to save the parameter.\r
472 \r
473     |image22|\r
474 \r
475 Repeat for each instance-specific value that you wish to turn into a\r
476 parameter.\r
477 \r
478 *Summary of editing commands:*\r
479 \r
480  - CTRL+4 to add a parameter (also saves previous unsaved parameter)\r
481  - CTRL+S to save a parameter\r
482  - CTRL+Z to undo the last edit\r
483 \r
484 Notes on naming Parameters:\r
485 \r
486 -  Choose meaningful, unique parameter names for each parameter. If the\r
487    same parameter value appears in multiple places in the config, the\r
488    parameter name which is assigned to the first instance will be\r
489    automatically assigned to all instances. However, you may choose a\r
490    different parameter name for each instance of the parameter value\r
491    (except when using the MERGE function).\r
492 \r
493 -  Use only dash (-) or underline (\_) as separators between words in\r
494    the name.\r
495 \r
496 -  The name should not contain spaces or any other special characters.\r
497 \r
498 -  Do not use parameter names which are sub-strings of other parameter\r
499    names. For example, don’t use field1 and field12 as parameter names.\r
500 \r
501 \r
502 Synchronizing a Template\r
503 ~~~~~~~~~~~~~~~~~~~~~~~~\r
504 \r
505 Once you have named all the parameters (this example shows 2\r
506 parameters), click the “SYNCHRONIZE” button to automatically create a\r
507 parameter definition file and a parameter name-value file. The next\r
508 sections describe these files.\r
509 \r
510 It may take a few seconds for the system to SYNCHRONIZE; when it is\r
511 complete, you will be taken to the Parameter Definition screen.\r
512 \r
513 Remember to use the SAVE and/or DOWNLOAD buttons on the Reference Data\r
514 screen to preserve your work.\r
515 \r
516 |image23|\r
517 \r
518 Modifying an Existing Template\r
519 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
520 \r
521 In addition to creating new templates, you can also modify an existing\r
522 template by adding or removing parameter names.\r
523 \r
524 To add a new parameter name, follow the steps in the Create a template from a "golden" configuration file section above.\r
525 SYNCHRONIZE to add the new parameter to the name/value and parameter\r
526 definition GUI.\r
527 \r
528 To remove an existing parameter name, remove the parameter name (i.e.,\r
529 ${name}) using the backspace key and replace with the static value. Then\r
530 SYNCHRONIZE to remove the parameter from the name/value and parameter\r
531 definition GUI.\r
532 \r
533 Remember to use the SAVE and/or DOWNLOAD buttons on the Reference Data\r
534 screen to preserve your work.\r
535 \r
536 Create a parameter definition file describing instance-specific parameters in the template \r
537 ------------------------------------------------------------------------------------------\r
538 \r
539 Clicking the “SYNCHRONIZE” button after creating a template will automatically create/update a parameter definition file for\r
540 that template (and a parameter name-value file described in the next\r
541 section). Alternatively, you can upload an existing parameter definition\r
542 file from your PC.\r
543 \r
544 You can view or edit the definition fields for each parameter via the\r
545 Parameter Definition screen. Note that any edits to the parameter names\r
546 would be overwritten by a subsequent SYNCHRONIZE with the template.\r
547 \r
548 |image24|\r
549 \r
550 Select a Source for each parameter\r
551 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
552 \r
553 There are three choices for the source:\r
554 \r
555 1. External Systems (e.g., INSTAR). APPC will automatically obtain parameter values from\r
556    an external system (typically IP addresses for VNF’s). First, obtain a\r
557    “key file” for your VNF. Then use the\r
558    “Upload Key File” button on the Parameter Definition screen. APPC\r
559    will automatically populate key names and values used to retrieve data\r
560    from an external system.\r
561 \r
562 \r
563 2. ***A&AI***. APPC will automatically obtain parameter values from\r
564    A&AI (typically VNF/VNFC/VM identifiers). After selecting “A&AI”,\r
565    select a rule type and APPC will automatically populate the key\r
566    names and values. For rule types that include a list, populate the\r
567    ‘Filter By Field’ and ‘Filter By Value’.\r
568 \r
569     |image26|\r
570 \r
571 3. ***Manual.*** APPC will use a manually-created excel to populate\r
572    parameter values. Later section describes this User Input Spreadsheet.\r
573 \r
574 Remember to use the SAVE and/or DOWNLOAD buttons on the Reference Data\r
575 screen to preserve your work.\r
576 \r
577 Create a file containing name-value pairs for parameters\r
578 --------------------------------------------------------\r
579 \r
580 Clicking the “SYNCHRONIZE” button after creating a template (see section\r
581 Synchronizing a Template) will automatically create/update a parameter name-value pair file\r
582 for that template (and a parameter definition file described in the\r
583 previous section).\r
584 \r
585 Navigate to the Template tab and “Param Values” subtab to view/edit\r
586 parameter name-value pairs.\r
587 \r
588 If you make any edits, remember to use the SAVE and/or DOWNLOAD buttons\r
589 on the Reference Data screen to preserve your work.\r
590 \r
591 |image27|\r
592 \r
593 Option: Using MERGE to automatically create a template from a parameter name-value pair file\r
594 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
595 \r
596 The APPC Design Tool also provides a way to create a template from an\r
597 existing parameter name-value pair file. This is useful when the\r
598 configuration of the VNF has changed. Rather than manually recreating\r
599 the template, you can use the MERGE function to automatically add\r
600 parameter names based on a valid name-value pairs file from a previous\r
601 template.\r
602 \r
603 First, navigate to the Template tab and “Param Values” subtab and click\r
604 on UPLOAD PARAM FILE\r
605 \r
606 |image28|\r
607 \r
608 Then navigate to the Template configuration screen. Upload a\r
609 configuration file that contains values you wish to turn into\r
610 parameters.\r
611 \r
612 |image29|\r
613 \r
614 Next, click “MERGE”. APPC will automatically add parameters to the\r
615 configuration file using the name-value pairs. Wherever APPC finds a\r
616 matching value, it will add the corresponding parameter name.\r
617 \r
618 After using the MERGE button to create a template, you can use the\r
619 SYNCHRONIZE button to create/update the parameter definition file and\r
620 name-value files.\r
621 \r
622 Remember to use the SAVE and/or DOWNLOAD buttons on the Reference Data\r
623 screen to preserve your work.\r
624 \r
625 |image30|\r
626 \r
627 Test the template in a lab using APPC CDT Test Function\r
628 =======================================================================\r
629 \r
630 User Input Spreadsheet\r
631 ----------------------\r
632 \r
633 The following steps are used to prepare a user input spreadsheet for the\r
634 VNF instance and action to be tested.\r
635 \r
636 1. Start with this generic 1802 user input excel spreadsheet.\r
637 \r
638     :download:`Generic 1802 User Input Spreadsheet v.02.xlsx` (compatible with excel 2013)\r
639 \r
640 2. Update the user-input sections of the spreadsheet.\r
641 \r
642    a) Upload Data tab: choose action, populate VNF-ID\r
643 \r
644    b) >Action< tab: Select the tab for the action being tested. Choose a\r
645    protocol and enter required action identifiers & request parameter\r
646    values. Enter any payload parameter names and values required for\r
647    this associated template. (copy/paste from a name-value pair file or\r
648    other source).\r
649 \r
650    The screen shots on the following pages show the user input sections\r
651    highlighted in yellow.\r
652 \r
653 1. Save the spreadsheet with a name for your VNF instance and action.\r
654 \r
655 “Upload Data” tab – Select action to be tested and populate any action\r
656 identifiers such as vnf-id.\r
657 \r
658 |image31|\r
659 \r
660 Action tab: This example is for the ConfigModify action, so the\r
661 “ConfigModify” tab is shown. Choose a protocol and enter required action\r
662 identifiers & request parameter values. Enter any payload parameter\r
663 names and values required for this associated template. (You may\r
664 copy/paste from a name-value pair file or other source).\r
665 \r
666 |image32|\r
667 \r
668 Using APPC CDT TEST action to test a VNF configuration template\r
669 -----------------------------------------------------------------\r
670 \r
671 The APPC CDT **TEST** action is used to initiate configuration\r
672 and other lifecycle commands.\r
673 \r
674  ** DETAIL COMING SOON **\r
675 \r
676 Note on populating southbound properties:\r
677 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
678 \r
679 When a new vnf-type is created or a new action is added to an existing\r
680 vnf-type using the CDT tool and the Reference Data artifact is loaded to\r
681 APPC, an update is made to the APPC run-time southbound properties\r
682 file for the vnf-type.   The southbound properties are needed for\r
683 connecting to a VNF instance or Ansible server.   The southbound\r
684 properties contain the following information:\r
685 \r
686 ``{vnf\_type}.{protocol}.{action}.user = {value}``\r
687 \r
688 ``{vnf\_type}.{protocol}.{action}.port = {value}``\r
689 \r
690 ``{vnf\_type}.{protocol}.{action}.password = {value}``\r
691 \r
692 ``{vnf\_type}.{protocol}.{action}.url = {value}``\r
693 \r
694 The user, port, and url values are contained in the Reference Data\r
695 artifact, if populated by the self-service user.  The password value is\r
696 updated by T2 production support using a GUI tool provided. <TO DO: CHECK ON THIS>\r
697 \r
698 The current process which creates the southbound properties from the\r
699 Reference Data only updates the southbound properties file only a single\r
700 node in the APPC cluster.   \r
701 \r
702 \r
703 APP-C Design Tool - File Descriptions\r
704 =====================================\r
705 \r
706 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
707 | **File Description**                                                                                                                 | **File Format**   | **File name / example**                              |\r
708 +======================================================================================================================================+===================+======================================================+\r
709 |                                                                                                                                      |                   |                                                      |\r
710 | **Pre-template Config file** –contains a ‘golden’ or working configuration (for Netconf) or JSON data block (for Chef or Ansible).   | XML, JSON         |  :download:`simple xml config.txt`                   |\r
711 |                                                                                                                                      |                   |                                                      |\r
712 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
713 |                                                                                                                                      |                   |                                                      |\r
714 | **Reference file**  [5]_– describes a VNF in terms of its subtending VM’s and VNFC’s and the actions/protocols being onboarded.      | XML, JSON         |  :download:`reference_AllAction_vPQR_0.0.1V.json`    |\r
715 |                                                                                                                                      |                   |                                                      |\r
716 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
717 |                                                                                                                                      |                   |                                                      |\r
718 | **Template file** – a configuration file with parameters for instance-specific fields.                                               | XML               |  :download:`template_Configure_vABC_0.0.1.txt`       |\r
719 |                                                                                                                                      |                   |                                                      |\r
720 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
721 |                                                                                                                                      |                   |                                                      |\r
722 | **Parameter Definition file** (aka pd\_Configure) contains **parameter definitions** associated with a template.                     | YAML              |  :download:`pd_Configure_vABC_0.0.1V.yaml.txt`       |\r
723 |                                                                                                                                      |                   |                                                      |\r
724 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
725 |                                                                                                                                      |                   |                                                      |\r
726 | **Name-Value file** (aka param\_Configure) contains name-value pairs for parameters associated with a template.                      | JSON              |  :download:`param_Configure_vABC_0.0.1V.txt`         |\r
727 |                                                                                                                                      |                   |                                                      |\r
728 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
729 |                                                                                                                                      |                   |                                                      |\r
730 | **Key data file** – contains external system data to populate a PD configure file.                                                   | TXT               |   <TO DO: Need sample file>                          |\r
731 |                                                                                                                                      |                   |                                                      |\r
732 +--------------------------------------------------------------------------------------------------------------------------------------+-------------------+------------------------------------------------------+\r
733 \r
734 Note: Do not alter file names because APPC CDT requires a specific file naming format. Note that for yaml files, Sphinx is not able to handle correctly, so we had to add .txt to allow the download. Please remember to remove .txt from pd_Configure_vABC_0.0.1V.yaml.txt when you download it.\r
735 \r
736 .. |image0| image:: media/image0.png\r
737    :width: 7.88889in \r
738    :height: 4.43750in \r
739 .. |image1| image:: media/image1.png\r
740    :width: 8.72292in\r
741    :height: 4.51788in\r
742 .. |image2| image:: media/image2.png\r
743    :width: 8.75000in\r
744    :height: 4.58908in\r
745 .. |image3| image:: media/image3.png\r
746    :width: 8.70833in\r
747    :height: 4.89844in\r
748 .. |image4| image:: media/image4.png\r
749    :width: 7.46875in\r
750    :height: 4.19310in\r
751 .. |image5| image:: media/image5.png\r
752    :width: 7.23958in\r
753    :height: 3.87172in\r
754 .. |image6| image:: media/image6.png\r
755    :width: 7.58491in\r
756    :height: 4.26651in\r
757 .. |image7| image:: media/image7.png\r
758    :width: 9.43750in\r
759    :height: 5.30859in\r
760 .. |image8| image:: media/image8.png\r
761    :width: 7.86980in\r
762    :height: 4.72917in\r
763 .. |image9| image:: media/image9.png\r
764    :width: 7.56250in\r
765    :height: 4.54450in\r
766 .. |image10| image:: media/image10.png\r
767    :width: 9.01042in\r
768    :height: 5.06836in\r
769 .. |image11| image:: media/image11.png\r
770    :width: 9.44792in\r
771    :height: 5.31445in\r
772 .. |image12| image:: media/image12.png\r
773    :width: 9.48958in\r
774    :height: 5.33789in\r
775 .. |image13| image:: media/image13.png\r
776    :width: 9.48125in\r
777    :height: 5.33320in\r
778 .. |image14| image:: media/image14.png\r
779    :width: 9.25926in\r
780    :height: 5.20833in\r
781 .. |image15| image:: media/image15.png\r
782    :width: 9.05556in\r
783    :height: 5.09375in\r
784 .. |image16| image:: media/image16.png\r
785    :width: 5.79167in\r
786    :height: 3.74135in\r
787 .. |imageA| image:: media/imageA.png\r
788    :width: 5.79167in\r
789    :height: 3.74135in  \r
790 .. |image17| image:: media/image17.png\r
791    :width: 6.13542in\r
792    :height: 4.97745in\r
793 .. |image18| image:: media/image18.png\r
794    :width: 9.00000in\r
795    :height: 5.27639in\r
796 .. |image19| image:: media/image19.png\r
797    :width: 5.43423in\r
798    :height: 1.83333in\r
799 .. |image20| image:: media/image20.png\r
800    :width: 5.44473in\r
801    :height: 1.93750in\r
802 .. |image21| image:: media/image21.png\r
803    :width: 5.32292in\r
804    :height: 1.92771in\r
805 .. |image22| image:: media/image22.png\r
806    :width: 5.31153in\r
807    :height: 1.83333in\r
808 .. |image23| image:: media/image23.png\r
809    :width: 7.54167in\r
810    :height: 4.24219in\r
811 .. |image24| image:: media/image24.png\r
812    :width: 7.48148in\r
813    :height: 4.20833in\r
814 .. |image26| image:: media/image26.png\r
815    :width: 6.87789in\r
816    :height: 3.78125in\r
817 .. |image27| image:: media/image27.png\r
818    :width: 7.97170in\r
819    :height: 4.48408in\r
820 .. |image28| image:: media/image28.png\r
821    :width: 8.56604in\r
822    :height: 4.81840in\r
823 .. |image29| image:: media/image29.png\r
824    :width: 9.00943in\r
825    :height: 5.06781in\r
826 .. |image30| image:: media/image30.png\r
827    :width: 8.07407in\r
828    :height: 4.54167in\r
829 .. |image31| image:: media/image31.png\r
830    :width: 9.00000in\r
831    :height: 5.18958in\r
832 .. |image32| image:: media/image32.png\r
833    :width: 9.00000in\r
834    :height: 5.18958in\r
835 \r