~ionutbalutoiu/charms/trusty/neutron-api/next

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/hahelpers/cluster.py

  • Committer: Liam Young
  • Date: 2014-06-17 09:48:24 UTC
  • Revision ID: liam.young@canonical.com-20140617094824-0pynps6kou6ake7s
Minor bug fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
 
30
30
def is_clustered():
31
 
    if relation_ids('ha'):
32
 
    else:
33
31
    for r_id in (relation_ids('ha') or []):
34
32
        for unit in (relation_list(r_id) or []):
35
33
            clustered = relation_get('clustered',
70
68
        remote_unit_no = int(peer.split('/')[1])
71
69
        if remote_unit_no < local_unit_no:
72
70
            return False
73
 
        else:
74
71
    return True
75
72
 
76
73