cloudapi: rename gpg_key field to gpgkey

Oh no, we made a mistake here: Both our json repositories and repo files in
/etc/yum.repos.d have the GPG key in a field named `gpgkey`. Unfortunately,
cloudapi uses a field named `gpg_key`. One consequence of this issue is that
our api.sh test is meant to pass GPG keys in the compose request but since
it's using a bad field name (`gpgkey`), the key is actually not used.

I've decided to fix this in cloudapi: The `gpg_key` field is now renamed to
`gpgkey`. This is a breaking change but no one is using this API anyway so
we think it's better to do this now than introducing weird backward
compatible hacks.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2022-03-25 10:04:42 +01:00 committed by Ondřej Budai
parent 80af9cac98
commit af44202b1c
4 changed files with 117 additions and 87 deletions

View file

@ -1265,8 +1265,8 @@ func genRepoConfig(repo Repository) (*rpmmd.RepoConfig, error) {
if repo.CheckGpg != nil {
repoConfig.CheckGPG = *repo.CheckGpg
}
if repo.GpgKey != nil {
repoConfig.GPGKey = *repo.GpgKey
if repo.Gpgkey != nil {
repoConfig.GPGKey = *repo.Gpgkey
}
if repo.IgnoreSsl != nil {
repoConfig.IgnoreSSL = *repo.IgnoreSsl