Merge ~johnsca/charms/+source/http:imports into ~bcsaller/charms/+source/http:master

Proposed by Cory Johns
Status: Needs review
Proposed branch: ~johnsca/charms/+source/http:imports
Merge into: ~bcsaller/charms/+source/http:master
Diff against target: 27 lines (+6/-5)
1 file modified
provides.py (+6/-5)
Reviewer Review Type Date Requested Status
Benjamin Saller Pending
Review via email: mp+268645@code.launchpad.net

Description of the change

Fixed imports due to charms.reactive split.
Also made hostname automatic and implicit, since I can't envision ever wanting to send anything other than private-address.

To post a comment you must log in.

Unmerged commits

0df7fc8... by Cory Johns

Fixed imports for charms.reactive split and made hostname automatic

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/provides.py b/provides.py
2index 56fbd41..6ca360c 100644
3--- a/provides.py
4+++ b/provides.py
5@@ -1,6 +1,7 @@
6-from charmhelpers.core.reactive import hook
7-from charmhelpers.core.reactive import RelationBase
8-from charmhelpers.core.reactive import scopes
9+from charmhelpers.core import hookenv
10+from charms.reactive import hook
11+from charms.reactive import RelationBase
12+from charms.reactive import scopes
13
14
15 class HttpProvides(RelationBase):
16@@ -14,9 +15,9 @@ class HttpProvides(RelationBase):
17 def broken(self):
18 self.remove_state('{relation_name}.available')
19
20- def configure(self, hostname, port):
21+ def configure(self, port):
22 relation_info = {
23- 'hostname': hostname,
24+ 'hostname': hookenv.unit_get('private-address'),
25 'port': port,
26 }
27 self.set_remote(**relation_info)

Subscribers

People subscribed via source and target branches

to all changes: