Révision 33cff547
Add autoconf and enhance graphs
| plugins/nova/nova_instance_timing | ||
|---|---|---|
| 12 | 12 |
# |
| 13 | 13 |
# Magic markers |
| 14 | 14 |
#%# capabilities=autoconf |
| 15 |
#%# family=nova
|
|
| 15 |
#%# family=auto
|
|
| 16 | 16 |
|
| 17 |
from nova import context |
|
| 18 |
from nova import db |
|
| 19 |
from nova import flags |
|
| 20 |
from nova import utils |
|
| 21 |
from nova.db.sqlalchemy.session import get_session |
|
| 22 | 17 |
import sys |
| 23 | 18 |
|
| 19 |
try: |
|
| 20 |
from nova import context |
|
| 21 |
from nova import db |
|
| 22 |
from nova import flags |
|
| 23 |
from nova import utils |
|
| 24 |
from nova.db.sqlalchemy.session import get_session |
|
| 25 |
except ImportError: |
|
| 26 |
succesful_import = False |
|
| 27 |
else: |
|
| 28 |
succesful_import = True |
|
| 29 |
|
|
| 24 | 30 |
|
| 25 | 31 |
def print_config(): |
| 26 | 32 |
global states |
| ... | ... | |
| 58 | 64 |
if sys.argv[1] == "config": |
| 59 | 65 |
print_config() |
| 60 | 66 |
elif sys.argv[1] == "autoconf": |
| 61 |
print "yes" |
|
| 62 |
else: |
|
| 67 |
if not succesful_import: |
|
| 68 |
print 'no (failed import nova module)' |
|
| 69 |
sys.exit(0) |
|
| 70 |
else: |
|
| 71 |
print 'yes' |
|
| 72 |
elif succesful_import: |
|
| 63 | 73 |
utils.default_flagfile() |
| 64 | 74 |
flags.FLAGS(sys.argv) |
| 65 | 75 |
print_values() |
Formats disponibles : Unified diff