[ Agent ] [ Executor ] 初步完成部署的函数功能
This commit is contained in:
@@ -27,6 +27,9 @@ type AgentOsOperator struct {
|
||||
AgentOSReleaseCode string `json:"agent_os_release_code",comment:"主机操作系统的发行版代号, focal之类的"`
|
||||
|
||||
AgentServerInfo *register.AgentServerInfo `json:"agent_server_info"`
|
||||
|
||||
// 离线下载URL地址
|
||||
OssOfflinePrefix string
|
||||
}
|
||||
|
||||
// Exec 执行基础功能函数
|
||||
@@ -86,7 +89,6 @@ func (op *AgentOsOperator) Exec(baseFuncName string, funcArgs ...string) []strin
|
||||
break
|
||||
default:
|
||||
multiLineCommand = op.ok(funcArgs)
|
||||
|
||||
}
|
||||
|
||||
log.DebugF("multiLineCommand are => %v", multiLineCommand)
|
||||
@@ -95,7 +97,10 @@ func (op *AgentOsOperator) Exec(baseFuncName string, funcArgs ...string) []strin
|
||||
|
||||
// exec the command here
|
||||
for _, singleLineCommand := range multiLineCommand {
|
||||
result = append(result, AllOutputCommandExecutor(singleLineCommand)...)
|
||||
singleCommandResult := AllOutputCommandExecutor(singleLineCommand)
|
||||
|
||||
result = append(result, "")
|
||||
result = append(result, singleCommandResult...)
|
||||
|
||||
// debug usage
|
||||
log.DebugF("exec result are => %v", result)
|
||||
|
||||
Reference in New Issue
Block a user