cloudapi: make Repository.rhsm optional
I think that we can spare the users of clouadpi of writing "rhsm": "false" into the requests so I decided to make this property optional and default to false. This is nice because it matches the behaviour of Weldr repositories and sources so we can also use test/data/repositories without any changes after openapi validation is enabled. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
616258ee25
commit
de46e85712
4 changed files with 113 additions and 109 deletions
|
|
@ -1010,7 +1010,8 @@ func collectRepos(irRepos, payloadRepositories []Repository, payloadPackageSets
|
|||
|
||||
func genRepoConfig(repo Repository) (*rpmmd.RepoConfig, error) {
|
||||
repoConfig := new(rpmmd.RepoConfig)
|
||||
repoConfig.RHSM = repo.Rhsm
|
||||
|
||||
repoConfig.RHSM = repo.Rhsm != nil && *repo.Rhsm
|
||||
|
||||
if repo.Baseurl != nil {
|
||||
repoConfig.BaseURL = *repo.Baseurl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue