summaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/aai/create_customer.robot4
-rw-r--r--robot/resources/aai/create_service.robot4
-rw-r--r--robot/resources/aai/create_tenant.robot4
-rw-r--r--robot/resources/demo_preload.robot3
-rw-r--r--robot/resources/openstack/cinder_interface.robot4
-rw-r--r--robot/resources/openstack/keystone_interface.robot6
-rw-r--r--robot/resources/openstack/neutron_interface.robot7
-rw-r--r--robot/resources/openstack/nova_interface.robot3
-rw-r--r--robot/resources/sdngc_interface.robot4
-rw-r--r--robot/resources/test_templates/closedloop_test_template.robot8
10 files changed, 15 insertions, 32 deletions
diff --git a/robot/resources/aai/create_customer.robot b/robot/resources/aai/create_customer.robot
index fec58843..78547758 100644
--- a/robot/resources/aai/create_customer.robot
+++ b/robot/resources/aai/create_customer.robot
@@ -6,7 +6,6 @@ Documentation Create A&AI Customer API.
Resource aai_interface.robot
Resource ../json_templater.robot
Library Collections
-Library OperatingSystem
*** Variables ***
@@ -19,9 +18,8 @@ ${A&AI ADD CUSTOMER BODY} robot/assets/templates/aai/add_customer.template
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}
- ${data_template}= OperatingSystem.Get File ${A&AI ADD CUSTOMER BODY}
${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 ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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 f4f2b27c..0584a2a1 100644
--- a/robot/resources/aai/create_service.robot
+++ b/robot/resources/aai/create_service.robot
@@ -5,7 +5,6 @@ Documentation Create A&AI Customer API.
Resource ../json_templater.robot
Resource aai_interface.robot
-Library OperatingSystem
Library Collections
Library ONAPLibrary.Utilities
@@ -30,9 +29,8 @@ Create Service
[Documentation] Creates a service in A&AI
[Arguments] ${service_type}
${uuid}= Generate UUID4
- ${data_template}= OperatingSystem.Get File ${AAI_ADD_SERVICE_BODY}
${arguments}= Create Dictionary service_type=${service_type} UUID=${uuid}
- ${data}= Fill JSON Template ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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 99d3a08d..24cb4d4d 100644
--- a/robot/resources/aai/create_tenant.robot
+++ b/robot/resources/aai/create_tenant.robot
@@ -5,7 +5,6 @@ Documentation Create A&AI Customer API.
Resource ../json_templater.robot
Resource aai_interface.robot
-Library OperatingSystem
Library Collections
@@ -29,9 +28,8 @@ Inventory Tenant
[Documentation] Inventorys a Tenant in A&AI
[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}
- ${data_template}= OperatingSystem.Get File ${AAI_ADD_TENANT_BODY}
${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 ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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/demo_preload.robot b/robot/resources/demo_preload.robot
index e00e36be..410e2262 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -98,10 +98,9 @@ Create Customer For VNF Demo
Create Service If Not Exists vCPE
Create Service If Not Exists vIMS
Create Service If Not Exists gNB
- ${data_template}= OperatingSystem.Get File ${ADD_DEMO_CUSTOMER_BODY}
${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 ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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/openstack/cinder_interface.robot b/robot/resources/openstack/cinder_interface.robot
index ab71d0f0..41667999 100644
--- a/robot/resources/openstack/cinder_interface.robot
+++ b/robot/resources/openstack/cinder_interface.robot
@@ -3,7 +3,6 @@ Documentation The main interface for interacting with Openstack. It handles
Library ONAPLibrary.Openstack
Library RequestsLibrary
Library ONAPLibrary.Utilities
-Library OperatingSystem
Resource ../global_properties.robot
Resource ../json_templater.robot
Resource openstack_common.robot
@@ -33,10 +32,9 @@ Get Openstack Volume
Add Openstack Volume
[Documentation] Runs an Openstack Request to add a volume and returns that volume id of the created volume
[Arguments] ${alias} ${name} ${size}
- ${data_template}= OperatingSystem.Get File ${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE}
${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 ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot
index 11dec823..ceb43e8d 100644
--- a/robot/resources/openstack/keystone_interface.robot
+++ b/robot/resources/openstack/keystone_interface.robot
@@ -66,18 +66,16 @@ Get KeystoneAPIVersion
Get KeyStoneAuthv2 Data
[Documentation] Returns all the data for keystone auth v2 api
[Arguments] ${username} ${password} ${path}
- ${data_template}= OperatingSystem.Get File ${OPENSTACK_KEYSTONE_AUTH_v2_BODY_FILE}
${arguments}= Create Dictionary username=${username} password=${password} tenantId=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}
- ${data}= Fill JSON Template ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${OPENSTACK_KEYSTONE_AUTH_v2_BODY_FILE} ${arguments}
${data_path}= Catenate ${path}${OPENSTACK_KEYSTONE_AUTH_v2_PATH}
[Return] ${data_path} ${data}
Get KeyStoneAuthv3 Data
[Documentation] Returns all the data for keystone auth v3 api
[Arguments] ${username} ${password} ${path}
- ${data_template}= OperatingSystem.Get File ${OPENSTACK_KEYSTONE_AUTH_v3_BODY_FILE}
${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 ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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 63b3cd7c..640a237a 100644
--- a/robot/resources/openstack/neutron_interface.robot
+++ b/robot/resources/openstack/neutron_interface.robot
@@ -2,7 +2,6 @@
Documentation The main interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields
Library ONAPLibrary.Openstack
Library RequestsLibrary
-Library OperatingSystem
Library Collections
Resource ../global_properties.robot
Resource ../json_templater.robot
@@ -44,9 +43,8 @@ Get Openstack Ports
Add Openstack Network
[Documentation] Runs an Openstack Request to add a network and returns that network id of the created network
[Arguments] ${alias} ${name}
- ${data_template}= OperatingSystem.Get File ${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE}
${arguments}= Create Dictionary name=${name}
- ${data}= Fill JSON Template ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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']}
@@ -74,9 +72,8 @@ Add Openstack Network With Subnet
[Documentation] Runs an Openstack Request to add a network and returns that network id of the created network
[Arguments] ${alias} ${name} ${cidr}
${network_id}= Add Openstack Network ${alias} ${name}
- ${data_template}= OperatingSystem.Get File ${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE}
${arguments}= Create Dictionary network_id=${network_id} cidr=${cidr} subnet_name=${name}
- ${data}= Fill JSON Template ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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 e02d3e72..94a07479 100644
--- a/robot/resources/openstack/nova_interface.robot
+++ b/robot/resources/openstack/nova_interface.robot
@@ -31,10 +31,9 @@ Get Openstack Keypair
Add Openstack Keypair
[Documentation] Runs an Openstack Request to add a keypair and returns the keypair name
[Arguments] ${alias} ${name}
- ${data_template}= OperatingSystem.Get File ${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE}
${ssh_key}= OperatingSystem.Get File ${OPENSTACK_NOVA_KEYPAIR_SSH_KEY}
${arguments}= Create Dictionary name=${name} publickey=${ssh_key}
- ${data}= Fill JSON Template ${data_template} ${arguments}
+ ${data}= Fill JSON Template File ${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']}
diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot
index f1100a68..db544482 100644
--- a/robot/resources/sdngc_interface.robot
+++ b/robot/resources/sdngc_interface.robot
@@ -2,7 +2,6 @@
Documentation The main interface for interacting with SDN-GC. It handles low level stuff like managing the http request library and SDN-GC required fields
Library RequestsLibrary
Library ONAPLibrary.Utilities
-Library OperatingSystem
Library SeleniumLibrary
Library Collections
Library String
@@ -136,10 +135,9 @@ Get From Mapping
Preload One Vnf Topology
[Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_module_type} ${service} ${filename} ${uuid}
Return From Keyword If '${filename}' == ''
- ${data_template}= OperatingSystem.Get File ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template
${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 ${data_template} ${parameters}
+ ${data}= Fill JSON Template File ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template ${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/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot
index a22fbe13..90d5f8cf 100644
--- a/robot/resources/test_templates/closedloop_test_template.robot
+++ b/robot/resources/test_templates/closedloop_test_template.robot
@@ -148,7 +148,7 @@ Push Ops Policy
[Documentation] Push Ops Policy
[Arguments] ${policyname} ${policytype}
${dict}= Create Dictionary policy_name=${policyname} policy_type=${policytype}
- ${output} = Fill JSON Template ${PUSH_POLICY_TEMPLATE} ${dict}
+ ${output} = Fill JSON Template File ${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 +156,7 @@ Push Config Policy
[Documentation] Push Config Policy
[Arguments] ${policyname} ${policytype}
${dict}= Create Dictionary policy_name=${policyname} policy_type=${policytype}
- ${output} = Fill JSON Template ${PUSH_POLICY_TEMPLATE} ${dict}
+ ${output} = Fill JSON Template File ${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 +166,7 @@ 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 ${DEL_POLICY_TEMPLATE} ${dict}
+ ${output} = Fill JSON Template File ${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 +175,7 @@ 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 ${DEL_POLICY_TEMPLATE} ${dict}
+ ${output} = Fill JSON Template File ${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