def resolve_identity(options)
      options[:agent_type] = agent_type(options[:agent_type], options[:agent_name])
      if options[:base_id]
        base_id = options[:base_id].to_i
        if base_id.abs.to_s != options[:base_id]
          puts "** Identity needs to be a positive integer"
          exit(1)
        end
        token = if options[:secure_identity]
          RightScale::SecureIdentity.derive(base_id, options[:token])
        else
          options[:token]
        end
        options[:identity] = AgentIdentity.new(options[:prefix] || 'rs', options[:agent_type], base_id, token).to_s
      end
    end
def resolve_identity(options)
      options[:agent_type] = agent_type(options[:agent_type], options[:agent_name])
      if options[:base_id]
        base_id = options[:base_id].to_i
        if base_id.abs.to_s != options[:base_id]
          puts "** Identity needs to be a positive integer"
          exit(1)
        end
        token = if options[:secure_identity]
          RightScale::SecureIdentity.derive(base_id, options[:token])
        else
          options[:token]
        end
        options[:identity] = AgentIdentity.new(options[:prefix] || 'rs', options[:agent_type], base_id, token).to_s
      end
    end
Generate agent identity from options
 Build identity from base_id, token, prefix and agent name

 === Parameters
 options(Hash):: Hash containing identity components

 === Return
 options(Hash)::