~niedbalski/charms/trusty/swift-storage/fix-lp-1308557

« back to all changes in this revision

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

  • Committer: James Page
  • Date: 2014-04-16 08:34:53 UTC
  • mfrom: (24.1.17 swift-storage)
  • Revision ID: james.page@canonical.com-20140416083453-3n4gz51lk3p8tojd
[james-page,r=james-page,t=*]

Support for Icehouse on 12.04 and 14.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
 
41
41
def get_ca_cert():
42
 
    ca_cert = None
43
 
    log("Inspecting identity-service relations for CA SSL certificate.",
44
 
        level=INFO)
45
 
    for r_id in relation_ids('identity-service'):
46
 
        for unit in relation_list(r_id):
47
 
            if not ca_cert:
48
 
                ca_cert = relation_get('ca_cert',
49
 
                                       rid=r_id, unit=unit)
 
42
    ca_cert = config_get('ssl_ca')
 
43
    if ca_cert is None:
 
44
        log("Inspecting identity-service relations for CA SSL certificate.",
 
45
            level=INFO)
 
46
        for r_id in relation_ids('identity-service'):
 
47
            for unit in relation_list(r_id):
 
48
                if ca_cert is None:
 
49
                    ca_cert = relation_get('ca_cert',
 
50
                                           rid=r_id, unit=unit)
50
51
    return ca_cert
51
52
 
52
53