|
@ -693,6 +693,7 @@ wait_docker_ip() { |
|
|
} |
|
|
} |
|
|
export -f wait_docker_ip |
|
|
export -f wait_docker_ip |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wait_for_tcp_port() { |
|
|
wait_for_tcp_port() { |
|
|
local network=$1 host_port=$2 timeout=20 |
|
|
local network=$1 host_port=$2 timeout=20 |
|
|
verb "Trying to connect to $host_port" |
|
|
verb "Trying to connect to $host_port" |
|
@ -1637,18 +1638,18 @@ _get_compose_relations_cached () { |
|
|
"str") |
|
|
"str") |
|
|
target_service="$(echo "$relation_def" | shyaml get-value 2>/dev/null)" || return 1 |
|
|
target_service="$(echo "$relation_def" | shyaml get-value 2>/dev/null)" || return 1 |
|
|
tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 |
|
|
tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 |
|
|
echo -en "$relation_name\0$target_service\0\0$tech_dep\0" |
|
|
|
|
|
|
|
|
printf "%s\0" "$relation_name" "$target_service" "" "$tech_dep" |
|
|
;; |
|
|
;; |
|
|
"sequence") |
|
|
"sequence") |
|
|
while read-0 target_service; do |
|
|
while read-0 target_service; do |
|
|
tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 |
|
|
tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 |
|
|
echo -en "$relation_name\0$target_service\0\0$tech_dep\0" |
|
|
|
|
|
|
|
|
printf "%s\0" "$relation_name" "$target_service" "" "$tech_dep" |
|
|
done < <(echo "$relation_def" | shyaml get-values-0 2>/dev/null) |
|
|
done < <(echo "$relation_def" | shyaml get-values-0 2>/dev/null) |
|
|
;; |
|
|
;; |
|
|
"struct") |
|
|
"struct") |
|
|
while read-0 target_service relation_config; do |
|
|
while read-0 target_service relation_config; do |
|
|
tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 |
|
|
tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 |
|
|
echo -en "$relation_name\0$target_service\0$relation_config\0$tech_dep\0" |
|
|
|
|
|
|
|
|
printf "%s\0" "$relation_name" "$target_service" "$relation_config" "$tech_dep" |
|
|
done < <(echo "$relation_def" | shyaml key-values-0 2>/dev/null) |
|
|
done < <(echo "$relation_def" | shyaml key-values-0 2>/dev/null) |
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |
|
|