Skip to content

Instantly share code, notes, and snippets.

@brianredbeard
Created May 31, 2019 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianredbeard/d8fb7c192fbc4fc123f17b2d05528dae to your computer and use it in GitHub Desktop.
Save brianredbeard/d8fb7c192fbc4fc123f17b2d05528dae to your computer and use it in GitHub Desktop.
Generate URLs for Red Hat CoreOS Images
#!/usr/bin/env python3
# requires the requests library:
# pip install requests
import requests
import json
RHCOS_BUILDS="https://raw.githubusercontent.com/openshift/installer/master/data/data/rhcos.json"
builds = requests.get(RHCOS_BUILDS).json()
for image,content in builds["images"].items():
print("# " + image)
print("# SHA-256" + content["sha256"])
print(builds["baseURI"]+content["path"])
print('')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment