[agent-go]-简化Agent 剔除Harbor K8s Image相关的内容
This commit is contained in:
@@ -102,25 +102,33 @@ func Execute(em *ExecutionMessage) (bool, []string) {
|
||||
|
||||
} else if strings.HasPrefix(em.ExecutionType, "HARBOR") {
|
||||
// harbor function
|
||||
if em.FuncContent == nil || len(em.FuncContent) <= 1 {
|
||||
ok = false
|
||||
resultLog = []string{
|
||||
"[Harbor Execute] - functions args is wrong!",
|
||||
}
|
||||
//if em.FuncContent == nil || len(em.FuncContent) <= 1 {
|
||||
// ok = false
|
||||
// resultLog = []string{
|
||||
// "[Harbor Execute] - functions args is wrong!",
|
||||
// }
|
||||
//}
|
||||
//// Harbor Execute
|
||||
//ok, resultLog = HarborOperatorCache.Exec(em.FuncContent[0], em.FuncContent[1:]...)
|
||||
ok = true
|
||||
resultLog = []string{
|
||||
"null function!",
|
||||
}
|
||||
// Harbor Execute
|
||||
ok, resultLog = HarborOperatorCache.Exec(em.FuncContent[0], em.FuncContent[1:]...)
|
||||
|
||||
} else if strings.HasPrefix(em.ExecutionType, "IMAGE") {
|
||||
// image function
|
||||
if em.FuncContent == nil || len(em.FuncContent) <= 1 {
|
||||
ok = false
|
||||
resultLog = []string{
|
||||
"[Harbor Execute] - functions args is wrong!",
|
||||
}
|
||||
//if em.FuncContent == nil || len(em.FuncContent) <= 1 {
|
||||
// ok = false
|
||||
// resultLog = []string{
|
||||
// "[Harbor Execute] - functions args is wrong!",
|
||||
// }
|
||||
//}
|
||||
//// Harbor Execute
|
||||
//ok, resultLog = AgentOsOperatorCache.Sync(em.FuncContent[0], em.FuncContent[1:]...)
|
||||
ok = true
|
||||
resultLog = []string{
|
||||
"null function!",
|
||||
}
|
||||
// Harbor Execute
|
||||
ok, resultLog = AgentOsOperatorCache.Sync(em.FuncContent[0], em.FuncContent[1:]...)
|
||||
} else {
|
||||
// deprecated
|
||||
// shell command
|
||||
|
||||
Reference in New Issue
Block a user