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

[2/4] public library: Implement registration and status/keepalive #279

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

felixsch
Copy link
Contributor

@felixsch felixsch commented Jan 2, 2025

related card: https://trello.com/c/uRZTaz4g/3682-rr1-library-implement-announce-activate-de-activate-and-de-register

This is the public library implementation which is required to allow Rancher Manager to register against SCC.
The general idea is to easily allow products to register themself to SCC and therefore show up as activated product in the systems details.

In this merge request:

  • Add registration and deregistration functionality
  • Add status/keepalive functionality

About the pull requests

There are multiple merge requests which all together implement a useful subset of the overall API functionality of SCC.
[1/4] public library: Implement HTTP connection
[2/4] public library: Implement registration and status/keepalive
[3/4] public library: Implement product activation and extension traversal
[4/4] public library: repository cleanup

I you are here to review these, please start with the first one (this one) and only start with the next merge request when this one is merged. I will update bases accordingly then. Each merge request enhances the public-api-test binary to show demo usage of the implemented functionality in this merge request.

If you want to see a full CI run of this set checkout: #281

How to review this merge request (and all others):

  • Checkout the branch and make sure the documentation looks sane. You can render the documentation using:
$ go install golang.org/x/pkgsite/cmd/pkgsite@latest
$ pkgsite -open .
  • Run the public-api-test application including a demo showing the implementation working
$ make build
$ REGCODE=<regcode> ./out/public-api-test SLES 15.5 x86_64
  • Check if you can spot inconsistencies regarding the implementation. Any areas of improvements?

If you have any questions, need help setting up development environment, do not hesitate to reach out to me 🚀

Thank you! ❤️

@felixsch felixsch changed the base branch from connect-public-library to main January 2, 2025 10:52
@felixsch felixsch changed the base branch from main to connect-public-library January 2, 2025 11:34
@felixsch felixsch force-pushed the connect-public-library-registration branch from 2e9f283 to a6f08bb Compare January 2, 2025 14:55
pkg/registration/status.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mssola mssola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

pkg/registration/register.go Show resolved Hide resolved
pkg/registration/register.go Show resolved Hide resolved
pkg/registration/register.go Show resolved Hide resolved
@mssola mssola force-pushed the connect-public-library branch 3 times, most recently from fd80c1c to 3fb6984 Compare January 9, 2025 11:41
Base automatically changed from connect-public-library to main January 15, 2025 06:27
The registration creates a new system in SCC and allows for performing
the status/keepalive call to update the provided systemInformation.

Note: Instead of historically named hwinfo, here everything is named
systemInformation
@felixsch felixsch force-pushed the connect-public-library-registration branch from a6f08bb to 8568ade Compare January 15, 2025 10:25
@felixsch felixsch force-pushed the connect-public-library-registration branch from 9fb0fba to 242011d Compare January 15, 2025 12:57
Copy link
Contributor

@mssola mssola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@mssola mssola merged commit b2a35d6 into main Jan 15, 2025
2 checks passed
@mssola mssola deleted the connect-public-library-registration branch January 15, 2025 13:54
@felixsch felixsch restored the connect-public-library-registration branch January 15, 2025 14:09
@felixsch felixsch deleted the connect-public-library-registration branch January 15, 2025 15:48
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.

2 participants