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.