class Object
Public Instance Methods
silence_warnings(&block)
click to toggle source
We stole this piece of code (silence_warnings
) from the Internet. We am using it to silence the warnings of the certificates settings (below)
# File lib/RaaSmain.rb, line 43 def silence_warnings(&block) warn_level = $VERBOSE $VERBOSE = nil result = block.call $VERBOSE = warn_level result end
usage()
click to toggle source
This is what the program accepts as input
# File lib/RaaSmain.rb, line 62 def usage puts "\nUsage: #{$PROGRAM_NAME} operation [option1] [option2]\n" puts "\n\toperations: peers|replications|testfailover[or test]|testcleanup[or cleanuptest]|failover[or recovery]" puts "\n\te.g. #{$PROGRAM_NAME} peers" puts "\te.g. #{$PROGRAM_NAME} replications ALL" puts "\te.g. #{$PROGRAM_NAME} replications <VM name>" puts "\te.g. #{$PROGRAM_NAME} testfailover [or test] <VM name>" puts "\te.g. #{$PROGRAM_NAME} testfailover [or test] ALL" puts "\te.g. #{$PROGRAM_NAME} testcleanup [or cleanuptest] <VM name>" puts "\te.g. #{$PROGRAM_NAME} testcleanup [or cleanuptest] cleanuptest ALL" puts "\te.g. #{$PROGRAM_NAME} failover [or recovery] <VM name>" puts "\te.g. #{$PROGRAM_NAME} failover [or recovery] recovery ALL" puts "\n" end