debian-forge-composer/internal
Tomas Hozza f06e66b94b osbuild2: support for servers option in org.osbuild.chrony
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>
2021-07-08 19:37:09 +02:00
..
blueprint rhel84/grub2: set saved_entry 2021-02-20 20:01:15 +01:00
boot upload/aws: add support for session tokens 2021-06-28 13:14:19 +03:00
client Use RepoRegistry in composer and Weldr API 2021-05-14 15:43:00 +02:00
cloud/gcp GCP: Fix panic while parsing a specific build job log 2021-04-29 14:48:50 +02:00
cloudapi cloudapi: check if metadata is nil before converting 2021-06-29 09:33:05 +01:00
common internal/common: add helper functions to get pointer to a basic type value 2021-07-08 19:37:09 +02:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk osbuild: rename package to osbuild1 2021-03-17 18:12:17 +00:00
distro distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
distroregistry distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
jobqueue jobqueue: Replace JobArgs() with Job() 2021-01-19 10:37:51 +01:00
jsondb jsondb: Allow passing nil as document to Read() 2020-05-13 16:45:09 +02:00
kojiapi kojiapi: include image type exports in Koji job args 2021-06-18 14:02:09 +01:00
mocks worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
osbuild1 osbuild1: convert stage metadata from v2 2021-06-29 09:33:05 +01:00
osbuild2 osbuild2: support for servers option in org.osbuild.chrony 2021-07-08 19:37:09 +02:00
ostree ostree: add test for VerifyRef() 2021-06-18 14:02:09 +01:00
reporegistry Use RepoRegistry in composer and Weldr API 2021-05-14 15:43:00 +02:00
rpmmd rhel85: distro and arch package sets 2021-07-01 12:48:32 +02:00
store distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
target New upload target: AWS S3 2021-06-18 14:02:09 +01:00
test worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
upload spec: drop hacks for Fedora 32 2021-07-05 11:16:08 +02:00
weldr fix: small typo in code comments 2021-07-02 10:38:04 +02:00
worker worker: Use http.PostForm to post data 2021-06-23 10:33:22 +02:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00