replace aai, closeloop, sdc with jinja 45/90245/1
authorDR695H <dr695h@att.com>
Thu, 20 Jun 2019 19:04:04 +0000 (15:04 -0400)
committerDR695H <dr695h@att.com>
Thu, 20 Jun 2019 19:04:04 +0000 (15:04 -0400)
Issue-ID: TEST-158
Change-Id: I95a783f26e28512cb4fc98e50931d62001c489c6
Signed-off-by: DR695H <dr695h@att.com>
90 files changed:
robot/assets/templates/aai/add-connectivity.jinja [moved from robot/assets/templates/aai/add-connectivity.template with 90% similarity]
robot/assets/templates/aai/add-relationship.jinja [new file with mode: 0644]
robot/assets/templates/aai/add-relationship.template [deleted file]
robot/assets/templates/aai/add-vpn-binding.jinja [moved from robot/assets/templates/aai/add-vpn-binding.template with 93% similarity]
robot/assets/templates/aai/add_availability_zone_body.jinja [moved from robot/assets/templates/aai/add_availability_zone_body.template with 52% similarity]
robot/assets/templates/aai/add_complex_body.jinja [moved from robot/assets/templates/aai/add_complex_body.template with 80% similarity]
robot/assets/templates/aai/add_customer.jinja [moved from robot/assets/templates/aai/add_customer.template with 77% similarity]
robot/assets/templates/aai/add_demo_customer.jinja [moved from robot/assets/templates/aai/add_demo_customer.template with 63% similarity]
robot/assets/templates/aai/add_service_body.jinja [new file with mode: 0644]
robot/assets/templates/aai/add_service_body.template [deleted file]
robot/assets/templates/aai/add_tenant_body.jinja [new file with mode: 0644]
robot/assets/templates/aai/add_tenant_body.template [deleted file]
robot/assets/templates/aai/add_vnfc_body.jinja [new file with mode: 0644]
robot/assets/templates/aai/add_vnfc_body.template [deleted file]
robot/assets/templates/aai/add_zone_body.jinja [new file with mode: 0644]
robot/assets/templates/aai/add_zone_body.template [deleted file]
robot/assets/templates/aai/named_query.jinja [moved from robot/assets/templates/aai/named_query.template with 84% similarity]
robot/assets/templates/aai/service_subscription.jinja [moved from robot/assets/templates/aai/service_subscription.template with 92% similarity]
robot/assets/templates/aai/vlb_closed_loop_hack.jinja [new file with mode: 0644]
robot/assets/templates/aai/vlb_closed_loop_hack.template [deleted file]
robot/assets/templates/asdc/action.jinja [new file with mode: 0644]
robot/assets/templates/asdc/action.template [deleted file]
robot/assets/templates/asdc/artifact_upload.jinja [new file with mode: 0644]
robot/assets/templates/asdc/artifact_upload.template [deleted file]
robot/assets/templates/asdc/catalog_allotted_inputs.jinja [moved from robot/assets/templates/asdc/catalog_allotted_inputs.template with 85% similarity]
robot/assets/templates/asdc/catalog_allotted_properties.jinja [moved from robot/assets/templates/asdc/catalog_allotted_properties.template with 75% similarity]
robot/assets/templates/asdc/catalog_net_input_properties.jinja [moved from robot/assets/templates/asdc/catalog_net_input_properties.template with 78% similarity]
robot/assets/templates/asdc/catalog_resource.jinja [moved from robot/assets/templates/asdc/catalog_resource.template with 85% similarity]
robot/assets/templates/asdc/catalog_resource_alloted_resource.jinja [moved from robot/assets/templates/asdc/catalog_resource_alloted_resource.template with 69% similarity]
robot/assets/templates/asdc/catalog_service.jinja [moved from robot/assets/templates/asdc/catalog_service.template with 94% similarity]
robot/assets/templates/asdc/catalog_vnf_inputs.jinja [moved from robot/assets/templates/asdc/catalog_vnf_inputs.template with 84% similarity]
robot/assets/templates/asdc/catalog_vnf_properties.jinja [moved from robot/assets/templates/asdc/catalog_vnf_properties.template with 66% similarity]
robot/assets/templates/asdc/entitlement_pool.jinja [moved from robot/assets/templates/asdc/entitlement_pool.template with 62% similarity]
robot/assets/templates/asdc/feature_group.jinja [moved from robot/assets/templates/asdc/feature_group.template with 62% similarity]
robot/assets/templates/asdc/key_group.jinja [moved from robot/assets/templates/asdc/key_group.template with 60% similarity]
robot/assets/templates/asdc/license_agreement.jinja [moved from robot/assets/templates/asdc/license_agreement.template with 73% similarity]
robot/assets/templates/asdc/license_model.jinja [moved from robot/assets/templates/asdc/license_model.template with 63% similarity]
robot/assets/templates/asdc/resource_instance.jinja [new file with mode: 0644]
robot/assets/templates/asdc/resource_instance.template [deleted file]
robot/assets/templates/asdc/software_product.jinja [moved from robot/assets/templates/asdc/software_product.template with 53% similarity]
robot/assets/templates/asdc/user_remarks.jinja [new file with mode: 0644]
robot/assets/templates/asdc/user_remarks.template [deleted file]
robot/assets/templates/cinder_add_volume.template [deleted file]
robot/assets/templates/keystone_get_v2_auth.template [deleted file]
robot/assets/templates/neutron_add_subnet.template [deleted file]
robot/assets/templates/nova_add_keypair.template [deleted file]
robot/assets/templates/nova_add_server.template [deleted file]
robot/assets/templates/openstack/cinder_add_volume.jinja [new file with mode: 0644]
robot/assets/templates/openstack/heat_add_stack.jinja [moved from robot/assets/templates/heat_add_stack.template with 59% similarity]
robot/assets/templates/openstack/keystone_get_v2_auth.jinja [new file with mode: 0644]
robot/assets/templates/openstack/keystone_get_v3_auth.jinja [moved from robot/assets/templates/keystone_get_v3_auth.template with 59% similarity]
robot/assets/templates/openstack/neutron_add_network.jinja [moved from robot/assets/templates/neutron_add_network.template with 66% similarity]
robot/assets/templates/openstack/neutron_add_subnet.jinja [new file with mode: 0644]
robot/assets/templates/openstack/nova_add_keypair.jinja [new file with mode: 0644]
robot/assets/templates/openstack/nova_add_server.jinja [new file with mode: 0644]
robot/assets/templates/policy/closedloop_configpolicy.jinja [moved from robot/assets/templates/policy/closedloop_configpolicy.template with 100% similarity]
robot/assets/templates/policy/closedloop_createpolicy.jinja [moved from robot/assets/templates/policy/closedloop_createpolicy.template with 92% similarity]
robot/assets/templates/policy/closedloop_deletepolicy.jinja [moved from robot/assets/templates/policy/closedloop_deletepolicy.template with 62% similarity]
robot/assets/templates/policy/closedloop_getconfigpolicy.jinja [moved from robot/assets/templates/policy/closedloop_getconfigpolicy.template with 69% similarity]
robot/assets/templates/policy/closedloop_opspolicy.jinja [moved from robot/assets/templates/policy/closedloop_opspolicy.template with 94% similarity]
robot/assets/templates/policy/closedloop_pushpolicy.jinja [new file with mode: 0644]
robot/assets/templates/policy/closedloop_pushpolicy.template [deleted file]
robot/assets/templates/sdnc/preload.jinja [moved from robot/assets/templates/sdnc/preload.template with 71% similarity]
robot/assets/templates/template_example.template [deleted file]
robot/resources/aai/add-relationship-list.robot
robot/resources/aai/ccvpn-connectivities.robot
robot/resources/aai/ccvpn-vpn-bindings.robot
robot/resources/aai/create_availability_zone.robot
robot/resources/aai/create_complex.robot
robot/resources/aai/create_customer.robot
robot/resources/aai/create_service.robot
robot/resources/aai/create_tenant.robot
robot/resources/aai/create_vnfc.robot
robot/resources/aai/create_zone.robot
robot/resources/aai/network.robot
robot/resources/aai/service_instance.robot
robot/resources/aai/volume_group.robot
robot/resources/asdc_interface.robot
robot/resources/demo_preload.robot
robot/resources/heatbridge.robot
robot/resources/json_templater.robot [deleted file]
robot/resources/openstack/cinder_interface.robot
robot/resources/openstack/heat_interface.robot
robot/resources/openstack/keystone_interface.robot
robot/resources/openstack/neutron_interface.robot
robot/resources/openstack/nova_interface.robot
robot/resources/sdngc_interface.robot
robot/resources/stack_validation/policy_check_vfw.robot
robot/resources/stack_validation/validate_common.robot
robot/resources/test_templates/closedloop_test_template.robot

