Révision 017ad1f8
Fix import problem when keystone is not present
| plugins/keystone/keystone_stats | ||
|---|---|---|
| 23 | 23 |
else: |
| 24 | 24 |
succesful_import = True |
| 25 | 25 |
|
| 26 |
|
|
| 27 |
CONF = config.CONF |
|
| 28 |
|
|
| 29 | 26 |
stats = ['users', 'tenants'] |
| 30 | 27 |
|
| 31 |
|
|
| 32 | 28 |
def print_config(): |
| 33 | 29 |
global states |
| 34 | 30 |
print 'graph_title Keystone Stats' |
| ... | ... | |
| 86 | 82 |
print "%s_%s.value %s" % (field, state, value) |
| 87 | 83 |
|
| 88 | 84 |
def load_conf(): |
| 89 |
CONF(config_files=[utils.find_config('keystone.conf')])
|
|
| 85 |
config.CONF(config_files=[utils.find_config('keystone.conf')])
|
|
| 90 | 86 |
|
| 91 | 87 |
if __name__ == '__main__': |
| 92 | 88 |
if len(sys.argv) > 1: |
Formats disponibles : Unified diff