Skip to content

Commit

Permalink
Revert "feat: Disable anonymous cloud registration temporarily"
Browse files Browse the repository at this point in the history
This reverts commit 5a75445.
  • Loading branch information
ptoscano committed Jan 22, 2025
1 parent 8c54d4f commit b0c0f2d
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/subscription_manager/scripts/rhsmcertd_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,16 @@ def _auto_register(cp_provider: "CPProvider") -> ExitStatus:
log.info("Standard automatic registration was successful.")
return ExitStatus.OK

# Uncomment the following block to enable automatic cloud registration v2.
# This feature has been disabled temporarily to ensure we do not cause
# regressions by not having the backend fully prepared and tested.

# if token["tokenType"] == "CP-Anonymous-Cloud-Registration":
# try:
# _auto_register_anonymous(uep=uep, token=token)
# cache.CloudTokenCache.delete_cache()
# except Exception:
# log.exception("Anonymous automatic registration failed.")
# return ExitStatus.REGISTRATION_FAILED
# else:
# log.info("Anonymous automatic registration was successful.")
# return ExitStatus.OK
if token["tokenType"] == "CP-Anonymous-Cloud-Registration":
try:
_auto_register_anonymous(uep=uep, token=token)
cache.CloudTokenCache.delete_cache()
except Exception:
log.exception("Anonymous automatic registration failed.")
return ExitStatus.REGISTRATION_FAILED
else:
log.info("Anonymous automatic registration was successful.")
return ExitStatus.OK

log.error(f"Unsupported token type for automatic registration: {token['tokenType']}.")
return ExitStatus.BAD_TOKEN_TYPE
Expand Down

0 comments on commit b0c0f2d

Please sign in to comment.