def parse_common(opts, options)

      opts.on("--test") do 
        options[:user] = 'test'
        options[:pass] = 'testing'
        options[:vhost] = '/right_net'
        options[:test] = true
        options[:pid_dir] = Dir.tmpdir
        options[:base_id] = "#{rand(1000000)}"
        options[:options][:log_dir] = Dir.tmpdir
      end

      opts.on("-i", "--identity ID") do |id|
        options[:base_id] = id
      end

      opts.on("-t", "--token TOKEN") do |t|
        options[:token] = t
      end

      opts.on("-S", "--secure-identity") do
        options[:secure_identity] = true
      end

      opts.on("-x", "--prefix PREFIX") do |p|
        options[:prefix] = p
      end

      opts.on("--url URL") do |url|
        uri = URI.parse(url)
        options[:user]  = uri.user     if uri.user
        options[:pass]  = uri.password if uri.password
        options[:host]  = uri.host
        options[:port]  = uri.port     if uri.port
        options[:vhost] = uri.path     if (uri.path && !uri.path.empty?)
      end
      
      opts.on("-u", "--user USER") do |user|
        options[:user] = user
      end

      opts.on("-p", "--pass PASSWORD") do |pass|
        options[:pass] = pass
      end

      opts.on("-v", "--vhost VHOST") do |vhost|
        options[:vhost] = vhost
      end

      opts.on("-P", "--port PORT") do |port|
        options[:port] = port
      end

      opts.on("-h", "--host HOST") do |host|
        options[:host] = host
      end

      opts.on('--type TYPE') do |t|
        options[:agent_type] = t
      end

      opts.on_tail("--help") do
        puts Usage.scan(__FILE__)
        exit
      end

      opts.on_tail("--version") do
        puts version
        exit
      end
      true
    end
def parse_common(opts, options)

      opts.on("--test") do 
        options[:user] = 'test'
        options[:pass] = 'testing'
        options[:vhost] = '/right_net'
        options[:test] = true
        options[:pid_dir] = Dir.tmpdir
        options[:base_id] = "#{rand(1000000)}"
        options[:options][:log_dir] = Dir.tmpdir
      end

      opts.on("-i", "--identity ID") do |id|
        options[:base_id] = id
      end

      opts.on("-t", "--token TOKEN") do |t|
        options[:token] = t
      end

      opts.on("-S", "--secure-identity") do
        options[:secure_identity] = true
      end

      opts.on("-x", "--prefix PREFIX") do |p|
        options[:prefix] = p
      end

      opts.on("--url URL") do |url|
        uri = URI.parse(url)
        options[:user]  = uri.user     if uri.user
        options[:pass]  = uri.password if uri.password
        options[:host]  = uri.host
        options[:port]  = uri.port     if uri.port
        options[:vhost] = uri.path     if (uri.path && !uri.path.empty?)
      end
      
      opts.on("-u", "--user USER") do |user|
        options[:user] = user
      end

      opts.on("-p", "--pass PASSWORD") do |pass|
        options[:pass] = pass
      end

      opts.on("-v", "--vhost VHOST") do |vhost|
        options[:vhost] = vhost
      end

      opts.on("-P", "--port PORT") do |port|
        options[:port] = port
      end

      opts.on("-h", "--host HOST") do |host|
        options[:host] = host
      end

      opts.on('--type TYPE') do |t|
        options[:agent_type] = t
      end

      opts.on_tail("--help") do
        puts Usage.scan(__FILE__)
        exit
      end

      opts.on_tail("--version") do
        puts version
        exit
      end
      true
    end
Parse common options between rad and rnac

 === Parameters
 opts(OptionParser):: Options parser with options to be parsed
 options(Hash):: Storage for options that are parsed

 === Return
 true:: Always return true