0

Downloading Subscription Manifests from the Red Hat Customer Portal

As a frequent user of the Red Hat Customer Portal, one of the things that I commonly need to do is download an updated subscription manifest. In the goal to ‘AUTOMATE ALL THE THINGS’™, I wrote rhsmDownloadManifest.py available in the rhsmTools repository. It’s a pretty straightforward script, which does the following:

  • Take your username and find your account number.
  • Get a list of all the subscription consumers your account number has access to (systems, Satellite & SAM applications).
  • If one of the consumers is of type Satellite or SAM and matches the parameters that are passed to the script, export it with an ISO8601 timestamp.
$ ./rhsmDownloadManifest.py  -l rh_user_account -s Satellite_62
Attempting to connect: https://subscription.rhn.redhat.com/subscription/users/rh_user_account/owners/
Attempting to connect: https://subscription.rhn.redhat.com/subscription/owners/11223344/consumers/
    Attempting to connect: https://subscription.rhn.redhat.com/subscription/consumers/4739ea31-ff26-4327-893e-551610345d6b/export/
    Subscription Management Application Satellite_62 matches parameters. Exporting...
    Writing Manifest to Satellite_62_2016-09-18_12:01:21.zip

Enjoy.

Rich Jerrido

Leave a Reply