Revision b8669a69 autotools/build-bash-completion
b/autotools/build-bash-completion | ||
---|---|---|
33 | 33 |
import optparse |
34 | 34 |
from cStringIO import StringIO |
35 | 35 |
|
36 |
# _constants shouldn't be imported from anywhere except constants.py, but we're |
|
37 |
# making an exception here because this script is only used at build time. |
|
38 |
from ganeti import _constants |
|
39 |
|
|
36 | 40 |
from ganeti import constants |
37 | 41 |
from ganeti import cli |
38 | 42 |
from ganeti import utils |
... | ... | |
41 | 45 |
|
42 | 46 |
from ganeti.tools import burnin |
43 | 47 |
|
44 |
# _autoconf shouldn't be imported from anywhere except constants.py, but we're |
|
45 |
# making an exception here because this script is only used at build time. |
|
46 |
from ganeti import _autoconf |
|
47 |
|
|
48 | 48 |
#: Regular expression describing desired format of option names. Long names can |
49 | 49 |
#: contain lowercase characters, numbers and dashes only. |
50 | 50 |
_OPT_NAME_RE = re.compile(r"^-[a-zA-Z0-9]|--[a-z][-a-z0-9]+$") |
... | ... | |
832 | 832 |
WritePreamble(sw, debug) |
833 | 833 |
|
834 | 834 |
# gnt-* scripts |
835 |
for scriptname in _autoconf.GNT_SCRIPTS:
|
|
835 |
for scriptname in _constants.GNT_SCRIPTS:
|
|
836 | 836 |
filename = "scripts/%s" % scriptname |
837 | 837 |
|
838 | 838 |
WriteCompletion(sw, scriptname, GetFunctionName(scriptname), debug, |
... | ... | |
849 | 849 |
debug=not options.compact) |
850 | 850 |
|
851 | 851 |
# htools, if enabled |
852 |
if _autoconf.HTOOLS:
|
|
853 |
for script in _autoconf.HTOOLS_PROGS:
|
|
852 |
if _constants.HTOOLS:
|
|
853 |
for script in _constants.HTOOLS_PROGS:
|
|
854 | 854 |
WriteHaskellCompletion(sw, script, htools=True, debug=debug) |
855 | 855 |
|
856 | 856 |
# ganeti-confd, if enabled |
857 |
if _autoconf.ENABLE_CONFD:
|
|
857 |
if _constants.ENABLE_CONFD:
|
|
858 | 858 |
WriteHaskellCompletion(sw, "src/ganeti-confd", htools=False, |
859 | 859 |
debug=debug) |
860 | 860 |
|
861 | 861 |
# mon-collector, if monitoring is enabled |
862 |
if _autoconf.ENABLE_MOND:
|
|
862 |
if _constants.ENABLE_MOND:
|
|
863 | 863 |
WriteHaskellCmdCompletion(sw, "src/mon-collector", debug=debug) |
864 | 864 |
|
865 | 865 |
# Reset extglob to original value |
Also available in: Unified diff