Dhandapani Gopal has uploaded a new change for review. Change subject: engine: Changed "Host" to "Server" ......................................................................
engine: Changed "Host" to "Server" Changed existing "Host" to "Server" in Add Gluster Server related sources, since server is more appropriate in gluster context. Change-Id: Ia37048f232b40387f6871050926df6815280fe1e Signed-off-by: Dhandapani <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/AddGlusterServerVDSParameters.java D backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterHostAddVDSParameters.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties A backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AddGlusterServerVDSCommand.java D backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterHostAddVDSCommand.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java M frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties 14 files changed, 66 insertions(+), 64 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/21/9821/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java index 8c85d5f..fb9ad82 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; + import javax.naming.AuthenticationException; import org.apache.commons.lang.StringUtils; @@ -41,16 +42,16 @@ import org.ovirt.engine.core.common.validation.group.PowerManagementCheck; import org.ovirt.engine.core.common.vdscommands.VDSCommandType; import org.ovirt.engine.core.common.vdscommands.VDSReturnValue; -import org.ovirt.engine.core.common.vdscommands.gluster.GlusterHostAddVDSParameters; +import org.ovirt.engine.core.common.vdscommands.gluster.AddGlusterServerVDSParameters; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.dal.VdcBllMessages; import org.ovirt.engine.core.dal.dbbroker.DbFacade; import org.ovirt.engine.core.dal.job.ExecutionMessageDirector; import org.ovirt.engine.core.utils.FileUtil; +import org.ovirt.engine.core.utils.ssh.SSHClient; import org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil; import org.ovirt.engine.core.utils.transaction.TransactionMethod; import org.ovirt.engine.core.utils.transaction.TransactionSupport; -import org.ovirt.engine.core.utils.ssh.SSHClient; @NonTransactiveCommandAttribute(forceCompensation = true) public class AddVdsCommand<T extends AddVdsActionParameters> extends VdsCommand<T> { @@ -167,14 +168,14 @@ : getParameters().getvds().gethost_name(); VDSReturnValue returnValue = runVdsCommand( - VDSCommandType.GlusterHostAdd, - new GlusterHostAddVDSParameters(upServer.getId(), + VDSCommandType.AddGlusterServer, + new AddGlusterServerVDSParameters(upServer.getId(), hostName)); setSucceeded(returnValue.getSucceeded()); if (!getSucceeded()) { getReturnValue().getFault().setError(returnValue.getVdsError().getCode()); getReturnValue().getFault().setMessage(returnValue.getVdsError().getMessage()); - errorType = AuditLogType.GLUSTER_HOST_ADD_FAILED; + errorType = AuditLogType.GLUSTER_SERVER_ADD_FAILED; return; } } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java index ce9008e..9175a6e 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java @@ -20,7 +20,7 @@ import org.ovirt.engine.core.common.businessentities.storage_pool; import org.ovirt.engine.core.common.vdscommands.VDSCommandType; import org.ovirt.engine.core.common.vdscommands.VDSReturnValue; -import org.ovirt.engine.core.common.vdscommands.gluster.GlusterHostAddVDSParameters; +import org.ovirt.engine.core.common.vdscommands.gluster.AddGlusterServerVDSParameters; import org.ovirt.engine.core.common.vdscommands.gluster.RemoveGlusterServerVDSParameters; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.compat.TransactionScopeOption; @@ -208,12 +208,12 @@ : getVds().gethost_name(); VDSReturnValue returnValue = runVdsCommand( - VDSCommandType.GlusterHostAdd, - new GlusterHostAddVDSParameters(getClusterUtils().getUpServer(targetClusterId).getId(), + VDSCommandType.AddGlusterServer, + new AddGlusterServerVDSParameters(getClusterUtils().getUpServer(targetClusterId).getId(), hostName)); if (!returnValue.getSucceeded()) { handleVdsError(returnValue); - errorType = AuditLogType.GLUSTER_HOST_ADD_FAILED; + errorType = AuditLogType.GLUSTER_SERVER_ADD_FAILED; return false; } return true; diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java index 6b81d69..0d87ab3 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java @@ -30,7 +30,7 @@ import org.ovirt.engine.core.common.vdscommands.VDSReturnValue; import org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase; import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase; -import org.ovirt.engine.core.common.vdscommands.gluster.GlusterHostAddVDSParameters; +import org.ovirt.engine.core.common.vdscommands.gluster.AddGlusterServerVDSParameters; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.dal.dbbroker.DbFacade; import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector; @@ -186,7 +186,7 @@ if (!_glusterPeerListSucceeded) { type = AuditLogType.GLUSTER_SERVERS_LIST_FAILED; } else if (!_glusterPeerProbeSucceeded) { - type = AuditLogType.GLUSTER_HOST_ADD_FAILED; + type = AuditLogType.GLUSTER_SERVER_ADD_FAILED; } } return type; @@ -295,12 +295,12 @@ private boolean glusterPeerProbe(Guid upServerId, String newServerName) { try { - VDSReturnValue returnValue = runVdsCommand(VDSCommandType.GlusterHostAdd, - new GlusterHostAddVDSParameters(upServerId, newServerName)); + VDSReturnValue returnValue = runVdsCommand(VDSCommandType.AddGlusterServer, + new AddGlusterServerVDSParameters(upServerId, newServerName)); if (!returnValue.getSucceeded()) { getReturnValue().getFault().setError(returnValue.getVdsError().getCode()); getReturnValue().getFault().setMessage(returnValue.getVdsError().getMessage()); - AuditLogDirector.log(new AuditLogableBase(getVdsId()), AuditLogType.GLUSTER_HOST_ADD_FAILED); + AuditLogDirector.log(new AuditLogableBase(getVdsId()), AuditLogType.GLUSTER_SERVER_ADD_FAILED); _glusterPeerProbeSucceeded = false; } return returnValue.getSucceeded(); diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java index a1f8fc6..5f61344 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java @@ -224,7 +224,7 @@ GLUSTER_SERVER_REMOVED_FROM_CLI(4033), GLUSTER_VOLUME_INFO_FAILED(4034), GLUSTER_COMMAND_FAILED(4035), - GLUSTER_HOST_ADD_FAILED(4436), + GLUSTER_SERVER_ADD_FAILED(4436), GLUSTER_SERVERS_LIST_FAILED(4437), GLUSTER_SERVER_REMOVE(4038), diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java index 09b84c3..1ec8479 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java @@ -56,7 +56,7 @@ AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_FAILED); AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_START); AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED); - AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.GLUSTER_HOST_ADD_FAILED); + AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.GLUSTER_SERVER_ADD_FAILED); AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.GLUSTER_SERVER_REMOVE); AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.GLUSTER_SERVER_REMOVE_FAILED); AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_PROFILE_START); diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java index 726bd07..032736e 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java @@ -134,7 +134,7 @@ AddBricksToGlusterVolume("org.ovirt.engine.core.vdsbroker.gluster"), ReplaceGlusterVolumeBrick("org.ovirt.engine.core.vdsbroker.gluster"), RemoveGlusterServer("org.ovirt.engine.core.vdsbroker.gluster"), - GlusterHostAdd("org.ovirt.engine.core.vdsbroker.gluster"), + AddGlusterServer("org.ovirt.engine.core.vdsbroker.gluster"), GlusterServersList("org.ovirt.engine.core.vdsbroker.gluster"), StartGlusterVolumeProfile("org.ovirt.engine.core.vdsbroker.gluster"), StopGlusterVolumeProfile("org.ovirt.engine.core.vdsbroker.gluster"), diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/AddGlusterServerVDSParameters.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/AddGlusterServerVDSParameters.java new file mode 100644 index 0000000..d9ab696 --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/AddGlusterServerVDSParameters.java @@ -0,0 +1,27 @@ +package org.ovirt.engine.core.common.vdscommands.gluster; + +import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase; +import org.ovirt.engine.core.compat.Guid; + +/** + * VDS parameters class with Host name or Ip as parameter, + * Used by the "Add Gluster Server" command. + */ +public class AddGlusterServerVDSParameters extends VdsIdVDSCommandParametersBase { + + private String hostnameOrIp; + + public AddGlusterServerVDSParameters(Guid serverId, String hostnameOrIp) { + super(serverId); + setHostnameOrIp(hostnameOrIp); + } + + public String getHostnameOrIp() { + return hostnameOrIp; + } + + public void setHostnameOrIp(String hostnameOrIp) { + this.hostnameOrIp = hostnameOrIp; + } + +} diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterHostAddVDSParameters.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterHostAddVDSParameters.java deleted file mode 100644 index 7beb3aa..0000000 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterHostAddVDSParameters.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.ovirt.engine.core.common.vdscommands.gluster; - -import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase; -import org.ovirt.engine.core.compat.Guid; - -/** - * VDS parameters class with Host name as parameters, - * Used by the "Add Gluster Host" command. - */ -public class GlusterHostAddVDSParameters extends VdsIdVDSCommandParametersBase { - - private String hostName; - - public GlusterHostAddVDSParameters(Guid serverId, String hostName) { - super(serverId); - setHostName(hostName); - } - - public String getHostName() { - return hostName; - } - - public void setHostName(String hostName) { - this.hostName = hostName; - } - -} diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java index 8551cb1..af49918 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java @@ -76,7 +76,7 @@ mSeverities.put(AuditLogType.GLUSTER_VOLUME_REBALANCE_START_FAILED, AuditLogSeverity.ERROR); mSeverities.put(AuditLogType.GLUSTER_VOLUME_ADD_BRICK, AuditLogSeverity.NORMAL); mSeverities.put(AuditLogType.GLUSTER_VOLUME_ADD_BRICK_FAILED, AuditLogSeverity.ERROR); - mSeverities.put(AuditLogType.GLUSTER_HOST_ADD_FAILED, AuditLogSeverity.ERROR); + mSeverities.put(AuditLogType.GLUSTER_SERVER_ADD_FAILED, AuditLogSeverity.ERROR); mSeverities.put(AuditLogType.GLUSTER_SERVER_REMOVE, AuditLogSeverity.NORMAL); mSeverities.put(AuditLogType.GLUSTER_SERVER_REMOVE_FAILED, AuditLogSeverity.ERROR); mSeverities.put(AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_FAILED, AuditLogSeverity.ERROR); diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties index b36afc0..24212f1 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -554,7 +554,7 @@ GLUSTER_VOLUME_REPLACE_BRICK_FAILED=Replace Gluster Volume Brick failed GLUSTER_VOLUME_REPLACE_BRICK_START=Gluster Volume ${glusterVolumeName} Replace Brick started. GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED=Could not start Gluster Volume ${glusterVolumeName} Replace Brick. -GLUSTER_HOST_ADD_FAILED=Failed to add gluster server ${VdsName} into Cluster ${VdsGroupName}. +GLUSTER_SERVER_ADD_FAILED=Failed to add gluster server ${VdsName} into Cluster ${VdsGroupName}. GLUSTER_SERVER_REMOVE=Gluster server ${VdsName} removed from Cluster ${VdsGroupName}. GLUSTER_SERVER_REMOVE_FAILED=Failed to remove gluster server ${VdsName} from Cluster ${VdsGroupName}. GLUSTER_SERVERS_LIST_FAILED=Failed to fetch gluster peer list from server ${VdsName} on Cluster ${VdsGroupName}. diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AddGlusterServerVDSCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AddGlusterServerVDSCommand.java new file mode 100644 index 0000000..80a95b6 --- /dev/null +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AddGlusterServerVDSCommand.java @@ -0,0 +1,17 @@ +package org.ovirt.engine.core.vdsbroker.gluster; + +import org.ovirt.engine.core.common.vdscommands.gluster.AddGlusterServerVDSParameters; + + +public class AddGlusterServerVDSCommand<P extends AddGlusterServerVDSParameters> extends AbstractGlusterBrokerCommand<P> { + + public AddGlusterServerVDSCommand(P parameters) { + super(parameters); + } + + @Override + protected void ExecuteVdsBrokerCommand() { + status = getBroker().glusterHostAdd(getParameters().getHostnameOrIp()); + ProceedProxyReturnValue(); + } +} diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterHostAddVDSCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterHostAddVDSCommand.java deleted file mode 100644 index a739fd8..0000000 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterHostAddVDSCommand.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.ovirt.engine.core.vdsbroker.gluster; - -import org.ovirt.engine.core.common.vdscommands.gluster.GlusterHostAddVDSParameters; - -public class GlusterHostAddVDSCommand<P extends GlusterHostAddVDSParameters> extends AbstractGlusterBrokerCommand<P> { - - public GlusterHostAddVDSCommand(P parameters) { - super(parameters); - } - - @Override - protected void ExecuteVdsBrokerCommand() { - status = getBroker().glusterHostAdd(getParameters().getHostName()); - ProceedProxyReturnValue(); - } -} diff --git a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java index c0f7a83..b4da2f3 100644 --- a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java +++ b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java @@ -234,7 +234,7 @@ String AuditLogType___GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED(); - String AuditLogType___GLUSTER_HOST_ADD_FAILED(); + String AuditLogType___GLUSTER_SERVER_ADD_FAILED(); String AuditLogType___GLUSTER_SERVER_REMOVE(); diff --git a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties index c05605c..5881eec 100644 --- a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties +++ b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties @@ -113,7 +113,7 @@ AuditLogType___GLUSTER_VOLUME_REPLACE_BRICK_FAILED=Gluster Volume Replace Brick Failed AuditLogType___GLUSTER_VOLUME_REPLACE_BRICK_START=Gluster Volume Replace Brick Started AuditLogType___GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED=Gluster Volume Replace Brick could not be started -AuditLogType___GLUSTER_HOST_ADD_FAILED=Failed to Add Gluster Server +AuditLogType___GLUSTER_SERVER_ADD_FAILED=Failed to Add Gluster Server AuditLogType___GLUSTER_SERVER_REMOVE=Gluster Server Removed AuditLogType___GLUSTER_SERVER_REMOVE_FAILED=Failed to Remove Gluster Server AuditLogType___GLUSTER_VOLUME_PROFILE_START=Gluster Volume Profile started -- To view, visit http://gerrit.ovirt.org/9821 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia37048f232b40387f6871050926df6815280fe1e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dhandapani Gopal <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
