Tal Nisan has uploaded a new change for review. Change subject: core: Moved disk alias genenration in AddDiskCommand to execution ......................................................................
core: Moved disk alias genenration in AddDiskCommand to execution Moved the disk alias generation in AddDiskCommand to the execution phase as in the job properties calculation the VM disk map is not yet populated. Also the disk alias was omitted from the execution message as we cannot assure that in 100% of the times a disk alias will be specified (the VM name is not there for the same reason) https://bugzilla.redhat.com/1168252 Signed-off-by: Tal Nisan <[email protected]> Change-Id: Id30fa5d3a99dd12b8c45633d592d017c3a6ffd1b --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java M backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties 2 files changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/72/35672/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java index 8a63e1c..a503d64 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java @@ -365,6 +365,7 @@ protected void executeVmCommand() { getParameters().getDiskInfo().setId(Guid.newGuid()); getParameters().setEntityInfo(new EntityInfo(VdcObjectType.Disk, getParameters().getDiskInfo().getId())); + ImagesHandler.setDiskAlias(getParameters().getDiskInfo(), getVm()); if (DiskStorageType.IMAGE == getParameters().getDiskInfo().getDiskStorageType()) { createDiskBasedOnImage(); } else { @@ -624,14 +625,5 @@ protected StorageDomainValidator createStorageDomainValidator() { return new StorageDomainValidator(getStorageDomain()); - } - - @Override - public Map<String, String> getJobMessageProperties() { - if (jobProperties == null) { - ImagesHandler.setDiskAlias(getParameters().getDiskInfo(), getVm()); - jobProperties = super.getJobMessageProperties(); - } - return jobProperties; } } diff --git a/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties b/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties index 42f6216..8ab35fc 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties @@ -20,7 +20,7 @@ job.InternalMigrateVm=Migrating VM ${VM} because previous Host became non-operational job.ExportVm=Exporting VM ${VM} To Export Domain ${Storage} job.ExportVmTemplate=Exporting VM Template ${VmTemplate} To Export Domain ${Storage} -job.AddDisk=Adding Disk ${DiskAlias} +job.AddDisk=Adding Disk job.RemoveDisk=Removing Disk ${DiskAlias} job.ImportVm=Importing VM ${VM} to Cluster ${VdsGroups} job.ForceSelectSPM=Force selecting ${VDS} as SPM for Data Center ${StoragePool} -- To view, visit http://gerrit.ovirt.org/35672 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id30fa5d3a99dd12b8c45633d592d017c3a6ffd1b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
