Add get_transport_url function patching

Change-Id: I40c7adf7ed8485119820ac53744053ec94511193
This commit is contained in:
dukhlov 2016-02-02 05:30:18 -05:00 committed by Dmitriy Ukhlov
parent 1e643aaad7
commit a3a2894089
3 changed files with 35 additions and 2 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/devstack-plugin-pika.git

View File

@ -14,10 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
function get_transport_url {
echo "pika://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672"
}
function iniset_rpc_backend {
local package=$1
local file=$2
local section=${3:-DEFAULT}
iniset $file $section transport_url "pika://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672"
}
iniset $file $section transport_url $(get_transport_url)
}

25
tox.ini Normal file
View File

@ -0,0 +1,25 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = bashate
[testenv]
usedevelop = False
install_command = pip install {opts} {packages}
[testenv:bashate]
deps = bashate
whitelist_externals = bash
commands = bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-not \( -type d -name doc -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
\( \
-name \*.sh -or \
-name \*rc -or \
-name functions\* -or \
-wholename \*/lib/\* \
\) \
-print0 | xargs -0 bashate -v"