~openstack-charmers/charms/trusty/hacluster/trunk

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/utils.py

  • Committer: Liam Young
  • Date: 2016-04-12 14:53:45 UTC
  • mfrom: (64.1.2 stable/16.07.remote)
  • Revision ID: liam.young@canonical.com-20160412145345-78w1gllxjni2zqjk
[gnuoy, r=james-page] Precreate corosync acl dir if needed as xenial package (2.3.5) does not create it unlike earlier releases

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
    ('liberty',
138
138
        ['2.3.0', '2.4.0', '2.5.0']),
139
139
    ('mitaka',
140
 
        ['2.5.0', '2.6.0']),
 
140
        ['2.5.0', '2.6.0', '2.7.0']),
141
141
])
142
142
 
143
143
# >= Liberty version->codename mapping
156
156
    ]),
157
157
    'keystone': OrderedDict([
158
158
        ('8.0', 'liberty'),
 
159
        ('8.1', 'liberty'),
159
160
        ('9.0', 'mitaka'),
160
161
    ]),
161
162
    'horizon-common': OrderedDict([
1534
1535
    return _assess_status_func
1535
1536
 
1536
1537
 
1537
 
def pausable_restart_on_change(restart_map, stopstart=False):
 
1538
def pausable_restart_on_change(restart_map, stopstart=False,
 
1539
                               restart_functions=None):
1538
1540
    """A restart_on_change decorator that checks to see if the unit is
1539
1541
    paused. If it is paused then the decorated function doesn't fire.
1540
1542
 
1567
1569
                return f(*args, **kwargs)
1568
1570
            # otherwise, normal restart_on_change functionality
1569
1571
            return restart_on_change_helper(
1570
 
                (lambda: f(*args, **kwargs)), restart_map, stopstart)
 
1572
                (lambda: f(*args, **kwargs)), restart_map, stopstart,
 
1573
                restart_functions)
1571
1574
        return wrapped_f
1572
1575
    return wrap