mirror of https://github.com/allinssl/allinssl
parent
d3f9b05335
commit
85eaf5d4c0
|
@ -273,7 +273,14 @@ func SSHAPITest(providerID string) error {
|
||||||
default:
|
default:
|
||||||
port = "22"
|
port = "22"
|
||||||
}
|
}
|
||||||
|
IPtype := public.CheckIPType(providerConfig.Host)
|
||||||
|
if IPtype == "IPv6" {
|
||||||
|
providerConfig.Host = "[" + providerConfig.Host + "]"
|
||||||
|
}
|
||||||
addr := fmt.Sprintf("%s:%s", providerConfig.Host, port)
|
addr := fmt.Sprintf("%s:%s", providerConfig.Host, port)
|
||||||
|
if providerConfig.Mode == "" || providerConfig.Mode == "password" {
|
||||||
|
providerConfig.PrivateKey = ""
|
||||||
|
}
|
||||||
|
|
||||||
authMethods, err := buildAuthMethods(providerConfig.Password, providerConfig.PrivateKey)
|
authMethods, err := buildAuthMethods(providerConfig.Password, providerConfig.PrivateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -264,7 +264,10 @@ func RunNode(node *WorkflowNode, ctx *ExecutionContext) error {
|
||||||
lastStatus := ctx.GetStatus(node.Config["fromNodeId"].(string))
|
lastStatus := ctx.GetStatus(node.Config["fromNodeId"].(string))
|
||||||
for _, branch := range node.ConditionNodes {
|
for _, branch := range node.ConditionNodes {
|
||||||
if branch.Config["type"] == string(lastStatus) {
|
if branch.Config["type"] == string(lastStatus) {
|
||||||
return RunNode(branch, ctx)
|
err := RunNode(branch, ctx)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("执行条件分支失败: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue