From 7c2df87dede8db83f8e4a5a57beca4ec729256e4 Mon Sep 17 00:00:00 2001 From: James Kirsch Date: Fri, 11 Sep 2020 14:12:44 -0700 Subject: 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 --- tests/test-ironic.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/test-ironic.sh') 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 -- cgit v1.2.3