From 3bb6cf4b938d3e725860606d3ddaa8eecd872151 Mon Sep 17 00:00:00 2001 From: DR695H Date: Thu, 20 Jun 2019 15:04:04 -0400 Subject: replace aai, closeloop, sdc with jinja Issue-ID: TEST-158 Change-Id: I95a783f26e28512cb4fc98e50931d62001c489c6 Signed-off-by: DR695H --- robot/assets/templates/aai/add-connectivity.jinja | 21 ++++ .../assets/templates/aai/add-connectivity.template | 21 ---- robot/assets/templates/aai/add-relationship.jinja | 4 + .../assets/templates/aai/add-relationship.template | 4 - robot/assets/templates/aai/add-vpn-binding.jinja | 18 +++ .../assets/templates/aai/add-vpn-binding.template | 18 --- .../templates/aai/add_availability_zone_body.jinja | 5 + .../aai/add_availability_zone_body.template | 5 - robot/assets/templates/aai/add_complex_body.jinja | 42 +++++++ .../assets/templates/aai/add_complex_body.template | 42 ------- robot/assets/templates/aai/add_customer.jinja | 25 ++++ robot/assets/templates/aai/add_customer.template | 25 ---- robot/assets/templates/aai/add_demo_customer.jinja | 123 ++++++++++++++++++++ .../templates/aai/add_demo_customer.template | 123 -------------------- robot/assets/templates/aai/add_service_body.jinja | 6 + .../assets/templates/aai/add_service_body.template | 6 - robot/assets/templates/aai/add_tenant_body.jinja | 18 +++ .../assets/templates/aai/add_tenant_body.template | 18 --- robot/assets/templates/aai/add_vnfc_body.jinja | 7 ++ robot/assets/templates/aai/add_vnfc_body.template | 7 -- robot/assets/templates/aai/add_zone_body.jinja | 7 ++ robot/assets/templates/aai/add_zone_body.template | 7 -- robot/assets/templates/aai/named_query.jinja | 17 +++ robot/assets/templates/aai/named_query.template | 17 --- .../templates/aai/service_subscription.jinja | 19 ++++ .../templates/aai/service_subscription.template | 19 ---- .../templates/aai/vlb_closed_loop_hack.jinja | 7 ++ .../templates/aai/vlb_closed_loop_hack.template | 7 -- robot/assets/templates/asdc/action.jinja | 3 + robot/assets/templates/asdc/action.template | 3 - robot/assets/templates/asdc/artifact_upload.jinja | 8 ++ .../assets/templates/asdc/artifact_upload.template | 8 -- .../templates/asdc/catalog_allotted_inputs.jinja | 46 ++++++++ .../asdc/catalog_allotted_inputs.template | 46 -------- .../asdc/catalog_allotted_properties.jinja | 43 +++++++ .../asdc/catalog_allotted_properties.template | 43 ------- .../asdc/catalog_net_input_properties.jinja | 39 +++++++ .../asdc/catalog_net_input_properties.template | 39 ------- robot/assets/templates/asdc/catalog_resource.jinja | 43 +++++++ .../templates/asdc/catalog_resource.template | 43 ------- .../asdc/catalog_resource_alloted_resource.jinja | 41 +++++++ .../catalog_resource_alloted_resource.template | 41 ------- robot/assets/templates/asdc/catalog_service.jinja | 42 +++++++ .../assets/templates/asdc/catalog_service.template | 42 ------- .../assets/templates/asdc/catalog_vnf_inputs.jinja | 112 ++++++++++++++++++ .../templates/asdc/catalog_vnf_inputs.template | 112 ------------------ .../templates/asdc/catalog_vnf_properties.jinja | 29 +++++ .../templates/asdc/catalog_vnf_properties.template | 29 ----- robot/assets/templates/asdc/entitlement_pool.jinja | 13 +++ .../templates/asdc/entitlement_pool.template | 13 --- robot/assets/templates/asdc/feature_group.jinja | 11 ++ robot/assets/templates/asdc/feature_group.template | 11 -- robot/assets/templates/asdc/key_group.jinja | 10 ++ robot/assets/templates/asdc/key_group.template | 10 -- .../assets/templates/asdc/license_agreement.jinja | 12 ++ .../templates/asdc/license_agreement.template | 12 -- robot/assets/templates/asdc/license_model.jinja | 5 + robot/assets/templates/asdc/license_model.template | 5 - .../assets/templates/asdc/resource_instance.jinja | 10 ++ .../templates/asdc/resource_instance.template | 10 -- robot/assets/templates/asdc/software_product.jinja | 18 +++ .../templates/asdc/software_product.template | 18 --- robot/assets/templates/asdc/user_remarks.jinja | 1 + robot/assets/templates/asdc/user_remarks.template | 1 - robot/assets/templates/cinder_add_volume.template | 9 -- robot/assets/templates/heat_add_stack.template | 12 -- .../assets/templates/keystone_get_v2_auth.template | 10 -- .../assets/templates/keystone_get_v3_auth.template | 26 ----- .../assets/templates/neutron_add_network.template | 7 -- robot/assets/templates/neutron_add_subnet.template | 8 -- robot/assets/templates/nova_add_keypair.template | 6 - robot/assets/templates/nova_add_server.template | 17 --- .../templates/openstack/cinder_add_volume.jinja | 9 ++ .../templates/openstack/heat_add_stack.jinja | 12 ++ .../templates/openstack/keystone_get_v2_auth.jinja | 10 ++ .../templates/openstack/keystone_get_v3_auth.jinja | 26 +++++ .../templates/openstack/neutron_add_network.jinja | 7 ++ .../templates/openstack/neutron_add_subnet.jinja | 8 ++ .../templates/openstack/nova_add_keypair.jinja | 6 + .../templates/openstack/nova_add_server.jinja | 17 +++ .../templates/policy/closedloop_configpolicy.jinja | 36 ++++++ .../policy/closedloop_configpolicy.template | 36 ------ .../templates/policy/closedloop_createpolicy.jinja | 21 ++++ .../policy/closedloop_createpolicy.template | 21 ---- .../templates/policy/closedloop_deletepolicy.jinja | 5 + .../policy/closedloop_deletepolicy.template | 5 - .../policy/closedloop_getconfigpolicy.jinja | 8 ++ .../policy/closedloop_getconfigpolicy.template | 8 -- .../templates/policy/closedloop_opspolicy.jinja | 25 ++++ .../templates/policy/closedloop_opspolicy.template | 25 ---- .../templates/policy/closedloop_pushpolicy.jinja | 5 + .../policy/closedloop_pushpolicy.template | 5 - robot/assets/templates/sdnc/preload.jinja | 33 ++++++ robot/assets/templates/sdnc/preload.template | 33 ------ robot/assets/templates/template_example.template | 6 - robot/resources/aai/add-relationship-list.robot | 15 +-- robot/resources/aai/ccvpn-connectivities.robot | 8 +- robot/resources/aai/ccvpn-vpn-bindings.robot | 8 +- robot/resources/aai/create_availability_zone.robot | 8 +- robot/resources/aai/create_complex.robot | 13 +-- robot/resources/aai/create_customer.robot | 10 +- robot/resources/aai/create_service.robot | 12 +- robot/resources/aai/create_tenant.robot | 11 +- robot/resources/aai/create_vnfc.robot | 8 +- robot/resources/aai/create_zone.robot | 16 +-- robot/resources/aai/network.robot | 24 ++-- robot/resources/aai/service_instance.robot | 11 +- robot/resources/aai/volume_group.robot | 24 +--- robot/resources/asdc_interface.robot | 126 +++++++++++++-------- robot/resources/demo_preload.robot | 6 +- robot/resources/heatbridge.robot | 9 +- robot/resources/json_templater.robot | 20 ---- robot/resources/openstack/cinder_interface.robot | 7 +- robot/resources/openstack/heat_interface.robot | 15 ++- robot/resources/openstack/keystone_interface.robot | 16 +-- robot/resources/openstack/neutron_interface.robot | 12 +- robot/resources/openstack/nova_interface.robot | 15 ++- robot/resources/sdngc_interface.robot | 8 +- .../stack_validation/policy_check_vfw.robot | 1 - .../stack_validation/validate_common.robot | 1 - .../test_templates/closedloop_test_template.robot | 38 ++++--- 121 files changed, 1244 insertions(+), 1270 deletions(-) create mode 100644 robot/assets/templates/aai/add-connectivity.jinja delete mode 100644 robot/assets/templates/aai/add-connectivity.template create mode 100644 robot/assets/templates/aai/add-relationship.jinja delete mode 100644 robot/assets/templates/aai/add-relationship.template create mode 100644 robot/assets/templates/aai/add-vpn-binding.jinja delete mode 100644 robot/assets/templates/aai/add-vpn-binding.template create mode 100644 robot/assets/templates/aai/add_availability_zone_body.jinja delete mode 100644 robot/assets/templates/aai/add_availability_zone_body.template create mode 100644 robot/assets/templates/aai/add_complex_body.jinja delete mode 100644 robot/assets/templates/aai/add_complex_body.template create mode 100644 robot/assets/templates/aai/add_customer.jinja delete mode 100644 robot/assets/templates/aai/add_customer.template create mode 100644 robot/assets/templates/aai/add_demo_customer.jinja delete mode 100644 robot/assets/templates/aai/add_demo_customer.template create mode 100644 robot/assets/templates/aai/add_service_body.jinja delete mode 100644 robot/assets/templates/aai/add_service_body.template create mode 100644 robot/assets/templates/aai/add_tenant_body.jinja delete mode 100644 robot/assets/templates/aai/add_tenant_body.template create mode 100644 robot/assets/templates/aai/add_vnfc_body.jinja delete mode 100644 robot/assets/templates/aai/add_vnfc_body.template create mode 100644 robot/assets/templates/aai/add_zone_body.jinja delete mode 100644 robot/assets/templates/aai/add_zone_body.template create mode 100644 robot/assets/templates/aai/named_query.jinja delete mode 100644 robot/assets/templates/aai/named_query.template create mode 100644 robot/assets/templates/aai/service_subscription.jinja delete mode 100644 robot/assets/templates/aai/service_subscription.template create mode 100644 robot/assets/templates/aai/vlb_closed_loop_hack.jinja delete mode 100644 robot/assets/templates/aai/vlb_closed_loop_hack.template create mode 100644 robot/assets/templates/asdc/action.jinja delete mode 100644 robot/assets/templates/asdc/action.template create mode 100644 robot/assets/templates/asdc/artifact_upload.jinja delete mode 100644 robot/assets/templates/asdc/artifact_upload.template create mode 100644 robot/assets/templates/asdc/catalog_allotted_inputs.jinja delete mode 100644 robot/assets/templates/asdc/catalog_allotted_inputs.template create mode 100644 robot/assets/templates/asdc/catalog_allotted_properties.jinja delete mode 100644 robot/assets/templates/asdc/catalog_allotted_properties.template create mode 100644 robot/assets/templates/asdc/catalog_net_input_properties.jinja delete mode 100644 robot/assets/templates/asdc/catalog_net_input_properties.template create mode 100644 robot/assets/templates/asdc/catalog_resource.jinja delete mode 100644 robot/assets/templates/asdc/catalog_resource.template create mode 100644 robot/assets/templates/asdc/catalog_resource_alloted_resource.jinja delete mode 100644 robot/assets/templates/asdc/catalog_resource_alloted_resource.template create mode 100644 robot/assets/templates/asdc/catalog_service.jinja delete mode 100644 robot/assets/templates/asdc/catalog_service.template create mode 100644 robot/assets/templates/asdc/catalog_vnf_inputs.jinja delete mode 100644 robot/assets/templates/asdc/catalog_vnf_inputs.template create mode 100644 robot/assets/templates/asdc/catalog_vnf_properties.jinja delete mode 100644 robot/assets/templates/asdc/catalog_vnf_properties.template create mode 100644 robot/assets/templates/asdc/entitlement_pool.jinja delete mode 100644 robot/assets/templates/asdc/entitlement_pool.template create mode 100644 robot/assets/templates/asdc/feature_group.jinja delete mode 100644 robot/assets/templates/asdc/feature_group.template create mode 100644 robot/assets/templates/asdc/key_group.jinja delete mode 100644 robot/assets/templates/asdc/key_group.template create mode 100644 robot/assets/templates/asdc/license_agreement.jinja delete mode 100644 robot/assets/templates/asdc/license_agreement.template create mode 100644 robot/assets/templates/asdc/license_model.jinja delete mode 100644 robot/assets/templates/asdc/license_model.template create mode 100644 robot/assets/templates/asdc/resource_instance.jinja delete mode 100644 robot/assets/templates/asdc/resource_instance.template create mode 100644 robot/assets/templates/asdc/software_product.jinja delete mode 100644 robot/assets/templates/asdc/software_product.template create mode 100644 robot/assets/templates/asdc/user_remarks.jinja delete mode 100644 robot/assets/templates/asdc/user_remarks.template delete mode 100644 robot/assets/templates/cinder_add_volume.template delete mode 100644 robot/assets/templates/heat_add_stack.template delete mode 100644 robot/assets/templates/keystone_get_v2_auth.template delete mode 100644 robot/assets/templates/keystone_get_v3_auth.template delete mode 100644 robot/assets/templates/neutron_add_network.template delete mode 100644 robot/assets/templates/neutron_add_subnet.template delete mode 100644 robot/assets/templates/nova_add_keypair.template delete mode 100644 robot/assets/templates/nova_add_server.template create mode 100644 robot/assets/templates/openstack/cinder_add_volume.jinja create mode 100644 robot/assets/templates/openstack/heat_add_stack.jinja create mode 100644 robot/assets/templates/openstack/keystone_get_v2_auth.jinja create mode 100644 robot/assets/templates/openstack/keystone_get_v3_auth.jinja create mode 100644 robot/assets/templates/openstack/neutron_add_network.jinja create mode 100644 robot/assets/templates/openstack/neutron_add_subnet.jinja create mode 100644 robot/assets/templates/openstack/nova_add_keypair.jinja create mode 100644 robot/assets/templates/openstack/nova_add_server.jinja create mode 100644 robot/assets/templates/policy/closedloop_configpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_configpolicy.template create mode 100644 robot/assets/templates/policy/closedloop_createpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_createpolicy.template create mode 100644 robot/assets/templates/policy/closedloop_deletepolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_deletepolicy.template create mode 100644 robot/assets/templates/policy/closedloop_getconfigpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_getconfigpolicy.template create mode 100644 robot/assets/templates/policy/closedloop_opspolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_opspolicy.template create mode 100644 robot/assets/templates/policy/closedloop_pushpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_pushpolicy.template create mode 100644 robot/assets/templates/sdnc/preload.jinja delete mode 100644 robot/assets/templates/sdnc/preload.template delete mode 100644 robot/assets/templates/template_example.template delete mode 100644 robot/resources/json_templater.robot (limited to 'robot') diff --git a/robot/assets/templates/aai/add-connectivity.jinja b/robot/assets/templates/aai/add-connectivity.jinja new file mode 100644 index 00000000..5721ccff --- /dev/null +++ b/robot/assets/templates/aai/add-connectivity.jinja @@ -0,0 +1,21 @@ +{ + "connectivity-id": "{{connectivity_id}}", + "bandwidth-profile-name": "", + "vpn-type": "", + "cir": "", + "eir": "", + "cbs": "", + "ebs": "", + "color-aware": "", + "coupling-flag": "", + "etht-svc-name": "", + "access-provider-id": "", + "access-client-id": "", + "access-topology-id": "", + "access-node-id": "", + "access-ltp-id": "", + "connectivity-selflink": "", + "cvlan": "", + "operational-status": "", + "resource-version": "" +} diff --git a/robot/assets/templates/aai/add-connectivity.template b/robot/assets/templates/aai/add-connectivity.template deleted file mode 100644 index a693b208..00000000 --- a/robot/assets/templates/aai/add-connectivity.template +++ /dev/null @@ -1,21 +0,0 @@ -{ - "connectivity-id": "${connectivity_id}", - "bandwidth-profile-name": "", - "vpn-type": "", - "cir": "", - "eir": "", - "cbs": "", - "ebs": "", - "color-aware": "", - "coupling-flag": "", - "etht-svc-name": "", - "access-provider-id": "", - "access-client-id": "", - "access-topology-id": "", - "access-node-id": "", - "access-ltp-id": "", - "connectivity-selflink": "", - "cvlan": "", - "operational-status": "", - "resource-version": "" -} diff --git a/robot/assets/templates/aai/add-relationship.jinja b/robot/assets/templates/aai/add-relationship.jinja new file mode 100644 index 00000000..e09dbcc9 --- /dev/null +++ b/robot/assets/templates/aai/add-relationship.jinja @@ -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 index e8550aaf..00000000 --- a/robot/assets/templates/aai/add-relationship.template +++ /dev/null @@ -1,4 +0,0 @@ -{ - "related-to": "${related_class_name}", - "related-link": "${related_object_url}" -} diff --git a/robot/assets/templates/aai/add-vpn-binding.jinja b/robot/assets/templates/aai/add-vpn-binding.jinja new file mode 100644 index 00000000..f901e806 --- /dev/null +++ b/robot/assets/templates/aai/add-vpn-binding.jinja @@ -0,0 +1,18 @@ +{ + "vpn-id": "{{vpn_id}}", + "vpn-name": "", + "vpn-platform": "", + "vpn-type": "", + "vpn-region": "", + "customer-vpn-id": "", + "route-distinguisher": "", + "access-provider-id": "", + "access-client-id": "", + "access-topology-id": "", + "src-access-node-id": "", + "src-access-ltp-id": "", + "dst-access-node-id": "", + "dst-access-ltp-id": "", + "operational-status": "", + "resource-version": "" +} \ No newline at end of file diff --git a/robot/assets/templates/aai/add-vpn-binding.template b/robot/assets/templates/aai/add-vpn-binding.template deleted file mode 100644 index 8c6743fe..00000000 --- a/robot/assets/templates/aai/add-vpn-binding.template +++ /dev/null @@ -1,18 +0,0 @@ -{ - "vpn-id": "${vpn_id}", - "vpn-name": "", - "vpn-platform": "", - "vpn-type": "", - "vpn-region": "", - "customer-vpn-id": "", - "route-distinguisher": "", - "access-provider-id": "", - "access-client-id": "", - "access-topology-id": "", - "src-access-node-id": "", - "src-access-ltp-id": "", - "dst-access-node-id": "", - "dst-access-ltp-id": "", - "operational-status": "", - "resource-version": "" -} \ No newline at end of file diff --git a/robot/assets/templates/aai/add_availability_zone_body.jinja b/robot/assets/templates/aai/add_availability_zone_body.jinja new file mode 100644 index 00000000..1d16dd6e --- /dev/null +++ b/robot/assets/templates/aai/add_availability_zone_body.jinja @@ -0,0 +1,5 @@ +{ +"availability-zone-name":"{{availability_zone_name}}", +"hypervisor-type": "KVM", +"operational-status": "Active" +} diff --git a/robot/assets/templates/aai/add_availability_zone_body.template b/robot/assets/templates/aai/add_availability_zone_body.template deleted file mode 100644 index e955ab32..00000000 --- a/robot/assets/templates/aai/add_availability_zone_body.template +++ /dev/null @@ -1,5 +0,0 @@ -{ -"availability-zone-name":"${availability_zone_name}", -"hypervisor-type": "KVM", -"operational-status": "Active" -} diff --git a/robot/assets/templates/aai/add_complex_body.jinja b/robot/assets/templates/aai/add_complex_body.jinja new file mode 100644 index 00000000..6ae3c0d0 --- /dev/null +++ b/robot/assets/templates/aai/add_complex_body.jinja @@ -0,0 +1,42 @@ + { + "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", + "street1": "example-street1-val-34205", + "street2": "example-street2-val-99210", + "city": "example-city-val-27150", + "state": "example-state-val-59487", + "postal-code": "68871", + "country": "example-country-val-94173", + "region": "example-region-val-13893", + "latitude": "example-latitude-val-89101", + "longitude": "32.89948", + "elevation": "97.045443", + "lata": "example-lata-val-46073", + "relationship-list": { + "relationship": [ + { + "related-to": "cloud-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-key": "cloud-region.cloud-region-id", + "relationship-value": "{{region}}" + } + ], + "related-to-property": [ + { + "property-key": "cloud-region.owner-defined-type", + "property-value": "{{owner_defined_type}}" + } + ] + } + ] + } + } diff --git a/robot/assets/templates/aai/add_complex_body.template b/robot/assets/templates/aai/add_complex_body.template deleted file mode 100644 index 3e0ac871..00000000 --- a/robot/assets/templates/aai/add_complex_body.template +++ /dev/null @@ -1,42 +0,0 @@ - { - "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", - "street1": "example-street1-val-34205", - "street2": "example-street2-val-99210", - "city": "example-city-val-27150", - "state": "example-state-val-59487", - "postal-code": "68871", - "country": "example-country-val-94173", - "region": "example-region-val-13893", - "latitude": "example-latitude-val-89101", - "longitude": "32.89948", - "elevation": "97.045443", - "lata": "example-lata-val-46073", - "relationship-list": { - "relationship": [ - { - "related-to": "cloud-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-key": "cloud-region.cloud-region-id", - "relationship-value": "${region}" - } - ], - "related-to-property": [ - { - "property-key": "cloud-region.owner-defined-type", - "property-value": "${owner_defined_type}" - } - ] - } - ] - } - } diff --git a/robot/assets/templates/aai/add_customer.jinja b/robot/assets/templates/aai/add_customer.jinja new file mode 100644 index 00000000..062f93bb --- /dev/null +++ b/robot/assets/templates/aai/add_customer.jinja @@ -0,0 +1,25 @@ +{ + "global-customer-id": "{{global_customer_id}}", + "subscriber-name": "{{subscriber_name}}", + "subscriber-type": "{{subscriber_type}}", + "service-subscriptions": { + "service-subscription": [{ + "service-type": "{{service1}}", + "relationship-list": { + "relationship": [{ + "related-to": "tenant", + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "{{cloud_owner1}}" + }, { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "{{cloud_region_id1}}" + }, { + "relationship-key": "tenant.tenant-id", + "relationship-value": "{{tenant_id1}}" + }] + }] + } + }] + } + } \ No newline at end of file diff --git a/robot/assets/templates/aai/add_customer.template b/robot/assets/templates/aai/add_customer.template deleted file mode 100644 index d0ae174a..00000000 --- a/robot/assets/templates/aai/add_customer.template +++ /dev/null @@ -1,25 +0,0 @@ -{ - "global-customer-id": "${global_customer_id}", - "subscriber-name": "${subscriber_name}", - "subscriber-type": "${subscriber_type}", - "service-subscriptions": { - "service-subscription": [{ - "service-type": "${service1}", - "relationship-list": { - "relationship": [{ - "related-to": "tenant", - "relationship-data": [{ - "relationship-key": "cloud-region.cloud-owner", - "relationship-value": "${cloud_owner1}" - }, { - "relationship-key": "cloud-region.cloud-region-id", - "relationship-value": "${cloud_region_id1}" - }, { - "relationship-key": "tenant.tenant-id", - "relationship-value": "${tenant_id1}" - }] - }] - } - }] - } - } \ No newline at end of file diff --git a/robot/assets/templates/aai/add_demo_customer.jinja b/robot/assets/templates/aai/add_demo_customer.jinja new file mode 100644 index 00000000..2c4f6c92 --- /dev/null +++ b/robot/assets/templates/aai/add_demo_customer.jinja @@ -0,0 +1,123 @@ +{ + "global-customer-id" : "{{global_customer_id}}", + "subscriber-name" : "{{subscriber_name}}", + "subscriber-type" : "{{subscriber_type}}", + "service-subscriptions" : { + "service-subscription" : [{ + "service-type" : "{{service1}}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "{{cloud_owner}}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "{{cloud_region_id}}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "{{tenant_id}}" + } + ] + } + ] + } + }, { + "service-type" : "{{service2}}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "{{cloud_owner}}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "{{cloud_region_id}}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "{{tenant_id}}" + } + ] + } + ] + } + }, { + "service-type" : "{{service3}}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "{{cloud_owner}}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "{{cloud_region_id}}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "{{tenant_id}}" + } + ] + } + ] + } + }, { + "service-type" : "{{service4}}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "{{cloud_owner}}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "{{cloud_region_id}}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "{{tenant_id}}" + } + ] + } + ] + } + }, { + "service-type" : "{{service5}}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "{{cloud_owner}}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "{{cloud_region_id}}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "{{tenant_id}}" + } + ] + } + ] + } + }, { + "service-type" : "{{service6}}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "{{cloud_owner}}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "{{cloud_region_id}}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "{{tenant_id}}" + } + ] + } + ] + } + } + ] + } +} diff --git a/robot/assets/templates/aai/add_demo_customer.template b/robot/assets/templates/aai/add_demo_customer.template deleted file mode 100644 index a91e3836..00000000 --- a/robot/assets/templates/aai/add_demo_customer.template +++ /dev/null @@ -1,123 +0,0 @@ -{ - "global-customer-id" : "${global_customer_id}", - "subscriber-name" : "${subscriber_name}", - "subscriber-type" : "${subscriber_type}", - "service-subscriptions" : { - "service-subscription" : [{ - "service-type" : "${service1}", - "relationship-list" : { - "relationship" : [{ - "related-to" : "tenant", - "relationship-data" : [{ - "relationship-key" : "cloud-region.cloud-owner", - "relationship-value" : "${cloud_owner}" - }, { - "relationship-key" : "cloud-region.cloud-region-id", - "relationship-value" : "${cloud_region_id}" - }, { - "relationship-key" : "tenant.tenant-id", - "relationship-value" : "${tenant_id}" - } - ] - } - ] - } - }, { - "service-type" : "${service2}", - "relationship-list" : { - "relationship" : [{ - "related-to" : "tenant", - "relationship-data" : [{ - "relationship-key" : "cloud-region.cloud-owner", - "relationship-value" : "${cloud_owner}" - }, { - "relationship-key" : "cloud-region.cloud-region-id", - "relationship-value" : "${cloud_region_id}" - }, { - "relationship-key" : "tenant.tenant-id", - "relationship-value" : "${tenant_id}" - } - ] - } - ] - } - }, { - "service-type" : "${service3}", - "relationship-list" : { - "relationship" : [{ - "related-to" : "tenant", - "relationship-data" : [{ - "relationship-key" : "cloud-region.cloud-owner", - "relationship-value" : "${cloud_owner}" - }, { - "relationship-key" : "cloud-region.cloud-region-id", - "relationship-value" : "${cloud_region_id}" - }, { - "relationship-key" : "tenant.tenant-id", - "relationship-value" : "${tenant_id}" - } - ] - } - ] - } - }, { - "service-type" : "${service4}", - "relationship-list" : { - "relationship" : [{ - "related-to" : "tenant", - "relationship-data" : [{ - "relationship-key" : "cloud-region.cloud-owner", - "relationship-value" : "${cloud_owner}" - }, { - "relationship-key" : "cloud-region.cloud-region-id", - "relationship-value" : "${cloud_region_id}" - }, { - "relationship-key" : "tenant.tenant-id", - "relationship-value" : "${tenant_id}" - } - ] - } - ] - } - }, { - "service-type" : "${service5}", - "relationship-list" : { - "relationship" : [{ - "related-to" : "tenant", - "relationship-data" : [{ - "relationship-key" : "cloud-region.cloud-owner", - "relationship-value" : "${cloud_owner}" - }, { - "relationship-key" : "cloud-region.cloud-region-id", - "relationship-value" : "${cloud_region_id}" - }, { - "relationship-key" : "tenant.tenant-id", - "relationship-value" : "${tenant_id}" - } - ] - } - ] - } - }, { - "service-type" : "${service6}", - "relationship-list" : { - "relationship" : [{ - "related-to" : "tenant", - "relationship-data" : [{ - "relationship-key" : "cloud-region.cloud-owner", - "relationship-value" : "${cloud_owner}" - }, { - "relationship-key" : "cloud-region.cloud-region-id", - "relationship-value" : "${cloud_region_id}" - }, { - "relationship-key" : "tenant.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 index 00000000..76eab165 --- /dev/null +++ b/robot/assets/templates/aai/add_service_body.jinja @@ -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 index ca32fd51..00000000 --- a/robot/assets/templates/aai/add_service_body.template +++ /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 index 00000000..71430b97 --- /dev/null +++ b/robot/assets/templates/aai/add_tenant_body.jinja @@ -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 index a7dbbbf7..00000000 --- a/robot/assets/templates/aai/add_tenant_body.template +++ /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 index 00000000..fa32b4a8 --- /dev/null +++ b/robot/assets/templates/aai/add_vnfc_body.jinja @@ -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 index 88ababd3..00000000 --- a/robot/assets/templates/aai/add_vnfc_body.template +++ /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 index 00000000..87dfaa5c --- /dev/null +++ b/robot/assets/templates/aai/add_zone_body.jinja @@ -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 index 01f99c0a..00000000 --- a/robot/assets/templates/aai/add_zone_body.template +++ /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 diff --git a/robot/assets/templates/aai/named_query.jinja b/robot/assets/templates/aai/named_query.jinja new file mode 100644 index 00000000..f4501d0f --- /dev/null +++ b/robot/assets/templates/aai/named_query.jinja @@ -0,0 +1,17 @@ +{ + "query-parameters": { + "named-query": { + "named-query-uuid": "f199cb88-5e69-4b1f-93e0-6f257877d066" + } + }, + "instance-filters": { + "instance-filter": [ + { + "vserver": + { + "vserver-name": "{{vserver_name}}" + } + } + ] + } +} \ No newline at end of file diff --git a/robot/assets/templates/aai/named_query.template b/robot/assets/templates/aai/named_query.template deleted file mode 100644 index de3f21f6..00000000 --- a/robot/assets/templates/aai/named_query.template +++ /dev/null @@ -1,17 +0,0 @@ -{ - "query-parameters": { - "named-query": { - "named-query-uuid": "f199cb88-5e69-4b1f-93e0-6f257877d066" - } - }, - "instance-filters": { - "instance-filter": [ - { - "vserver": - { - "vserver-name": "${vserver_name}" - } - } - ] - } -} \ No newline at end of file diff --git a/robot/assets/templates/aai/service_subscription.jinja b/robot/assets/templates/aai/service_subscription.jinja new file mode 100644 index 00000000..f8ec466d --- /dev/null +++ b/robot/assets/templates/aai/service_subscription.jinja @@ -0,0 +1,19 @@ +{ + "service-subscription":[ + { + "service-type":"{{service_type}}", + "resource-version":"1473866861", + "service-instances":{ + "service-instance":[ + { + "service-instance-id":"d3f9a631-e280-4a87-846d-9ccd7a265980", + "service-instance-name":"VIV+IST+ezNew+Oct6", + "persona-model-id":"e6f1d393-6432-4820-ab86-7a10ba4b31ac", + "persona-model-version":"1.0", + "resource-version":"1475807447" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/robot/assets/templates/aai/service_subscription.template b/robot/assets/templates/aai/service_subscription.template deleted file mode 100644 index 85703581..00000000 --- a/robot/assets/templates/aai/service_subscription.template +++ /dev/null @@ -1,19 +0,0 @@ -{ - "service-subscription":[ - { - "service-type":"{$service_type}", - "resource-version":"1473866861", - "service-instances":{ - "service-instance":[ - { - "service-instance-id":"d3f9a631-e280-4a87-846d-9ccd7a265980", - "service-instance-name":"VIV+IST+ezNew+Oct6", - "persona-model-id":"e6f1d393-6432-4820-ab86-7a10ba4b31ac", - "persona-model-version":"1.0", - "resource-version":"1475807447" - } - ] - } - } - ] -} \ No newline at end of file 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 index 00000000..bf034592 --- /dev/null +++ b/robot/assets/templates/aai/vlb_closed_loop_hack.jinja @@ -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 index 27f9c963..00000000 --- a/robot/assets/templates/aai/vlb_closed_loop_hack.template +++ /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 index 00000000..3ef9f60b --- /dev/null +++ b/robot/assets/templates/asdc/action.jinja @@ -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 index 4d417c9f..00000000 --- a/robot/assets/templates/asdc/action.template +++ /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 index 00000000..80e6fc63 --- /dev/null +++ b/robot/assets/templates/asdc/artifact_upload.jinja @@ -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 index 9be6ca04..00000000 --- a/robot/assets/templates/asdc/artifact_upload.template +++ /dev/null @@ -1,8 +0,0 @@ -{ - "artifactLabel":"${artifactLabel}", - "artifactName": "${artifactName}", - "artifactType": "${artifactType}", - "artifactGroupType": "${artifactGroupType}", - "description": "${description}", - "payloadData": "${payloadData}" -} diff --git a/robot/assets/templates/asdc/catalog_allotted_inputs.jinja b/robot/assets/templates/asdc/catalog_allotted_inputs.jinja new file mode 100644 index 00000000..b53a2e7a --- /dev/null +++ b/robot/assets/templates/asdc/catalog_allotted_inputs.jinja @@ -0,0 +1,46 @@ +[ + { + "defaultValue": "{{nf_type}}", + "description": null, + "name": "nf_type", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{nf_type_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "{{nf_role}}", + "description": null, + "name": "nf_role", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{nf_role_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + } +] diff --git a/robot/assets/templates/asdc/catalog_allotted_inputs.template b/robot/assets/templates/asdc/catalog_allotted_inputs.template deleted file mode 100644 index 11074801..00000000 --- a/robot/assets/templates/asdc/catalog_allotted_inputs.template +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "defaultValue": "${nf_type}", - "description": null, - "name": "nf_type", - "parentUniqueId": null, - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${nf_type_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": null, - "inputPath": null - }, - { - "defaultValue": "${nf_role}", - "description": null, - "name": "nf_role", - "parentUniqueId": null, - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${nf_role_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": null, - "inputPath": null - } -] diff --git a/robot/assets/templates/asdc/catalog_allotted_properties.jinja b/robot/assets/templates/asdc/catalog_allotted_properties.jinja new file mode 100644 index 00000000..ba183a1e --- /dev/null +++ b/robot/assets/templates/asdc/catalog_allotted_properties.jinja @@ -0,0 +1,43 @@ +[{ + "definition": false, + "description": "The depending service invariant uuid in order to map the allotted resource to the specific service version", + "empty": false, + "getInputProperty": false, + "hidden": false, + "immutable": false, + "name": "providing_service_invariant_uuid", + "password": false, + "required": true, + "type": "string", + "value": {{providing_service_invariant_uuid}}, + "uniqueId": "{{uniqueId}}.providing_service_invariant_uuid" + }, + { + "definition": false, + "description": "The depending service uuid in order to map the allotted resource to the specific service version", + "empty": false, + "getInputProperty": false, + "hidden": false, + "immutable": false, + "name": "providing_service_uuid", + "password": false, + "required": true, + "type": "string", + "value": {{providing_service_uuid}}, + "uniqueId": "{{uniqueId}}.providing_service_uuid" + }, + { + "definition": false, + "description": "The depending service name in order to map the allotted resource to the specific service version", + "empty": false, + "getInputProperty": false, + "hidden": false, + "immutable": false, + "name": "providing_service_name", + "password": false, + "required": true, + "type": "string", + "value": {{providing_service_name}}, + "uniqueId": "{{uniqueId}}.providing_service_name" + } +] diff --git a/robot/assets/templates/asdc/catalog_allotted_properties.template b/robot/assets/templates/asdc/catalog_allotted_properties.template deleted file mode 100644 index 023abcfe..00000000 --- a/robot/assets/templates/asdc/catalog_allotted_properties.template +++ /dev/null @@ -1,43 +0,0 @@ -[{ - "definition": false, - "description": "The depending service invariant uuid in order to map the allotted resource to the specific service version", - "empty": false, - "getInputProperty": false, - "hidden": false, - "immutable": false, - "name": "providing_service_invariant_uuid", - "password": false, - "required": true, - "type": "string", - "value": ${providing_service_invariant_uuid}, - "uniqueId": "${uniqueId}.providing_service_invariant_uuid" - }, - { - "definition": false, - "description": "The depending service uuid in order to map the allotted resource to the specific service version", - "empty": false, - "getInputProperty": false, - "hidden": false, - "immutable": false, - "name": "providing_service_uuid", - "password": false, - "required": true, - "type": "string", - "value": ${providing_service_uuid}, - "uniqueId": "${uniqueId}.providing_service_uuid" - }, - { - "definition": false, - "description": "The depending service name in order to map the allotted resource to the specific service version", - "empty": false, - "getInputProperty": false, - "hidden": false, - "immutable": false, - "name": "providing_service_name", - "password": false, - "required": true, - "type": "string", - "value": ${providing_service_name}, - "uniqueId": "${uniqueId}.providing_service_name" - } -] diff --git a/robot/assets/templates/asdc/catalog_net_input_properties.jinja b/robot/assets/templates/asdc/catalog_net_input_properties.jinja new file mode 100644 index 00000000..772e4ffa --- /dev/null +++ b/robot/assets/templates/asdc/catalog_net_input_properties.jinja @@ -0,0 +1,39 @@ +[ +{ + "uniqueId": "{{uniqueId}}", + "type": "string", + "required": false, + "definition": false, + "description": "{{description}}", + "schema": { + "property": { + "required": false, + "definition": true, + "password": false, + "hidden": false, + "immutable": false, + "getInputProperty": false, + "empty": false + }, + "empty": false + }, + "password": false, + "name": "{{name}}", + "value": "{{value}}", + "hidden": false, + "immutable": false, + "parentUniqueId": "{{parentUniqueId}}", + "schemaProperty": { + "required": false, + "definition": true, + "password": false, + "hidden": false, + "immutable": false, + "getInputProperty": false, + "empty": false + }, + "getInputProperty": false, + "ownerId": "{{ownerId}}", + "empty": false + } +] diff --git a/robot/assets/templates/asdc/catalog_net_input_properties.template b/robot/assets/templates/asdc/catalog_net_input_properties.template deleted file mode 100644 index 852bb5d7..00000000 --- a/robot/assets/templates/asdc/catalog_net_input_properties.template +++ /dev/null @@ -1,39 +0,0 @@ -[ -{ - "uniqueId": "${uniqueId}", - "type": "string", - "required": false, - "definition": false, - "description": "${description}", - "schema": { - "property": { - "required": false, - "definition": true, - "password": false, - "hidden": false, - "immutable": false, - "getInputProperty": false, - "empty": false - }, - "empty": false - }, - "password": false, - "name": "${name}", - "value": "${value}", - "hidden": false, - "immutable": false, - "parentUniqueId": "${parentUniqueId}", - "schemaProperty": { - "required": false, - "definition": true, - "password": false, - "hidden": false, - "immutable": false, - "getInputProperty": false, - "empty": false - }, - "getInputProperty": false, - "ownerId": "${ownerId}", - "empty": false - } -] diff --git a/robot/assets/templates/asdc/catalog_resource.jinja b/robot/assets/templates/asdc/catalog_resource.jinja new file mode 100644 index 00000000..6839beda --- /dev/null +++ b/robot/assets/templates/asdc/catalog_resource.jinja @@ -0,0 +1,43 @@ +{ + "artifacts": {}, + "toscaArtifacts": {}, + "contactId": "cs0008", + "categories": [ + { + "name": "Generic", + "normalizedName": "generic", + "uniqueId": "resourceNewCategory.generic", + "subcategories": [ + { + "name": "Abstract", + "normalizedName": "abstract", + "uniqueId": "resourceNewCategory.generic.abstract", + "icons": [ + "database" + ] + } + ] + } + ], + "description": "vendor software product", + "icon": "defaulticon", + "componentInstancesProperties": {}, + "componentInstancesAttributes": {}, + "name": "{{software_product_name}}", + "tags": [ + "{{software_product_name}}" + ], + "capabilities": {}, + "requirements": {}, + "deploymentArtifacts": {}, + "componentType": "RESOURCE", + "vendorName": "{{vendor_name}}", + "vendorRelease": "1.0", + "componentInstances": [], + "properties": [], + "attributes": [], + "groups": [], + "resourceType": "VF", + "csarUUID": "{{software_product_id}}", + "csarVersion": "1.0" +} \ No newline at end of file diff --git a/robot/assets/templates/asdc/catalog_resource.template b/robot/assets/templates/asdc/catalog_resource.template deleted file mode 100644 index fcc17ce2..00000000 --- a/robot/assets/templates/asdc/catalog_resource.template +++ /dev/null @@ -1,43 +0,0 @@ -{ - "artifacts": {}, - "toscaArtifacts": {}, - "contactId": "cs0008", - "categories": [ - { - "name": "Generic", - "normalizedName": "generic", - "uniqueId": "resourceNewCategory.generic", - "subcategories": [ - { - "name": "Abstract", - "normalizedName": "abstract", - "uniqueId": "resourceNewCategory.generic.abstract", - "icons": [ - "database" - ] - } - ] - } - ], - "description": "vendor software product", - "icon": "defaulticon", - "componentInstancesProperties": {}, - "componentInstancesAttributes": {}, - "name": "${software_product_name}", - "tags": [ - "${software_product_name}" - ], - "capabilities": {}, - "requirements": {}, - "deploymentArtifacts": {}, - "componentType": "RESOURCE", - "vendorName": "${vendor_name}", - "vendorRelease": "1.0", - "componentInstances": [], - "properties": [], - "attributes": [], - "groups": [], - "resourceType": "VF", - "csarUUID": "${software_product_id}", - "csarVersion": "1.0" -} \ No newline at end of file diff --git a/robot/assets/templates/asdc/catalog_resource_alloted_resource.jinja b/robot/assets/templates/asdc/catalog_resource_alloted_resource.jinja new file mode 100644 index 00000000..9890edfe --- /dev/null +++ b/robot/assets/templates/asdc/catalog_resource_alloted_resource.jinja @@ -0,0 +1,41 @@ +{ + "artifacts": {}, + "toscaArtifacts": {}, + "contactId": "cs0008", + "categories": [ + { + "name": "Allotted Resource", + "normalizedName": "allotted resource", + "uniqueId": "resourceNewCategory.allotted resource", + "subcategories": [ + { + "name": "{{subcategory}}", + "normalizedName": "{{subcategory}}", + "uniqueId": "resourceNewCategory.allotted resource.{{subcategory}}", + "icons": [ + "allotted_resource" + ] + } + ] + } + ], + "description": "Alloted Resource {{subcategory}}", + "icon": "defaulticon", + "componentInstancesProperties": {}, + "componentInstancesAttributes": {}, + "name": "{{software_product_name}}", + "tags": [ + "{{software_product_name}}" + ], + "capabilities": {}, + "requirements": {}, + "deploymentArtifacts": {}, + "componentType": "RESOURCE", + "vendorName": "{{vendor_name}}", + "vendorRelease": "1.0", + "componentInstances": [], + "properties": [], + "attributes": [], + "groups": [], + "resourceType": "VF" +} diff --git a/robot/assets/templates/asdc/catalog_resource_alloted_resource.template b/robot/assets/templates/asdc/catalog_resource_alloted_resource.template deleted file mode 100644 index e3a11ec3..00000000 --- a/robot/assets/templates/asdc/catalog_resource_alloted_resource.template +++ /dev/null @@ -1,41 +0,0 @@ -{ - "artifacts": {}, - "toscaArtifacts": {}, - "contactId": "cs0008", - "categories": [ - { - "name": "Allotted Resource", - "normalizedName": "allotted resource", - "uniqueId": "resourceNewCategory.allotted resource", - "subcategories": [ - { - "name": "${subcategory}", - "normalizedName": "${subcategory}", - "uniqueId": "resourceNewCategory.allotted resource.${subcategory}", - "icons": [ - "allotted_resource" - ] - } - ] - } - ], - "description": "Alloted Resource ${subcategory}", - "icon": "defaulticon", - "componentInstancesProperties": {}, - "componentInstancesAttributes": {}, - "name": "${software_product_name}", - "tags": [ - "${software_product_name}" - ], - "capabilities": {}, - "requirements": {}, - "deploymentArtifacts": {}, - "componentType": "RESOURCE", - "vendorName": "${vendor_name}", - "vendorRelease": "1.0", - "componentInstances": [], - "properties": [], - "attributes": [], - "groups": [], - "resourceType": "VF" -} diff --git a/robot/assets/templates/asdc/catalog_service.jinja b/robot/assets/templates/asdc/catalog_service.jinja new file mode 100644 index 00000000..8fa31f4c --- /dev/null +++ b/robot/assets/templates/asdc/catalog_service.jinja @@ -0,0 +1,42 @@ +{ + "artifacts": {}, + "toscaArtifacts": {}, + "contactId": "cs0008", + "categories": [ + { + "name": "Network L1-3", + "normalizedName": "network l1-3", + "uniqueId": "serviceNewCategory.network l1-3", + "icons": [ + "network_l_1-3" + ], + "subcategories": null, + "version": null, + "ownerId": null, + "empty": false, + "type": null + } + ], + "description": "catalog service description", + "icon": "network_l_1-3", + "componentInstancesProperties": {}, + "componentInstancesAttributes": {}, + "name": "{{service_name}}", + "tags": [ + "robot-ete", + "{{service_name}}" + ], + "capabilities": {}, + "requirements": {}, + "deploymentArtifacts": {}, + "componentType": "SERVICE", + "projectCode": "123456", + "componentInstances": [], + "properties": [], + "attributes": [], + "forwardingPaths": {}, + "ecompGeneratedNaming": true, + "serviceApiArtifacts": {}, + "instantiationType": "A-la-carte", + "environmentContext": "General_Revenue-Bearing" +} diff --git a/robot/assets/templates/asdc/catalog_service.template b/robot/assets/templates/asdc/catalog_service.template deleted file mode 100644 index e35768f4..00000000 --- a/robot/assets/templates/asdc/catalog_service.template +++ /dev/null @@ -1,42 +0,0 @@ -{ - "artifacts": {}, - "toscaArtifacts": {}, - "contactId": "cs0008", - "categories": [ - { - "name": "Network L1-3", - "normalizedName": "network l1-3", - "uniqueId": "serviceNewCategory.network l1-3", - "icons": [ - "network_l_1-3" - ], - "subcategories": null, - "version": null, - "ownerId": null, - "empty": false, - "type": null - } - ], - "description": "catalog service description", - "icon": "network_l_1-3", - "componentInstancesProperties": {}, - "componentInstancesAttributes": {}, - "name": "${service_name}", - "tags": [ - "robot-ete", - "${service_name}" - ], - "capabilities": {}, - "requirements": {}, - "deploymentArtifacts": {}, - "componentType": "SERVICE", - "projectCode": "123456", - "componentInstances": [], - "properties": [], - "attributes": [], - "forwardingPaths": {}, - "ecompGeneratedNaming": true, - "serviceApiArtifacts": {}, - "instantiationType": "A-la-carte", - "environmentContext": "General_Revenue-Bearing" -} diff --git a/robot/assets/templates/asdc/catalog_vnf_inputs.jinja b/robot/assets/templates/asdc/catalog_vnf_inputs.jinja new file mode 100644 index 00000000..25b0ccae --- /dev/null +++ b/robot/assets/templates/asdc/catalog_vnf_inputs.jinja @@ -0,0 +1,112 @@ +[ + { + "defaultValue": "{{nf_function}}", + "description": null, + "name": "nf_function", + "parentUniqueId": "cs0008", + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{nf_function_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": "cs0008", + "inputPath": null + }, + { + "defaultValue": "{{nf_type}}", + "description": null, + "name": "nf_type", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{nf_type_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "{{nf_naming_code}}", + "description": null, + "name": "nf_naming_code", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{nf_naming_code_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "{{nf_role}}", + "description": null, + "name": "nf_role", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{nf_role_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "{{cloud_env}}", + "description": "Cloud environment (e.g., openstack, rackspace)", + "name": "cloud_env", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{cloud_env_uid}}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + } +] diff --git a/robot/assets/templates/asdc/catalog_vnf_inputs.template b/robot/assets/templates/asdc/catalog_vnf_inputs.template deleted file mode 100644 index fb5d4940..00000000 --- a/robot/assets/templates/asdc/catalog_vnf_inputs.template +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "defaultValue": "${nf_function}", - "description": null, - "name": "nf_function", - "parentUniqueId": "cs0008", - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${nf_function_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": "cs0008", - "inputPath": null - }, - { - "defaultValue": "${nf_type}", - "description": null, - "name": "nf_type", - "parentUniqueId": null, - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${nf_type_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": null, - "inputPath": null - }, - { - "defaultValue": "${nf_naming_code}", - "description": null, - "name": "nf_naming_code", - "parentUniqueId": null, - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${nf_naming_code_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": null, - "inputPath": null - }, - { - "defaultValue": "${nf_role}", - "description": null, - "name": "nf_role", - "parentUniqueId": null, - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${nf_role_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": null, - "inputPath": null - }, - { - "defaultValue": "${cloud_env}", - "description": "Cloud environment (e.g., openstack, rackspace)", - "name": "cloud_env", - "parentUniqueId": null, - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${cloud_env_uid}", - "value": null, - "definition": false, - "getInputValues": null, - "instanceUniqueId": null, - "propertyId": null, - "properties": null, - "inputs": null, - "ownerId": null, - "inputPath": null - } -] diff --git a/robot/assets/templates/asdc/catalog_vnf_properties.jinja b/robot/assets/templates/asdc/catalog_vnf_properties.jinja new file mode 100644 index 00000000..d725e0a2 --- /dev/null +++ b/robot/assets/templates/asdc/catalog_vnf_properties.jinja @@ -0,0 +1,29 @@ +[ + { + "name": "nfc_function", + "parentUniqueId": "{{parent_id}}", + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "{{parent_id}}.nfc_function", + "value": "{{nfc_function}}", + "definition": false + }, + { + "description": "vfc naming", + "name": "nfc_naming", + "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}}\"}", + "definition": false + } +] diff --git a/robot/assets/templates/asdc/catalog_vnf_properties.template b/robot/assets/templates/asdc/catalog_vnf_properties.template deleted file mode 100644 index 63e85527..00000000 --- a/robot/assets/templates/asdc/catalog_vnf_properties.template +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "name": "nfc_function", - "parentUniqueId": "${parent_id}", - "password": false, - "required": false, - "schema": { - "property": {} - }, - "type": "string", - "uniqueId": "${parent_id}.nfc_function", - "value": "${nfc_function}", - "definition": false - }, - { - "description": "vfc naming", - "name": "nfc_naming", - "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}\"}", - "definition": false - } -] diff --git a/robot/assets/templates/asdc/entitlement_pool.jinja b/robot/assets/templates/asdc/entitlement_pool.jinja new file mode 100644 index 00000000..d9d39469 --- /dev/null +++ b/robot/assets/templates/asdc/entitlement_pool.jinja @@ -0,0 +1,13 @@ +{ + "name": "{{entitlement_pool_name}}", + "description": "vendor entitlement pool", + "thresholdValue": "100", + "thresholdUnits": "Percentage", + "time": { + "choice": "", + "other": "" + }, + "startDate": "{{license_start_date}}", + "expiryDate": "{{license_end_date}}", + "manufacturerReferenceNumber": "111111" +} diff --git a/robot/assets/templates/asdc/entitlement_pool.template b/robot/assets/templates/asdc/entitlement_pool.template deleted file mode 100644 index b7e6825c..00000000 --- a/robot/assets/templates/asdc/entitlement_pool.template +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "${entitlement_pool_name}", - "description": "vendor entitlement pool", - "thresholdValue": "100", - "thresholdUnits": "Percentage", - "time": { - "choice": "", - "other": "" - }, - "startDate": "${license_start_date}", - "expiryDate": "${license_end_date}", - "manufacturerReferenceNumber": "111111" -} diff --git a/robot/assets/templates/asdc/feature_group.jinja b/robot/assets/templates/asdc/feature_group.jinja new file mode 100644 index 00000000..5bc03f55 --- /dev/null +++ b/robot/assets/templates/asdc/feature_group.jinja @@ -0,0 +1,11 @@ +{ + "name": "{{feature_group_name}}", + "description": "vendor feature group", + "partNumber": "123abc456", + "addedLicenseKeyGroupsIds": [ + "{{key_group_id}}" + ], + "addedEntitlementPoolsIds": [ + "{{entitlement_pool_id}}" + ] +} diff --git a/robot/assets/templates/asdc/feature_group.template b/robot/assets/templates/asdc/feature_group.template deleted file mode 100644 index 9b54663a..00000000 --- a/robot/assets/templates/asdc/feature_group.template +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "${feature_group_name}", - "description": "vendor feature group", - "partNumber": "123abc456", - "addedLicenseKeyGroupsIds": [ - "${key_group_id}" - ], - "addedEntitlementPoolsIds": [ - "${entitlement_pool_id}" - ] -} diff --git a/robot/assets/templates/asdc/key_group.jinja b/robot/assets/templates/asdc/key_group.jinja new file mode 100644 index 00000000..91e4027b --- /dev/null +++ b/robot/assets/templates/asdc/key_group.jinja @@ -0,0 +1,10 @@ +{ + "name": "{{key_group_name}}", + "description": "vendor license key group", + "type": "Universal", + "thresholdValue": "100", + "thresholdUnits": "Percentage", + "startDate": "{{license_start_date}}", + "expiryDate": "{{license_end_date}}", + "manufacturerReferenceNumber": "11111" +} diff --git a/robot/assets/templates/asdc/key_group.template b/robot/assets/templates/asdc/key_group.template deleted file mode 100644 index 2d194dc8..00000000 --- a/robot/assets/templates/asdc/key_group.template +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "${key_group_name}", - "description": "vendor license key group", - "type": "Universal", - "thresholdValue": "100", - "thresholdUnits": "Percentage", - "startDate": "${license_start_date}", - "expiryDate": "${license_end_date}", - "manufacturerReferenceNumber": "11111" -} diff --git a/robot/assets/templates/asdc/license_agreement.jinja b/robot/assets/templates/asdc/license_agreement.jinja new file mode 100644 index 00000000..66776f47 --- /dev/null +++ b/robot/assets/templates/asdc/license_agreement.jinja @@ -0,0 +1,12 @@ +{ + "name": "{{license_agreement_name}}", + "description": "vendor license agreement", + "requirementsAndConstrains": "abcdef", + "licenseTerm": { + "choice": "Fixed_Term", + "other": "" + }, + "addedFeatureGroupsIds": [ + "{{feature_group_id}}" + ] +} \ No newline at end of file diff --git a/robot/assets/templates/asdc/license_agreement.template b/robot/assets/templates/asdc/license_agreement.template deleted file mode 100644 index 6324d140..00000000 --- a/robot/assets/templates/asdc/license_agreement.template +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "${license_agreement_name}", - "description": "vendor license agreement", - "requirementsAndConstrains": "abcdef", - "licenseTerm": { - "choice": "Fixed_Term", - "other": "" - }, - "addedFeatureGroupsIds": [ - "${feature_group_id}" - ] -} \ No newline at end of file diff --git a/robot/assets/templates/asdc/license_model.jinja b/robot/assets/templates/asdc/license_model.jinja new file mode 100644 index 00000000..27fe266e --- /dev/null +++ b/robot/assets/templates/asdc/license_model.jinja @@ -0,0 +1,5 @@ +{ + "vendorName": "{{vendor_name}}", + "description": "vendor license model", + "iconRef": "icon" +} \ No newline at end of file diff --git a/robot/assets/templates/asdc/license_model.template b/robot/assets/templates/asdc/license_model.template deleted file mode 100644 index 45fc83fc..00000000 --- a/robot/assets/templates/asdc/license_model.template +++ /dev/null @@ -1,5 +0,0 @@ -{ - "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 index 00000000..18b71685 --- /dev/null +++ b/robot/assets/templates/asdc/resource_instance.jinja @@ -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 index 18cf34c7..00000000 --- a/robot/assets/templates/asdc/resource_instance.template +++ /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}" -} diff --git a/robot/assets/templates/asdc/software_product.jinja b/robot/assets/templates/asdc/software_product.jinja new file mode 100644 index 00000000..2aa5676e --- /dev/null +++ b/robot/assets/templates/asdc/software_product.jinja @@ -0,0 +1,18 @@ +{ + "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}}", + "icon": "icon", + "licensingData": { + "licenseAgreement": "{{license_agreement_id}}", + "featureGroups": [ + "{{feature_group_id}}" + ] + } +} + diff --git a/robot/assets/templates/asdc/software_product.template b/robot/assets/templates/asdc/software_product.template deleted file mode 100644 index 61b26f90..00000000 --- a/robot/assets/templates/asdc/software_product.template +++ /dev/null @@ -1,18 +0,0 @@ -{ - "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}", - "icon": "icon", - "licensingData": { - "licenseAgreement": "${license_agreement_id}", - "featureGroups": [ - "${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 index 00000000..ea01a249 --- /dev/null +++ b/robot/assets/templates/asdc/user_remarks.jinja @@ -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 index 465115e6..00000000 --- a/robot/assets/templates/asdc/user_remarks.template +++ /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 index 544f41e3..00000000 --- a/robot/assets/templates/cinder_add_volume.template +++ /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/heat_add_stack.template b/robot/assets/templates/heat_add_stack.template deleted file mode 100644 index c3af3172..00000000 --- a/robot/assets/templates/heat_add_stack.template +++ /dev/null @@ -1,12 +0,0 @@ -{ - "files": {}, - "disable_rollback": true, - "stack_name": "${stack_name}", - "parameters": - ${parameters} - , - "template": - ${template} - , - "timeout_mins": 60 -} \ 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 index 97182b02..00000000 --- a/robot/assets/templates/keystone_get_v2_auth.template +++ /dev/null @@ -1,10 +0,0 @@ -{ - "auth": { - "tenantId" : "${tenantId}", - "passwordCredentials": { - "username": "${username}", - "password": "${password}" - } - } -} - diff --git a/robot/assets/templates/keystone_get_v3_auth.template b/robot/assets/templates/keystone_get_v3_auth.template deleted file mode 100644 index 49623367..00000000 --- a/robot/assets/templates/keystone_get_v3_auth.template +++ /dev/null @@ -1,26 +0,0 @@ -{ - "auth": { - "identity": { - "methods": [ - "password" - ], - "password": { - "user": { - "name": "${username}", - "domain": { - "id": "${domain_id}" - }, - "password": "${password}" - } - } - - }, - "scope": { - "project": { - "name": "${project_name}", - "domain": { "id": "${domain_id}" } - } - } - } -} - diff --git a/robot/assets/templates/neutron_add_network.template b/robot/assets/templates/neutron_add_network.template deleted file mode 100644 index 36382d47..00000000 --- a/robot/assets/templates/neutron_add_network.template +++ /dev/null @@ -1,7 +0,0 @@ -{ - "network": - { - "name": "${name}", - "admin_state_up": false - } -} \ No newline at end of file diff --git a/robot/assets/templates/neutron_add_subnet.template b/robot/assets/templates/neutron_add_subnet.template deleted file mode 100644 index 5a4264f8..00000000 --- a/robot/assets/templates/neutron_add_subnet.template +++ /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 index 52e2b068..00000000 --- a/robot/assets/templates/nova_add_keypair.template +++ /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 index d40774a2..00000000 --- a/robot/assets/templates/nova_add_server.template +++ /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 index 00000000..b3a6c7bc --- /dev/null +++ b/robot/assets/templates/openstack/cinder_add_volume.jinja @@ -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 diff --git a/robot/assets/templates/openstack/heat_add_stack.jinja b/robot/assets/templates/openstack/heat_add_stack.jinja new file mode 100644 index 00000000..2ee4bddf --- /dev/null +++ b/robot/assets/templates/openstack/heat_add_stack.jinja @@ -0,0 +1,12 @@ +{ + "files": {}, + "disable_rollback": true, + "stack_name": "{{stack_name}}", + "parameters": + {{parameters}} + , + "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 index 00000000..efe6f0d9 --- /dev/null +++ b/robot/assets/templates/openstack/keystone_get_v2_auth.jinja @@ -0,0 +1,10 @@ +{ + "auth": { + "tenantId" : "{{tenantId}}", + "passwordCredentials": { + "username": "{{username}}", + "password": "{{password}}" + } + } +} + diff --git a/robot/assets/templates/openstack/keystone_get_v3_auth.jinja b/robot/assets/templates/openstack/keystone_get_v3_auth.jinja new file mode 100644 index 00000000..8a3287d5 --- /dev/null +++ b/robot/assets/templates/openstack/keystone_get_v3_auth.jinja @@ -0,0 +1,26 @@ +{ + "auth": { + "identity": { + "methods": [ + "password" + ], + "password": { + "user": { + "name": "{{username}", + "domain": { + "id": "{{domain_id}}" + }, + "password": "{{password}}" + } + } + + }, + "scope": { + "project": { + "name": "{{project_name}}", + "domain": { "id": "{{domain_id}}" } + } + } + } +} + diff --git a/robot/assets/templates/openstack/neutron_add_network.jinja b/robot/assets/templates/openstack/neutron_add_network.jinja new file mode 100644 index 00000000..91834185 --- /dev/null +++ b/robot/assets/templates/openstack/neutron_add_network.jinja @@ -0,0 +1,7 @@ +{ + "network": + { + "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 index 00000000..e0c2f830 --- /dev/null +++ b/robot/assets/templates/openstack/neutron_add_subnet.jinja @@ -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 index 00000000..77912ddb --- /dev/null +++ b/robot/assets/templates/openstack/nova_add_keypair.jinja @@ -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 index 00000000..e02cbec3 --- /dev/null +++ b/robot/assets/templates/openstack/nova_add_server.jinja @@ -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 diff --git a/robot/assets/templates/policy/closedloop_configpolicy.jinja b/robot/assets/templates/policy/closedloop_configpolicy.jinja new file mode 100644 index 00000000..3f3575b4 --- /dev/null +++ b/robot/assets/templates/policy/closedloop_configpolicy.jinja @@ -0,0 +1,36 @@ +{ + "service": "tca_policy", + "location": "SampleServiceLocation", + "uuid": "test", + "policyName": "MicroServicevDNS", + "description": "MicroService vDNS Policy", + "configName": "SampleConfigName", + "templateVersion": "OpenSource.version.1", + "version": "1.1.0", + "priority": "1", + "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "riskType": "SampleRiskType", + "riskLevel": "1", + "guard": "False", + "content": { + "tca_policy": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [{ + "eventName": "vLoadBalancer", + "controlLoopSchemaType": "VM", + "policyScope": "DCAE", + "policyName": "DCAE.Config_tca-hi-lo", + "policyVersion": "v0.0.1", + "thresholds": [{ + "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "version": "1.0.2", + "fieldPath": "$$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta", + "thresholdValue": 300, + "direction": "GREATER_OR_EQUAL", + "severity": "CRITICAL", + "closedLoopEventStatus": "ONSET" + }] + }] + } + } +} diff --git a/robot/assets/templates/policy/closedloop_configpolicy.template b/robot/assets/templates/policy/closedloop_configpolicy.template deleted file mode 100644 index 3f3575b4..00000000 --- a/robot/assets/templates/policy/closedloop_configpolicy.template +++ /dev/null @@ -1,36 +0,0 @@ -{ - "service": "tca_policy", - "location": "SampleServiceLocation", - "uuid": "test", - "policyName": "MicroServicevDNS", - "description": "MicroService vDNS Policy", - "configName": "SampleConfigName", - "templateVersion": "OpenSource.version.1", - "version": "1.1.0", - "priority": "1", - "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", - "riskType": "SampleRiskType", - "riskLevel": "1", - "guard": "False", - "content": { - "tca_policy": { - "domain": "measurementsForVfScaling", - "metricsPerEventName": [{ - "eventName": "vLoadBalancer", - "controlLoopSchemaType": "VM", - "policyScope": "DCAE", - "policyName": "DCAE.Config_tca-hi-lo", - "policyVersion": "v0.0.1", - "thresholds": [{ - "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", - "version": "1.0.2", - "fieldPath": "$$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta", - "thresholdValue": 300, - "direction": "GREATER_OR_EQUAL", - "severity": "CRITICAL", - "closedLoopEventStatus": "ONSET" - }] - }] - } - } -} diff --git a/robot/assets/templates/policy/closedloop_createpolicy.jinja b/robot/assets/templates/policy/closedloop_createpolicy.jinja new file mode 100644 index 00000000..bbb1f1ad --- /dev/null +++ b/robot/assets/templates/policy/closedloop_createpolicy.jinja @@ -0,0 +1,21 @@ +{ + "policyConfigType": "BRMS_PARAM", + "policyName": "{{policy_name}}", + "policyDescription": "Create BRMS Param policy", + "attributes": { + "RULE": { + "templateName": "ClosedLoopDemo_closedLoopControlName", + "aaiNamedQueryUUID": "2", + "aaiPassword": "2", + "aaiPatternMatch": "2", + "aaiURL": "2", + "actor": "2", + "appcTopic": "2", + "closedLoopControlName": "2", + "msoPassword": "2", + "msoURL": "2", + "msoUsername": "2", + "aaiUsername": "3" + } + } +} diff --git a/robot/assets/templates/policy/closedloop_createpolicy.template b/robot/assets/templates/policy/closedloop_createpolicy.template deleted file mode 100644 index 7c693e84..00000000 --- a/robot/assets/templates/policy/closedloop_createpolicy.template +++ /dev/null @@ -1,21 +0,0 @@ -{ - "policyConfigType": "BRMS_PARAM", - "policyName": "${policy_name}", - "policyDescription": "Create BRMS Param policy", - "attributes": { - "RULE": { - "templateName": "ClosedLoopDemo_closedLoopControlName", - "aaiNamedQueryUUID": "2", - "aaiPassword": "2", - "aaiPatternMatch": "2", - "aaiURL": "2", - "actor": "2", - "appcTopic": "2", - "closedLoopControlName": "2", - "msoPassword": "2", - "msoURL": "2", - "msoUsername": "2", - "aaiUsername": "3" - } - } -} diff --git a/robot/assets/templates/policy/closedloop_deletepolicy.jinja b/robot/assets/templates/policy/closedloop_deletepolicy.jinja new file mode 100644 index 00000000..73c5badf --- /dev/null +++ b/robot/assets/templates/policy/closedloop_deletepolicy.jinja @@ -0,0 +1,5 @@ +{ + "pdpGroup": "default", + "policyComponent": "PDP", + "policyName": "{{policy_name}}" +} diff --git a/robot/assets/templates/policy/closedloop_deletepolicy.template b/robot/assets/templates/policy/closedloop_deletepolicy.template deleted file mode 100644 index 55510102..00000000 --- a/robot/assets/templates/policy/closedloop_deletepolicy.template +++ /dev/null @@ -1,5 +0,0 @@ -{ - "pdpGroup": "default", - "policyComponent": "PDP", - "policyName": "${policy_name}" -} diff --git a/robot/assets/templates/policy/closedloop_getconfigpolicy.jinja b/robot/assets/templates/policy/closedloop_getconfigpolicy.jinja new file mode 100644 index 00000000..f1142b57 --- /dev/null +++ b/robot/assets/templates/policy/closedloop_getconfigpolicy.jinja @@ -0,0 +1,8 @@ +{ + "configAttributes" : { + }, + "configName" : ".*", + "ecompName" : "DCAE", + "policyName" : "{{config_policy_name}}", + "unique" : true +} \ No newline at end of file diff --git a/robot/assets/templates/policy/closedloop_getconfigpolicy.template b/robot/assets/templates/policy/closedloop_getconfigpolicy.template deleted file mode 100644 index 34145e5b..00000000 --- a/robot/assets/templates/policy/closedloop_getconfigpolicy.template +++ /dev/null @@ -1,8 +0,0 @@ -{ - "configAttributes" : { - }, - "configName" : ".*", - "ecompName" : "DCAE", - "policyName" : "${config_policy_name}", - "unique" : true -} \ No newline at end of file diff --git a/robot/assets/templates/policy/closedloop_opspolicy.jinja b/robot/assets/templates/policy/closedloop_opspolicy.jinja new file mode 100644 index 00000000..0a2cc08a --- /dev/null +++ b/robot/assets/templates/policy/closedloop_opspolicy.jinja @@ -0,0 +1,25 @@ + +{ + "policyConfigType": "BRMS_PARAM", + "policyName": "{{policy_name}}", + "policyDescription": "Create BRMS Param policy for vFW", + "attributes": { + "RULE": { + "templateName": "ControlLoopDemo__closedLoopControlName", + "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", + "policyVersion": "v1.0", + "aaiNamedQueryUUID": "null", + "aaiPassword": "null", + "aaiURL": "null", + "actor": "APPC", + "appcTopic": "APPC-CL", + "msoPassword": "null", + "msoURL": "null", + "msoUsername": "null", + "aaiUsername": "null", + "notificationTopic": "POLICY-CL-MGT", + "aaiPatternMatch": 1 + } + } +} + diff --git a/robot/assets/templates/policy/closedloop_opspolicy.template b/robot/assets/templates/policy/closedloop_opspolicy.template deleted file mode 100644 index 722c9dca..00000000 --- a/robot/assets/templates/policy/closedloop_opspolicy.template +++ /dev/null @@ -1,25 +0,0 @@ - -{ - "policyConfigType": "BRMS_PARAM", - "policyName": "${policy_name}", - "policyDescription": "Create BRMS Param policy for vFW", - "attributes": { - "RULE": { - "templateName": "ControlLoopDemo__closedLoopControlName", - "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", - "policyVersion": "v1.0", - "aaiNamedQueryUUID": "null", - "aaiPassword": "null", - "aaiURL": "null", - "actor": "APPC", - "appcTopic": "APPC-CL", - "msoPassword": "null", - "msoURL": "null", - "msoUsername": "null", - "aaiUsername": "null", - "notificationTopic": "POLICY-CL-MGT", - "aaiPatternMatch": 1 - } - } -} - diff --git a/robot/assets/templates/policy/closedloop_pushpolicy.jinja b/robot/assets/templates/policy/closedloop_pushpolicy.jinja new file mode 100644 index 00000000..7be4c9a9 --- /dev/null +++ b/robot/assets/templates/policy/closedloop_pushpolicy.jinja @@ -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 index ce1d4859..00000000 --- a/robot/assets/templates/policy/closedloop_pushpolicy.template +++ /dev/null @@ -1,5 +0,0 @@ -{ - "policyName" : "${policy_name}", - "policyType" : "${policy_type}", - "pdpGroup" : "default" -} \ No newline at end of file diff --git a/robot/assets/templates/sdnc/preload.jinja b/robot/assets/templates/sdnc/preload.jinja new file mode 100644 index 00000000..d1c6425d --- /dev/null +++ b/robot/assets/templates/sdnc/preload.jinja @@ -0,0 +1,33 @@ +{ + "input": { + "request-information": { + "notification-url": "openecomp.org", + "order-number": "1", + "order-version": "1", + "request-action": "PreloadVNFRequest", + "request-id": "robot12" + }, + "sdnc-request-header": { + "svc-action": "reserve", + "svc-notification-url": "http:\/\/openecomp.org:8080\/adapters\/rest\/SDNCNotify", + "svc-request-id": "robot12" + }, + "vnf-topology-information": { + "vnf-assignments": { + "availability-zones": [], + "vnf-networks": [], + "vnf-vms": [] + }, + "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}}" + } + } + } +} diff --git a/robot/assets/templates/sdnc/preload.template b/robot/assets/templates/sdnc/preload.template deleted file mode 100644 index 327d806c..00000000 --- a/robot/assets/templates/sdnc/preload.template +++ /dev/null @@ -1,33 +0,0 @@ -{ - "input": { - "request-information": { - "notification-url": "openecomp.org", - "order-number": "1", - "order-version": "1", - "request-action": "PreloadVNFRequest", - "request-id": "robot12" - }, - "sdnc-request-header": { - "svc-action": "reserve", - "svc-notification-url": "http:\/\/openecomp.org:8080\/adapters\/rest\/SDNCNotify", - "svc-request-id": "robot12" - }, - "vnf-topology-information": { - "vnf-assignments": { - "availability-zones": [], - "vnf-networks": [], - "vnf-vms": [] - }, - "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}" - } - } - } -} diff --git a/robot/assets/templates/template_example.template b/robot/assets/templates/template_example.template deleted file mode 100644 index 42583f14..00000000 --- a/robot/assets/templates/template_example.template +++ /dev/null @@ -1,6 +0,0 @@ -{ - "requestReferences": { - "instanceId": "${instanceId}", - "requestId": "${requestId}" - } -} \ No newline at end of file diff --git a/robot/resources/aai/add-relationship-list.robot b/robot/resources/aai/add-relationship-list.robot index 056b896f..7b353498 100644 --- a/robot/resources/aai/add-relationship-list.robot +++ b/robot/resources/aai/add-relationship-list.robot @@ -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 diff --git a/robot/resources/aai/ccvpn-connectivities.robot b/robot/resources/aai/ccvpn-connectivities.robot index 3f4dc0b2..7e18709c 100644 --- a/robot/resources/aai/ccvpn-connectivities.robot +++ b/robot/resources/aai/ccvpn-connectivities.robot @@ -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)$ diff --git a/robot/resources/aai/ccvpn-vpn-bindings.robot b/robot/resources/aai/ccvpn-vpn-bindings.robot index c139f7cc..67789e27 100644 --- a/robot/resources/aai/ccvpn-vpn-bindings.robot +++ b/robot/resources/aai/ccvpn-vpn-bindings.robot @@ -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)$ diff --git a/robot/resources/aai/create_availability_zone.robot b/robot/resources/aai/create_availability_zone.robot index d8b6111e..8bc7b640 100644 --- a/robot/resources/aai/create_availability_zone.robot +++ b/robot/resources/aai/create_availability_zone.robot @@ -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)$ diff --git a/robot/resources/aai/create_complex.robot b/robot/resources/aai/create_complex.robot index e1be288a..8fed0c79 100644 --- a/robot/resources/aai/create_complex.robot +++ b/robot/resources/aai/create_complex.robot @@ -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)$ diff --git a/robot/resources/aai/create_customer.robot b/robot/resources/aai/create_customer.robot index 78547758..ecae4d3a 100644 --- a/robot/resources/aai/create_customer.robot +++ b/robot/resources/aai/create_customer.robot @@ -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} diff --git a/robot/resources/aai/create_service.robot b/robot/resources/aai/create_service.robot index 0584a2a1..cbf04676 100644 --- a/robot/resources/aai/create_service.robot +++ b/robot/resources/aai/create_service.robot @@ -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 diff --git a/robot/resources/aai/create_tenant.robot b/robot/resources/aai/create_tenant.robot index 24cb4d4d..1e9fa802 100644 --- a/robot/resources/aai/create_tenant.robot +++ b/robot/resources/aai/create_tenant.robot @@ -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)$ diff --git a/robot/resources/aai/create_vnfc.robot b/robot/resources/aai/create_vnfc.robot index 359c62d5..de79f468 100644 --- a/robot/resources/aai/create_vnfc.robot +++ b/robot/resources/aai/create_vnfc.robot @@ -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)$ diff --git a/robot/resources/aai/create_zone.robot b/robot/resources/aai/create_zone.robot index 09d6ea6e..644817c9 100644 --- a/robot/resources/aai/create_zone.robot +++ b/robot/resources/aai/create_zone.robot @@ -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()} - - - - - diff --git a/robot/resources/aai/network.robot b/robot/resources/aai/network.robot index a3fd7737..8229a7e4 100644 --- a/robot/resources/aai/network.robot +++ b/robot/resources/aai/network.robot @@ -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} diff --git a/robot/resources/aai/service_instance.robot b/robot/resources/aai/service_instance.robot index 52212f2a..5a4c4573 100644 --- a/robot/resources/aai/service_instance.robot +++ b/robot/resources/aai/service_instance.robot @@ -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)$ diff --git a/robot/resources/aai/volume_group.robot b/robot/resources/aai/volume_group.robot index 94ad3b7b..c9fc0f84 100644 --- a/robot/resources/aai/volume_group.robot +++ b/robot/resources/aai/volume_group.robot @@ -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 diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index d91786ca..80ecc35f 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -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']} diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index 410e2262..0c5229a9 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -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)$ diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot index 3574b951..90725177 100644 --- a/robot/resources/heatbridge.robot +++ b/robot/resources/heatbridge.robot @@ -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 index b0572511..00000000 --- a/robot/resources/json_templater.robot +++ /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 diff --git a/robot/resources/openstack/cinder_interface.robot b/robot/resources/openstack/cinder_interface.robot index 41667999..ca6e62b7 100644 --- a/robot/resources/openstack/cinder_interface.robot +++ b/robot/resources/openstack/cinder_interface.robot @@ -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']} diff --git a/robot/resources/openstack/heat_interface.robot b/robot/resources/openstack/heat_interface.robot index 471c2a9f..0362d3eb 100644 --- a/robot/resources/openstack/heat_interface.robot +++ b/robot/resources/openstack/heat_interface.robot @@ -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 diff --git a/robot/resources/openstack/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot index ceb43e8d..1df6ac91 100644 --- a/robot/resources/openstack/keystone_interface.robot +++ b/robot/resources/openstack/keystone_interface.robot @@ -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} diff --git a/robot/resources/openstack/neutron_interface.robot b/robot/resources/openstack/neutron_interface.robot index 640a237a..058809de 100644 --- a/robot/resources/openstack/neutron_interface.robot +++ b/robot/resources/openstack/neutron_interface.robot @@ -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} diff --git a/robot/resources/openstack/nova_interface.robot b/robot/resources/openstack/nova_interface.robot index 94a07479..b1f07f86 100644 --- a/robot/resources/openstack/nova_interface.robot +++ b/robot/resources/openstack/nova_interface.robot @@ -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)$ diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index db544482..988fe4c9 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -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} diff --git a/robot/resources/stack_validation/policy_check_vfw.robot b/robot/resources/stack_validation/policy_check_vfw.robot index 7ac8ef72..2be3995d 100644 --- a/robot/resources/stack_validation/policy_check_vfw.robot +++ b/robot/resources/stack_validation/policy_check_vfw.robot @@ -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 diff --git a/robot/resources/stack_validation/validate_common.robot b/robot/resources/stack_validation/validate_common.robot index 383a0146..9c5be62c 100644 --- a/robot/resources/stack_validation/validate_common.robot +++ b/robot/resources/stack_validation/validate_common.robot @@ -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 diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot index 90d5f8cf..7354dc1a 100644 --- a/robot/resources/test_templates/closedloop_test_template.robot +++ b/robot/resources/test_templates/closedloop_test_template.robot @@ -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 -- cgit 1.2.3-korg