feat: 网元信息Telnet客户端连接函数

This commit is contained in:
TsMask
2024-06-14 17:00:16 +08:00
parent 4109afcc5b
commit 4b1acc3e25
2 changed files with 40 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package service
import (
"be.ems/src/framework/utils/ssh"
"be.ems/src/framework/utils/telnet"
"be.ems/src/modules/network_element/model"
)
@@ -47,12 +48,16 @@ type INeInfo interface {
// CheckUniqueNeTypeAndNeId 校验同类型下标识是否唯一
CheckUniqueNeTypeAndNeId(neType, neId, id string) bool
// NeRunSSHClient 网元主机的SSH客户端-为创建相关连接
// NeRunSSHClient 网元主机的SSH客户端-为创建相关连接,注意结束后 Close()
NeRunSSHClient(neType, neId string) (*ssh.ConnSSH, error)
// NeRunSSHCmd 网元主机的SSH客户端发送cmd命令
NeRunSSHCmd(neType, neId, cmd string) (string, error)
// NeRunTelnetClient 网元主机的Telnet客户端-为创建相关连接,注意结束后 Close()
// num 是网元主机telnet 14100 25200
NeRunTelnetClient(neType, neId string, num int) (*telnet.ConnTelnet, error)
// neConfOAMRead 网元OAM配置文件读取
NeConfOAMRead(neType, neId string) (map[string]any, error)