Removal of internal ID in backup event descriptions (#12197)

This commit is contained in:
Tonitzpp 2025-12-30 05:37:09 -03:00 committed by GitHub
parent 40d21f093f
commit 46cb805c90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.user.backup;
import javax.inject.Inject; import javax.inject.Inject;
import com.cloud.vm.VirtualMachine;
import org.apache.cloudstack.acl.RoleType; import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandResourceType; import org.apache.cloudstack.api.ApiCommandResourceType;
@ -138,7 +139,8 @@ public class CreateBackupCmd extends BaseAsyncCreateCmd {
@Override @Override
public String getEventDescription() { public String getEventDescription() {
return "Creating backup for Instance " + vmId; String vmUuid = _uuidMgr.getUuid(VirtualMachine.class, getVmId());
return "Creating backup for Instance " + vmUuid;
} }
@Override @Override

View File

@ -28,6 +28,7 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.BackupResponse; import org.apache.cloudstack.api.response.BackupResponse;
import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.SuccessResponse;
import org.apache.cloudstack.backup.Backup;
import org.apache.cloudstack.backup.BackupManager; import org.apache.cloudstack.backup.BackupManager;
import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.context.CallContext;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
@ -111,6 +112,7 @@ public class DeleteBackupCmd extends BaseAsyncCmd {
@Override @Override
public String getEventDescription() { public String getEventDescription() {
return "Deleting backup ID " + backupId; String backupUuid = _uuidMgr.getUuid(Backup.class, getId());
return "Deleting backup ID " + backupUuid;
} }
} }

View File

@ -28,6 +28,7 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.SuccessResponse;
import org.apache.cloudstack.api.response.BackupResponse; import org.apache.cloudstack.api.response.BackupResponse;
import org.apache.cloudstack.backup.Backup;
import org.apache.cloudstack.backup.BackupManager; import org.apache.cloudstack.backup.BackupManager;
import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.context.CallContext;
@ -99,6 +100,7 @@ public class RestoreBackupCmd extends BaseAsyncCmd {
@Override @Override
public String getEventDescription() { public String getEventDescription() {
return "Restoring Instance from backup: " + backupId; String backupUuid = _uuidMgr.getUuid(Backup.class, getBackupId());
return "Restoring Instance from backup: " + backupUuid;
} }
} }