Skip to content
Snippets Groups Projects
Commit 3929e782 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a function for all fields of a given OP_ID


This patch changes THH to export a new function which defines all
fields of a given OP_ID. Not very clean, since for an invalid OP_ID we
return empty list, but since it will only be used in tests it should
be good enough.

The generated code looks as follows:

    allOpFields :: String -> [String]
    allOpFields "OP_TEST_DELAY"
                  = ["duration", "on_master", "on_nodes", "repeat"]
    allOpFields "OP_INSTANCE_REPLACE_DISKS"
                  = ["disks", "early_release", "iallocator", "ignore_ipolicy",
                     "instance_name", "mode", "remote_node"]
    …
    allOpFields _ = []

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent fa10983e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment