[Arguments] ${controller_ip}
[Documentation] Will disable token based authentication. Currently, that is done with a config file change
SSHLibrary.Open Connection ${controller_ip}
[Arguments] ${controller_ip}
[Documentation] Will disable token based authentication. Currently, that is done with a config file change
SSHLibrary.Open Connection ${controller_ip}
${cmd}= Set Variable sed -i 's/^authEnabled=.*$/authEnabled=false/g' ${AUTHN_CFG_FILE}
SSHLibrary.Execute Command ${cmd}
SSHLibrary.Close Connection
${cmd}= Set Variable sed -i 's/^authEnabled=.*$/authEnabled=false/g' ${AUTHN_CFG_FILE}
SSHLibrary.Execute Command ${cmd}
SSHLibrary.Close Connection
[Arguments] ${controller_ip}
[Documentation] Will enable token based authentication. Currently, that is done with a config file change
SSHLibrary.Open Connection ${controller_ip}
[Arguments] ${controller_ip}
[Documentation] Will enable token based authentication. Currently, that is done with a config file change
SSHLibrary.Open Connection ${controller_ip}
${cmd}= Set Variable sed -i 's/^authEnabled=.*$/authEnabled=true/g' ${AUTHN_CFG_FILE}
SSHLibrary.Execute Command ${cmd}
SSHLibrary.Close Connection
${cmd}= Set Variable sed -i 's/^authEnabled=.*$/authEnabled=true/g' ${AUTHN_CFG_FILE}
SSHLibrary.Execute Command ${cmd}
SSHLibrary.Close Connection
${auth_data}= Create Auth Data ${USER} ${PWD} ${scope} ${client_id} ${client_secret}
${resp}= AAA Login ${ODL_SYSTEM_IP} ${auth_data}
Should Be Equal As Strings ${resp.status_code} 201
${auth_data}= Create Auth Data ${USER} ${PWD} ${scope} ${client_id} ${client_secret}
${resp}= AAA Login ${ODL_SYSTEM_IP} ${auth_data}
Should Be Equal As Strings ${resp.status_code} 201
${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= RequestsLibrary.GET Request httpbin ${idmurl}/users/${user_id} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= RequestsLibrary.GET Request httpbin ${idmurl}/users/${user_id} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
${headers}= Create Dictionary Content-Type=application/json
${resp}= RequestsLibrary.POST Request httpbin ${idmurl}/users headers=${headers} data=${user_data}
Should Be Equal As Strings ${resp.status_code} 201
${headers}= Create Dictionary Content-Type=application/json
${resp}= RequestsLibrary.POST Request httpbin ${idmurl}/users headers=${headers} data=${user_data}
Should Be Equal As Strings ${resp.status_code} 201