Merge lp:~tealeg/charms/trusty/glance-simplestreams-sync/work-with-multiple-rabbitMQs into lp:~landscape/charms/trusty/glance-simplestreams-sync/landscape

Proposed by Geoff Teale
Status: Merged
Approved by: Geoff Teale
Approved revision: 64
Merged at revision: 61
Proposed branch: lp:~tealeg/charms/trusty/glance-simplestreams-sync/work-with-multiple-rabbitMQs
Merge into: lp:~landscape/charms/trusty/glance-simplestreams-sync/landscape
Diff against target: 17 lines (+5/-1)
1 file modified
scripts/glance-simplestreams-sync.py (+5/-1)
To merge this branch: bzr merge lp:~tealeg/charms/trusty/glance-simplestreams-sync/work-with-multiple-rabbitMQs
Reviewer Review Type Date Requested Status
Данило Шеган (community) Approve
Alberto Donato (community) Approve
Review via email: mp+291378@code.launchpad.net

Description of the change

The charmhelpers library will always set the rabbit_hosts variable to a comma separated string of IP addresses, however the charm expects a python array. This branch produces such an array by splitting the string.

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

Looks good, will give it a run over the weekend. I assume I can use cs:~tealeg/trusty/glance-simplestreams-sync-0 for testing?

Revision history for this message
Alberto Donato (ack) wrote :

LGTM, +1

One nit inline.

review: Approve
Revision history for this message
Geoff Teale (tealeg) wrote :

Addressed comments.

Revision history for this message
Geoff Teale (tealeg) wrote :

> Looks good, will give it a run over the weekend. I assume I can use
> cs:~tealeg/trusty/glance-simplestreams-sync-0 for testing?

Yup:

juju deploy cs:~tealeg/trusty/glance-simplestreams-sync-0

Revision history for this message
Данило Шеган (danilo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/glance-simplestreams-sync.py'
2--- scripts/glance-simplestreams-sync.py 2016-03-29 12:27:20 +0000
3+++ scripts/glance-simplestreams-sync.py 2016-04-11 10:04:24 +0000
4@@ -429,9 +429,13 @@
5
6 id_conf = read_conf(ID_CONF_FILE_NAME)
7
8+ # The indentity.yaml file contains either a singular string variable
9+ # 'rabbit_host', or a comma separated list in the plural variable
10+ # 'rabbit_hosts'
11+ host = None
12 hosts = id_conf.get('rabbit_hosts', None)
13 if hosts is not None:
14- host = hosts[0]
15+ host = hosts.split(",")[0]
16 else:
17 host = id_conf.get('rabbit_host', None)
18

Subscribers

People subscribed via source and target branches

to all changes: