Merge lp:~verterok/charms/trusty/tanuki-spec-manager/service-name-for-website-relation into lp:~tanuki/charms/trusty/tanuki-spec-manager/trunk

Proposed by Guillermo Gonzalez on 2015-10-15
Status: Merged
Approved by: Guillermo Gonzalez on 2015-10-15
Approved revision: 34
Merged at revision: 32
Proposed branch: lp:~verterok/charms/trusty/tanuki-spec-manager/service-name-for-website-relation
Merge into: lp:~tanuki/charms/trusty/tanuki-spec-manager/trunk
Diff against target: 12 lines (+4/-0)
1 file modified
hooks/actions.py (+4/-0)
To merge this branch: bzr merge lp:~verterok/charms/trusty/tanuki-spec-manager/service-name-for-website-relation
Reviewer Review Type Date Requested Status
Celso Providelo (community) 2015-10-15 Approve on 2015-10-15
Review via email: mp+274603@code.launchpad.net

Commit message

set service_name in website relation

Description of the change

set service_name in website relation

To post a comment you must log in.
33. By Guillermo Gonzalez on 2015-10-15

improve service-name split

34. By Guillermo Gonzalez on 2015-10-15

fix rsplit

Celso Providelo (cprov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/actions.py'
--- hooks/actions.py 2015-10-05 14:39:08 +0000
+++ hooks/actions.py 2015-10-15 18:29:56 +0000
@@ -137,6 +137,10 @@
137 hookenv.log('Providing Website relation data.')137 hookenv.log('Providing Website relation data.')
138 data = super(WebsiteRelation, self).provide_data()138 data = super(WebsiteRelation, self).provide_data()
139 data['port'] = 8000139 data['port'] = 8000
140 # unit name is in the form of: <service-name>-r<revno>
141 # we need the service-name to match it with the haproxy services config
142 service_name = hookenv.local_unit().rsplit("-r", 1)[0]
143 data['service_name'] = service_name
140 return data144 return data
141145
142146

Subscribers

People subscribed via source and target branches