On Wed 28 of Sep 2011 15:45:15 Russell Bryant wrote:
ACK. The test works for me.
However, after reading through this test, I'd like to talk about how the
keys functionality works with augeas. I think that we should make what
gets stored in a key file consistent for each type of sysconfig scheme
(puppet, augeaus, regedit).
Right now, the key file is storing the output of the augeas command.
The puppet scheme works differently. I think we should make augeas work
the same way. Right now, when you use run_uri() or run_string() with
puppet, the key file has:
1) "OK" -- successful
2) "FAILED\n%d", process exit code -- failed
For augeaus, since we don't shell out, it won't be the process exit
code, but it could be the return value from the augeas API call.
Output of augeas commands needs to be present in the result somehow. Augeas
can be used for getting values, so it should be part of the result in the key.
How about this content of the key:
1) "OK\n%s", result of (augeas) command if any
2) "FAILED\n%d\n%s", exit code from process/API, description of the
error/other data
This way we can store some data with the key to be accessible from caller.
Radek