Esempio n. 1
0
func NewRemoteRedisBackup(sshCfg command.SshConfig) (*RedisBackup, error) {
	lo.G.Debug("setting up a new remote MongoDump Object")
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &RedisBackup{
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
Esempio n. 2
0
func createExecuter(hostname, opsManagerUsername, opsManagerPassword string, port int) (remoteExecuter command.Executer, err error) {
	remoteExecuter, err = command.NewRemoteExecutor(command.SshConfig{
		Username: opsManagerUsername,
		Password: opsManagerPassword,
		Host:     hostname,
		Port:     port,
	})
	return
}
Esempio n. 3
0
func createExecuter(hostname, tempestpassword string) (remoteExecuter command.Executer, err error) {
	remoteExecuter, err = command.NewRemoteExecutor(command.SshConfig{
		Username: OPSMGR_DEFAULT_USER,
		Password: tempestpassword,
		Host:     hostname,
		Port:     22,
	})
	return
}
Esempio n. 4
0
func NewRemoteMysqlDump(username, password string, sshCfg command.SshConfig) (*MysqlDump, error) {
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &MysqlDump{
		Ip:        "localhost",
		Username:  username,
		Password:  password,
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
Esempio n. 5
0
func (context *OpsManager) createExecuter() (err error) {
	context.Executer, err = command.NewRemoteExecutor(command.SshConfig{
		Username: context.SSHUsername,
		Password: context.SSHPassword,
		Host:     context.Hostname,
		Port:     context.SSHPort,
		SSLKey:   context.SSHPrivateKey,
	})
	return
}
Esempio n. 6
0
func NewRemoteMongoDump(username, password string, sshCfg command.SshConfig) (*MongoDump, error) {
	lo.G.Debug("setting up a new remote MongoDump Object")
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &MongoDump{
		IP:        "localhost",
		Username:  username,
		Password:  password,
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
Esempio n. 7
0
func NewPgRemoteDump(port int, database, username, password string, sshCfg command.SshConfig) (*PgDump, error) {
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &PgDump{
		sshCfg:    sshCfg,
		Ip:        "localhost",
		Port:      port,
		Database:  database,
		Username:  username,
		Password:  password,
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}