Revision 9b773665 autotools/convert-constants
b/autotools/convert-constants | ||
---|---|---|
30 | 30 |
from ganeti import constants |
31 | 31 |
from ganeti import errors |
32 | 32 |
from ganeti import luxi |
33 |
from ganeti import opcodes |
|
33 | 34 |
from ganeti import qlang |
34 | 35 |
|
35 | 36 |
|
... | ... | |
296 | 297 |
return "\n".join(lines) |
297 | 298 |
|
298 | 299 |
|
300 |
def ConvertMisc(): |
|
301 |
"""Convert some extra computed-values to Haskell. |
|
302 |
|
|
303 |
""" |
|
304 |
lines = [""] |
|
305 |
lines.extend(ConvertVariable("opcodes", "OP_IDS", |
|
306 |
opcodes.OP_MAPPING.keys(), {})) |
|
307 |
return "\n".join(lines) |
|
308 |
|
|
309 |
|
|
299 | 310 |
def main(): |
300 | 311 |
print Convert(constants, "") |
301 | 312 |
print Convert(luxi, "luxi") |
302 | 313 |
print Convert(qlang, "qlang") |
303 | 314 |
print Convert(_autoconf, "autoconf") |
304 | 315 |
print Convert(errors, "errors") |
316 |
print ConvertMisc() |
|
305 | 317 |
|
306 | 318 |
|
307 | 319 |
if __name__ == "__main__": |
Also available in: Unified diff