Top Level Namespace
Defined Under Namespace
Classes: RaaS
Instance Method Summary collapse
-
#silence_warnings(&block) ⇒ Object
We stole this piece of code (silence_warnings) from the Internet.
-
#usage ⇒ Object
This is what the program accepts as input.
Instance Method Details
#silence_warnings(&block) ⇒ Object
We stole this piece of code (silence_warnings) from the Internet. We am using it to silence the warnings of the certificates settings (below)
43 44 45 46 47 48 49 |
# File 'lib/RaaSmain.rb', line 43 def silence_warnings(&block) warn_level = $VERBOSE $VERBOSE = nil result = block.call $VERBOSE = warn_level result end |
#usage ⇒ Object
This is what the program accepts as input
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# 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 |