Shireesh Anjal has posted comments on this change. Change subject: engine: Create Gluster Volume & Volume Option Set ......................................................................
Patch Set 2: (12 inline comments) Incorporated most comments by Omer. New patch-set to follow. .................................................... File backend/manager/dbscripts/create_functions.sql Line 254: SELECT cluster_id AS id Done .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeCommand.java Line 37: super(params); Done Line 93: setGlusterVolumeName(volume.getName()); Have modified getGlusterVolumeName in AuditLogableBase to get the value from DB if it is null. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeCommandBase.java Line 23: setVdsGroupId(getGlusterVolume().getClusterId()); getGlusterVolume is defined in AuditLogableBase. However you are right - it can be null if the volume id passed is invalid. So I have added a check to set the cluster id only if getGlusterVolume() doesn't return null. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/SetGlusterVolumeOptionCommand.java Line 57: setGlusterVolumeId(option.getVolumeId()); Done Line 62: getGlusterVolumeName(), getParameters().getVolumeOption())); Done Have removed the class level field. Line 80: if(getGlusterVolume().getOptionValue(option.getKey()) != null) { Note that the null check is on the return value of method getOptionValue. Here we are checking if the option is already set on the volume (fetched from DB using getGlusterVolume()), and hence cannot be "inserted", but needs to be "updated". .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/CreateGlusterVolumeParameters.java Line 15: super(); Done .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java Line 541: public String getGlusterVolumeName() { Done .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties Line 664: VAR__TYPE__GLUSTER_VOLUME=${type} Gluster Volume Done .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties Line 494: GLUSTER_VOLUME_CREATE_FAILED=Creation of Gluster Volume ${glusterVolumeName} failed. Done .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/CreateGlusterVolumeVDSCommand.java Line 38: parameters.put("volumeType", volume.getVolumeType().toString()); Done -- To view, visit http://gerrit.ovirt.org/3142 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2e5a857d188450409ce9f6eefd4df6bc1b10f9b2 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shireesh Anjal <san...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Livnat Peer <lp...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches