diff options
| author | James Kirsch <generalfuzz@gmail.com> | 2020-09-11 14:12:44 -0700 |
|---|---|---|
| committer | James Kirsch <generalfuzz@gmail.com> | 2020-09-24 10:09:13 -0700 |
| commit | 7c2df87dede8db83f8e4a5a57beca4ec729256e4 (patch) | |
| tree | d1689755b547785ee49cc5c21403aa8f37dfa659 /tests/test-ironic.sh | |
| parent | 3d30624cc1396a9c11658e4780bf10889ac4c564 (diff) | |
| download | kolla-ansible-7c2df87dede8db83f8e4a5a57beca4ec729256e4.tar.gz kolla-ansible-7c2df87dede8db83f8e4a5a57beca4ec729256e4.zip | |
Add support for encrypting Ironic API
This patch introduces an optional backend encryption for the Ironic API
service. When used in conjunction with enabling TLS for service API
endpoints, network communcation will be encrypted end to end, from
client through HAProxy to the Ironic service.
Change-Id: I9edf7545c174ca8839ceaef877bb09f49ef2b451
Partially-Implements: blueprint add-ssl-internal-network
Diffstat (limited to 'tests/test-ironic.sh')
| -rwxr-xr-x | tests/test-ironic.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test-ironic.sh b/tests/test-ironic.sh index 6cc3ede3f..9e7876f2a 100755 --- a/tests/test-ironic.sh +++ b/tests/test-ironic.sh @@ -35,7 +35,13 @@ function wait_for_placement_resources { for i in $(seq 1 120); do # Fetch provider UUIDs from Placement local providers - providers=$(curl -sH "X-Auth-Token: $token" $endpoint/resource_providers \ + args=( + -sH "X-Auth-Token: $token" + ) + if [[ "$TLS_ENABLED" = "True" ]]; then + args+=(--cacert $OS_CACERT) + fi + providers=$(curl "${args[@]}" $endpoint/resource_providers \ | ./jq -r '.resource_providers[].uuid') local p @@ -46,7 +52,7 @@ function wait_for_placement_resources { # A resource class inventory record looks something like # {"max_unit": 1, "min_unit": 1, "step_size": 1, "reserved": 0, "total": 1, "allocation_ratio": 1} # Subtract reserved from total (defaulting both to 0) - amount=$(curl -sH "X-Auth-Token: $token" $endpoint/resource_providers/$p/inventories \ + amount=$(curl "${args[@]}" $endpoint/resource_providers/$p/inventories \ | ./jq ".inventories.CUSTOM_$resource_class as \$cls | (\$cls.total // 0) - (\$cls.reserved // 0)") if [ $amount -gt 0 ]; then |
