85c12706d1
When upgrade-workloadsriov is set, workload is generated with an SRIOV PF port on the existing external network A mechanism has been added to remove workload previously created after update/upgrade is completed, when upgrade-workloadcleanup is set Change-Id: I969d901be4eeb93e0abe4e8b06f6c54399b52ea2
21 lines
758 B
Django/Jinja
21 lines
758 B
Django/Jinja
#!/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [[ ! -s {{ working_dir }}/vm_ip.sh ]]; then
|
|
{% if workload_sriov | bool %}
|
|
echo export VM_IP=$(openstack server list -f json | jq -r -c '.[0]["Networks"]' | cut -d"=" -f2) > {{ working_dir }}/vm_ip.sh
|
|
{% else %}
|
|
echo export VM_IP=$(openstack floating ip list -f json | jq -r -c '.[] | select(.Port) | .["Floating IP Address"]' | head -1) > {{ working_dir }}/vm_ip.sh
|
|
{% endif %}
|
|
fi
|
|
|
|
source {{ working_dir }}/vm_ip.sh
|
|
|
|
while true; do
|
|
curl --location --silent --show-error --max-time 5 \
|
|
--write-out "HTTP Code: %{http_code}\nTotal Time: %{time_total} sec\nEffective URL: %{url_effective}\n\n" \
|
|
http://${VM_IP}/ 2>/dev/null >> {{ working_dir }}/http_response.log
|
|
sleep 1
|
|
done
|