~freyes/charms/trusty/hacluster/debug-config

« back to all changes in this revision

Viewing changes to hooks/lib/cluster_utils.py

  • Committer: James Page
  • Date: 2014-04-11 10:25:09 UTC
  • mfrom: (18.2.5 hacluster)
  • Revision ID: james.page@canonical.com-20140411102509-ulrtgrpgnjt8x9g4
Rebase on precise charm for pingd and lint tidy

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    relation_get,
16
16
    get_unit_hostname,
17
17
    config_get
18
 
    )
 
18
)
19
19
import subprocess
20
20
import os
21
21
 
35
35
    cmd = [
36
36
        "crm", "resource",
37
37
        "show", resource
38
 
        ]
 
38
    ]
39
39
    try:
40
40
        status = subprocess.check_output(cmd)
41
41
    except subprocess.CalledProcessError:
93
93
            if (relation_get('https_keystone', rid=r_id, unit=unit) and
94
94
                relation_get('ssl_cert', rid=r_id, unit=unit) and
95
95
                relation_get('ssl_key', rid=r_id, unit=unit) and
96
 
                relation_get('ca_cert', rid=r_id, unit=unit)):
 
96
                    relation_get('ca_cert', rid=r_id, unit=unit)):
97
97
                return True
98
98
    return False
99
99