Last active
August 29, 2015 14:27
-
-
Save vinyar/0c0d83f376e7f3590255 to your computer and use it in GitHub Desktop.
Pulling out pega space requirements via ruby
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 'nokogiri' | |
file = File.open('/pega_cookbook/files/default/prpcUtils.xml') | |
doc = Nokogiri::XML(f) | |
needed = doc.xpath("//pega:hasenoughspace/@needed").text |
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
raise 'Not enough space available for Pega deployment' if node['filesystem']['/dev/xvda1']['kb_available'] < needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment