Merge lp:~jjo/charms/trusty/rabbitmq-server/use-rabbitmqctl-q-for-list-cmds into lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next

Proposed by JuanJo Ciarlante
Status: Merged
Merged at revision: 83
Proposed branch: lp:~jjo/charms/trusty/rabbitmq-server/use-rabbitmqctl-q-for-list-cmds
Merge into: lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next
Diff against target: 27 lines (+4/-4)
1 file modified
hooks/rabbit_utils.py (+4/-4)
To merge this branch: bzr merge lp:~jjo/charms/trusty/rabbitmq-server/use-rabbitmqctl-q-for-list-cmds
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Jorge Niedbalski (community) Approve
OpenStack Charmers Pending
Review via email: mp+251650@code.launchpad.net

This proposal supersedes a proposal from 2015-03-03.

To post a comment you must log in.
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

LGTM +1

review: Approve
Revision history for this message
Billy Olsen (billy-olsen) wrote :

LGTM. Approve. Waiting for OSCI votes before merging

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2190 rabbitmq-server-next for jjo mp251650
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2190/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2400 rabbitmq-server-next for jjo mp251650
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
  unit_tests/test_rabbitmq_server_relations.py:6:1: E402 module level import not at top of file
  make: *** [lint] Error 1

Full lint test output: http://paste.ubuntu.com/10520232/
Build: http://10.245.162.77:8080/job/charm_lint_check/2400/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2320 rabbitmq-server-next for jjo mp251650
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [functional_test] Error 1

Full amulet test output: http://paste.ubuntu.com/10520653/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2320/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/rabbit_utils.py'
2--- hooks/rabbit_utils.py 2015-01-22 15:37:28 +0000
3+++ hooks/rabbit_utils.py 2015-03-03 20:22:28 +0000
4@@ -80,9 +80,9 @@
5 Returns a list of all the available vhosts
6 """
7 try:
8- output = subprocess.check_output([RABBITMQ_CTL, 'list_vhosts'])
9+ output = subprocess.check_output([RABBITMQ_CTL, 'list_vhosts', '-q'])
10
11- return output.split('\n')[1:-2]
12+ return output.rstrip().split('\n')
13 except Exception as ex:
14 # if no vhosts, just raises an exception
15 log(str(ex), level='DEBUG')
16@@ -102,9 +102,9 @@
17
18
19 def user_exists(user):
20- cmd = [RABBITMQ_CTL, 'list_users']
21+ cmd = [RABBITMQ_CTL, 'list_users', '-q']
22 out = subprocess.check_output(cmd)
23- for line in out.split('\n')[1:]:
24+ for line in out.rstrip().split('\n'):
25 _user = line.split('\t')[0]
26 if _user == user:
27 admin = line.split('\t')[1]

Subscribers

People subscribed via source and target branches