Revision d31193c3 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 |
|
34 | 33 |
from ganeti import qlang |
35 | 34 |
from ganeti import jstore |
36 | 35 |
|
... | ... | |
300 | 299 |
return "\n".join(lines) |
301 | 300 |
|
302 | 301 |
|
303 |
def ConvertMisc(): |
|
304 |
"""Convert some extra computed-values to Haskell. |
|
305 |
|
|
306 |
""" |
|
307 |
lines = [""] |
|
308 |
lines.extend(ConvertVariable("opcodes", "OP_IDS", |
|
309 |
opcodes.OP_MAPPING.keys(), {})) |
|
310 |
return "\n".join(lines) |
|
311 |
|
|
312 |
|
|
313 | 302 |
def main(): |
314 | 303 |
print Convert(constants, "") |
315 | 304 |
print Convert(luxi, "luxi") |
... | ... | |
317 | 306 |
print Convert(_autoconf, "autoconf") |
318 | 307 |
print Convert(errors, "errors") |
319 | 308 |
print Convert(jstore, "jstore") |
320 |
print ConvertMisc() |
|
321 | 309 |
|
322 | 310 |
|
323 | 311 |
if __name__ == "__main__": |
Also available in: Unified diff