summaryrefslogtreecommitdiffstats
path: root/robot/resources/openstack
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-06-19 17:40:26 -0400
committerDR695H <dr695h@att.com>2019-06-19 17:40:26 -0400
commitdaec16c9140e962235523a357b465c70c166a88f (patch)
treed31e294937780d1672953c285eee834a92292201 /robot/resources/openstack
parent9d810d0f842705d1ff29684b489deb4188096879 (diff)
only use the file version of json template
Issue-ID: TEST-158 Change-Id: Ib172145fe3e5d77bd688505b145ca1709422366a Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/openstack')
-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
4 files changed, 6 insertions, 14 deletions
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']}