Browse Source

Add get_transport_url function patching

Change-Id: I40c7adf7ed8485119820ac53744053ec94511193
changes/09/275109/4
dukhlov 3 years ago
parent
commit
a3a2894089
3 changed files with 35 additions and 2 deletions
  1. 4
    0
      .gitreview
  2. 6
    2
      devstack/plugin.sh
  3. 25
    0
      tox.ini

+ 4
- 0
.gitreview View File

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

+ 6
- 2
devstack/plugin.sh View File

@@ -14,10 +14,14 @@
14 14
 # License for the specific language governing permissions and limitations
15 15
 # under the License.
16 16
 
17
+function get_transport_url {
18
+    echo "pika://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672"
19
+}
20
+
17 21
 function iniset_rpc_backend {
18 22
     local package=$1
19 23
     local file=$2
20 24
     local section=${3:-DEFAULT}
21 25
 
22
-    iniset $file $section transport_url "pika://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672"
23
-}
26
+    iniset $file $section transport_url $(get_transport_url)
27
+}

+ 25
- 0
tox.ini View File

@@ -0,0 +1,25 @@
1
+[tox]
2
+minversion = 1.6
3
+skipsdist = True
4
+envlist = bashate
5
+
6
+[testenv]
7
+usedevelop = False
8
+install_command = pip install {opts} {packages}
9
+
10
+[testenv:bashate]
11
+deps = bashate
12
+whitelist_externals = bash
13
+commands = bash -c "find {toxinidir}          \
14
+         -not \( -type d -name .?\* -prune \) \
15
+         -not \( -type d -name doc -prune \)  \
16
+         -type f                              \
17
+         -not -name \*~                       \
18
+         -not -name \*.md                     \
19
+         \(                                   \
20
+          -name \*.sh -or                     \
21
+          -name \*rc -or                      \
22
+          -name functions\* -or               \
23
+          -wholename \*/lib/\*                \
24
+         \)                                   \
25
+         -print0 | xargs -0 bashate -v"

Loading…
Cancel
Save