12 lines
768 B
Plaintext
12 lines
768 B
Plaintext
#!/bin/bash
|
|
|
|
KEYSTONE_COMMAND="<%= @keystone_command %> --os-username <%= @admin_username %> --os-password <%= @admin_password %> --os-tenant-name <%= @admin_tenant %> --os-auth-url <%= @os_auth_url %>"
|
|
KEYSTONE_ARGS=' <%= @keystone_args %>'
|
|
|
|
TENANT_ID=$($KEYSTONE_COMMAND $KEYSTONE_ARGS | grep id | awk -F\| '{print $3}' | cut -d ' ' -f2)
|
|
|
|
RESULT=$(curl -s -k --user 'openbook:Tall!g3nt' -D - https://<%= @ipaddress %>:8443/Openbook/resource/resourcemanagers/testconnection/OpenStack -H "Content-Type: application/x-www-form-urlencoded" -H "X-Connection-Details: {'connectionUrl':'<%= @keystone_admin_url %>','userName':'<%= @admin_username %>','adminTenantId':'$TENANT_ID','password':'<%= @admin_password %>'}")
|
|
|
|
echo "$RESULT" >> /tmp/connectivity-test-result.txt
|
|
|