diff options
author | Jerry Flood <jflood@att.com> | 2019-04-23 16:16:34 -0400 |
---|---|---|
committer | Jerry Flood <jflood@att.com> | 2019-04-24 06:37:15 -0400 |
commit | cb8d238bf57c2723fac484a0f7c1dc77428a65c0 (patch) | |
tree | 42f9736406df7acbfde6449d3cc1960157cc05ee /cmso-robot/robot/resources/optimizer_common.robot | |
parent | 990a5833020c8b01f059c7e5f6405c0076eeed05 (diff) |
Remove dead code, add robot tests
Issue-ID: OPTFRA-474
Change-Id: I409f3c16d287419357d07487032ceee8eda8cf94
Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-robot/robot/resources/optimizer_common.robot')
-rw-r--r-- | cmso-robot/robot/resources/optimizer_common.robot | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cmso-robot/robot/resources/optimizer_common.robot b/cmso-robot/robot/resources/optimizer_common.robot index 81c0c75..7212f03 100644 --- a/cmso-robot/robot/resources/optimizer_common.robot +++ b/cmso-robot/robot/resources/optimizer_common.robot @@ -46,14 +46,28 @@ Delete Optimizer Get Optimizer [Documentation] Runs a scheduler GET request - [Arguments] ${alias} ${resource} + [Arguments] ${alias} ${resource} ${accept}=application/json ${data_path}= Catenate ${OPTIMIZER_PATH}/${resource} ${url}= Catenate ${GLOBAL_OPTIMIZER_URL} ${uuid}= Generate UUID ${proxies}= Create Dictionary no=pass ${session}= Create Session ${alias} ${url} ${auth_string}= B64 Encode ${GLOBAL_OPTIMIZER_USER}:${GLOBAL_OPTIMIZER_PASSWORD} - ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string} + ${headers}= Create Dictionary Accept=${accept} Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string} ${resp}= Get Request ${alias} ${data_path} headers=${headers} Log Received response from scheduler ${resp.json()} [Return] ${resp} + +Get Optimizer Plain Text + [Documentation] Runs a scheduler GET request + [Arguments] ${alias} ${resource} ${accept}=text/plain + ${data_path}= Catenate ${OPTIMIZER_PATH}/${resource} + ${url}= Catenate ${GLOBAL_OPTIMIZER_URL} + ${uuid}= Generate UUID + ${proxies}= Create Dictionary no=pass + ${session}= Create Session ${alias} ${url} + ${auth_string}= B64 Encode ${GLOBAL_OPTIMIZER_USER}:${GLOBAL_OPTIMIZER_PASSWORD} + ${headers}= Create Dictionary Accept=${accept} Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string} + ${resp}= Get Request ${alias} ${data_path} headers=${headers} + Log Received response from scheduler ${resp.text} + [Return] ${resp} |