Created
June 23, 2014 19:14
-
-
Save anonymous/e7c70286dbfa8b788867 to your computer and use it in GitHub Desktop.
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
def get_backup_metrics_per_node(node) | |
rest = ::Chef::REST.new(::Chef::Config[:chef_server_url]) | |
res = {} | |
configured_backups.each_key do |type| | |
configured_backups[type].each_key do |subtype| | |
next unless configured_backups[type][subtype]['metrics'] | |
res[type] = {} unless res[type] | |
res[type][subtype] = {} unless res[type][subtype] | |
res[type][subtype]['metrics'] = configured_backups[type][subtype]['metrics'] | |
end | |
end | |
res | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment