feat(region): return forwardDetails when query server sshable

This commit is contained in:
rainzm
2021-04-26 19:25:18 +08:00
parent 03066fed94
commit 9a651dad3f
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,