@@ -1,5 +1,5 @@
 {
-      "connectivity-id": "${connectivity_id}",
+      "connectivity-id": "{{connectivity_id}}",
       "bandwidth-profile-name": "",
       "vpn-type": "",
       "cir": "",
diff --git a/robot/assets/templates/aai/add-relationship.jinja b/robot/assets/templates/aai/add-relationship.jinja
new file mode 100644 (file)
index 0000000..e09dbcc
--- /dev/null
@@ -0,0 +1,4 @@
+{
+    "related-to": "{{related_class_name}}",
+    "related-link": "{{related_object_url}}"
+}
diff --git a/robot/assets/templates/aai/add-relationship.template b/robot/assets/templates/aai/add-relationship.template
deleted file mode 100644 (file)
index e8550aa..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-    "related-to": "${related_class_name}",
-    "related-link": "${related_object_url}"
-}
@@ -1,5 +1,5 @@
 {
-  "vpn-id": "${vpn_id}",
+  "vpn-id": "{{vpn_id}}",
   "vpn-name": "",
   "vpn-platform": "",
   "vpn-type": "",
@@ -1,5 +1,5 @@
 {
-"availability-zone-name":"${availability_zone_name}",
+"availability-zone-name":"{{availability_zone_name}}",
 "hypervisor-type": "KVM",
 "operational-status": "Active"
 }
@@ -1,6 +1,6 @@
         {
-            "complex-name": "${complex_name}",
-            "physical-location-id": "${physical_location_id}",
+            "complex-name": "{{complex_name}}",
+            "physical-location-id": "{{physical_location_id}}",
             "data-center-code": "example-data-center-code-val-5556",
             "identity-url": "example-identity-url-val-56898",
             "physical-location-type": "example-physical-location-type-val-7608",
                 "relationship": [
                     {
                         "related-to": "cloud-region",
-                        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/${region}",
+                        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/{{region}}",
                         "relationship-data": [
                             {
                                 "relationship-key": "cloud-region.cloud-owner",
-                                "relationship-value": "${cloud_owner}"
+                                "relationship-value": "{{cloud_owner}}"
                             },
                             {
                                 "relationship-key": "cloud-region.cloud-region-id",
-                                "relationship-value": "${region}"
+                                "relationship-value": "{{region}}"
                             }
                         ],
                         "related-to-property": [
                             {
                                 "property-key": "cloud-region.owner-defined-type",
-                                "property-value": "${owner_defined_type}"
+                                "property-value": "{{owner_defined_type}}"
                             }
                         ]
                     }
@@ -1,22 +1,22 @@
 {
-         "global-customer-id": "${global_customer_id}",
-         "subscriber-name": "${subscriber_name}",
-         "subscriber-type": "${subscriber_type}",
+         "global-customer-id": "{{global_customer_id}}",
+         "subscriber-name": "{{subscriber_name}}",
+         "subscriber-type": "{{subscriber_type}}",
          "service-subscriptions": {
                  "service-subscription": [{
-                         "service-type": "${service1}",
+                         "service-type": "{{service1}}",
                          "relationship-list": {
                                  "relationship": [{
                                          "related-to": "tenant",
                                          "relationship-data": [{
                                                  "relationship-key": "cloud-region.cloud-owner",
-                                                 "relationship-value": "${cloud_owner1}"
+                                                 "relationship-value": "{{cloud_owner1}}"
                                          }, {
                                                  "relationship-key": "cloud-region.cloud-region-id",
-                                                 "relationship-value": "${cloud_region_id1}"
+                                                 "relationship-value": "{{cloud_region_id1}}"
                                          }, {
                                                  "relationship-key": "tenant.tenant-id",
-                                                 "relationship-value": "${tenant_id1}"
+                                                 "relationship-value": "{{tenant_id1}}"
                                          }]
                                  }]
                          }
 {
-       "global-customer-id" : "${global_customer_id}",
-       "subscriber-name" : "${subscriber_name}",
-       "subscriber-type" : "${subscriber_type}",
+       "global-customer-id" : "{{global_customer_id}}",
+       "subscriber-name" : "{{subscriber_name}}",
+       "subscriber-type" : "{{subscriber_type}}",
        "service-subscriptions" : {
                "service-subscription" : [{
-                               "service-type" : "${service1}",
+                               "service-type" : "{{service1}}",
                                "relationship-list" : {
                                        "relationship" : [{
                                                        "related-to" : "tenant",
                                                        "relationship-data" : [{
                                                                        "relationship-key" : "cloud-region.cloud-owner",
-                                                                       "relationship-value" : "${cloud_owner}"
+                                                                       "relationship-value" : "{{cloud_owner}}"
                                                                }, {
                                                                        "relationship-key" : "cloud-region.cloud-region-id",
-                                                                       "relationship-value" : "${cloud_region_id}"
+                                                                       "relationship-value" : "{{cloud_region_id}}"
                                                                }, {
                                                                        "relationship-key" : "tenant.tenant-id",
-                                                                       "relationship-value" : "${tenant_id}"
+                                                                       "relationship-value" : "{{tenant_id}}"
                                                                }
                                                        ]
                                                }
                                        ]
                                }
                        }, {
-                               "service-type" : "${service2}",
+                               "service-type" : "{{service2}}",
                                "relationship-list" : {
                                        "relationship" : [{
                                                        "related-to" : "tenant",
                                                        "relationship-data" : [{
                                                                        "relationship-key" : "cloud-region.cloud-owner",
-                                                                       "relationship-value" : "${cloud_owner}"
+                                                                       "relationship-value" : "{{cloud_owner}}"
                                                                }, {
                                                                        "relationship-key" : "cloud-region.cloud-region-id",
-                                                                       "relationship-value" : "${cloud_region_id}"
+                                                                       "relationship-value" : "{{cloud_region_id}}"
                                                                }, {
                                                                        "relationship-key" : "tenant.tenant-id",
-                                                                       "relationship-value" : "${tenant_id}"
+                                                                       "relationship-value" : "{{tenant_id}}"
                                                                }
                                                        ]
                                                }
                                        ]
                                }
                        }, {
-                               "service-type" : "${service3}",
+                               "service-type" : "{{service3}}",
                                "relationship-list" : {
                                        "relationship" : [{
                                                        "related-to" : "tenant",
                                                        "relationship-data" : [{
                                                                        "relationship-key" : "cloud-region.cloud-owner",
-                                                                       "relationship-value" : "${cloud_owner}"
+                                                                       "relationship-value" : "{{cloud_owner}}"
                                                                }, {
                                                                        "relationship-key" : "cloud-region.cloud-region-id",
-                                                                       "relationship-value" : "${cloud_region_id}"
+                                                                       "relationship-value" : "{{cloud_region_id}}"
                                                                }, {
                                                                        "relationship-key" : "tenant.tenant-id",
-                                                                       "relationship-value" : "${tenant_id}"
+                                                                       "relationship-value" : "{{tenant_id}}"
                                                                }
                                                        ]
                                                }
                                        ]
                                }
                        }, {
-                               "service-type" : "${service4}",
+                               "service-type" : "{{service4}}",
                                "relationship-list" : {
                                        "relationship" : [{
                                                        "related-to" : "tenant",
                                                        "relationship-data" : [{
                                                                        "relationship-key" : "cloud-region.cloud-owner",
-                                                                       "relationship-value" : "${cloud_owner}"
+                                                                       "relationship-value" : "{{cloud_owner}}"
                                                                }, {
                                                                        "relationship-key" : "cloud-region.cloud-region-id",
-                                                                       "relationship-value" : "${cloud_region_id}"
+                                                                       "relationship-value" : "{{cloud_region_id}}"
                                                                }, {
                                                                        "relationship-key" : "tenant.tenant-id",
-                                                                       "relationship-value" : "${tenant_id}"
+                                                                       "relationship-value" : "{{tenant_id}}"
                                                                }
                                                        ]
                                                }
                                        ]
                                }
                        }, {
-                               "service-type" : "${service5}",
+                               "service-type" : "{{service5}}",
                                "relationship-list" : {
                                        "relationship" : [{
                                                        "related-to" : "tenant",
                                                        "relationship-data" : [{
                                                                        "relationship-key" : "cloud-region.cloud-owner",
-                                                                       "relationship-value" : "${cloud_owner}"
+                                                                       "relationship-value" : "{{cloud_owner}}"
                                                                }, {
                                                                        "relationship-key" : "cloud-region.cloud-region-id",
-                                                                       "relationship-value" : "${cloud_region_id}"
+                                                                       "relationship-value" : "{{cloud_region_id}}"
                                                                }, {
                                                                        "relationship-key" : "tenant.tenant-id",
-                                                                       "relationship-value" : "${tenant_id}"
+                                                                       "relationship-value" : "{{tenant_id}}"
                                                                }
                                                        ]
                                                }
                                        ]
                                }
                        }, {
-                               "service-type" : "${service6}",
+                               "service-type" : "{{service6}}",
                                "relationship-list" : {
                                        "relationship" : [{
                                                        "related-to" : "tenant",
                                                        "relationship-data" : [{
                                                                        "relationship-key" : "cloud-region.cloud-owner",
-                                                                       "relationship-value" : "${cloud_owner}"
+                                                                       "relationship-value" : "{{cloud_owner}}"
                                                                }, {
                                                                        "relationship-key" : "cloud-region.cloud-region-id",
-                                                                       "relationship-value" : "${cloud_region_id}"
+                                                                       "relationship-value" : "{{cloud_region_id}}"
                                                                }, {
                                                                        "relationship-key" : "tenant.tenant-id",
-                                                                       "relationship-value" : "${tenant_id}"
+                                                                       "relationship-value" : "{{tenant_id}}"
                                                                }
                                                        ]
                                                }
diff --git a/robot/assets/templates/aai/add_service_body.jinja b/robot/assets/templates/aai/add_service_body.jinja
new file mode 100644 (file)
index 0000000..76eab16
--- /dev/null
@@ -0,0 +1,6 @@
+{
+   "service-id": "{{UUID}}",
+   "service-description": "{{service_type}}"
+}
+
+
diff --git a/robot/assets/templates/aai/add_service_body.template b/robot/assets/templates/aai/add_service_body.template
deleted file mode 100644 (file)
index ca32fd5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-   "service-id": "${UUID}",
-   "service-description": "${service_type}"
-}
-
-
diff --git a/robot/assets/templates/aai/add_tenant_body.jinja b/robot/assets/templates/aai/add_tenant_body.jinja
new file mode 100644 (file)
index 0000000..71430b9
--- /dev/null
@@ -0,0 +1,18 @@
+{
+        "cloud-owner": "{{cloud_owner}}",
+        "cloud-region-id": "{{cloud_region_id}}",
+        "cloud-type": "{{cloud_type}}",
+        "owner-defined-type": "{{owner_defined_type}}",
+        "cloud-region-version": "{{cloud_region_version}}",
+        "cloud-zone": "{{cloud_zone}}",
+        {{resource_version}}
+        "tenants": {
+                "tenant": [{
+                        "tenant-id": "{{tenant_id}}",
+                        "tenant-name": "{{tenant_name}}"
+
+                }]
+        }
+}
+
+
diff --git a/robot/assets/templates/aai/add_tenant_body.template b/robot/assets/templates/aai/add_tenant_body.template
deleted file mode 100644 (file)
index a7dbbbf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-        "cloud-owner": "${cloud_owner}",
-        "cloud-region-id": "${cloud_region_id}",
-        "cloud-type": "${cloud_type}",
-        "owner-defined-type": "${owner_defined_type}",
-        "cloud-region-version": "${cloud_region_version}",
-        "cloud-zone": "${cloud_zone}",
-        ${resource_version}
-        "tenants": {
-                "tenant": [{
-                        "tenant-id": "${tenant_id}",
-                        "tenant-name": "${tenant_name}"
-
-                }]
-        }
-}
-
-
diff --git a/robot/assets/templates/aai/add_vnfc_body.jinja b/robot/assets/templates/aai/add_vnfc_body.jinja
new file mode 100644 (file)
index 0000000..fa32b4a
--- /dev/null
@@ -0,0 +1,7 @@
+{
+"vnfc-name": "{{vnfc_name}}",
+"nfc-naming-code": "{{vnfc_nc}}",
+"nfc-function": "{{vnfc_func}}",
+"in-maint": "false",
+"is-closed-loop-disabled": "false"
+}
\ No newline at end of file
diff --git a/robot/assets/templates/aai/add_vnfc_body.template b/robot/assets/templates/aai/add_vnfc_body.template
deleted file mode 100644 (file)
index 88ababd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-"vnfc-name": "${vnfc_name}",
-"nfc-naming-code": "${vnfc_nc}",
-"nfc-function": "${vnfc_func}",
-"in-maint": "false",
-"is-closed-loop-disabled": "false"
-}
\ No newline at end of file
diff --git a/robot/assets/templates/aai/add_zone_body.jinja b/robot/assets/templates/aai/add_zone_body.jinja
new file mode 100644 (file)
index 0000000..87dfaa5
--- /dev/null
@@ -0,0 +1,7 @@
+{
+"zone-id":"{{zone_id}}",
+"zone-name":"{{zone_name}}",
+"design-type":"{{design_type}}",
+"zone-context":"{{zone_context}}",
+"status":"deployed"
+}
\ No newline at end of file
diff --git a/robot/assets/templates/aai/add_zone_body.template b/robot/assets/templates/aai/add_zone_body.template
deleted file mode 100644 (file)
index 01f99c0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-"zone-id":"${zone_id}",
-"zone-name":"${zone_name}",
-"design-type":"${design_type}",
-"zone-context":"${zone_context}",
-"status":"deployed"
-}
\ No newline at end of file
@@ -9,7 +9,7 @@
             { 
                 "vserver": 
                 { 
-                    "vserver-name": "${vserver_name}" 
+                    "vserver-name": "{{vserver_name}}" 
                 }
             } 
         ] 
@@ -1,7 +1,7 @@
 {
    "service-subscription":[
       {
-         "service-type":"{$service_type}",
+         "service-type":"{{service_type}}",
          "resource-version":"1473866861",
          "service-instances":{
             "service-instance":[
diff --git a/robot/assets/templates/aai/vlb_closed_loop_hack.jinja b/robot/assets/templates/aai/vlb_closed_loop_hack.jinja
new file mode 100644 (file)
index 0000000..bf03459
--- /dev/null
@@ -0,0 +1,7 @@
+{
+       "is-base-vf-module": false,
+       "persona-model-id": "{{persona_model_id}}",
+       "persona-model-version": "1.0",
+       "vf-module-id": "{{vf_module_id}}",
+       "vf-module-name": "{{vf_module_id}}"                                                             
+}
diff --git a/robot/assets/templates/aai/vlb_closed_loop_hack.template b/robot/assets/templates/aai/vlb_closed_loop_hack.template
deleted file mode 100644 (file)
index 27f9c96..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-       "is-base-vf-module": false,
-       "persona-model-id": "${persona_model_id}",
-       "persona-model-version": "1.0",
-       "vf-module-id": "${vf_module_id}",
-       "vf-module-name": "${vf_module_id}"                                                              
-}
diff --git a/robot/assets/templates/asdc/action.jinja b/robot/assets/templates/asdc/action.jinja
new file mode 100644 (file)
index 0000000..3ef9f60
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "action": "{{action}}"
+}
\ No newline at end of file
diff --git a/robot/assets/templates/asdc/action.template b/robot/assets/templates/asdc/action.template
deleted file mode 100644 (file)
index 4d417c9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "action": "${action}"
-}
\ No newline at end of file
diff --git a/robot/assets/templates/asdc/artifact_upload.jinja b/robot/assets/templates/asdc/artifact_upload.jinja
new file mode 100644 (file)
index 0000000..80e6fc6
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  "artifactLabel":"{{artifactLabel}}",
+  "artifactName": "{{artifactName}}",
+  "artifactType": "{{artifactType}}",
+  "artifactGroupType": "{{artifactGroupType}}",
+  "description": "{{description}}",
+  "payloadData": "{{payloadData}}"
+}
diff --git a/robot/assets/templates/asdc/artifact_upload.template b/robot/assets/templates/asdc/artifact_upload.template
deleted file mode 100644 (file)
index 9be6ca0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "artifactLabel":"${artifactLabel}",
-  "artifactName": "${artifactName}",
-  "artifactType": "${artifactType}",
-  "artifactGroupType": "${artifactGroupType}",
-  "description": "${description}",
-  "payloadData": "${payloadData}"
-}
@@ -1,6 +1,6 @@
 [
   {
-    "defaultValue": "${nf_type}",
+    "defaultValue": "{{nf_type}}",
     "description": null,
     "name": "nf_type",
     "parentUniqueId": null,
@@ -10,7 +10,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${nf_type_uid}",
+    "uniqueId": "{{nf_type_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -22,7 +22,7 @@
     "inputPath": null
   },
   {
-    "defaultValue": "${nf_role}",
+    "defaultValue": "{{nf_role}}",
     "description": null,
     "name": "nf_role",
     "parentUniqueId": null,
@@ -32,7 +32,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${nf_role_uid}",
+    "uniqueId": "{{nf_role_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -9,8 +9,8 @@
                "password": false,
                "required": true,
                "type": "string",
-               "value": ${providing_service_invariant_uuid},
-                "uniqueId": "${uniqueId}.providing_service_invariant_uuid"
+               "value": {{providing_service_invariant_uuid}},
+                "uniqueId": "{{uniqueId}}.providing_service_invariant_uuid"
        },
         {
                "definition": false,
@@ -23,8 +23,8 @@
                "password": false,
                "required": true,
                "type": "string",
-               "value": ${providing_service_uuid},
-                "uniqueId": "${uniqueId}.providing_service_uuid"
+               "value": {{providing_service_uuid}},
+                "uniqueId": "{{uniqueId}}.providing_service_uuid"
        },
         {
                "definition": false,
@@ -37,7 +37,7 @@
                "password": false,
                "required": true,
                "type": "string",
-               "value": ${providing_service_name},
-                "uniqueId": "${uniqueId}.providing_service_name"
+               "value": {{providing_service_name}},
+                "uniqueId": "{{uniqueId}}.providing_service_name"
        }
 ]
@@ -1,10 +1,10 @@
 [
 {
-        "uniqueId": "${uniqueId}",
+        "uniqueId": "{{uniqueId}}",
         "type": "string",
         "required": false,
         "definition": false,
-        "description": "${description}",
+        "description": "{{description}}",
         "schema": {
           "property": {
             "required": false,
           "empty": false
         },
         "password": false,
-        "name": "${name}",
-        "value": "${value}",
+        "name": "{{name}}",
+        "value": "{{value}}",
         "hidden": false,
         "immutable": false,
-        "parentUniqueId": "${parentUniqueId}",
+        "parentUniqueId": "{{parentUniqueId}}",
         "schemaProperty": {
           "required": false,
           "definition": true,
@@ -33,7 +33,7 @@
           "empty": false
         },
         "getInputProperty": false,
-        "ownerId": "${ownerId}",
+        "ownerId": "{{ownerId}}",
         "empty": false
       }
 ]
   "icon": "defaulticon",
   "componentInstancesProperties": {},
   "componentInstancesAttributes": {},
-  "name": "${software_product_name}",
+  "name": "{{software_product_name}}",
   "tags": [
-    "${software_product_name}"
+    "{{software_product_name}}"
   ],
   "capabilities": {},
   "requirements": {},
   "deploymentArtifacts": {},
   "componentType": "RESOURCE",
-  "vendorName": "${vendor_name}",
+  "vendorName": "{{vendor_name}}",
   "vendorRelease": "1.0",
   "componentInstances": [],
   "properties": [],
   "attributes": [],
   "groups": [],
   "resourceType": "VF",
-  "csarUUID": "${software_product_id}",
+  "csarUUID": "{{software_product_id}}",
   "csarVersion": "1.0"
 }
\ No newline at end of file
@@ -9,9 +9,9 @@
       "uniqueId": "resourceNewCategory.allotted resource",
       "subcategories": [
         {
-          "name": "${subcategory}",
-          "normalizedName": "${subcategory}",
-          "uniqueId": "resourceNewCategory.allotted resource.${subcategory}",
+          "name": "{{subcategory}}",
+          "normalizedName": "{{subcategory}}",
+          "uniqueId": "resourceNewCategory.allotted resource.{{subcategory}}",
           "icons": [
             "allotted_resource"
           ]
       ]
     }
   ],
-  "description": "Alloted Resource ${subcategory}",
+  "description": "Alloted Resource {{subcategory}}",
   "icon": "defaulticon",
   "componentInstancesProperties": {},
   "componentInstancesAttributes": {},
-  "name": "${software_product_name}",
+  "name": "{{software_product_name}}",
   "tags": [
-    "${software_product_name}"
+    "{{software_product_name}}"
   ],
   "capabilities": {},
   "requirements": {},
   "deploymentArtifacts": {},
   "componentType": "RESOURCE",
-  "vendorName": "${vendor_name}",
+  "vendorName": "{{vendor_name}}",
   "vendorRelease": "1.0",
   "componentInstances": [],
   "properties": [],
   "icon": "network_l_1-3",
   "componentInstancesProperties": {},
   "componentInstancesAttributes": {},
-  "name": "${service_name}",
+  "name": "{{service_name}}",
   "tags": [
     "robot-ete",
-    "${service_name}"
+    "{{service_name}}"
   ],
   "capabilities": {},
   "requirements": {},
@@ -1,6 +1,6 @@
 [
   {
-    "defaultValue": "${nf_function}",
+    "defaultValue": "{{nf_function}}",
     "description": null,
     "name": "nf_function",
     "parentUniqueId": "cs0008",
@@ -10,7 +10,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${nf_function_uid}",
+    "uniqueId": "{{nf_function_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -22,7 +22,7 @@
     "inputPath": null
   },
   {
-    "defaultValue": "${nf_type}",
+    "defaultValue": "{{nf_type}}",
     "description": null,
     "name": "nf_type",
     "parentUniqueId": null,
@@ -32,7 +32,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${nf_type_uid}",
+    "uniqueId": "{{nf_type_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -44,7 +44,7 @@
     "inputPath": null
   },
   {
-    "defaultValue": "${nf_naming_code}",
+    "defaultValue": "{{nf_naming_code}}",
     "description": null,
     "name": "nf_naming_code",
     "parentUniqueId": null,
@@ -54,7 +54,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${nf_naming_code_uid}",
+    "uniqueId": "{{nf_naming_code_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -66,7 +66,7 @@
     "inputPath": null
   },
   {
-    "defaultValue": "${nf_role}",
+    "defaultValue": "{{nf_role}}",
     "description": null,
     "name": "nf_role",
     "parentUniqueId": null,
@@ -76,7 +76,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${nf_role_uid}",
+    "uniqueId": "{{nf_role_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -88,7 +88,7 @@
     "inputPath": null
   },
   {
-    "defaultValue": "${cloud_env}",
+    "defaultValue": "{{cloud_env}}",
     "description": "Cloud environment (e.g., openstack, rackspace)",
     "name": "cloud_env",
     "parentUniqueId": null,
@@ -98,7 +98,7 @@
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${cloud_env_uid}",
+    "uniqueId": "{{cloud_env_uid}}",
     "value": null,
     "definition": false,
     "getInputValues": null,
@@ -1,29 +1,29 @@
 [
   {
     "name": "nfc_function",
-    "parentUniqueId": "${parent_id}",
+    "parentUniqueId": "{{parent_id}}",
     "password": false,
     "required": false,
     "schema": {
       "property": {}
     },
     "type": "string",
-    "uniqueId": "${parent_id}.nfc_function",
-    "value": "${nfc_function}",
+    "uniqueId": "{{parent_id}}.nfc_function",
+    "value": "{{nfc_function}}",
     "definition": false
   },
   {
     "description": "vfc naming",
     "name": "nfc_naming",
-    "parentUniqueId": "${parent_id}",
+    "parentUniqueId": "{{parent_id}}",
     "password": false,
     "required": false,
     "schema": {
       "property": {}
     },
     "type": "org.openecomp.datatypes.Naming",
-    "uniqueId": "${parent_id}.nfc_naming",
-    "value": "{\"ecomp_generated_naming\":true,\"naming_policy\":\"${nfc_naming_policy}\"}",
+    "uniqueId": "{{parent_id}}.nfc_naming",
+    "value": "{\"ecomp_generated_naming\":true,\"naming_policy\":\"{{nfc_naming_policy}}\"}",
     "definition": false
   }
 ]
@@ -1,5 +1,5 @@
 {
-       "name": "${entitlement_pool_name}",
+       "name": "{{entitlement_pool_name}}",
        "description": "vendor entitlement pool",
        "thresholdValue": "100",
        "thresholdUnits": "Percentage",
@@ -7,7 +7,7 @@
                "choice": "",
                "other": ""
        },
-       "startDate": "${license_start_date}",
-       "expiryDate": "${license_end_date}",
+       "startDate": "{{license_start_date}}",
+       "expiryDate": "{{license_end_date}}",
        "manufacturerReferenceNumber": "111111"
 }
@@ -1,11 +1,11 @@
 {
-  "name": "${feature_group_name}",
+  "name": "{{feature_group_name}}",
   "description": "vendor feature group",
   "partNumber": "123abc456",
   "addedLicenseKeyGroupsIds": [
-    "${key_group_id}"
+    "{{key_group_id}}"
   ],
   "addedEntitlementPoolsIds": [
-    "${entitlement_pool_id}"
+    "{{entitlement_pool_id}}"
   ]
 }
similarity index 60%
rename from robot/assets/templates/asdc/key_group.template
rename to robot/assets/templates/asdc/key_group.jinja
index 2d194dc..91e4027 100644 (file)
@@ -1,10 +1,10 @@
 {
-       "name": "${key_group_name}",
+       "name": "{{key_group_name}}",
        "description": "vendor license key group",
        "type": "Universal",
        "thresholdValue": "100",
        "thresholdUnits": "Percentage",
-       "startDate": "${license_start_date}",
-       "expiryDate": "${license_end_date}",
+       "startDate": "{{license_start_date}}",
+       "expiryDate": "{{license_end_date}}",
        "manufacturerReferenceNumber": "11111"
 }
@@ -1,5 +1,5 @@
 {
-  "name": "${license_agreement_name}",
+  "name": "{{license_agreement_name}}",
   "description": "vendor license agreement",
   "requirementsAndConstrains": "abcdef",
   "licenseTerm": {
@@ -7,6 +7,6 @@
     "other": ""
   },
   "addedFeatureGroupsIds": [
-    "${feature_group_id}"
+    "{{feature_group_id}}"
   ]
 }
\ No newline at end of file
@@ -1,5 +1,5 @@
 {
-  "vendorName": "${vendor_name}",
+  "vendorName": "{{vendor_name}}",
   "description": "vendor license model",
   "iconRef": "icon"
 }
\ No newline at end of file
diff --git a/robot/assets/templates/asdc/resource_instance.jinja b/robot/assets/templates/asdc/resource_instance.jinja
new file mode 100644 (file)
index 0000000..18b7168
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "uniqueId": "{{catalog_resource_id}}{{milli_timestamp}}",
+  "posX": {{posX}},
+  "posY": {{posY}},
+  "name": "{{catalog_resource_name}}",
+  "componentVersion": "1.0",
+  "originType": "{{originType}}",
+  "icon": "defaulticon",
+  "componentUid": "{{catalog_resource_id}}"
+}
diff --git a/robot/assets/templates/asdc/resource_instance.template b/robot/assets/templates/asdc/resource_instance.template
deleted file mode 100644 (file)
index 18cf34c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "uniqueId": "${catalog_resource_id}${milli_timestamp}",
-  "posX": ${posX},
-  "posY": ${posY},
-  "name": "${catalog_resource_name}",
-  "componentVersion": "1.0",
-  "originType": "${originType}",
-  "icon": "defaulticon",
-  "componentUid": "${catalog_resource_id}"
-}
@@ -1,17 +1,17 @@
 {
-  "name": "${software_product_name}",
+  "name": "{{software_product_name}}",
   "description": "vendor software product",
   "category": "resourceNewCategory.generic",
   "subCategory": "resourceNewCategory.generic.abstract",
   "onboardingMethod" : "NetworkPackage",
-  "licensingVersion":  "${version_id}",
-  "vendorName": "${vendor_name}",
-  "vendorId": "${vendor_id}",
+  "licensingVersion":  "{{version_id}}",
+  "vendorName": "{{vendor_name}}",
+  "vendorId": "{{vendor_id}}",
   "icon": "icon",
   "licensingData": {
-    "licenseAgreement": "${license_agreement_id}",
+    "licenseAgreement": "{{license_agreement_id}}",
     "featureGroups": [
-      "${feature_group_id}"
+      "{{feature_group_id}}"
     ]
   }
 }
diff --git a/robot/assets/templates/asdc/user_remarks.jinja b/robot/assets/templates/asdc/user_remarks.jinja
new file mode 100644 (file)
index 0000000..ea01a24
--- /dev/null
@@ -0,0 +1 @@
+{"userRemarks":"{{user_remarks}}"}
\ No newline at end of file
diff --git a/robot/assets/templates/asdc/user_remarks.template b/robot/assets/templates/asdc/user_remarks.template
deleted file mode 100644 (file)
index 465115e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{"userRemarks":"${user_remarks}"}
\ No newline at end of file
diff --git a/robot/assets/templates/cinder_add_volume.template b/robot/assets/templates/cinder_add_volume.template
deleted file mode 100644 (file)
index 544f41e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-    "volume": {
-        "display_name": "${name}",
-        "display_description": "${description}",
-        "size": ${size},
-        "volume_type": "${type}",
-        "availability_zone": "${availability_zone}"
-    }
-}
\ No newline at end of file
diff --git a/robot/assets/templates/keystone_get_v2_auth.template b/robot/assets/templates/keystone_get_v2_auth.template
deleted file mode 100644 (file)
index 97182b0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "auth": {
-    "tenantId" : "${tenantId}",
-    "passwordCredentials": {
-      "username": "${username}",
-      "password": "${password}"
-    }
-  }
-}
-
diff --git a/robot/assets/templates/neutron_add_subnet.template b/robot/assets/templates/neutron_add_subnet.template
deleted file mode 100644 (file)
index 5a4264f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "subnet": {
-        "network_id": "${network_id}",
-        "ip_version": 4,
-        "name":"${subnet_name}",
-        "cidr": "${cidr}"
-    }
-}
\ No newline at end of file
diff --git a/robot/assets/templates/nova_add_keypair.template b/robot/assets/templates/nova_add_keypair.template
deleted file mode 100644 (file)
index 52e2b06..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-    "keypair": {
-        "name": "${name}",
-        "public_key": "${publickey}"
-    }
-}
\ No newline at end of file
diff --git a/robot/assets/templates/nova_add_server.template b/robot/assets/templates/nova_add_server.template
deleted file mode 100644 (file)
index d40774a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "server": {
-        "name": "${name}",
-        "imageRef": "${imageRef}",
-        "flavorRef": "${flavorRef}",
-        "config_drive": true,
-        "OS-DCF:diskConfig": "MANUAL",
-        "metadata": {
-            "${name}": "Server for attaching VVG"
-        },
-        "networks": [
-            {
-                "uuid": "${public_net_id}"
-            }
-        ]
-    }
-}
\ No newline at end of file
diff --git a/robot/assets/templates/openstack/cinder_add_volume.jinja b/robot/assets/templates/openstack/cinder_add_volume.jinja
new file mode 100644 (file)
index 0000000..b3a6c7b
--- /dev/null
@@ -0,0 +1,9 @@
+{
+    "volume": {
+        "display_name": "{{name}}",
+        "display_description": "{{description}}",
+        "size": {{size}},
+        "volume_type": "{{type}}",
+        "availability_zone": "{{availability_zone}}"
+    }
+}
\ No newline at end of file
@@ -1,12 +1,12 @@
 {
     "files": {},
     "disable_rollback": true,
-    "stack_name": "${stack_name}",
+    "stack_name": "{{stack_name}}",
     "parameters": 
-        ${parameters}
+        {{parameters}}
     ,
     "template":  
-        ${template}
+        {{template}}
     ,
     "timeout_mins": 60
 }
\ No newline at end of file
diff --git a/robot/assets/templates/openstack/keystone_get_v2_auth.jinja b/robot/assets/templates/openstack/keystone_get_v2_auth.jinja
new file mode 100644 (file)
index 0000000..efe6f0d
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "auth": {
+    "tenantId" : "{{tenantId}}",
+    "passwordCredentials": {
+      "username": "{{username}}",
+      "password": "{{password}}"
+    }
+  }
+}
+
@@ -6,19 +6,19 @@
             ],
             "password": {
                 "user": {
-                    "name": "${username}",
+                    "name": "{{username}",
                     "domain": {
-                        "id": "${domain_id}"
+                        "id": "{{domain_id}}"
                     },
-                    "password": "${password}"
+                    "password": "{{password}}"
                 }
             }
         
     },
     "scope": {
       "project": {
-        "name": "${project_name}",
-        "domain": { "id": "${domain_id}" }
+        "name": "{{project_name}}",
+        "domain": { "id": "{{domain_id}}" }
       }
     }
   }
@@ -1,7 +1,7 @@
 {
  "network":
   {
-    "name": "${name}",
+    "name": "{{name}}",
     "admin_state_up": false
   }
 }
\ No newline at end of file
diff --git a/robot/assets/templates/openstack/neutron_add_subnet.jinja b/robot/assets/templates/openstack/neutron_add_subnet.jinja
new file mode 100644 (file)
index 0000000..e0c2f83
--- /dev/null
@@ -0,0 +1,8 @@
+{
+    "subnet": {
+        "network_id": "{{network_id}}",
+        "ip_version": 4,
+        "name":"{{subnet_name}}",
+        "cidr": "{{cidr}}"
+    }
+}
\ No newline at end of file
diff --git a/robot/assets/templates/openstack/nova_add_keypair.jinja b/robot/assets/templates/openstack/nova_add_keypair.jinja
new file mode 100644 (file)
index 0000000..77912dd
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "keypair": {
+        "name": "{{name}}",
+        "public_key": "{{publickey}}"
+    }
+}
\ No newline at end of file
diff --git a/robot/assets/templates/openstack/nova_add_server.jinja b/robot/assets/templates/openstack/nova_add_server.jinja
new file mode 100644 (file)
index 0000000..e02cbec
--- /dev/null
@@ -0,0 +1,17 @@
+{
+    "server": {
+        "name": "{{name}}",
+        "imageRef": "{{imageRef}}",
+        "flavorRef": "{{flavorRef}}",
+        "config_drive": true,
+        "OS-DCF:diskConfig": "MANUAL",
+        "metadata": {
+            "{{name}}": "Server for attaching VVG"
+        },
+        "networks": [
+            {
+                "uuid": "{{public_net_id}}"
+            }
+        ]
+    }
+}
\ No newline at end of file
@@ -1,6 +1,6 @@
 {
        "policyConfigType": "BRMS_PARAM",
-       "policyName": "${policy_name}",
+       "policyName": "{{policy_name}}",
        "policyDescription": "Create BRMS Param policy",
        "attributes": {
                "RULE": {
@@ -1,5 +1,5 @@
 {
     "pdpGroup": "default",
     "policyComponent": "PDP",
-    "policyName": "${policy_name}"
+    "policyName": "{{policy_name}}"
 }
@@ -3,6 +3,6 @@
     },
     "configName" : ".*",
     "ecompName" : "DCAE",
-    "policyName" : "${config_policy_name}",
+    "policyName" : "{{config_policy_name}}",
     "unique" : true
 }
\ No newline at end of file
@@ -1,7 +1,7 @@
 
 { 
        "policyConfigType": "BRMS_PARAM", 
-       "policyName": "${policy_name}", 
+       "policyName": "{{policy_name}}", 
        "policyDescription": "Create BRMS Param policy for vFW", 
        "attributes": { 
                "RULE": { 
diff --git a/robot/assets/templates/policy/closedloop_pushpolicy.jinja b/robot/assets/templates/policy/closedloop_pushpolicy.jinja
new file mode 100644 (file)
index 0000000..7be4c9a
--- /dev/null
@@ -0,0 +1,5 @@
+{
+    "policyName" : "{{policy_name}}",
+    "policyType" : "{{policy_type}}",
+    "pdpGroup" : "default"
+}
\ No newline at end of file
diff --git a/robot/assets/templates/policy/closedloop_pushpolicy.template b/robot/assets/templates/policy/closedloop_pushpolicy.template
deleted file mode 100644 (file)
index ce1d485..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-    "policyName" : "${policy_name}",
-    "policyType" : "${policy_type}",
-    "pdpGroup" : "default"
-}
\ No newline at end of file
similarity index 71%
rename from robot/assets/templates/sdnc/preload.template
rename to robot/assets/templates/sdnc/preload.jinja
index 327d806..d1c6425 100644 (file)
                                "vnf-vms": []
                        },
                        "vnf-parameters":
-                               ${vnf_parameters}
+                               {{vnf_parameters}}
                        ,
                        "vnf-topology-identifier": {
-                               "generic-vnf-name": "${generic_vnf_name}",
-                               "generic-vnf-type": "${generic_vnf_type}",
-                               "vnf-name": "${vf_module_name}",
-                               "vnf-type": "${vf_module_type}",
-                               "service-type": "${service_type}"
+                               "generic-vnf-name": "{{generic_vnf_name}}",
+                               "generic-vnf-type": "{{generic_vnf_type}}",
+                               "vnf-name": "{{vf_module_name}}",
+                               "vnf-type": "{{vf_module_type}}",
+                               "service-type": "{{service_type}}"
                        }
                }
        }
diff --git a/robot/assets/templates/template_example.template b/robot/assets/templates/template_example.template
deleted file mode 100644 (file)
index 42583f1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  "requestReferences": {
-    "instanceId": "${instanceId}",
-    "requestId": "${requestId}"
-  }
-}
\ No newline at end of file
index 056b896..7b35349 100644 (file)
@@ -3,17 +3,14 @@ Documentation     Operations on relationship-list sub-object in AAI,
 ...    using specified base URL path including API version where it is implemented,
 ...    relies on system to choose default EdgeRule for the pair of object classes
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
-Resource    api_version_properties.robot
-Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating
 
 *** Variables ***
-${AAI_RELATIONSHIPLIST_PATH}=      relationship-list
+${AAI_RELATIONSHIPLIST_PATH}      relationship-list
 ${AAI_RELATIONSHIP_PATH}=      ${AAI_RELATIONSHIPLIST_PATH}/relationship
-${AAI_ADD_RELATIONSHIP_BODY}=    robot/assets/templates/aai/add-relationship.template
+${AAI_ADD_RELATIONSHIP_BODY}    aai/add-relationship.jinja
 ${AAI_RELATIONSHIP_DEPTH}=    ?depth=1
 
 *** Keywords ***
@@ -21,7 +18,8 @@ Add Relationship
     [Documentation]    Adds Relationship sub-object to existing object in AAI
     [Arguments]    ${api_version_base_object_url}  ${related_class_name}  ${related_object_url}
     ${arguments}=    Create Dictionary     related_class_name=${related_class_name}  related_object_url=${related_object_url}
-    ${data}=    Fill JSON Template File    ${AAI_ADD_RELATIONSHIP_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_RELATIONSHIP_BODY}    ${arguments}
     ${put_resp}=    Run A&AI Put Request     ${api_version_base_object_url}/${AAI_RELATIONSHIP_PATH}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}     ^(201|200)$
@@ -39,5 +37,4 @@ Get Object With Depth
     ${resp}=    Run A&AI Get Request     ${api_version_base_object_url}${AAI_RELATIONSHIP_DEPTH}
     Should Be Equal As Strings  ${resp.status_code}     200
     Log    Returning response ${resp.json()}
-    [Return]  ${resp.json()}
-
+    [Return]  ${resp.json()}
\ No newline at end of file
index 3f4dc0b..7e18709 100644 (file)
@@ -1,19 +1,18 @@
 *** Settings ***
 Documentation     Operations on connectivities in AAI for CCVPN use case, using earliest API version where it is implemented and latest API version where it is not implemented
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Resource    api_version_properties.robot
 Resource    add-relationship-list.robot
 Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating    
 
 *** Variables ***
 ${AAI_CONN_ROOT_PATH}      /network/connectivities/connectivity
 ${AAI_CONN_EXAMPLES_PATH}      /examples/connectivities
 ${AAI_CONN_NODES_PATH}      /nodes/connectivities
-${AAI_ADD_CONNECTIVITY_BODY}=    robot/assets/templates/aai/add-connectivity.template
+${AAI_ADD_CONNECTIVITY_BODY}=    aai/add-connectivity.jinja
 ${AAI_CONN_API_NA_INDEX_PATH}=  ${AAI_BEIJING_INDEX_PATH}
 ${AAI_CONN_API_IMPL_INDEX_PATH}=  ${AAI_CASABLANCA_INDEX_PATH}
 
@@ -29,7 +28,8 @@ Create Connectivity
     [Documentation]    Creates Connectivity in AAI
     [Arguments]    ${connectivity_id}
     ${arguments}=    Create Dictionary     connectivity_id=${connectivity_id}
-    ${data}=    Fill JSON Template File    ${AAI_ADD_CONNECTIVITY_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_CONNECTIVITY_BODY}    ${arguments}
     ${put_resp}=    Run A&AI Put Request     ${AAI_CONN_API_IMPL_INDEX_PATH}${AAI_CONN_ROOT_PATH}/${connectivity_id}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}     ^(201|200)$
index c139f7c..67789e2 100644 (file)
@@ -3,19 +3,18 @@ Documentation     Operations on vpn-bindings in AAI for CCVPN use case,
 ...     using earliest API version where changes are implemented and
 ...     latest API version where changes are not implemented
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Resource    api_version_properties.robot
 Resource    add-relationship-list.robot
 Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating
 
 *** Variables ***
 ${AAI_VPNB_ROOT_PATH}      /network/vpn-bindings/vpn-binding
 ${AAI_VPNB_EXAMPLES_PATH}      /examples/vpn-bindings
 ${AAI_VPNB_NODES_PATH}      /nodes/vpn-bindings
-${AAI_ADD_VPNBINDING_BODY}=    robot/assets/templates/aai/add-vpn-binding.template
+${AAI_ADD_VPNBINDING_BODY}=    aai/add-vpn-binding.jinja
 ${AAI_VPNB_API_NA_INDEX_PATH}=  ${AAI_BEIJING_INDEX_PATH}
 ${AAI_VPNB_API_IMPL_INDEX_PATH}=  ${AAI_CASABLANCA_INDEX_PATH}
 
@@ -31,7 +30,8 @@ Create VPN Binding
     [Documentation]    Creates VPN Binding in AAI
     [Arguments]    ${vpn_id}
     ${arguments}=    Create Dictionary     vpn_id=${vpn_id}
-    ${data}=    Fill JSON Template File    ${AAI_ADD_VPNBINDING_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_VPNBINDING_BODY}    ${arguments}
     ${put_resp}=    Run A&AI Put Request     ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}     ^(201|200)$
index d8b6111..8bc7b64 100644 (file)
@@ -1,17 +1,16 @@
 *** Settings ***
 Documentation     Create availability zone in A&AI.
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating
 
 *** Variables ***
 ${AZ_ROOT_PATH}      /cloud-infrastructure/cloud-regions/cloud-region
 ${AZ_ZONE_PATH}      /availability-zones/availability-zone
 
-${AAI_ADD_AVAILABILITY_ZONE_BODY}=    robot/assets/templates/aai/add_availability_zone_body.template
+${AAI_ADD_AVAILABILITY_ZONE_BODY}    aai/add_availability_zone_body.jinja
 
 *** Keywords ***
 Create Availability Zone If Not Exists
@@ -25,7 +24,8 @@ Create Availability Zone
     [Documentation]    Creates availability zone in A&AI
     [Arguments]    ${availability_zone_name}  ${cloud-owner}  ${cloud-region-id}
     ${arguments}=    Create Dictionary     availability_zone_name=${availability_zone_name}
-    ${data}=    Fill JSON Template File    ${AAI_ADD_AVAILABILITY_ZONE_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_AVAILABILITY_ZONE_BODY}    ${arguments}
     ${put_resp}=    Run A&AI Put Request     ${GLOBAL_AAI_INDEX_PATH}${AZ_ROOT_PATH}/${cloud-owner}/${cloud-region-id}${AZ_ZONE_PATH}/${availability_zone_name}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}     ^(201|200)$
index e1be288..8fed0c7 100644 (file)
@@ -1,13 +1,10 @@
 *** Settings ***
 Documentation    Create A&AI Customer API.
-...
-...                  Create A&AI Customer API
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating    
 
 
 *** Variables ***
@@ -15,8 +12,7 @@ ${COMPLEX_INDEX_PATH}     /aai/v11
 ${ROOT_COMPLEXES_PATH}  /cloud-infrastructure/complexes
 ${ROOT_COMPLEX_PATH}  /cloud-infrastructure/complexes/complex
 
-${SYSTEM USER}    robot-ete
-${AAI_ADD_COMPLEX_BODY}=    robot/assets/templates/aai/add_complex_body.template
+${AAI_ADD_COMPLEX_BODY}    aai/add_complex_body.jinja
 
 *** Keywords ***
 Inventory Complex If Not Exists
@@ -27,14 +23,15 @@ Inventory Complex If Not Exists
     Inventory Complex  ${complex_name}   ${physical_location_id}   ${cloud_owner}   ${region}   ${owner_defined_type}
 
 Inventory Complex
-    [Documentation]    Inventorys a COmplex in A&AI
+    [Documentation]    Inventorys a Complex in A&AI
     [Arguments]    ${complex_name}   ${physical_location_id}   ${cloud_owner}   ${region}   ${owner_defined_type}
     ${arguments}=    Create Dictionary     complex_name=${complex_name}
     Set To Dictionary   ${arguments}     physical_location_id=${physical_location_id}
     Set To Dictionary   ${arguments}     cloud_owner=${cloud_owner}
     Set To Dictionary   ${arguments}     region=${region}
     Set To Dictionary   ${arguments}     owner_defined_type=${owner_defined_type}
-    ${data}=   Fill JSON Template File    ${AAI_ADD_COMPLEX_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_COMPLEX_BODY}    ${arguments}
        ${put_resp}=    Run A&AI Put Request     ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}    ^(201|200)$
index 7854775..ecae4d3 100644 (file)
@@ -1,25 +1,23 @@
 *** Settings ***
 Documentation    Create A&AI Customer API.
-...
-...                  Create A&AI Customer API
 
 Resource   aai_interface.robot
-Resource   ../json_templater.robot
 Library    Collections
-
+Library    ONAPLibrary.Templating    
 
 *** Variables ***
 ${INDEX PATH}     /aai/v11
 ${ROOT_CUSTOMER_PATH}  /business/customers/customer/
 ${SYSTEM USER}    robot-ete
-${A&AI ADD CUSTOMER BODY}    robot/assets/templates/aai/add_customer.template
+${A&AI ADD CUSTOMER BODY}    aai/add_customer.jinja
 
 *** Keywords ***
 Create Customer
     [Documentation]    Creates a customer in A&AI
     [Arguments]    ${customer_name}  ${customer_id}  ${customer_type}    ${service_type}      ${clouder_owner}    ${cloud_region_id}    ${tenant_id}
     ${arguments}=    Create Dictionary    subscriber_name=${customer_name}    global_customer_id=${customer_id}    subscriber_type=${customer_type}     cloud_owner1=${clouder_owner}  cloud_region_id1=${cloud_region_id}    tenant_id1=${tenant_id}    service1=${service_type}
-    ${data}=   Fill JSON Template File    ${A&AI ADD CUSTOMER BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${A&AI ADD CUSTOMER BODY}    ${arguments}
        ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id}    ${data}
     Should Be Equal As Strings         ${put_resp.status_code}         201
        [Return]  ${put_resp.status_code}
index 0584a2a..cbf0467 100644 (file)
@@ -1,13 +1,10 @@
 *** Settings ***
 Documentation    Create A&AI Customer API.
-...
-...                  Create A&AI Customer API
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Library    Collections
-Library                  ONAPLibrary.Utilities
-
+Library           ONAPLibrary.Utilities
+Library           ONAPLibrary.Templating    
 
 
 *** Variables ***
@@ -15,7 +12,7 @@ ${INDEX PATH}     /aai/v11
 ${ROOT_SERVICE_PATH}  /service-design-and-creation/services
 
 ${SYSTEM USER}    robot-ete
-${AAI_ADD_SERVICE_BODY}=    robot/assets/templates/aai/add_service_body.template
+${AAI_ADD_SERVICE_BODY}=    aai/add_service_body.jinja
 
 *** Keywords ***
 Create Service If Not Exists
@@ -30,7 +27,8 @@ Create Service
     [Arguments]    ${service_type}
     ${uuid}=    Generate UUID4
     ${arguments}=    Create Dictionary    service_type=${service_type}    UUID=${uuid}
-    ${data}=   Fill JSON Template File    ${AAI_ADD_SERVICE_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_SERVICE_BODY}    ${arguments}
     ${fullpath}=    Catenate         ${INDEX PATH}${ROOT_SERVICE_PATH}/service/${uuid}
        ${put_resp}=    Run A&AI Put Request     ${fullpath}    ${data}
     Should Be Equal As Strings         ${put_resp.status_code}         201
index 24cb4d4..1e9fa80 100644 (file)
@@ -1,20 +1,16 @@
 *** Settings ***
 Documentation    Create A&AI Customer API.
