aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/openstack/heat_interface.robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/openstack/heat_interface.robot')
-rw-r--r--robot/resources/openstack/heat_interface.robot57
1 files changed, 28 insertions, 29 deletions
diff --git a/robot/resources/openstack/heat_interface.robot b/robot/resources/openstack/heat_interface.robot
index 74c7aac8..32f3fdee 100644
--- a/robot/resources/openstack/heat_interface.robot
+++ b/robot/resources/openstack/heat_interface.robot
@@ -1,8 +1,8 @@
*** Settings ***
-Documentation The interface for interacting with Openstack Heat API.
+Documentation The interface for interacting with Openstack Heat API.
Library OpenstackLibrary
Library RequestsLibrary
-Library UUID
+Library UUID
Library OperatingSystem
Library HEATUtils
Library StringTemplater
@@ -12,7 +12,7 @@ Resource ../json_templater.robot
Resource openstack_common.robot
*** Variables ***
-${OPENSTACK_HEAT_API_VERSION} /v1
+${OPENSTACK_HEAT_API_VERSION} /v1
${OPENSTACK_HEAT_STACK_PATH} /stacks
${OPENSTACK_HEAT_ADD_STACK_TEMPLATE} robot/assets/templates/heat_add_stack.template
@@ -21,19 +21,19 @@ ${OPENSTACK_HEAT_ADD_STACK_TEMPLATE} robot/assets/templates/heat_add_stack.te
Get Openstack Stacks
[Documentation] Returns the openstack stacks info
[Arguments] ${alias}
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH}
[Return] ${resp.json()}
-
+
Get Openstack Stack
[Documentation] Returns the openstack stacks info for the given stack name
- [Arguments] ${alias} ${stack_name}
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH} /${stack_name}
+ [Arguments] ${alias} ${stack_name}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH} /${stack_name}
[Return] ${resp.json()}
-
+
Create Openstack Stack
[Documentation] Takes an openstack heat yaml and returns the created stack
[Arguments] ${alias} ${request}
- ${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH} data_path= data=${request}
+ ${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH} data_path= data=${request}
[Return] ${resp.json()}
Make Add Stack Request
@@ -44,50 +44,49 @@ Make Add Stack Request
${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
+ Log $request
[Return] ${request}
Delete Openstack Stack
[Documentation] Deletes and Openstack Stack for the passed name and id
- [Arguments] ${alias} ${stack_name} ${stack_id}
+ [Arguments] ${alias} ${stack_name} ${stack_id}
${data_path}= Catenate /${stack_name}/${stack_id}
- ${resp}= Internal Delete Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH} data_path=${data_path}
+ ${resp}= Internal Delete Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH} data_path=${data_path}
Should Be Equal As Strings 204 ${resp.status_code}
[Return] ${resp}
Get Stack Details
- [Documentation] Gets all of the information necessary for tearing down an existing Openstack Stack
- [Arguments] ${alias} ${stack_name}
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH} /${stack_name}
- ${result}= Stack Info Parse ${resp.json()}
+ [Documentation] Gets all of the information necessary for tearing down an existing Openstack Stack
+ [Arguments] ${alias} ${stack_name}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH} /${stack_name}
+ ${result}= Stack Info Parse ${resp.json()}
[Return] ${result}
Get Stack Template
- [Documentation] Gets all of the template information of an existing Openstack Stack
- [Arguments] ${alias} ${stack_name} ${stack_id}
+ [Documentation] Gets all of the template information of an existing Openstack Stack
+ [Arguments] ${alias} ${stack_name} ${stack_id}
${data_path}= Catenate /${stack_name}/${stack_id}/template
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH} ${data_path}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH} ${data_path}
${template}= Catenate ${resp.json()}
[Return] ${template}
-
+
Get Stack Resources
- [Documentation] Gets all of the resources of an existing Openstack Stack
- [Arguments] ${alias} ${stack_name} ${stack_id}
+ [Documentation] Gets all of the resources of an existing Openstack Stack
+ [Arguments] ${alias} ${stack_name} ${stack_id}
${data_path}= Catenate /${stack_name}/${stack_id}/resources
- ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${GLOBAL_OPENSTACK_SERVICE_REGION} ${OPENSTACK_HEAT_STACK_PATH} ${data_path}
+ ${resp}= Internal Get Openstack ${alias} ${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} ${OPENSTACK_HEAT_STACK_PATH} ${data_path}
[Return] ${resp.json()}
-
+
Wait for Stack to Be Deployed
[Arguments] ${alias} ${stack_name} ${timeout}=600s
- ${stack_info}= Wait Until Keyword Succeeds ${timeout} 30 sec Get Deployed Stack ${alias} ${stack_name}
+ ${stack_info}= Wait Until Keyword Succeeds ${timeout} 30 sec Get Deployed Stack ${alias} ${stack_name}
${status}= Get From Dictionary ${stack_info} stack_status
Should Be Equal ${status} CREATE_COMPLETE
[Return] ${stack_info}
-
+
Get Deployed Stack
- [Arguments] ${alias} ${stack_name}
+ [Arguments] ${alias} ${stack_name}
${stack_info}= Get Stack Details ${alias} ${stack_name}
${status}= Get From Dictionary ${stack_info} stack_status
Should Not Be Equal ${status} CREATE_IN_PROGRESS
- [Return] ${stack_info}
- \ No newline at end of file
+ [Return] ${stack_info}