#!/bin/bash # # Copyright 2020 VEXXHOST, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # iniset rpc configuration function iniset_k8s_rpc_backend { local package=$1 local file=$2 local section=${3:-DEFAULT} local conn_url=$4 iniset $file $section transport_url $conn_url if [ -n "$RABBIT_HEARTBEAT_TIMEOUT_THRESHOLD" ]; then iniset $file oslo_messaging_rabbit heartbeat_timeout_threshold $RABBIT_HEARTBEAT_TIMEOUT_THRESHOLD fi if [ -n "$RABBIT_HEARTBEAT_RATE" ]; then iniset $file oslo_messaging_rabbit heartbeat_rate $RABBIT_HEARTBEAT_RATE fi } export -f iniset_k8s_rpc_backend