Documentation
¶
Index ¶
- Constants
- func Ask_usrinput_int(message_to_show string) (int, error)
- func Ask_usrinput_passwd_string(message_to_show string) string
- func Ask_usrinput_string(message_to_show string) string
- func CheckSSHforRebootingAfterDelay(client *ssh.Client, timeAmount int) bool
- func ConnectDB(user, password, dbname string)
- func ConnectWithRetry(hostIP string, port int, username string, password string, maxRetries int) *ssh.Client
- func ConvertParamPostgresToMysql(query string) string
- func DBexec(query DBQuery, args ...interface{}) (sql.Result, error)
- func DBslect(query DBQuery, args ...interface{}) (*sql.Rows, error)
- func Enable_common_jobnets()
- func Formatted_log(level int, unfmt string, arg ...any) string
- func GenerateExcelFile(yamlFiles []string, outputExcel, testerName string) error
- func Generate_sshkeys(key_filepath string)
- func GetSSHClient(hostIP string, port int, username string, password string) (*ssh.Client, error)
- func GetSSHClientWithKey(hostIP string, port int, username string, keyfilepath string) (*ssh.Client, error)
- func GetSingleRow(query DBQuery, args []interface{}, dest ...interface{}) error
- func Get_file_trunc(filepath string, flag int, permission os.FileMode) *os.File
- func Get_formatted_time() string
- func Get_host(hosts []common.Host, host_type common.Host_type) (common.Host, error)
- func Get_hosts(hosts []common.Host, host_types ...common.Host_type) ([]common.Host, error)
- func Get_hosts_from_jsonfile(jsonfilepath string)
- func Get_log_filepath() string
- func Get_res_no(stdout string) (string, error)
- func Get_str_str_map(keysAndValues ...string) (map[string]string, error)
- func JobProcessDBCountCheck(targetProcessCount int, timeoutDuration int, inner_jobnet_main_id string, ...) error
- func Jobarg_enable_jobnet(jobnet_id string, jobnet_name string) error
- func Logi(level int, unfmt string, arg ...any) string
- func Set_host_pool(jsonfilepath string)
- func Set_hosts_to_jsonfile(hosts *[]common.Host, json_filepath string)
- type DBQuery
Constants ¶
View Source
const ( NoColCount = 3 PreOperationColCount = 17 OperationColCount = 17 ExpectedResultsColCount = 17 DurationColCount = 2 ResultColCount = 1 TestedDateColCount = 3 TestedByColCount = 3 )
number of columns to be merged
Variables ¶
This section is empty.
Functions ¶
func Ask_usrinput_int ¶
func Ask_usrinput_string ¶
func CheckSSHforRebootingAfterDelay ¶
CheckSSHforRebootingAfterDelay checks if the system is up using SSH connection after waiting for a specified timeAmount.
func ConnectDB ¶
func ConnectDB(user, password, dbname string)
ConnectDB initializes the database connection
func ConnectWithRetry ¶
func ConvertParamPostgresToMysql ¶
Converts the parameter in postgresql query to a compatible version for mysql
func Enable_common_jobnets ¶
func Enable_common_jobnets()
func GenerateExcelFile ¶
func Generate_sshkeys ¶
func Generate_sshkeys(key_filepath string)
func GetSSHClient ¶
This is new function of GetSSHClient that does not exit on error.
func GetSSHClientWithKey ¶
func GetSingleRow ¶
This function will execute the query that will get exactly one row
func Get_file_trunc ¶
func Get_formatted_time ¶
func Get_formatted_time() string
func Get_hosts_from_jsonfile ¶
func Get_hosts_from_jsonfile(jsonfilepath string)
func Get_log_filepath ¶
func Get_log_filepath() string
func Get_res_no ¶
func Get_str_str_map ¶
Get_str_str_map_single() gives [string]string map.
func JobProcessDBCountCheck ¶
func JobProcessDBCountCheck(targetProcessCount int, timeoutDuration int, inner_jobnet_main_id string, query DBQuery, args ...interface{}) error
Check count of the query
func Jobarg_enable_jobnet ¶
func Logi ¶
This function will write log with ticket and testcase numbers. If you call this function outside of testcase function, ticket and testcase numbers will be zero.
func Set_host_pool ¶
func Set_host_pool(jsonfilepath string)
func Set_hosts_to_jsonfile ¶
Types ¶
type DBQuery ¶
type DBQuery string
const ( DeleteRunJobnetQuery DBQuery = "DELETE FROM ja_run_jobnet_table" AbortSingleFWaitJobQuery DBQuery = `` /* 155-byte string literal not displayed */ CheckJobStatusCountQuery DBQuery = "SELECT count(*) FROM ja_run_job_table where status = 4 and job_type = 4 and inner_jobnet_main_id = $1" AbortExtJobQuery DBQuery = `UPDATE ja_run_jobnet_summary_table SET jobnet_abort_flag = 1 WHERE inner_jobnet_id = ?` AbortJobnetQuery DBQuery = "UPDATE ja_run_jobnet_summary_table SET jobnet_abort_flag = 1 WHERE inner_jobnet_id = $1" AbortSingleJOBIconQuery DBQuery = "UPDATE ja_run_job_table SET method_flag = 3 WHERE inner_jobnet_id = $1" CheckJobnetDoneWithRed DBQuery = "select * from ja_run_jobnet_table where status = 2 or status = 6" CheckAllRunCount DBQuery = `` /* 1202-byte string literal not displayed */ )
Click to show internal directories.
Click to hide internal directories.