mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
fix: add sshPort of listIP result (#2656)
Signed-off-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
parent
39657b3dd9
commit
2e6bad6355
|
|
@ -97,6 +97,7 @@ type SchemaTablePlaybook struct {
|
|||
// It indicates whether the IP is a localhost, if SSH is reachable, and if SSH authorization is present.
|
||||
type IPTable struct {
|
||||
IP string `json:"ip"` // IP address
|
||||
SSHPort string `json:"sshPort"` // SSH port
|
||||
Localhost bool `json:"localhost"` // Whether the IP is a localhost IP
|
||||
SSHReachable bool `json:"sshReachable"` // Whether SSH port is reachable on this IP
|
||||
SSHAuthorized bool `json:"sshAuthorized"` // Whether SSH is authorized for this IP
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ func (h schemaHandler) listIP(request *restful.Request, response *restful.Respon
|
|||
mu.Lock()
|
||||
ipTable = append(ipTable, api.IPTable{
|
||||
IP: ip,
|
||||
SSHPort: string(sshPort),
|
||||
Localhost: true,
|
||||
SSHReachable: true,
|
||||
SSHAuthorized: true,
|
||||
|
|
@ -126,6 +127,7 @@ func (h schemaHandler) listIP(request *restful.Request, response *restful.Respon
|
|||
mu.Lock()
|
||||
ipTable = append(ipTable, api.IPTable{
|
||||
IP: ip,
|
||||
SSHPort: string(sshPort),
|
||||
SSHReachable: reachable,
|
||||
SSHAuthorized: authorized,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue