summaryrefslogtreecommitdiffstats
path: root/python/examples/guestfs-python.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-11 15:07:01 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-11 19:55:16 +0100
commit39d1a7dbc9c7d4ae8cbb492a39149d1f8e75ff70 (patch)
treee22477a9c5f423239e45ec49f5d551a81a5d286a /python/examples/guestfs-python.pod
parent7b619d47f6931286620bc7c1cb6dcb4e63cc951b (diff)
downloadlibguestfs-39d1a7dbc9c7d4ae8cbb492a39149d1f8e75ff70.tar.gz
libguestfs-39d1a7dbc9c7d4ae8cbb492a39149d1f8e75ff70.tar.xz
libguestfs-39d1a7dbc9c7d4ae8cbb492a39149d1f8e75ff70.zip
generator: Use a struct instead of a tuple to describe each action.
Each action changes from a tuple like this: ("cat", (RString "content", [Pathname "path"], []), 4, [ProtocolLimitWarning], [InitISOFS, Always, TestOutput ( [["cat"; "/known-2"]], "abcdef\n")], "list the contents of a file", "[...]"); to a slightly longer but more readable struct: { defaults with name = "cat"; style = RString "content", [Pathname "path"], []; proc_nr = Some 4; protocol_limit_warning = true; tests = [ InitISOFS, Always, TestOutput ( [["cat"; "/known-2"]], "abcdef\n") ]; shortdesc = "list the contents of a file"; longdesc = "[...]" }; ["defaults" is a struct which contains the defaults for every field, allowing us to use the "{ defaults with ... }" syntax to just update the fields we want to be different from the defaults.] This is a mechanical change and there is no change to the output of the generator. I checked the output before and after with diff to verify this. There are no changes in the output apart from UUIDs which are expected to change with each run.
Diffstat (limited to 'python/examples/guestfs-python.pod')
0 files changed, 0 insertions, 0 deletions