Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Veeam: set backed_volumes for each backup #9898

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import com.cloud.hypervisor.vmware.VmwareDatacenterZoneMap;
import com.cloud.dc.dao.VmwareDatacenterDao;
import com.cloud.hypervisor.vmware.dao.VmwareDatacenterZoneMapDao;
import com.cloud.storage.dao.VolumeDao;
import com.cloud.user.User;
import com.cloud.utils.Pair;
import com.cloud.utils.component.AdapterBase;
Expand Down Expand Up @@ -109,6 +110,8 @@
private AgentManager agentMgr;
@Inject
private VirtualMachineManager virtualMachineManager;
@Inject
private VolumeDao volumeDao;

protected VeeamClient getClient(final Long zoneId) {
try {
Expand Down Expand Up @@ -378,6 +381,7 @@
backup.setAccountId(vm.getAccountId());
backup.setDomainId(vm.getDomainId());
backup.setZoneId(vm.getDataCenterId());
backup.setBackedUpVolumes(BackupManagerImpl.createVolumeInfoFromVolumes(volumeDao.findByInstance(vm.getId())));

Check warning on line 384 in plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/VeeamBackupProvider.java

View check run for this annotation

Codecov / codecov/patch

plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/VeeamBackupProvider.java#L384

Added line #L384 was not covered by tests

logger.debug(String.format("Creating a new entry in backups: [uuid: %s, vm_id: %s, external_id: %s, type: %s, date: %s, backup_offering_id: %s, account_id: %s, "
+ "domain_id: %s, zone_id: %s].", backup.getUuid(), backup.getVmId(), backup.getExternalId(), backup.getType(), backup.getDate(),
Expand Down
Loading