func (c *Client) FindTools(majorVersion, minorVersion int, osType, arch, agentStream string) (result params.FindToolsResult, err error) {
	if c.facade.BestAPIVersion() == 1 && agentStream != "" {
		return params.FindToolsResult{}, errors.New(
			"passing agent-stream not supported by the controller")
	}
	args := params.FindToolsParams{
		MajorVersion: majorVersion,
		MinorVersion: minorVersion,
		Arch:         arch,
		OSType:       osType,
		AgentStream:  agentStream,
	}
	err = c.facade.FacadeCall("FindTools", args, &result)
	if err != nil {
		return result, errors.Trace(err)
	}
	if result.Error != nil {
		err = result.Error
		// We need to deal with older controllers.
		if strings.HasSuffix(result.Error.Message, "not valid") {
			err = errors.NewNotValid(result.Error, "finding tools")
		}
		if params.IsCodeNotFound(err) {
			err = errors.NewNotFound(err, "finding tools")
		}
	}
	return result, err
}
// FindTools returns a List containing all tools matching the specified parameters.
FindTools returns a List containing all tools matching the specified parameters.
// FindTools returns a List containing all tools matching the specified parameters .
func (c *Client) FindTools(majorVersion, minorVersion int, osType, arch, agentStream string) (result params.FindToolsResult, err error) {
	if c.facade.BestAPIVersion() == 1 && agentStream != "" {
		return params.FindToolsResult{}, errors.New(
			"passing agent-stream not supported by the controller")
	}
	args := params.FindToolsParams{
		MajorVersion: majorVersion,
		MinorVersion: minorVersion,
		Arch:         arch,
		OSType:       osType,
		AgentStream:  agentStream,
	}
	err = c.facade.FacadeCall("FindTools", args, &result)
	if err != nil {
		return result, errors.Trace(err)
	}
	if result.Error != nil {
		err = result.Error
		if strings.HasSuffix(result.Error.Message, "not valid") {
			err = errors.NewNotValid(result.Error, "finding tools")
		}
		if params.IsCodeNotFound(err) {
			err = errors.NewNotFound(err, "finding tools")
		}
	}
	return result, err
}
func ( c * Client ) FindTools ( majorVersion , minorVersion int , osType , arch , agentStream string ) ( result params . FindToolsResult , err error ) { if c . facade . BestAPIVersion ( ) == 1 && agentStream != " " { return params . FindToolsResult { } , errors . New ( " " ) } args := params . FindToolsParams { MajorVersion : majorVersion , MinorVersion : minorVersion , Arch : arch , OSType : osType , AgentStream : agentStream , } err = c . facade . FacadeCall ( " " , args , & result ) if err != nil { return result , errors . Trace ( err ) } if result . Error != nil { err = result . Error if strings . HasSuffix ( result . Error . Message , " " ) { err = errors . NewNotValid ( result . Error , " " ) } if params . IsCodeNotFound ( err ) { err = errors . NewNotFound ( err , " " ) } } return result , err }
FindTools returns a List containing all tools matching the specified parameters.
FindTools returns a List containing all tools matching the specified parameters .
// We need to deal with older controllers.