-...
-...                  Create A&AI Customer API
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Library    Collections
-
+Library    ONAPLibrary.Templating
 
 
 *** Variables ***
 ${INDEX PATH}     /aai/v11
 ${ROOT_TENANT_PATH}  /cloud-infrastructure/cloud-regions/cloud-region/
 
-${SYSTEM USER}    robot-ete
-${AAI_ADD_TENANT_BODY}=    robot/assets/templates/aai/add_tenant_body.template
+${AAI_ADD_TENANT_BODY}=    aai/add_tenant_body.jinja
 
 *** Keywords ***
 Inventory Tenant If Not Exists
@@ -29,7 +25,8 @@ Inventory Tenant
     [Arguments]    ${cloud_owner}  ${cloud_region_id}  ${cloud_type}    ${owner_defined_type}    ${cloud_region_version}    ${cloud_zone}    ${tenant_id}    ${tenant_name}
     ${json_resource_version}=   Get Resource Version If Exists   ${cloud_owner}  ${cloud_region_id}  ${cloud_type}    ${owner_defined_type}    ${cloud_region_version}    ${cloud_zone}
     ${arguments}=    Create Dictionary     cloud_owner=${cloud_owner}  cloud_region_id=${cloud_region_id}  cloud_type=${cloud_type}    owner_defined_type=${owner_defined_type}    cloud_region_version=${cloud_region_version}    cloud_zone=${cloud_zone}    tenant_id=${tenant_id}    tenant_name=${tenant_name}   resource_version=${json_resource_version}
-    ${data}=   Fill JSON Template File   ${AAI_ADD_TENANT_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_TENANT_BODY}    ${arguments}
        ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${ROOT_TENANT_PATH}${cloud_owner}/${cloud_region_id}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}    ^(201|200)$
index 359c62d..de79f46 100644 (file)
@@ -1,16 +1,15 @@
 *** Settings ***
 Documentation     Create VNFC in AAI
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating
 
 *** Variables ***
 ${VNFC_ROOT_PATH}      /network/vnfcs/vnfc
 
-${AAI_ADD_VNFC_BODY}=    robot/assets/templates/aai/add_vnfc_body.template
+${AAI_ADD_VNFC_BODY}=    aai/add_vnfc_body.jinja
 
 *** Keywords ***
 Create VNFC If Not Exists
@@ -24,7 +23,8 @@ Create VNFC
     [Documentation]    Creates VNFC in A&AI
     [Arguments]    ${vnfc_name}    ${vnfc_nc}    ${vnfc_func}
     ${arguments}=    Create Dictionary     vnfc_name=${vnfc_name}    vnfc_nc=${vnfc_nc}    vnfc_func=${vnfc_func}
-    ${data}=    Fill JSON Template File    ${AAI_ADD_VNFC_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_VNFC_BODY}    ${arguments}
     ${put_resp}=    Run A&AI Put Request     ${GLOBAL_AAI_INDEX_PATH}${VNFC_ROOT_PATH}/${vnfc_name}    ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}     ^(201|200)$
index 09d6ea6..644817c 100644 (file)
@@ -1,21 +1,17 @@
 *** Settings ***
 Documentation    Create A&AI Customer API.
-...
-...                  Create A&AI Customer API
 
-Resource    ../json_templater.robot
 Resource    aai_interface.robot
 Library    OperatingSystem
 Library    Collections
-
+Library    ONAPLibrary.Templating    
 
 
 *** Variables ***
 ${ZONE_INDEX_PATH}     /aai/v11
 ${ROOT_ZONE_PATH}  /network/zones/zone
 
-${SYSTEM USER}    robot-ete
-${AAI_ADD_ZONE_BODY}=    robot/assets/templates/aai/add_zone_body.template
+${AAI_ADD_ZONE_BODY}=    aai/add_zone_body.jinja
 
 *** Keywords ***
 Inventory Zone If Not Exists
@@ -29,7 +25,8 @@ Inventory Zone
     [Documentation]    Inventorys a Tenant in A&AI
     [Arguments]    ${zone_id}  ${zone_name}  ${design_type}    ${zone_context}
     ${arguments}=    Create Dictionary     zone_id=${zone_id}  zone_name=${zone_name}  design_type=${design_type}    zone_context=${zone_context}
-    ${data}=   Fill JSON Template File    ${AAI_ADD_ZONE_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${AAI_ADD_ZONE_BODY}    ${arguments}
        ${put_resp}=    Run A&AI Put Request     ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id}     ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}    ^(201|200)$
@@ -52,8 +49,3 @@ Get Zone
        ${resp}=    Run A&AI Get Request     ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id}
     Should Be Equal As Strings         ${resp.status_code}     200
        [Return]  ${resp.json()}
-
-
-
-
-
index a3fd773..8229a7e 100644 (file)
@@ -1,30 +1,20 @@
 *** Settings ***
 Documentation    Validate A&AI Serivce Instance
-...
-...                  Validate A&AI Serivce Instance
 
 Resource          aai_interface.robot
 Library    Collections
-Library    OperatingSystem
-Library    RequestsLibrary
-Library    ONAPLibrary.JSON
-
-Resource          ../json_templater.robot
 
 *** Variables ***
-${INDEX PATH}     /aai/v11
-${GENERIC_QUERY_PATH}  /search/generic-query?
-${SYSTEM USER}    robot-ete
-${CUSTOMER SPEC PATH}    /business/customers/customer/
-${SERVICE SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
-${SERVICE INSTANCE}    /service-instances?service-instance-name=
-${SERVCE INSTANCE TEMPLATE}    robot/assets/templates/aai/service_subscription.template
+${INDEX_PATH}     /aai/v11
+${CUSTOMER_SPEC_PATH}    /business/customers/customer/
+${SERVICE_SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
+${SERVICE_INSTANCE}    /service-instances?service-instance-name=
 
 *** Keywords ***
 Validate Network
     [Documentation]    Query and Validates A&AI Service Instance
     [Arguments]    ${service_instance_name}    ${service_type}  ${customer_id}
-       ${resp}=    Run A&AI Get Request      ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
+       ${resp}=    Run A&AI Get Request      ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}${service_type}${SERVICE_INSTANCE}${service_instance_name}
     Dictionary Should Contain Value    ${resp.json()['service-instance'][0]}    ${service_instance_name}
 
 
@@ -32,9 +22,9 @@ Validate Network
 *** Keywords ***
 Create Network
     [Documentation]    Query and Validates A&AI Service Instance
-    [Arguments]    ${CUSTOMER ID}
+    [Arguments]    ${customer_id}
     ${json_string}=    Catenate     { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]}
-       ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}/VDNS    ${json_string}
+       ${put_resp}=    Run A&AI Put Request     ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}/VDNS    ${json_string}
     Should Be Equal As Strings         ${put_resp.status_code}         201
        [Return]  ${put_resp.status_code}
 
index 52212f2..5a4c457 100644 (file)
@@ -8,8 +8,8 @@ Library    Collections
 Library    OperatingSystem
 Library    RequestsLibrary
 Library    ONAPLibrary.JSON
+Library    ONAPLibrary.Templating
 Library    StringTemplater
-Resource          ../json_templater.robot
 Resource          ../stack_validation/validate_vlb.robot
 Resource          ../stack_validation/validate_vfw.robot
 Resource          ../stack_validation/validate_vvg.robot
@@ -22,11 +22,11 @@ ${SYSTEM USER}    robot-ete
 ${CUSTOMER SPEC PATH}    /business/customers/customer/
 ${SERVICE SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
 ${SERVICE INSTANCE}    /service-instances?service-instance-id=
-${SERVCE INSTANCE TEMPLATE}    robot/assets/templates/aai/service_subscription.template
+${SERVCE INSTANCE TEMPLATE}    aai/service_subscription.jinja
 
 ${GENERIC_VNF_PATH_TEMPLATE}   /network/generic-vnfs/generic-vnf/\${vnf_id}/vf-modules/vf-module/\${vf_module_id}
 ${GENERIC_VNF_QUERY_TEMPLATE}   /network/generic-vnfs/generic-vnf/\${vnf_id}/vf-modules/vf-module?vf-module-name=\${vf_module_name}
-${VLB_CLOSED_LOOP_HACK_BODY}    robot/assets/templates/aai/vlb_closed_loop_hack.template
+${VLB_CLOSED_LOOP_HACK_BODY}    aai/vlb_closed_loop_hack.jinja
 
 #*************** Test Case Variables *************
 ${VLB_CLOSED_LOOP_DELETE}
@@ -39,8 +39,6 @@ Validate Service Instance
     ${cust_resp}=    Run A&AI Get Request      ${INDEX PATH}/business/customers?subscriber-name=${customer_name}
        ${resp}=    Run A&AI Get Request      ${INDEX PATH}${CUSTOMER SPEC PATH}${cust_resp.json()['customer'][0]['global-customer-id']}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
     Dictionary Should Contain Value    ${resp.json()['service-instance'][0]}    ${service_instance_name}
-    #Dictionary Should Contain Key     ${resp.json()['service-instance'][0]}    persona-model-id
-    #Dictionary Should Contain Key     ${resp.json()['service-instance'][0]}    persona-model-version
 
 Validate Generic VNF
     [Documentation]    Query and Validates A&AI Service Instance
@@ -65,7 +63,8 @@ VLB Closed Loop Hack
     ${dummy}=    Catenate   dummy_${vnf_id}
     ${dict}=    Create Dictionary   vnf_id=${vnf_id}   vf_module_id=${dummy}   persona_model_id=${persona_model_id}   persona_model_version=${persona_model_version}
     ${datapath}=    Template String    ${GENERIC_VNF_PATH_TEMPLATE}    ${dict}
-    ${data}=   Fill JSON Template File    ${VLB_CLOSED_LOOP_HACK_BODY}    ${dict}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${VLB_CLOSED_LOOP_HACK_BODY}    ${dict}
        ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${datapath}   ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}    ^(201|412)$
index 94ad3b7..c9fc0f8 100644 (file)
@@ -1,29 +1,17 @@
 *** Settings ***
 Documentation    Validate A&AI Serivce Instance
-...
-...                  Validate A&AI Serivce Instance
 
 Resource          aai_interface.robot
 Library    Collections
-Library    OperatingSystem
-Library    RequestsLibrary
-Library    ONAPLibrary.JSON
-
-Resource          ../json_templater.robot
 
 *** Variables ***
-${INDEX PATH}     /aai/v11
-${GENERIC_QUERY_PATH}  /search/generic-query?
-${SYSTEM USER}    robot-ete
-${CUSTOMER SPEC PATH}    /business/customers/customer/
-${SERVICE SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
-${SERVICE INSTANCE}    /service-instances?service-instance-name=
-${SERVCE INSTANCE TEMPLATE}    robot/assets/templates/aai/service_subscription.template
+${INDEX_PATH}     /aai/v11
+${CUSTOMER_SPEC_PATH}    /business/customers/customer/
+${SERVICE_SUBSCRIPTIONS}    /service-subscriptions/service-subscription/
+${SERVICE_INSTANCE}    /service-instances?service-instance-name=
 
 *** Keywords ***
 Validate Volume Group
     [Arguments]    ${service_instance_name}    ${service_type}  ${customer_id}
-       ${resp}=    Run A&AI Get Request      ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name}
-    Dictionary Should Contain Value    ${resp.json()['service-instance'][0]}    ${service_instance_name}
-
-
+       ${resp}=    Run A&AI Get Request      ${INDEX_PATH}${CUSTOMER_SPEC_PATH}${customer_id}${SERVICE_SUBSCRIPTIONS}${service_type}${SERVICE_INSTANCE}${service_instance_name}
+    Dictionary Should Contain Value    ${resp.json()['service-instance'][0]}    ${service_instance_name}
\ No newline at end of file
index d91786c..80ecc35 100644 (file)
@@ -12,9 +12,9 @@ Library           ArchiveLibrary
 Library           ONAPLibrary.Openstack
 Library           DateTime
 Library           ONAPLibrary.ServiceMapping
+Library           ONAPLibrary.Templating
 Resource          global_properties.robot
 Resource          browser_setup.robot
-Resource          json_templater.robot
 
 *** Variables ***
 ${ASDC_DESIGNER_USER_ID}    cs0008
@@ -44,24 +44,24 @@ ${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}    /distribution-state
 ${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}    /distribution
 ${ASDC_DISTRIBUTION_STATE_APPROVE_PATH}    /approve
 ${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH}    /distribution/PROD/activate
-${ASDC_LICENSE_MODEL_TEMPLATE}    robot/assets/templates/asdc/license_model.template
-${ASDC_KEY_GROUP_TEMPLATE}    robot/assets/templates/asdc/key_group.template
-${ASDC_ENTITLEMENT_POOL_TEMPLATE}    robot/assets/templates/asdc/entitlement_pool.template
-${ASDC_FEATURE_GROUP_TEMPLATE}    robot/assets/templates/asdc/feature_group.template
-${ASDC_LICENSE_AGREEMENT_TEMPLATE}    robot/assets/templates/asdc/license_agreement.template
-${ASDC_ACTION_TEMPLATE}    robot/assets/templates/asdc/action.template
-${ASDC_SOFTWARE_PRODUCT_TEMPLATE}    robot/assets/templates/asdc/software_product.template
-${ASDC_ARTIFACT_UPLOAD_TEMPLATE}    robot/assets/templates/asdc/artifact_upload.template
-${ASDC_CATALOG_RESOURCE_TEMPLATE}    robot/assets/templates/asdc/catalog_resource.template
-${ASDC_USER_REMARKS_TEMPLATE}    robot/assets/templates/asdc/user_remarks.template
-${ASDC_CATALOG_SERVICE_TEMPLATE}    robot/assets/templates/asdc/catalog_service.template
-${ASDC_RESOURCE_INSTANCE_TEMPLATE}    robot/assets/templates/asdc/resource_instance.template
-${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE}    robot/assets/templates/asdc/catalog_vnf_properties.template
-${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE}    robot/assets/templates/asdc/catalog_vnf_inputs.template
-${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE}    robot/assets/templates/asdc/catalog_net_input_properties.template
-${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE}    robot/assets/templates/asdc/catalog_resource_alloted_resource.template
-${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE}    robot/assets/templates/asdc/catalog_allotted_properties.template
-${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE}    robot/assets/templates/asdc/catalog_allotted_inputs.template
+${ASDC_LICENSE_MODEL_TEMPLATE}    asdc/license_model.jinja
+${ASDC_KEY_GROUP_TEMPLATE}    asdc/key_group.jinja
+${ASDC_ENTITLEMENT_POOL_TEMPLATE}    asdc/entitlement_pool.jinja
+${ASDC_FEATURE_GROUP_TEMPLATE}    asdc/feature_group.jinja
+${ASDC_LICENSE_AGREEMENT_TEMPLATE}    asdc/license_agreement.jinja
+${ASDC_ACTION_TEMPLATE}    asdc/action.jinja
+${ASDC_SOFTWARE_PRODUCT_TEMPLATE}    asdc/software_product.jinja
+${ASDC_ARTIFACT_UPLOAD_TEMPLATE}    asdc/artifact_upload.jinja
+${ASDC_CATALOG_RESOURCE_TEMPLATE}    asdc/catalog_resource.jinja
+${ASDC_USER_REMARKS_TEMPLATE}    asdc/user_remarks.jinja
+${ASDC_CATALOG_SERVICE_TEMPLATE}    asdc/catalog_service.jinja
+${ASDC_RESOURCE_INSTANCE_TEMPLATE}    asdc/resource_instance.jinja
+${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE}    asdc/catalog_vnf_properties.jinja
+${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE}    asdc/catalog_vnf_inputs.jinja
+${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE}    asdc/catalog_net_input_properties.jinja
+${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE}    asdc/catalog_resource_alloted_resource.jinja
+${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE}    asdc/catalog_allotted_properties.jinja
+${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE}    asdc/catalog_allotted_inputs.jinja
 ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}     robot/assets/asdc/blueprints/
 ${ASDC_FE_ENDPOINT}     ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT}
 ${ASDC_BE_ENDPOINT}     ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT}
