Add more volume info to BackupSnapshotCommand, to generalize multi-hypervisor usage

This commit is contained in:
Kelven Yang 2010-11-02 17:02:23 -07:00
parent 5b879096d7
commit 3c6b3b3e3d
3 changed files with 12 additions and 0 deletions

View File

@ -50,6 +50,7 @@ public class BackupSnapshotCommand extends SnapshotCommand {
Long dcId,
Long accountId,
Long volumeId,
String volumePath,
String snapshotUuid,
String snapshotName,
String prevSnapshotUuid,
@ -64,6 +65,7 @@ public class BackupSnapshotCommand extends SnapshotCommand {
this.firstBackupUuid = firstBackupUuid;
this.isVolumeInactive = isVolumeInactive;
this.vmName = vmName;
setVolumePath(volumePath);
}
public String getPrevSnapshotUuid() {

View File

@ -32,6 +32,7 @@ public class SnapshotCommand extends Command {
private Long dcId;
private Long accountId;
private Long volumeId;
private String volumePath;
protected SnapshotCommand() {
@ -98,6 +99,14 @@ public class SnapshotCommand extends Command {
public Long getVolumeId() {
return volumeId;
}
public String getVolumePath() {
return volumePath;
}
public void setVolumePath(String path) {
volumePath = path;
}
/**
* {@inheritDoc}

View File

@ -496,6 +496,7 @@ public class SnapshotManagerImpl implements SnapshotManager {
dcId,
accountId,
volumeId,
volume.getPath(),
snapshotUuid,
snapshot.getName(),
prevSnapshotUuid,