diff options
author | 2019-04-03 15:23:27 -0400 | |
---|---|---|
committer | 2019-04-09 13:08:39 -0400 | |
commit | f7d891db891f4fb8db103236d4010de1b7739378 (patch) | |
tree | c7a7fff4bca0ec2ac3536442463ad8494fd07196 /ms/controllerblueprints/modules/blueprint-core/src/test/resources | |
parent | f2b17fe1579222ffc251d48bf9475dc3fcfc1206 (diff) |
Jinja template for Blueprint template service
Change-Id: Iec777e4500c2a040faccc8375b1d2dd24c27cb7f
Issue-ID: CCSDK-1193
Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-core/src/test/resources')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-jinja.json | 16 | ||||
-rwxr-xr-x | ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-velocity.json (renamed from ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data.json) | 0 | ||||
-rwxr-xr-x | ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-jinja-template.jinja | 42 | ||||
-rwxr-xr-x | ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-velocity-template.vtl (renamed from ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-template.vtl) | 0 |
4 files changed, 58 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-jinja.json b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-jinja.json new file mode 100644 index 000000000..bbfb38d80 --- /dev/null +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-jinja.json @@ -0,0 +1,16 @@ +{ + "node_hostname": "sdnc-host", + "node_backup_router_address": "2001:1890:1253::192:168:100:1", + "node_backup_router_d_address": "2011:1090:1253::112:158:100:1", + "servers": [ + "Server1", + "Server2", + "Server3" + ], + "classes": [ + "superuser-class", + "tacacs-adv-class", + "tacacs-base-class" + ], + "system_password": "teamops-system-password" +}
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data.json b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-velocity.json index 2acc6fcdd..2acc6fcdd 100755 --- a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data.json +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-data-velocity.json diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-jinja-template.jinja b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-jinja-template.jinja new file mode 100755 index 000000000..db900bc8b --- /dev/null +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-jinja-template.jinja @@ -0,0 +1,42 @@ +<configuration xmlns="http://xml.juniper.net/xnm/1.1/xnm" +xmlns:a="http://xml.juniper.net/junos/15.1X49/junos"> + <version>15.1X49-D50.3</version> + <groups> + <name>node0</name> + <system> + {%- for server in servers %} + <server-host-name>{{ server }}</server-host-name> + {%- endfor %} + </system> + <system> + <host-name>{{ node_hostname }}</host-name> + <backup-router> + <address>{{ node_backup_router_address }}</address> + <destination>{{ node_backup_router_d_address }}</destination> + </backup-router> + <login> + <message>ONAP information assets</message> + {%- for class in classes %} + <class> + {{ class }} + </class> + {%- endfor %} + <user> + <name>readwrite</name> + <full-name>Read - Write Account Access</full-name> + <uid>1002</uid> + <class>tacacs-adv-class</class> + <authentication> + <encrypted-password>{{ system_password }}</encrypted-password> + </authentication> + </user> + </login> + {%- for element in additional_array %} + <additionalArray> + <name>{{ element.name }}</name> + <location>{{ element.location }}</location> + </additionalArray> + {%- endfor %} + </system> + </groups> +</configuration>
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-template.vtl b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-velocity-template.vtl index f7b1269b3..f7b1269b3 100755 --- a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-template.vtl +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/base-config-velocity-template.vtl |