@@ -320,11 +320,11 @@ Setup SDC Catalog Resource Deployment Artifact Properties
     [Documentation]    Set up Deployment Artiface properties
     [Arguments]    ${catalog_service_id}    ${catalog_parent_service_id}   ${catalog_resource_unique_id}  ${blueprint_file}
     ${resp}=    Get ASDC Catalog Resource Component Instances Properties  ${catalog_service_id}
-    #${resp}=    Get ASDC Catalog Resource Deployment Artifact Properties  ${catalog_service_id}
     ${blueprint_data}    OperatingSystem.Get File    ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
     ${payloadData}=   Evaluate   base64.b64encode('''${blueprint_data}'''.encode('utf-8'))   modules=base64
     ${dict}=    Create Dictionary  artifactLabel=blueprint  artifactName=${blueprint_file}   artifactType=DCAE_INVENTORY_BLUEPRINT  artifactGroupType=DEPLOYMENT  description=${blueprint_file}   payloadData=${payloadData}
-    ${data}=   Fill JSON Template File    ${ASDC_ARTIFACT_UPLOAD_TEMPLATE}    ${dict}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ARTIFACT_UPLOAD_TEMPLATE}    ${dict}
     # POST artifactUpload to resource
     ${artifact_upload_path}=    Catenate  ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH}
     ${resp}=    Run ASDC MD5 Post Request    ${artifact_upload_path}    ${data}   ${ASDC_DESIGNER_USER_ID}
@@ -357,7 +357,8 @@ Setup SDC Catalog Resource GenericNeutronNet Properties
     \    ${ownerId}    Set Variable    ${comp['ownerId']}
     \    ${dict}=    Create Dictionary    parentUniqueId=${parentUniqueId}   ownerId=${ownerId}  uniqueId=${uniqueId}    description=${description}
     \    Run Keyword If   '${name}'=='network_role'   Set To Dictionary    ${dict}    name=${name}    value=${nf_role}
-    \    ${data}=   Fill JSON Template File    ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE}    ${dict}
+    \    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    \    ${data}=   Apply Template    sdc   ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE}    ${dict}
     \    ${response}=    Set ASDC Catalog Resource Component Instance Properties    ${catalog_parent_service_id}    ${catalog_service_id}    ${data}
 
 
@@ -392,7 +393,8 @@ Setup SDC Catalog Resource AllottedResource Properties
     \    ${uniqueId}    Set Variable     ${comp['uniqueId']}
     \    ${uniqueId}   Fetch From Left   ${uniqueId}   .
     \    Set To Dictionary    ${dict}    uniqueId=${uniqueId}
-    ${data}=   Fill JSON Template File    ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE}    ${dict}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE}    ${dict}
     ${response}=    Set ASDC Catalog Resource Component Instance Properties For Resource    ${catalog_resource_id}    ${componentInstance1}    ${data}
     Log To Console    resp=${response}
 
@@ -408,7 +410,8 @@ Setup SDC Catalog Resource AllottedResource Inputs
     \    ${uid}    Set Variable    ${comp['uniqueId']}
     \    Run Keyword If    '${name}'=='nf_type'    Set To Dictionary    ${dict}    nf_type=${nf_role}    nf_type_uid=${uid}
     \    Run Keyword If    '${name}'=='nf_role'    Set To Dictionary    ${dict}    nf_role=${nf_role}   nf_role_uid=${uid}
-    ${data}=   Fill JSON Template File    ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE}    ${dict}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE}    ${dict}
     ${response}=    Set ASDC Catalog Resource VNF Inputs    ${catalog_resource_id}    ${data}
     [Return]    ${response}
 
@@ -428,7 +431,8 @@ Setup ASDC Catalog Resource CDS Properties
     \    Run Keyword If   '${name}'=='abstract_vfw'   Set To Dictionary    ${dict}    nfc_function=vfw    nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP
     \    Run Keyword If   '${name}'=='abstract_vpg'   Set To Dictionary    ${dict}    nfc_function=vpg    nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP
     \    Run Keyword If   '${name}'=='abstract_vsn'   Set To Dictionary    ${dict}    nfc_function=vsn    nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP
-    \    ${data}=   Fill JSON Template File    ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE}    ${dict}
+    \    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    \    ${data}=   Apply Template    sdc   ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE}    ${dict}
     \    ${response}=    Set ASDC Catalog Resource Component Instance Properties    ${catalog_resource_id}    ${uniqueId}    ${data}
     \    Log To Console    resp=${response}
 
@@ -443,7 +447,8 @@ Setup ASDC Catalog Resource CDS Properties
     \    Run Keyword If    '${name}'=='nf_naming_code'    Set To Dictionary    ${dict}    nf_naming_code=vfw    nf_naming_code_uid=${uid}
     \    Run Keyword If    '${name}'=='nf_role'    Set To Dictionary    ${dict}    nf_role=vFW    nf_role_uid=${uid}
     \    Run Keyword If    '${name}'=='cloud_env'    Set To Dictionary    ${dict}    cloud_env=openstack    cloud_env_uid=${uid}
-    ${data}=   Fill JSON Template File    ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE}    ${dict}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE}    ${dict}
     ${response}=    Set ASDC Catalog Resource VNF Inputs    ${catalog_resource_id}    ${data}
 
 Add ASDC License Model
@@ -451,7 +456,8 @@ Add ASDC License Model
     ${uuid}=    Generate UUID4
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:23]
     ${map}=    Create Dictionary    vendor_name=${shortened_uuid}
-    ${data}=   Fill JSON Template File    ${ASDC_LICENSE_MODEL_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_LICENSE_MODEL_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}    ${data}  ${ASDC_DESIGNER_USER_ID}  ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['itemId']}    ${resp.json()['version']['id']}
@@ -470,7 +476,8 @@ Checkin ASDC License Model
     [Documentation]    Checks in an ASDC License Model by its id
     [Arguments]    ${id}   ${version_id}=0.1
     ${map}=    Create Dictionary    action=Checkin
-    ${data}=   Fill JSON Template File    ${ASDC_ACTION_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ACTION_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Put Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH}    ${data}   ${ASDC_DESIGNER_USER_ID}  ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -479,7 +486,8 @@ Submit ASDC License Model
     [Documentation]    Submits an ASDC License Model by its id
     [Arguments]    ${id}   ${version_id}=0.1
     ${map}=    Create Dictionary    action=Submit
-    ${data}=   Fill JSON Template File    ${ASDC_ACTION_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ACTION_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Put Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH}    ${data}   ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -488,7 +496,8 @@ Checkin ASDC Software Product
     [Documentation]    Checks in an ASDC Software Product by its id
     [Arguments]    ${id}   ${version_id}=0.1
     ${map}=    Create Dictionary    action=Checkin
-    ${data}=   Fill JSON Template File    ${ASDC_ACTION_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ACTION_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Put Request    ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH}    ${data}  ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -505,7 +514,8 @@ Submit ASDC Software Product
     [Documentation]    Submits an ASDC Software Product by its id
     [Arguments]    ${id}   ${version_id}=0.1
     ${map}=    Create Dictionary    action=Submit
-    ${data}=   Fill JSON Template File    ${ASDC_ACTION_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ACTION_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Put Request    ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH}    ${data}   ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -514,7 +524,8 @@ Package ASDC Software Product
     [Documentation]    Creates a package of an ASDC Software Product by its id
     [Arguments]    ${id}   ${version_id}=0.1
     ${map}=    Create Dictionary    action=Create_Package
-    ${data}=   Fill JSON Template File    ${ASDC_ACTION_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ACTION_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Put Request    ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH}    ${data}   ${ASDC_DESIGNER_USER_ID}  ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -525,7 +536,8 @@ Add ASDC Entitlement Pool
     ${uuid}=    Generate UUID4
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:23]
     ${map}=    Create Dictionary    entitlement_pool_name=${shortened_uuid}  license_start_date=${license_start_date}  license_end_date=${license_end_date}
-    ${data}=   Fill JSON Template File    ${ASDC_ENTITLEMENT_POOL_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ENTITLEMENT_POOL_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}     ${data}   ${ASDC_DESIGNER_USER_ID}  ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['value']}
@@ -542,7 +554,8 @@ Add ASDC License Group
     ${uuid}=    Generate UUID4
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:23]
     ${map}=    Create Dictionary    key_group_name=${shortened_uuid}   license_start_date=${license_start_date}  license_end_date=${license_end_date}
-    ${data}=   Fill JSON Template File    ${ASDC_KEY_GROUP_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_KEY_GROUP_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}     ${data}   ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['value']}
@@ -559,7 +572,8 @@ Add ASDC Feature Group
     ${uuid}=    Generate UUID4
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:23]
     ${map}=    Create Dictionary    feature_group_name=${shortened_uuid}    key_group_id=${key_group_id}    entitlement_pool_id=${entitlement_pool_id}   manufacturer_reference_number=mrn${shortened_uuid}
-    ${data}=   Fill JSON Template File    ${ASDC_FEATURE_GROUP_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_FEATURE_GROUP_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['value']}
@@ -576,7 +590,8 @@ Add ASDC License Agreement
     ${uuid}=    Generate UUID4
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:23]
     ${map}=    Create Dictionary    license_agreement_name=${shortened_uuid}    feature_group_id=${feature_group_id}
-    ${data}=   Fill JSON Template File    ${ASDC_LICENSE_AGREEMENT_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_LICENSE_AGREEMENT_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['value']}
@@ -594,7 +609,8 @@ Add ASDC Software Product
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:13]
     ${software_product_name}=  Catenate   ${name_prefix}   ${shortened_uuid}
     ${map}=    Create Dictionary    software_product_name=${software_product_name}    feature_group_id=${feature_group_id}    license_agreement_id=${license_agreement_id}    vendor_name=${license_model_name}    vendor_id=${license_model_id}    version_id=${license_model_version_id}
-    ${data}=   Fill JSON Template File    ${ASDC_SOFTWARE_PRODUCT_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_SOFTWARE_PRODUCT_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}   ${ASDC_BE_ONBOARD_ENDPOINT}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['itemId']}   ${resp.json()['version']['id']}
@@ -609,7 +625,8 @@ Add ASDC Catalog Resource
     [Documentation]    Creates an ASDC Catalog Resource and returns its id
     [Arguments]    ${license_agreement_id}    ${software_product_name}    ${license_model_name}    ${software_product_id}
     ${map}=    Create Dictionary    software_product_id=${software_product_id}    software_product_name=${software_product_name}    license_agreement_id=${license_agreement_id}    vendor_name=${license_model_name}
-    ${data}=   Fill JSON Template File    ${ASDC_CATALOG_RESOURCE_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_CATALOG_RESOURCE_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_RESOURCES_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     201
     [Return]    ${resp.json()['uniqueId']}
@@ -618,7 +635,8 @@ Add ASDC Allotted Resource Catalog Resource
     [Documentation]    Creates an ASDC Allotted Resource Catalog Resource and returns its id
     [Arguments]    ${license_agreement_id}    ${software_product_name}    ${license_model_name}    ${software_product_id}   ${subcategory}
     ${map}=    Create Dictionary    software_product_id=${software_product_id}    software_product_name=${software_product_name}    license_agreement_id=${license_agreement_id}    vendor_name=${license_model_name}   subcategory=${subcategory}
-    ${data}=   Fill JSON Template File    ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_RESOURCES_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     201
     [Return]    ${resp.json()['uniqueId']}
@@ -736,7 +754,8 @@ Checkin ASDC Catalog Resource
     [Documentation]    Checks in an ASDC Catalog Resource by its id
     [Arguments]    ${catalog_resource_id}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin    ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -745,7 +764,8 @@ Request Certify ASDC Catalog Resource
     [Documentation]    Requests certification of an ASDC Catalog Resource by its id
     [Arguments]    ${catalog_resource_id}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest    ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -761,7 +781,8 @@ Certify ASDC Catalog Resource
     [Documentation]    Certifies an ASDC Catalog Resource by its id and returns the new id
     [Arguments]    ${catalog_resource_id}    ${user_id}=${ASDC_TESTER_USER_ID}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify    ${data}    ${user_id}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['uniqueId']}
@@ -781,7 +802,8 @@ Add ASDC Catalog Service
     ${shortened_uuid}=     Evaluate    str("${uuid}")[:23]
     ${catalog_service_name}=   Set Variable If   '${catalog_service_name}' ==''   ${shortened_uuid}   ${catalog_service_name}
     ${map}=    Create Dictionary    service_name=${catalog_service_name}
