Source:
<code>protected void executeCommand() { GlusterVolumeGeoRepCreateParameters parameter = getParameters(); String slaveHost = parameter.getSlaveHost(); String slaveSShFingerPrint = GlusterUtil.getInstance().getHostSSHFingerPrint(slaveHost); VDSReturnValue sessionCreateReturnValue = null; VDSReturnValue passwordlessSSHCreateReturnValue = runVdsCommand(VDSCommandType.CreatePasswordLessSSHSession, new GlusterSshSessionParameters(slaveHost, slaveSShFingerPrint, parameter.getUserName(), parameter.getSlaveUserPassword())); if (passwordlessSSHCreateReturnValue.getSucceeded()) { sessionCreateReturnValue = runVdsCommand(VDSCommandType.GlusterVolumeGeoRepSessionCreate, new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), masterVolume.getName(), slaveHost, parameter.getSlaveVolumeName(), parameter.isForce())); if (!sessionCreateReturnValue.getSucceeded()) { handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_CREATE_FAILED, sessionCreateReturnValue.getVdsError().getMessage()); return; } <START> setSucceeded(sessionCreateReturnValue.getSucceeded()); <END> } else { handleVdsError(AuditLogType.GLUSTER_VOLUME_PASSWORD_LESS_SSH_FAILED, passwordlessSSHCreateReturnValue.getVdsError().getMessage()); setSucceeded(false); } getReturnValue().setActionReturnValue(sessionCreateReturnValue); }</code><technical_language>Add entry in database, session is created</technical_language>

Target:
protected void executeCommand() { GlusterVolumeGeoRepCreateParameters parameter = getParameters(); String slaveHost = parameter.getSlaveHost(); String slaveSShFingerPrint = GlusterUtil.getInstance().getHostSSHFingerPrint(slaveHost); VDSReturnValue sessionCreateReturnValue = null; VDSReturnValue passwordlessSSHCreateReturnValue = runVdsCommand(VDSCommandType.CreatePasswordLessSSHSession, new GlusterSshSessionParameters(slaveHost, slaveSShFingerPrint, parameter.getUserName(), parameter.getSlaveUserPassword())); if (passwordlessSSHCreateReturnValue.getSucceeded()) { sessionCreateReturnValue = runVdsCommand(VDSCommandType.GlusterVolumeGeoRepSessionCreate, new GlusterVolumeGeoRepSessionVDSParameters(upServer.getId(), masterVolume.getName(), slaveHost, parameter.getSlaveVolumeName(), parameter.isForce())); if (!sessionCreateReturnValue.getSucceeded()) { handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_CREATE_FAILED, sessionCreateReturnValue.getVdsError().getMessage()); return; } setSucceeded(sessionCreateReturnValue.getSucceeded()); GlusterGeoRepSession newSession = new GlusterGeoRepSession(); newSession.setMasterVolumeId(masterVolume.getId()); newSession.setMasterVolumeName(masterVolume.getName()); newSession.setSlaveHostName(slaveHost); newSession.setSlaveVolumeName(parameter.getSlaveVolumeName()); newSession.setSlaveVolumeId(getGlusterVolumeDao().getByName(getVdsDAO().getByName(slaveHost).getVdsGroupId(), parameter.getSlaveVolumeName()).getId()); newSession.setSlaveNodeUuid(getVdsDAO().getByName(slaveHost).getId()); getGlusterGeoRepDao().save(newSession); } else { handleVdsError(AuditLogType.GLUSTER_VOLUME_PASSWORD_LESS_SSH_FAILED, passwordlessSSHCreateReturnValue.getVdsError().getMessage()); setSucceeded(false); } getReturnValue().setActionReturnValue(sessionCreateReturnValue); }