feat(region): return forwardDetails when query server sshable

This commit is contained in:
rainzm
2021-04-27 12:01:35 +08:00
parent 72cac9aa15
commit fb1fb906fa
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -28,6 +28,13 @@ type GuestSshableMethodData struct {
Sshable bool
Reason string
ForwardDetails ForwardDetails
}
type ForwardDetails struct {
ProxyAgentId string
ProxyEndpointId string
}
type GuestSshableOutput struct {
+4
View File
@@ -283,6 +283,10 @@ func (guest *SGuest) sshableTryForward(
Method: compute_api.MethodProxyForward,
Host: fwd.BindAddr,
Port: fwd.BindPort,
ForwardDetails: compute_api.ForwardDetails{
ProxyAgentId: fwd.ProxyAgentId,
ProxyEndpointId: fwd.ProxyEndpointId,
},
}
return guest.sshableTry(
ctx, tryData, methodData,