-    ${data}=   Fill JSON Template File    ${ASDC_CATALOG_SERVICE_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_CATALOG_SERVICE_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_SERVICES_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     201
     [Return]    ${resp.json()['uniqueId']}
@@ -809,7 +831,8 @@ Checkin ASDC Catalog Service
     [Documentation]    Checks in an ASDC Catalog Service by its id
     [Arguments]    ${catalog_service_id}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin    ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -818,7 +841,8 @@ Request Certify ASDC Catalog Service
     [Documentation]    Requests certification of an ASDC Catalog Service by its id
     [Arguments]    ${catalog_service_id}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest    ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -834,7 +858,8 @@ Certify ASDC Catalog Service
     [Documentation]    Certifies an ASDC Catalog Service by its id and returns the new id
     [Arguments]    ${catalog_service_id}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify    ${data}    ${ASDC_TESTER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()['uniqueId']}
@@ -843,7 +868,8 @@ Approve ASDC Catalog Service
     [Documentation]    Approves an ASDC Catalog Service by its id
     [Arguments]    ${catalog_service_id}
     ${map}=    Create Dictionary    user_remarks=Robot remarks
-    ${data}=   Fill JSON Template File    ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_USER_REMARKS_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH}    ${data}    ${ASDC_GOVERNOR_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     200
     [Return]    ${resp.json()}
@@ -861,7 +887,8 @@ Add ASDC Resource Instance
     ${xoffset}=    Set Variable   ${xoffset+306}
     ${yoffset}=    Set Variable   ${yoffset+248}
     ${map}=    Create Dictionary    catalog_resource_id=${catalog_resource_id}    catalog_resource_name=${catalog_resource_name}    milli_timestamp=${milli_timestamp}   posX=${xoffset}    posY=${yoffset}    originType=${resourceType}
-    ${data}=   Fill JSON Template File    ${ASDC_RESOURCE_INSTANCE_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_RESOURCE_INSTANCE_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     201
     [Return]    ${resp.json()['uniqueId']}
@@ -873,7 +900,8 @@ Add ASDC Resource Instance To Resource
     ${xoffset}=    Set Variable   ${xoffset+306}
     ${yoffset}=    Set Variable   ${yoffset+248}
     ${map}=    Create Dictionary    catalog_resource_id=${catalog_resource_id}    catalog_resource_name=${catalog_resource_name}    milli_timestamp=${milli_timestamp}   posX=${xoffset}    posY=${yoffset}    originType=${resourceType}
-    ${data}=   Fill JSON Template File    ${ASDC_RESOURCE_INSTANCE_TEMPLATE}    ${map}
+    Create Environment    sdc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdc   ${ASDC_RESOURCE_INSTANCE_TEMPLATE}    ${map}
     ${resp}=    Run ASDC Post Request    ${ASDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH}     ${data}    ${ASDC_DESIGNER_USER_ID}
     Should Be Equal As Strings  ${resp.status_code}     201
     [Return]    ${resp.json()['uniqueId']}
index 410e226..0c5229a 100644 (file)
@@ -15,10 +15,11 @@ Library             Collections
 Library         OperatingSystem
 Library         SeleniumLibrary
 Library         RequestsLibrary
+Library                ONAPLibrary.Templating
 
 *** Variables ***
 
-${ADD_DEMO_CUSTOMER_BODY}   robot/assets/templates/aai/add_demo_customer.template
+${ADD_DEMO_CUSTOMER_BODY}   aai/add_demo_customer.jinja
 ${AAI_INDEX_PATH}     /aai/v8
 ${VF_MODULES_NAME}     _Demo_VFModules.json
 ${FILE_CACHE}    /share/
@@ -100,7 +101,8 @@ Create Customer For VNF Demo
     Create Service If Not Exists    gNB
     ${arguments}=    Create Dictionary    subscriber_name=${customer_name}    global_customer_id=${customer_id}    subscriber_type=${customer_type}     cloud_owner=${clouder_owner}  cloud_region_id=${cloud_region_id}    tenant_id=${tenant_id}
     Set To Dictionary   ${arguments}       service1=vFWCL       service2=vLB   service3=vCPE   service4=vIMS  service5=gNB   service6=vFW
-    ${data}=   Fill JSON Template File    ${ADD_DEMO_CUSTOMER_BODY}    ${arguments}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    aai   ${ADD_DEMO_CUSTOMER_BODY}    ${arguments}
     ${put_resp}=    Run A&AI Put Request     ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id}    ${data}
     ${status_string}=    Convert To String    ${put_resp.status_code}
     Should Match Regexp    ${status_string}    ^(200|201|412)$
index 3574b95..9072517 100644 (file)
@@ -3,7 +3,8 @@ Library     HeatBridge
 Library     Collections
 Library     StringTemplater
 Library     OperatingSystem
-Library         ONAPLibrary.ServiceMapping
+Library     ONAPLibrary.ServiceMapping
+Library     ONAPLibrary.Templating
 
 Resource    openstack/keystone_interface.robot
 Resource    openstack/heat_interface.robot
@@ -15,7 +16,7 @@ Resource    aai/create_vnfc.robot
 *** Variables ***
 ${MULTIPART_PATH}  /bulkadd
 ${NAMED_QUERY_PATH}  /aai/search/named-query
-${NAMED_QUERY_TEMPLATE}    robot/assets/templates/aai/named_query.template
+${NAMED_QUERY_TEMPLATE}    aai/named_query.jinja
 
 ${BASE_URI}   /cloud-infrastructure/cloud-regions/cloud-region/\${cloud}/\${region}
 ${IMAGE_URI}   ${BASE_URI}/images/image/\${image_id}
@@ -93,8 +94,8 @@ Run Vserver Query
     [Documentation]    Run A&AI query to validate the bulk add
     [Arguments]    ${vserver_name}
     ${dict}=    Create Dictionary    vserver_name=${vserver_name}
-    ${request}=    OperatingSystem.Get File    ${NAMED_QUERY_TEMPLATE}
-    ${request}=    Template String    ${request}    ${dict}
+    Create Environment    aai    ${GLOBAL_TEMPLATE_FOLDER}
+    ${request}=   Apply Template    aai   ${NAMED_QUERY_TEMPLATE}    ${dict}
     ${resp}=    Run A&AI Post Request    ${NAMED_QUERY_PATH}    ${request}
     Should Be Equal As Strings    ${resp.status_code}    200
 
diff --git a/robot/resources/json_templater.robot b/robot/resources/json_templater.robot
deleted file mode 100644 (file)
index b057251..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-*** Settings ***
-Documentation     This resource is filling out json string templates and returning the json back
-Library              RequestsLibrary
-Library           StringTemplater
-Library           OperatingSystem
-
-*** Keywords ***
-Fill JSON Template
-    [Documentation]    Runs substitution on template to return a filled in json
-    [Arguments]    ${json}    ${arguments}
-    ${returned_string}=    Template String    ${json}    ${arguments}
-    ${returned_json}=  To Json    ${returned_string}
-    [Return]    ${returned_json}
-
-Fill JSON Template File
-    [Documentation]    Runs substitution on template to return a filled in json
-    [Arguments]    ${json_file}    ${arguments}
-    ${json}=    OperatingSystem.Get File    ${json_file}
-    ${returned_json}=  Fill JSON Template    ${json}    ${arguments}
-    [Return]    ${returned_json}
\ No newline at end of file
index 4166799..ca6e62b 100644 (file)
@@ -3,8 +3,8 @@ Documentation     The main interface for interacting with Openstack. It handles
 Library           ONAPLibrary.Openstack
 Library              RequestsLibrary
 Library                  ONAPLibrary.Utilities
+Library           ONAPLibrary.Templating
 Resource    ../global_properties.robot
-Resource    ../json_templater.robot
 Resource    openstack_common.robot
 
 
@@ -12,7 +12,7 @@ Resource    openstack_common.robot
 ${OPENSTACK_CINDER_API_VERSION}    /v1
 ${OPENSTACK_CINDER_TYPES_PATH}    /types
 ${OPENSTACK_CINDER_VOLUMES_PATH}    /volumes
-${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE}        robot/assets/templates/cinder_add_volume.template
+${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE}        openstack/cinder_add_volume.jinja
 ${OPENSTACK_CINDER_VOLUMES_TYPE}    SSD
 ${OPENSTACK_CINDER_AVAILABILITY_ZONE}    nova
 
@@ -34,7 +34,8 @@ Add Openstack Volume
     [Arguments]    ${alias}    ${name}     ${size}
     ${uuid}=    Generate UUID4
     ${arguments}=    Create Dictionary    name=${name}     description=${GLOBAL_APPLICATION_ID}${uuid} size=${size}    type=${OPENSTACK_CINDER_VOLUMES_TYPE}    availability_zone=${OPENSTACK_CINDER_AVAILABILITY_ZONE}
-    ${data}=   Fill JSON Template File   ${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE}    ${arguments}
+    Create Environment    cinder    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    cinder    ${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE}    ${arguments}
     ${resp}=    Internal Post Openstack    ${alias}    ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE}   ${OPENSTACK_CINDER_VOLUMES_PATH}    data_path=    data=${data}
     Should Be Equal As Strings    200  ${resp.status_code}
     [Return]    ${resp.json()['volume']['id']}
index 471c2a9..0362d3e 100644 (file)
@@ -2,17 +2,16 @@
 Documentation     The interface for interacting with Openstack Heat API.
 Library           ONAPLibrary.Openstack
 Library              RequestsLibrary
-Library    OperatingSystem
-Library    StringTemplater
-Library    Collections
+Library           OperatingSystem
+Library           Collections
+Library           ONAPLibrary.Templating
 Resource    ../global_properties.robot
-Resource    ../json_templater.robot
 Resource    openstack_common.robot
 
 *** Variables ***
 ${OPENSTACK_HEAT_API_VERSION}    /v1
 ${OPENSTACK_HEAT_STACK_PATH}    /stacks
-${OPENSTACK_HEAT_ADD_STACK_TEMPLATE}    robot/assets/templates/heat_add_stack.template
+${OPENSTACK_HEAT_ADD_STACK_TEMPLATE}    openstack/heat_add_stack.jinja
 
 
 *** Keywords ***
@@ -40,9 +39,9 @@ Make Add Stack Request
     ${templatedata}=    Template Yaml To Json    ${template}
     ${envdata}=    Env Yaml To Json    ${env}
     ${dict}=  Create Dictionary     template=${templatedata}    parameters=${envdata}    stack_name=${name}
-    ${resp}=    OperatingSystem.Get File    ${OPENSTACK_HEAT_ADD_STACK_TEMPLATE}
-    ${request}=     Template String    ${resp}    ${dict}
-    Log    $request
+    Create Environment    heat    ${GLOBAL_TEMPLATE_FOLDER}
+    ${request}=    Apply Template    heat    ${OPENSTACK_HEAT_ADD_STACK_TEMPLATE}    ${dict}
+    Log    ${request}
     [Return]    ${request}
 
 Delete Openstack Stack
index ceb43e8..1df6ac9 100644 (file)
@@ -4,10 +4,10 @@ Library           ONAPLibrary.Openstack
 Library              RequestsLibrary
 Library                  ONAPLibrary.Utilities
 Library                  Collections
-Library    OperatingSystem
-Library    String
+Library           OperatingSystem
+Library           String
+Library                  ONAPLibrary.Templating
 Resource    ../global_properties.robot
-Resource    ../json_templater.robot
 Resource    openstack_common.robot
 
 *** Variables ***
@@ -15,8 +15,8 @@ ${OPENSTACK_KEYSTONE_API_v3_VERSION}   /v3
 ${OPENSTACK_KEYSTONE_API_v2_VERSION}   /v2.0
 ${OPENSTACK_KEYSTONE_AUTH_v3_PATH}    /auth/tokens
 ${OPENSTACK_KEYSTONE_AUTH_v2_PATH}    /tokens
-${OPENSTACK_KEYSTONE_AUTH_v2_BODY_FILE}    robot/assets/templates/keystone_get_v2_auth.template
-${OPENSTACK_KEYSTONE_AUTH_v3_BODY_FILE}    robot/assets/templates/keystone_get_v3_auth.template
+${OPENSTACK_KEYSTONE_AUTH_v2_BODY_FILE}    openstack/keystone_get_v2_auth.jinja
+${OPENSTACK_KEYSTONE_AUTH_v3_BODY_FILE}    openstack/keystone_get_v3_auth.jinja
 ${OPENSTACK_KEYSTONE_TENANT_PATH}    /tenants
 
 *** Keywords ***
@@ -67,7 +67,8 @@ Get KeyStoneAuthv2 Data
     [Documentation]    Returns all the data for keystone auth v2 api
     [Arguments]    ${username}    ${password}    ${path}
     ${arguments}=    Create Dictionary    username=${username}    password=${password}   tenantId=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}
-    ${data}=    Fill JSON Template File    ${OPENSTACK_KEYSTONE_AUTH_v2_BODY_FILE}    ${arguments}
+    Create Environment    keystone    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=    Apply Template    keystone    ${OPENSTACK_KEYSTONE_AUTH_v2_BODY_FILE}    ${arguments}
     ${data_path}=    Catenate    ${path}${OPENSTACK_KEYSTONE_AUTH_v2_PATH}
     [Return]    ${data_path}    ${data}
 
@@ -75,7 +76,8 @@ Get KeyStoneAuthv3 Data
     [Documentation]    Returns all the data for keystone auth v3 api
     [Arguments]    ${username}    ${password}    ${path}
     ${arguments}=    Create Dictionary    username=${username}    password=${password}   domain_id=${GLOBAL_INJECTED_OPENSTACK_DOMAIN_ID}    project_name=${GLOBAL_INJECTED_OPENSTACK_PROJECT_NAME}
-    ${data}=    Fill JSON Template File    ${OPENSTACK_KEYSTONE_AUTH_v3_BODY_FILE}    ${arguments}
+    Create Environment    keystone    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=    Apply Template    keystone    ${OPENSTACK_KEYSTONE_AUTH_v3_BODY_FILE}    ${arguments}
     ${data_path}=    Catenate    ${path}${OPENSTACK_KEYSTONE_AUTH_v3_PATH}
     [Return]    ${data_path}    ${data}
 
index 640a237..058809d 100644 (file)
@@ -3,16 +3,16 @@ Documentation     The main interface for interacting with Openstack. It handles
 Library           ONAPLibrary.Openstack
 Library              RequestsLibrary
 Library           Collections
+Library           ONAPLibrary.Templating    
 Resource    ../global_properties.robot
-Resource    ../json_templater.robot
 Resource    openstack_common.robot
 
 *** Variables ***
 ${OPENSTACK_NEUTRON_API_VERSION}    /v2.0
 ${OPENSTACK_NEUTRON_NETWORK_PATH}    /networks
-${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE}    robot/assets/templates/neutron_add_network.template
+${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE}    openstack/neutron_add_network.jinja
 ${OPENSTACK_NEUTRON_SUBNET_PATH}    /subnets
-${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE}    robot/assets/templates/neutron_add_subnet.template
+${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE}    openstack/neutron_add_subnet.jinja
 ${OPENSTACK_NEUTRON_PORT_PATH}    /ports
 
 *** Keywords ***
@@ -44,7 +44,8 @@ Add Openstack Network
     [Documentation]    Runs an Openstack Request to add a network and returns that network id of the created network
     [Arguments]    ${alias}    ${name}
     ${arguments}=    Create Dictionary    name=${name}
-    ${data}=   Fill JSON Template File    ${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE}    ${arguments}
+    Create Environment    openstack    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    openstack    ${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE}    ${arguments}
     ${resp}=    Internal Post Openstack    ${alias}    ${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE}    ${OPENSTACK_NEUTRON_NETWORK_PATH}    data_path=    data=${data}
     Should Be Equal As Strings    201  ${resp.status_code}
     [Return]    ${resp.json()['network']['id']}
@@ -73,7 +74,8 @@ Add Openstack Network With Subnet
     [Arguments]    ${alias}    ${name}    ${cidr}
     ${network_id}=    Add Openstack Network    ${alias}    ${name}
     ${arguments}=    Create Dictionary    network_id=${network_id}    cidr=${cidr}    subnet_name=${name}
-    ${data}=   Fill JSON Template File    ${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE}    ${arguments}
+    Create Environment    openstack    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    openstack    ${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE}    ${arguments}
     ${resp}=    Internal Post Openstack    ${alias}    ${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE}    ${OPENSTACK_NEUTRON_SUBNET_PATH}    data_path=    data=${data}
     Should Be Equal As Strings    201  ${resp.status_code}
     [Return]     ${network_id}
index 94a0747..b1f07f8 100644 (file)
@@ -3,22 +3,22 @@ Documentation     The main interface for interacting with Openstack. It handles
 Library           ONAPLibrary.Openstack
 Library              RequestsLibrary
 Library              ONAPLibrary.JSON
+Library              ONAPLibrary.Templating
 Library    OperatingSystem
 Library    Collections
 Resource    ../global_properties.robot
-Resource    ../json_templater.robot
 Resource    openstack_common.robot
 
 *** Variables ***
 ${OPENSTACK_NOVA_API_VERSION}    /v2
 ${OPENSTACK_NOVA_KEYPAIR_PATH}    /os-keypairs
-${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE}    robot/assets/templates/nova_add_keypair.template
+${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE}    openstack/nova_add_keypair.jinja
 ${OPENSTACK_NOVA_KEYPAIR_SSH_KEY}    robot/assets/keys/robot_ssh_public_key.txt
 ${OPENSTACK_NOVA_FLAVORS_PATH}    /flavors
 ${OPENSTACK_NOVA_SERVERS_PATH}    /servers
 ${OPENSTACK_NOVA_IMAGES_PATH}    /images
 ${OPENSTACK_NOVA_SERVERS_REBOOT_BODY}    {"reboot" : { "type" : "SOFT" }}
-${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE}    robot/assets/templates/nova_add_server.template
+${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE}    openstack/nova_add_server.jinja
 
 
 *** Keywords ***
@@ -33,7 +33,8 @@ Add Openstack Keypair
     [Arguments]    ${alias}    ${name}
     ${ssh_key}=    OperatingSystem.Get File     ${OPENSTACK_NOVA_KEYPAIR_SSH_KEY}
     ${arguments}=    Create Dictionary    name=${name}     publickey=${ssh_key}
-    ${data}=   Fill JSON Template File    ${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE}    ${arguments}
+    Create Environment    openstack    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    openstack    ${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE}    ${arguments}
     ${resp}=    Internal Post Openstack    ${alias}    ${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE}    ${OPENSTACK_NOVA_KEYPAIR_PATH}    data_path=    data=${data}
     Should Be Equal As Strings    200  ${resp.status_code}
     [Return]    ${resp.json()['keypair']['name']}
@@ -84,7 +85,8 @@ Add Server
     [Documentation]    Adds a server for the passed if
     [Arguments]    ${alias}    ${name}    ${imageRef}    ${flavorRef}
     ${dict}=    Create Dictionary   name=${name}   imageRef=${imageRef}   flavorRef=${flavorRef}
-    ${data}=    Fill JSON Template File    ${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE}    ${dict}
+    Create Environment    openstack    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    openstack   ${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE}    ${dict}
     ${resp}=    Internal Post Openstack    ${alias}    ${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE}    ${OPENSTACK_NOVA_SERVERS_PATH}   data_path=    data=${data}
     [Return]    ${resp}
 
@@ -98,7 +100,8 @@ Add Server For Image Name
     ${imageRef}=    Get Id For Name   ${images}    ${imageName}
     ${flavorRef}=   Get Id For Name   ${flavors}    ${flavorName}
     ${dict}=    Create Dictionary   name=${name}   imageRef=${imageRef}   flavorRef=${flavorRef}   public_net_id=${public_net_id}
-    ${data}=    Fill JSON Template File    ${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE}    ${dict}
+    Create Environment    openstack    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    openstack   ${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE}    ${dict}
     ${resp}=    Internal Post Openstack    ${alias}    ${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE}    ${OPENSTACK_NOVA_SERVERS_PATH}   data_path=    data=${data}
     ${status_string}=    Convert To String    ${resp.status_code}
     Should Match Regexp    ${status_string}    ^(202)$
index db54448..988fe4c 100644 (file)
@@ -7,16 +7,15 @@ Library         Collections
 Library      String
 Library      StringTemplater
 Library           ONAPLibrary.ServiceMapping
-
+Library           ONAPLibrary.Templating
 Resource          global_properties.robot
-Resource          ../resources/json_templater.robot
 Resource        browser_setup.robot
 
 
 *** Variables ***
 ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH}  /operations/VNF-API:preload-vnf-topology-operation
 ${PRELOAD_VNF_CONFIG_PATH}  /config/VNF-API:preload-vnfs/vnf-preload-list
-${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}  robot/assets/templates/sdnc/
+${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}  sdnc
 ${SDNGC_INDEX_PATH}    /restconf
 ${SDNCGC_HEALTHCHECK_OPERATION_PATH}  /operations/SLI-API:healthcheck
 ${SDNGC_REST_ENDPOINT}    ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDNC_IP_ADDR}:${GLOBAL_SDNGC_REST_PORT}
@@ -137,7 +136,8 @@ Preload One Vnf Topology
     Return From Keyword If    '${filename}' == ''
     ${parameters}=    Get Template Parameters    ${generic_vnf_name}    ${filename}   ${uuid}
     Set To Dictionary   ${parameters}   generic_vnf_name=${generic_vnf_name}     generic_vnf_type=${generic_vnf_type}  service_type=${service_type_uuid}    vf_module_name=${vf_module_name}    vf_module_type=${vf_module_type}
-    ${data}=   Fill JSON Template File    ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template    ${parameters}
+    Create Environment    sdnc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Apply Template    sdnc   ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.jinja    ${parameters}
        ${put_resp}=    Run SDNGC Post Request     ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH}     ${data}
     Should Be Equal As Strings         ${put_resp.json()['output']['response-code']}   200
     ${get_resp}=  Run SDNGC Get Request  ${SDNGC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type}
index 7ac8ef7..2be3995 100644 (file)
@@ -14,7 +14,6 @@ Resource          ../openstack/keystone_interface.robot
 Resource          ../openstack/nova_interface.robot
 Resource          ../openstack/heat_interface.robot
 Resource          ../ssh/files.robot
-Resource          ../ssh/processes.robot
 Resource          ../demo_preload.robot
 Resource          packet_generator_interface.robot
 Resource          validate_common.robot
index 383a014..9c5be62 100644 (file)
@@ -10,7 +10,6 @@ Resource          ../../resources/openstack/keystone_interface.robot
 Resource          ../../resources/openstack/nova_interface.robot
 Resource          ../../resources/openstack/heat_interface.robot
 Resource          ../../resources/ssh/files.robot
-Resource          ../../resources/ssh/processes.robot
 Resource          packet_generator_interface.robot
 
 
index 90d5f8c..7354dc1 100644 (file)
@@ -7,18 +7,19 @@ Resource        ../stack_validation/packet_generator_interface.robot
 Resource        vnf_orchestration_test_template.robot
 
 Library    String
-LIbrary    Process
+Library    Process
+Library    ONAPLibrary.Templating
 
 *** Variables ***
 ${RESOURCE_PATH_CREATE}        /pdp/createPolicy
 ${RESOURCE_PATH_CREATE_PUSH}        /pdp/pushPolicy
 ${RESOURCE_PATH_CREATE_DELETE}        /pdp/deletePolicy
 ${RESOURCE_PATH_GET_CONFIG}    /pdp/getConfig
-${CREATE_CONFIG_TEMPLATE}    robot/assets/templates/policy/closedloop_configpolicy.template
-${CREATE_OPS_TEMPLATE}    robot/assets/templates/policy/closedloop_opspolicy.template
-${PUSH_POLICY_TEMPLATE}   robot/assets/templates/policy/closedloop_pushpolicy.template
-${DEL_POLICY_TEMPLATE}   robot/assets/templates/policy/closedloop_deletepolicy.template
-${GECONFIG_VFW_TEMPLATE}    robot/assets/templates/policy/closedloop_getconfigpolicy.template
+${CREATE_CONFIG_TEMPLATE}    policy/closedloop_configpolicy.jinja
+${CREATE_OPS_TEMPLATE}    policy/closedloop_opspolicy.jinja
+${PUSH_POLICY_TEMPLATE}   policy/closedloop_pushpolicy.jinja
+${DEL_POLICY_TEMPLATE}   policy/closedloop_deletepolicy.jinja
+${GECONFIG_VFW_TEMPLATE}    policy/closedloop_getconfigpolicy.jinja
 
 # 'Normal' number of pg streams that will be set when policy is triggered
 ${VFWPOLICYRATE}    5
@@ -78,7 +79,8 @@ Get Configs VFW Policy
     [Documentation]    Get Config Policy for VFW
     ${getconfigpolicy}=    Catenate    .*${CONFIG_POLICY_NAME}*
     ${configpolicy_name}=    Create Dictionary    config_policy_name=${getconfigpolicy}
-    ${output} =     Fill JSON Template File     ${GECONFIG_VFW_TEMPLATE}    ${configpolicy_name}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${GECONFIG_VFW_TEMPLATE}    ${configpolicy_name}
     ${get_resp} =    Run Policy Get Configs Request    ${RESOURCE_PATH_GET_CONFIG}   ${output}
     Should Be Equal As Strings          ${get_resp.status_code}  200
     ${config}=    Catenate    ${get_resp.json()[0]["config"]}
@@ -98,7 +100,8 @@ Get Configs VDNS Policy
     [Documentation]    Get Config Policy for VDNS
     ${getconfigpolicy}=    Catenate    .*MicroServicevDNS*
     ${configpolicy_name}=    Create Dictionary    config_policy_name=${getconfigpolicy}
-    ${output} =     Fill JSON Template File     ${GECONFIG_VFW_TEMPLATE}    ${configpolicy_name}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${GECONFIG_VFW_TEMPLATE}    ${configpolicy_name}
     ${get_resp} =    Run Policy Get Configs Request    ${RESOURCE_PATH_GET_CONFIG}   ${output}
     Should Be Equal As Strings  ${get_resp.status_code}  200
     ${config}=    Catenate    ${get_resp.json()[0]["config"]}
@@ -121,7 +124,8 @@ Create Config Policy
     ${policyname1}=    Catenate   com.${randompolicyname}
     ${CONFIG_POLICY_NAME}=    Set Test Variable    ${policyname1}
     ${configpolicy}=    Create Dictionary    policy_name=${CONFIG_POLICY_NAME}
-    ${output} =     Fill JSON Template File     ${CREATE_CONFIG_TEMPLATE}    ${configpolicy}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${CREATE_CONFIG_TEMPLATE}    ${configpolicy}
     ${put_resp} =    Run Policy Put Request    ${RESOURCE_PATH_CREATE}  ${output}
        Should Be Equal As Strings      ${put_resp.status_code}         200
 
@@ -138,8 +142,8 @@ Create Ops Policy
        ${policyname1}=    Catenate   com.${randompolicyname}
        ${OPS_POLICY_NAME}=    Set Test Variable    ${policyname1}
        ${dict}=     Create Dictionary    policy_name=${OPS_POLICY_NAME}
-       #${NEWPOLICY1}=     Create Dictionary    policy_name=com.${OPS_POLICY_NAME}
-       ${output} =     Fill JSON Template File     ${CREATE_OPS_TEMPLATE}    ${dict}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${CREATE_OPS_TEMPLATE}    ${dict}
     ${put_resp} =    Run Policy Put Request    ${RESOURCE_PATH_CREATE}  ${output}
     Log    ${put_resp}
     Should Be Equal As Strings         ${put_resp.status_code}         200
@@ -148,7 +152,8 @@ Push Ops Policy
     [Documentation]    Push Ops Policy
     [Arguments]    ${policyname}    ${policytype}
     ${dict}=     Create Dictionary     policy_name=${policyname}    policy_type=${policytype}
-       ${output} =     Fill JSON Template File     ${PUSH_POLICY_TEMPLATE}     ${dict}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${PUSH_POLICY_TEMPLATE}     ${dict}
     ${put_resp} =    Run Policy Put Request    ${RESOURCE_PATH_CREATE_PUSH}  ${output}
     Should Be Equal As Strings         ${put_resp.status_code}         200
 
@@ -156,7 +161,8 @@ Push Config Policy
     [Documentation]    Push Config Policy
     [Arguments]    ${policyname}    ${policytype}
     ${dict}=     Create Dictionary     policy_name=${policyname}    policy_type=${policytype}
-       ${output} =     Fill JSON Template File     ${PUSH_POLICY_TEMPLATE}     ${dict}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${PUSH_POLICY_TEMPLATE}     ${dict}
     ${put_resp} =    Run Policy Put Request    ${RESOURCE_PATH_CREATE_PUSH}  ${output}
     Should Be Equal As Strings         ${put_resp.status_code}         200
 
@@ -166,7 +172,8 @@ Delete Config Policy
     [Arguments]    ${policy_name}
     ${policyname3}=    Catenate   com.Config_BRMS_Param_${policyname}.1.xml
     ${dict}=     Create Dictionary     policy_name=${policyname3}
-       ${output} =     Fill JSON Template File     ${DEL_POLICY_TEMPLATE}     ${dict}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${DEL_POLICY_TEMPLATE}     ${dict}
     ${put_resp} =    Run Policy Delete Request    ${RESOURCE_PATH_CREATE_DELETE}  ${output}
     Should Be Equal As Strings         ${put_resp.status_code}         200
 
@@ -175,7 +182,8 @@ Delete Ops Policy
     [Arguments]    ${policy_name}
     ${policyname3}=    Catenate   com.Config_MS_com.vFirewall.1.xml
     ${dict}=     Create Dictionary     policy_name=${policyname3}
-       ${output} =     Fill JSON Template File     ${DEL_POLICY_TEMPLATE}     ${dict}
+    Create Environment    cl    ${GLOBAL_TEMPLATE_FOLDER}
+    ${output}=   Apply Template    cl    ${DEL_POLICY_TEMPLATE}     ${dict}
     ${put_resp} =    Run Policy Delete Request    ${RESOURCE_PATH_CREATE_DELETE}  ${output}
     Should Be Equal As Strings         ${put_resp.status_code}         200