class WhiteCloth::CLI::Commands::Show

@author David Love

Displays a summary of the realm data found in the configured WhiteCloth server.

Public Instance Methods

aliases() click to toggle source

The aliases this sub-command is known by

# File lib/whitecloth/cli/commands/show.rb, line 33
def aliases
  []
end
long_desc() click to toggle source

A longer description, detailing both the purpose and the use of this command

# File lib/whitecloth/cli/commands/show.rb, line 44
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() click to toggle source

The name of the sub-command (as it appears in the command line app)

# File lib/whitecloth/cli/commands/show.rb, line 28
def name
  'show-status'
end
option_definitions() click to toggle source

Define the options for this command

# File lib/whitecloth/cli/commands/show.rb, line 56
def option_definitions
  []
end
run(options, arguments) click to toggle source

Execute the command

# File lib/whitecloth/cli/commands/show.rb, line 61
def run(options, 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() click to toggle source

A short help text describing the purpose of this command

# File lib/whitecloth/cli/commands/show.rb, line 38
def short_desc
  'Create or update information from the network'
end
usage() click to toggle source

Show the user the basic syntax of this command

# File lib/whitecloth/cli/commands/show.rb, line 51
def usage
  "bootstrap show-status"
end