summaryrefslogtreecommitdiffstats
path: root/robot/resources/dcae/deployment.robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/dcae/deployment.robot')
-rw-r--r--robot/resources/dcae/deployment.robot10
1 files changed, 8 insertions, 2 deletions
diff --git a/robot/resources/dcae/deployment.robot b/robot/resources/dcae/deployment.robot
index 30a5efce..4c8098cd 100644
--- a/robot/resources/dcae/deployment.robot
+++ b/robot/resources/dcae/deployment.robot
@@ -10,7 +10,7 @@ ${DEPLOYMENT_ENDPOINT} dcae-deployments
*** Keywords ***
Deploy Service
- [Arguments] ${inputs} ${deployment_name} ${wait_time}=5 minute
+ [Arguments] ${inputs} ${deployment_name} ${wait_time}=5 minute ${check_deployment_status}=true
Disable Warnings
${headers}= Create Dictionary content-type=application/json
${deployment_data}= Set Variable ${inputs}
@@ -18,7 +18,12 @@ Deploy Service
${resp}= Put Request deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name} data=${deployment_data} headers=${headers}
${operationLink} Set Variable ${resp.json().get('links').get('status')}
${operationId} Fetch From Right ${operationLink} /
- Wait Until Keyword Succeeds ${wait_time} 20 sec Deployment Status ${deployment_name} ${operationId}
+ Run Keyword If "${check_deployment_status}"=="true" Check Deployment Status ${deployment_name} ${operationId} ${wait_time}
+ [Return] ${operationId}
+
+Check Deployment Status
+ [Arguments] ${deployment_name} ${operationId} ${wait_time}
+ Wait Until Keyword Succeeds ${wait_time} 20 sec Deployment Status ${deployment_name} ${operationId}
Deployment Status
[Arguments] ${deployment_name} ${operationId}
@@ -27,6 +32,7 @@ Deployment Status
${resp}= Get Request deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name}/operation/${operationId}
${status} Set Variable ${resp.json().get('status')}
Should Be Equal As Strings ${status} succeeded
+ [Return] ${status}
Undeploy Service
[Arguments] ${deployment_name}