[ Project ] 适配前端部分代码
This commit is contained in:
@@ -189,7 +189,7 @@ func parseAgentServerInfo(agentServerInfoConf string) *register.AgentServerInfo
|
||||
}
|
||||
log.Info(fmt.Sprintf("agent server info is %v", string(jsonFormat)))
|
||||
|
||||
// build a operator cache
|
||||
// build operator cache
|
||||
BuildAgentOsOperator(agentServerInfo)
|
||||
|
||||
return agentServerInfo
|
||||
@@ -197,21 +197,13 @@ func parseAgentServerInfo(agentServerInfoConf string) *register.AgentServerInfo
|
||||
|
||||
func BuildAgentOsOperator(agentServerInfo *register.AgentServerInfo) {
|
||||
|
||||
executor.AgentOsOperatorCache = &executor.AgentOsOperator{
|
||||
InstallCommandPrefix: []string{
|
||||
"apt-get", "install", "-y",
|
||||
},
|
||||
RemoveCommandPrefix: []string{"apt", "remove", "-y"},
|
||||
CanAccessInternet: true,
|
||||
IsOsTypeUbuntu: true,
|
||||
IsAgentInnerWall: true,
|
||||
AgentArch: "amd64",
|
||||
AgentOSReleaseCode: "focal",
|
||||
AgentServerInfo: agentServerInfo,
|
||||
}
|
||||
// call the init exec function
|
||||
agentOsOperator := executor.BuildAgentOsOperator(agentServerInfo.OSInfo)
|
||||
|
||||
// assign the agentServerInfo
|
||||
agentOsOperator.AgentServerInfo = agentServerInfo
|
||||
|
||||
// debug
|
||||
marshal, _ := json.Marshal(executor.AgentOsOperatorCache)
|
||||
log.DebugF("cached agent operator is %s", marshal)
|
||||
|
||||
marshal, _ := json.Marshal(agentOsOperator)
|
||||
log.DebugF("[Agent INIT] cached agent operator is %s", marshal)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user