class InfraCommand

def run(argv)

def run(argv)
  Say.terminal %(planning!)
  parse(argv)
  # grab a config synth
  cfg_synth = Config.resolve_configurations
  # reject empty configurations
  if cfg_synth.empty?
    Say.terminal %(configuration empty, exiting...)
    exit
  end
  Say.terminal JSON.pretty_generate(cfg_synth)
  # preflight checks for the command execution
  # check_run
  # check_target(params[:target], cfg_synth)
  # targets = params[:target].split('.').map(&:to_sym)
  # process_target(targets, cfg_synth)
  ###########################################################################
  # modules
  # modules can be fetched from git or local path
  # modules can have a virtual environment to execute in
  ###########################################################################
  namespaces = cfg_synth[:namespace].keys.map(&:to_sym)
  namespaces.each do |namespace_name|
    namespace     = cfg_synth[:namespace][namespace_name]
    context_names = namespace.keys.map(&:to_sym)
    context_names.each do |cn|
      context = namespace[cn]
      modules = context[:modules]
      modules.each do |mod|
        PangeaModule.process(mod)
      end
    end
  end
  ###########################################################################
  # provide some kind of default exit of the command execution
  exit
end