~le-charmers/charms/trusty/cinder/leadership-election

« back to all changes in this revision

Viewing changes to hooks/cinder_utils.py

  • Committer: Liam Young
  • Date: 2015-03-09 16:15:42 UTC
  • Revision ID: liam.young@canonical.com-20150309161542-ktn6yc16ixqi5bob
Replace deprecated eligible_leader with is_elected_leader

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from charmhelpers.contrib.openstack.alternatives import install_alternative
31
31
from charmhelpers.contrib.hahelpers.cluster import (
32
 
    eligible_leader,
 
32
    is_elected_leader,
33
33
)
34
34
 
35
35
from charmhelpers.contrib.storage.linux.utils import (
445
445
 
446
446
    # Stop/start services and migrate DB if leader
447
447
    [service_stop(s) for s in services()]
448
 
    if eligible_leader(CLUSTER_RES):
 
448
    if is_elected_leader(CLUSTER_RES):
449
449
        migrate_database()
450
450
    [service_start(s) for s in services()]
451
451