Last active
August 29, 2015 14:20
-
-
Save cdelashmutt-pivotal/64652b7f3c29ad7ed584 to your computer and use it in GitHub Desktop.
Extract all defaults from PCF product metadata
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
require 'yaml' | |
data_hash = YAML.load_file(ARGV[0]) | |
data_hash["job_types"].each { |job| | |
job_name = job["name"] | |
resource_hash = {} | |
job["resource_definitions"].each { |resdef| | |
resource_hash[resdef["name"]] = resdef["default"] | |
} | |
print job_name, resource_hash | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment