Shireesh Anjal has uploaded a new change for review. Change subject: engine: improved getVdsId and getGlusterVolumeId ......................................................................
engine: improved getVdsId and getGlusterVolumeId If the id is null, try to retrieve it from corresponding object similar to what is being done already in getVdsGroupId() Change-Id: I52212ddb694d727248182d32abc1e1f5a21f76ee Bug-Url: https://bugzilla.redhat.com/916112 Signed-off-by: Shireesh Anjal <[email protected]> --- M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/gluster/GlusterAuditLogUtil.java 2 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/13001/1 diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java index f057c26..e0e1a6d 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java @@ -216,7 +216,14 @@ } public Guid getVdsId() { - return mVdsId != null ? mVdsId.getValue() : Guid.Empty; + if (mVdsId != null) { + return mVdsId.getValue(); + } else if (getVds() != null) { + mVdsId = getVds().getId(); + return mVdsId.getValue(); + } else { + return Guid.Empty; + } } public void setVdsId(final Guid value) { @@ -489,7 +496,14 @@ } public NGuid getGlusterVolumeId() { - return glusterVolumeId; + if (glusterVolumeId != null) { + return glusterVolumeId; + } else if (getGlusterVolume() != null) { + glusterVolumeId = getGlusterVolume().getId(); + return glusterVolumeId; + } else { + return Guid.Empty; + } } public void setGlusterVolumeId(NGuid value) { diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/gluster/GlusterAuditLogUtil.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/gluster/GlusterAuditLogUtil.java index 7d3f37d..8d32fd6 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/gluster/GlusterAuditLogUtil.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/gluster/GlusterAuditLogUtil.java @@ -47,11 +47,6 @@ } @Override - public Guid getVdsGroupId() { - return clusterId; - } - - @Override public VDSGroup getVdsGroup() { setVdsGroupId(clusterId); return super.getVdsGroup(); -- To view, visit http://gerrit.ovirt.org/13001 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52212ddb694d727248182d32abc1e1f5a21f76ee Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shireesh Anjal <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
