Add support for the newly added `servers` option in the
`org.osbuild.chrony` osbuild stage [1]. The option allows one to
specify timeservers to be used by chrony, including a subset of
lower-level configuration options per each server.
Implement a custom JSON marshaller method for `ChronyStageOptions` to
ensure that exactly one of 'timeservers' or 'servers' is specified, as
mandated by the stage schema.
Optional values in `ChronyConfigServer` are declared as pointers to
distinguish the case when the value was explicitly set by the user from
the default value when the structure instance is created. All of these
options should be omitted from the JSON, but only when not explicitly
set, not when their value us "0" for int or "false" for bool. Downside
of this approach is that one can not easily use pointer to a basic
type literal in the struct literal. Passing the basic type literal has
to be workarounded using an intermediate variable, which address is
used in the struct literal.
Add unit test cases for the added functionality.
[1] https://github.com/osbuild/osbuild/pull/692
Signed-off-by: Tomas Hozza <thozza@redhat.com>