[WIP] Free flag on smt (bsc#970990) #264
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See bug https://bugzilla.suse.com/show_bug.cgi?id=970990
Unfortunately this won't work correctly in all cases. The SCC vs. SMT detection is currently done via the registration server URL.
This will work correctly with the SCC or an SMT server. However, this will break when using the SCC Proxy. In that case the URL is different than the SCC server but the specified server (the proxy) just forwards the registration to the real SCC. And SCC (in contrast to SMT) will require registration codes.
Unfortunately the SCC Proxy is used in openQA so we cannot ignore this use case.
The proposed solutions:
free
, which defines whether the addon is paid, we could add a new flag (e.g.regcode_required
) which would tell that the server requires a reg. code for this addon.Unfortunately this would need a change on the SMT and SCC side. (Or at least on the SCC side, we could use default
false
for SMT when the value is missing in the response.)The question is whether this is possible and how reliable it is...
Trying blindly registering an addon sounds a bit strange, we would need carefully check for the errors, esp. finding that it's just because of a missing reg. code would be tricky and likely fragile.
Any other opinions, suggestions?