summaryrefslogtreecommitdiffstats
path: root/robot/resources/openstack/cinder_interface.robot
diff options
context:
space:
mode:
authorjf9860 <jf9860@att.com>2017-03-09 15:28:42 -0500
committerjf9860 <jf9860@att.com>2017-03-09 15:29:18 -0500
commit99c6329d9b5f5f83a38eb309181200b80d153949 (patch)
treeb7e51225ba0ac869f4c63d0d456b6bdd90550b6d /robot/resources/openstack/cinder_interface.robot
parentca5693c162ed0d019b416b5784c0ee8eaf653abf (diff)
TEST-4 Re-factor openstack region variable
Change-Id: Iad9ef0555dbbd921e261bfa2a63806100bcf7c83 Signed-off-by: jf9860 <jf9860@att.com>
Diffstat (limited to 'robot/resources/openstack/cinder_interface.robot')
-rw-r--r--robot/resources/openstack/cinder_interface.robot18
1 files changed, 9 insertions, 9 deletions
diff --git a/robot/resources/openstack/cinder_interface.robot b/robot/resources/openstack/cinder_interface.robot
index ee1a253b..1b720359 100644
--- a/robot/resources/openstack/cinder_interface.robot
+++ b/robot/resources/openstack/cinder_interface.robot
@@ -2,7 +2,7 @@
Documentation The main interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields
Library OpenstackLibrary
Library RequestsLibrary
-Library UUID
+Library UUID
Library OperatingSystem
Resource ../global_properties.robot
Resource ../json_templater.robot
@@ -20,14 +20,14 @@ ${OPENSTACK_CINDER_AVAILABILITY_ZONE} nova
*** Keywords ***
Get Openstack Volume Types
[Documentation] Returns the openstack volume types information
- [Arguments] ${alias}
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_CINDER_TYPES_PATH}
+ [Arguments] ${alias}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${OPENSTACK_CINDER_TYPES_PATH}
[Return] ${resp.json()}
-
+
Get Openstack Volume
[Documentation] Returns the openstack volume information for the passed in volume id
[Arguments] ${alias} ${volume_id}
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_CINDER_VOLUMES_PATH} /${volume_id}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${OPENSTACK_CINDER_VOLUMES_PATH} /${volume_id}
[Return] ${resp.json()}
Add Openstack Volume
@@ -37,14 +37,14 @@ Add Openstack Volume
${uuid}= Generate UUID
${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}
- ${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_CINDER_VOLUMES_PATH} data_path= data=${data}
+ ${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']}
-
+
Delete Openstack Volume
[Documentation] Runs an Openstack Request to delete a volume
[Arguments] ${alias} ${volume_id}
- ${resp}= Internal Delete Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_CINDER_VOLUMES_PATH} /${volume_id}
+ ${resp}= Internal Delete Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${OPENSTACK_CINDER_VOLUMES_PATH} /${volume_id}
${status_string}= Convert To String ${resp.status_code}
- Should Match Regexp ${status_string} ^(204|200|404)$
+ Should Match Regexp ${status_string} ^(204|200|404)$
[Return] ${resp.text} \ No newline at end of file