Created
May 31, 2019 19:16
-
-
Save brianredbeard/d8fb7c192fbc4fc123f17b2d05528dae to your computer and use it in GitHub Desktop.
Generate URLs for Red Hat CoreOS Images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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