Shireesh Anjal has posted comments on this change. Change subject: engine: Gluster server peer list command ......................................................................
Patch Set 1: (6 inline comments) .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterHostEntity.java Line 4: import org.ovirt.engine.core.common.businessentities.VDSStatus; Line 5: import org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil; Line 6: import org.ovirt.engine.core.compat.Guid; Line 7: Line 8: public class GlusterHostEntity extends IVdcQueryable { In Gluster context, please use 'Server' instead of 'Host' - particularly when it is a purely gluster specific scenario. In this particular case, I think "GlusterServerInfo" is a better name for this class. Line 9: Line 10: private Guid uuid; Line 11: Line 12: private String hostName; Line 4: import org.ovirt.engine.core.common.businessentities.VDSStatus; Line 5: import org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil; Line 6: import org.ovirt.engine.core.compat.Guid; Line 7: Line 8: public class GlusterHostEntity extends IVdcQueryable { It is not intended to be a full fledged host entity, but just a metadata class representing a 'gluster peer', the fields of interest being the server name (hostname/ipaddr), it's UUID (gluster assigned - not same as host uuid), and the peer status (gluster specific - connected, rejected, etc). It makes more sense to extend from vds_static if we want to store these details in DB, and show in the hosts view - but we don't plan to do it in near future. I think this class need not extend from IVdcQueryable either, as we don't intend to show it's objects in any of the tabs. Line 9: Line 10: private Guid uuid; Line 11: Line 12: private String hostName; Line 10: private Guid uuid; Line 11: Line 12: private String hostName; Line 13: Line 14: private VDSStatus status; The status here, is supposed to be the 'gluster peer status', and not the host status of oVirt. So it should be a new enum, say PeerStatus Line 15: Line 16: public GlusterHostEntity() { Line 17: } Line 18: Line 15: Line 16: public GlusterHostEntity() { Line 17: } Line 18: Line 19: public GlusterHostEntity(Guid uuid, String hostName, String fingerPrint, VDSStatus status) { fingerprint looks like an unused argument here. Line 20: setUuid(uuid); Line 21: setHostName(hostName); Line 22: setStatus(status); Line 23: } .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterHostsListVDSCommand.java Line 2: Line 3: import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase; Line 4: import org.ovirt.engine.core.vdsbroker.irsbroker.GlusterHostsListReturnForXmlRpc; Line 5: Line 6: public class GlusterHostsListVDSCommand<P extends VdsIdVDSCommandParametersBase> extends AbstractGlusterBrokerCommand<P> { I would prefer GlusterServersListVDSCommand Line 7: Line 8: private GlusterHostsListReturnForXmlRpc glusterHosts; Line 9: Line 10: public GlusterHostsListVDSCommand(P parameters) { .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/GlusterHostsListReturnForXmlRpc.java Line 7: import org.ovirt.engine.core.common.businessentities.VDSStatus; Line 8: import org.ovirt.engine.core.common.businessentities.gluster.GlusterHostEntity; Line 9: import org.ovirt.engine.core.compat.Guid; Line 10: Line 11: public final class GlusterHostsListReturnForXmlRpc extends StatusReturnForXmlRpc { I would prefer GlusterServersListReturnForXmlRpc Line 12: Line 13: private static final String GLUSTER_HOSTS = "hosts"; Line 14: Line 15: private static final String HOST_NAME = "hostname"; -- To view, visit http://gerrit.ovirt.org/7242 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icfacfdc5847e5d871da38d22b6b5efe86ea4d579 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Selvasundaram <sesub...@redhat.com> Gerrit-Reviewer: Dhandapani Gopal <dgo...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Selvasundaram <sesub...@redhat.com> Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches