Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update system from hybrid to payg if no more non free products active #1217

Merged
merged 9 commits into from
Aug 28, 2024

Conversation

jesusbv
Copy link
Collaborator

@jesusbv jesusbv commented Aug 27, 2024

Description

When deactivating a product on a hybrid system, if there are no more non free product active for that system on SCC, that system is no longer hybrid but payg and should get updated on the db

How to test

  • start a SLES 15.4 PAYG instance
  • activate LTSS (registercloudguest -r FOO)
  • check is active SUSEConnect -l and see LTSS being active
  • remove LTSS (SUSEConnect -d -p LTSS)
  • the system must be payg / 1 in the db, in the RMT server, access the db, and run
select proxy_byos_mode from systems where login = 'SCC_that_system_login'

The value for that field should be 1

Change Type

Please select the correct option.

  • Bug Fix (a non-breaking change which fixes an issue)
  • New Feature (a non-breaking change which adds new functionality)
  • Documentation Update (a change which only updates documentation)

Checklist

Please check off each item if the requirement is met.

  • I have reviewed my own code and believe that it's ready for an external review.
  • I have provided comments for any hard-to-understand code.
  • I have documented the MANUAL.md file with any changes to the user experience.
  • If my changes are non-trivial, I have added a changelog entry to notify users at package/obs/rmt-server.changes.

Review

Please check out our review guidelines
and get in touch with the author to get a shared understanding of the change.

When deactivating a product on a hybrid system, if there are no more
non free product active for that system on SCC, that system is no longer
hybrid but payg and should get updated on the db
@jesusbv jesusbv requested review from digitaltom and rjschwei August 27, 2024 17:01
@jesusbv jesusbv self-assigned this Aug 27, 2024
@jesusbv jesusbv requested a review from digitaltom August 28, 2024 09:16
Remove one line method and move the check to the method call
Move the exception handling to SccProxy's deactive_product_scc method
Rename method for accuracy
If a hybrid system deactivates a product from SCC
and has no more products on SCC, the system becomes PAYG
and, as such, it should be deregister from SCC
@jesusbv jesusbv merged commit 2010b3c into master Aug 28, 2024
3 checks passed
@jesusbv jesusbv deleted the hybrid-to-payg-prod-deactivation branch August 28, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants