Révision 33cff547
Add autoconf and enhance graphs
| plugins/nova/nova_services | ||
|---|---|---|
| 8 | 8 |
# |
| 9 | 9 |
# Magic markers |
| 10 | 10 |
#%# capabilities=autoconf |
| 11 |
#%# family=nova
|
|
| 11 |
#%# family=auto
|
|
| 12 | 12 |
|
| 13 |
from nova import context |
|
| 14 |
from nova import db |
|
| 15 |
from nova import flags |
|
| 16 |
from nova import utils |
|
| 17 | 13 |
import sys |
| 18 | 14 |
|
| 15 |
try: |
|
| 16 |
from nova import context |
|
| 17 |
from nova import db |
|
| 18 |
from nova import flags |
|
| 19 |
from nova import utils |
|
| 20 |
except ImportError: |
|
| 21 |
succesful_import = False |
|
| 22 |
else: |
|
| 23 |
succesful_import = True |
|
| 24 |
|
|
| 19 | 25 |
services = ['nova-compute', 'nova-volume', 'nova-scheduler', 'nova-vncproxy', 'nova-network', 'nova-cert', 'nova-console', 'nova-consoleauth'] |
| 20 | 26 |
|
| 21 | 27 |
|
| ... | ... | |
| 70 | 76 |
if sys.argv[1] == "config": |
| 71 | 77 |
print_config() |
| 72 | 78 |
elif sys.argv[1] == "autoconf": |
| 73 |
print "yes" |
|
| 74 |
else: |
|
| 79 |
if not succesful_import: |
|
| 80 |
print 'no (failed import nova module]' |
|
| 81 |
else: |
|
| 82 |
print 'yes' |
|
| 83 |
elif succesful_import: |
|
| 75 | 84 |
utils.default_flagfile() |
| 76 | 85 |
flags.FLAGS(sys.argv) |
| 77 | 86 |
print_values() |
Formats disponibles : Unified diff