Merge lp:~james-page/charm-helpers/fixup_hahelpers into lp:charm-helpers

Proposed by James Page
Status: Merged
Approved by: Adam Gandelman
Approved revision: 25
Merged at revision: 26
Proposed branch: lp:~james-page/charm-helpers/fixup_hahelpers
Merge into: lp:charm-helpers
Diff against target: 74 lines (+7/-6)
5 files modified
charmhelpers/contrib/hahelpers/apache_utils.py (+2/-2)
charmhelpers/contrib/hahelpers/ceph_utils.py (+1/-1)
charmhelpers/contrib/hahelpers/cluster_utils.py (+1/-1)
charmhelpers/contrib/hahelpers/haproxy_utils.py (+1/-1)
charmhelpers/contrib/hahelpers/utils.py (+2/-1)
To merge this branch: bzr merge lp:~james-page/charm-helpers/fixup_hahelpers
Reviewer Review Type Date Requested Status
Charm Helper Maintainers Pending
Review via email: mp+168873@code.launchpad.net

Description of the change

Fixup imports in hahelpers

The imports are all package local so no hahelper prefix required.

Also fixed up the get_host_ip function to not call unit_get in
the function definition, but in the function instead.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/hahelpers/apache_utils.py'
--- charmhelpers/contrib/hahelpers/apache_utils.py 2013-05-30 23:26:24 +0000
+++ charmhelpers/contrib/hahelpers/apache_utils.py 2013-06-12 08:27:26 +0000
@@ -8,7 +8,7 @@
8# Adam Gandelman <adamg@ubuntu.com>8# Adam Gandelman <adamg@ubuntu.com>
9#9#
1010
11from hahelpers.utils import (11from utils import (
12 relation_ids,12 relation_ids,
13 relation_list,13 relation_list,
14 relation_get,14 relation_get,
@@ -19,7 +19,7 @@
19 get_host_ip,19 get_host_ip,
20 restart20 restart
21 )21 )
22from hahelpers.cluster_utils import https22from cluster_utils import https
2323
24import os24import os
25import subprocess25import subprocess
2626
=== modified file 'charmhelpers/contrib/hahelpers/ceph_utils.py'
--- charmhelpers/contrib/hahelpers/ceph_utils.py 2013-05-30 23:26:24 +0000
+++ charmhelpers/contrib/hahelpers/ceph_utils.py 2013-06-12 08:27:26 +0000
@@ -12,7 +12,7 @@
12import subprocess12import subprocess
13import os13import os
14import shutil14import shutil
15import hahelpers.utils as utils15import utils
1616
17KEYRING = '/etc/ceph/ceph.client.%s.keyring'17KEYRING = '/etc/ceph/ceph.client.%s.keyring'
18KEYFILE = '/etc/ceph/ceph.client.%s.key'18KEYFILE = '/etc/ceph/ceph.client.%s.key'
1919
=== modified file 'charmhelpers/contrib/hahelpers/cluster_utils.py'
--- charmhelpers/contrib/hahelpers/cluster_utils.py 2013-05-30 23:26:24 +0000
+++ charmhelpers/contrib/hahelpers/cluster_utils.py 2013-06-12 08:27:26 +0000
@@ -8,7 +8,7 @@
8# Adam Gandelman <adamg@ubuntu.com>8# Adam Gandelman <adamg@ubuntu.com>
9#9#
1010
11from hahelpers.utils import (11from utils import (
12 juju_log,12 juju_log,
13 relation_ids,13 relation_ids,
14 relation_list,14 relation_list,
1515
=== modified file 'charmhelpers/contrib/hahelpers/haproxy_utils.py'
--- charmhelpers/contrib/hahelpers/haproxy_utils.py 2013-05-30 23:26:24 +0000
+++ charmhelpers/contrib/hahelpers/haproxy_utils.py 2013-06-12 08:27:26 +0000
@@ -8,7 +8,7 @@
8# Adam Gandelman <adamg@ubuntu.com>8# Adam Gandelman <adamg@ubuntu.com>
9#9#
1010
11from lib.utils import (11from utils import (
12 relation_ids,12 relation_ids,
13 relation_list,13 relation_list,
14 relation_get,14 relation_get,
1515
=== modified file 'charmhelpers/contrib/hahelpers/utils.py'
--- charmhelpers/contrib/hahelpers/utils.py 2013-06-11 18:22:54 +0000
+++ charmhelpers/contrib/hahelpers/utils.py 2013-06-12 08:27:26 +0000
@@ -270,7 +270,8 @@
270270
271271
272@cached272@cached
273def get_host_ip(hostname=unit_get('private-address')):273def get_host_ip(hostname=None):
274 hostname = hostname or unit_get('private-address')
274 try:275 try:
275 # Test to see if already an IPv4 address276 # Test to see if already an IPv4 address
276 socket.inet_aton(hostname)277 socket.inet_aton(hostname)

Subscribers

People subscribed via source and target branches