def parse_args
      options = { :agent_name => 'instance', :verbose => false }

      parser = Trollop::Parser.new do
        opt :level, "", :type => String, :long => "--log-level", :short => "-l"
        opt :agent
        opt :verbose
        version ""
      end

      parse do
        options.merge!(parser.parse)
        if options[:level]
          fail("Invalid log level '#{options[:level]}'") unless AgentManager::LEVELS.include?(options[:level].to_sym)
        end
        options
      end
    end
def parse_args
      options = { :agent_name => 'instance', :verbose => false }

      parser = Trollop::Parser.new do
        opt :level, "", :type => String, :long => "--log-level", :short => "-l"
        opt :agent
        opt :verbose
        version ""
      end

      parse do
        options.merge!(parser.parse)
        if options[:level]
          fail("Invalid log level '#{options[:level]}'") unless AgentManager::LEVELS.include?(options[:level].to_sym)
        end
        options
      end
    end
Create options hash from command line arguments

 === Return
 options(Hash):: Hash of options as defined by the command line