[Documentation] returns a string in the direct authentacation format (e.g., grant_type=password&username=admin&password=admin).
... It can also be passed scope, client_id and client_secret arguments for the case of client specific authorization
${data}= Set Variable grant_type=password&username=${user}&password=${password}&scope=${scope}
- ${data}= Run Keyword If "${client_id}" != "${EMPTY}" Set Variable ${data}&client_id=${client_id}
- ... ELSE Set Variable ${data}
- ${data}= Run Keyword If "${client_secret}" != "${EMPTY}" Set Variable ${data}&client_secret=${client_secret}
- ... ELSE Set Variable ${data}
+ ${data}= Run Keyword If "${client_id}" != "${EMPTY}" Set Variable ${data}&client_id=${client_id} ELSE Set Variable
+ ... ${data}
+ ${data}= Run Keyword If "${client_secret}" != "${EMPTY}" Set Variable ${data}&client_secret=${client_secret} ELSE Set Variable
+ ... ${data}
[Return] ${data}
Disable Authentication On Controller
*** Keywords ***
Check Mapping Removal
[Arguments] ${json}
- Run Keyword If "${ODL_VERSION}" == "Li" Check Mapping Removal Lithium ${json}
- ... ELSE Post Log Check ${LFM_RPC_API}:get-mapping ${json} 404
+ Run Keyword If "${ODL_VERSION}" == "Li" Check Mapping Removal Lithium ${json} ELSE Post Log Check ${LFM_RPC_API}:get-mapping
+ ... ${json} 404
Check Mapping Removal Lithium
[Arguments] ${json}
Run Keyword If "${switch.mgmt_protocol}" == "ssh" Call Method ${switch} set_mgmt_user ${MININET_USER}
${connection_index}= Run Keyword If "${switch.mgmt_protocol}" == "ssh" SSHLibrary.Open Connection ${switch.mgmt_ip} prompt=${switch.mgmt_prompt} timeout=30s
Run Keyword If "${switch.mgmt_protocol}" == "ssh" Login With Public Key ${switch.mgmt_user} ${switch.ssh_key} any
- ${connection_index}= Run Keyword If "${switch.mgmt_protocol}" == "telnet" Telnet.Open Connection ${switch.mgmt_ip}
- ... ELSE Set Variable ${connection_index}
+ ${connection_index}= Run Keyword If "${switch.mgmt_protocol}" == "telnet" Telnet.Open Connection ${switch.mgmt_ip} ELSE Set Variable
+ ... ${connection_index}
[Return] ${connection_index}
Configure Connection Index And Prompt Wrapper
[Documentation] Wraps the Execute Command keyword so that depending on the switch.mgmt_protocol the right
... library (Telnet or SSHLibrary) is used.
${output}= Run Keyword If "${switch.mgmt_protocol}" == "ssh" SSHLibrary.Execute Command ${cmd}
- ${output}= Run Keyword If "${switch.mgmt_protocol}" == "telnet" Telnet.Execute Command ${cmd}
- ... ELSE Set Variable ${output}
+ ${output}= Run Keyword If "${switch.mgmt_protocol}" == "telnet" Telnet.Execute Command ${cmd} ELSE Set Variable
+ ... ${output}
[Return] ${output}
Connect To Switch
[Documentation] Prepare the Hbase Filter from Tsdr List output
${left_str}= Remove Space on String ${left_str}
${right_str}= Remove Space on String ${right_str} 1
- ${x}= Run Keyword If '${left_str}' == 'MetricID' Catenate ${SPACE} _
- ... ELSE IF '${left_str}' == 'ObjectKeys' Catenate ${right_str} _
- ... ELSE IF '${left_str}' == 'TimeStamp' Get Epoch Time ${right_str}
- ... ELSE Catenate ${SPACE}
+ ${x}= Run Keyword If '${left_str}' == 'MetricID' Catenate ${SPACE} _ ELSE IF
+ ... '${left_str}' == 'ObjectKeys' Catenate ${right_str} _ ELSE IF '${left_str}' == 'TimeStamp'
+ ... Get Epoch Time ${right_str} ELSE Catenate ${SPACE}
[Return] ${x}
Create the Hbase table row
${result}= Get Lines Containing String ${group_output} output:${port-id1}
Should Contain ${result} type=${group-type}
Should Contain ${result} output:${port-id1}
- Run Keyword If "${port-id2-state}" == "up" Should Contain ${result} output:${port-id2}
- ... ELSE Should not Contain ${result} output:${port-id2}
+ Run Keyword If "${port-id2-state}" == "up" Should Contain ${result} output:${port-id2} ELSE Should not Contain
+ ... ${result} output:${port-id2}