diff options
author | DR695H <dr695h@att.com> | 2019-06-20 15:04:04 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-06-20 15:04:04 -0400 |
commit | 3bb6cf4b938d3e725860606d3ddaa8eecd872151 (patch) | |
tree | e03ccb5b30413d9fc7b3cef8c5ef0827d2e641d2 /robot/resources/aai | |
parent | 3440942ef2c78e1a8eb07c70c1a03b3834beaecf (diff) |
replace aai, closeloop, sdc with jinja
Issue-ID: TEST-158
Change-Id: I95a783f26e28512cb4fc98e50931d62001c489c6
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/aai')
-rw-r--r-- | robot/resources/aai/add-relationship-list.robot | 15 | ||||
-rw-r--r-- | robot/resources/aai/ccvpn-connectivities.robot | 8 | ||||
-rw-r--r-- | robot/resources/aai/ccvpn-vpn-bindings.robot | 8 | ||||
-rw-r--r-- | robot/resources/aai/create_availability_zone.robot | 8 | ||||
-rw-r--r-- | robot/resources/aai/create_complex.robot | 13 | ||||
-rw-r--r-- | robot/resources/aai/create_customer.robot | 10 | ||||
-rw-r--r-- | robot/resources/aai/create_service.robot | 12 | ||||
-rw-r--r-- | robot/resources/aai/create_tenant.robot | 11 | ||||
-rw-r--r-- | robot/resources/aai/create_vnfc.robot | 8 | ||||
-rw-r--r-- | robot/resources/aai/create_zone.robot | 16 | ||||
-rw-r--r-- | robot/resources/aai/network.robot | 24 | ||||
-rw-r--r-- | robot/resources/aai/service_instance.robot | 11 | ||||
-rw-r--r-- | robot/resources/aai/volume_group.robot | 24 |
13 files changed, 62 insertions, 106 deletions
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 |