~hopem/charms/trusty/keystone/fix-ssl-disable

« back to all changes in this revision

Viewing changes to hooks/keystone_hooks.py

  • Committer: Edward Hope-Morley
  • Date: 2015-02-16 13:35:14 UTC
  • mfrom: (117.1.3 keystone.strbools)
  • Revision ID: edward.hope-morley@canonical.com-20150216133514-byi9r8zk30a4ffz2
[hopem,r=gnuoy]

Synced charm-helpers to get core.strutils and replaced
str-to-bool logic with bool_from_string()

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    restart_on_change,
34
34
)
35
35
 
 
36
from charmhelpers.core.strutils import (
 
37
    bool_from_string,
 
38
)
 
39
 
36
40
from charmhelpers.fetch import (
37
41
    apt_install, apt_update,
38
42
    filter_installed_packages
65
69
    CA_CERT_PATH,
66
70
    ensure_permissions,
67
71
    get_ssl_sync_request_units,
68
 
    is_str_true,
69
72
    is_ssl_cert_master,
70
73
    is_db_ready,
71
74
    clear_ssl_synced_units,
301
304
    """
302
305
    unit = local_unit().replace('/', '-')
303
306
    count = 0
304
 
    if is_str_true(config('use-https')):
 
307
    if bool_from_string(config('use-https')):
305
308
        count += 1
306
309
 
307
 
    if is_str_true(config('https-service-endpoints')):
 
310
    if bool_from_string(config('https-service-endpoints')):
308
311
        count += 2
309
312
 
310
313
    if count: