Class: Mercury::CLI::Commands::Show
- Inherits:
-
Cri::Command
- Object
- Cri::Command
- Mercury::CLI::Commands::Show
- Defined in:
- lib/mercury/cli/commands/show.rb
Instance Method Summary collapse
- #aliases ⇒ Object
- #long_desc ⇒ Object
- #name ⇒ Object
- #option_definitions ⇒ Object
- #run(options, arguments) ⇒ Object
- #short_desc ⇒ Object
- #usage ⇒ Object
Instance Method Details
#aliases ⇒ Object
24 25 26 |
# File 'lib/mercury/cli/commands/show.rb', line 24 def aliases [] end |
#long_desc ⇒ Object
32 33 34 35 36 |
# File 'lib/mercury/cli/commands/show.rb', line 32 def long_desc "Displays the current state of the evironemnt " + "to update the host files (held in the 'hosts' directory). Existing " + "information will be updated, and missing information inserted.\n" end |
#name ⇒ Object
20 21 22 |
# File 'lib/mercury/cli/commands/show.rb', line 20 def name 'show-status' end |
#option_definitions ⇒ Object
42 43 44 |
# File 'lib/mercury/cli/commands/show.rb', line 42 def option_definitions [] end |
#run(options, arguments) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/mercury/cli/commands/show.rb', line 46 def run(, arguments) # Load the list of groups group_list = YAML::load( File.open("config/groups.yaml")) # Load the list of networks network_list = YAML::load( File.open("config/networks.yaml")) # Update the information in each group-network directory gn_name_list = Array.new network_list.each{|network| puts network[1] net_block = network[1]['ip4-address-block'].to_s # Scan this network # parser = Nmap::Parser.parsescan("nmap", "-sVC " + net_block) puts parser } end |
#short_desc ⇒ Object
28 29 30 |
# File 'lib/mercury/cli/commands/show.rb', line 28 def short_desc 'Create or update information from the network' end |
#usage ⇒ Object
38 39 40 |
# File 'lib/mercury/cli/commands/show.rb', line 38 def usage "bootstrap show-status" end |