mirror of https://github.com/apache/cloudstack.git
Merge remote-tracking branch 'origin/4.14'
This commit is contained in:
commit
961f3ece41
|
|
@ -21,6 +21,7 @@ import java.util.Date;
|
|||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.cloud.hypervisor.Hypervisor;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseResponseWithTagInformation;
|
||||
import org.apache.cloudstack.api.EntityReference;
|
||||
|
|
@ -100,6 +101,10 @@ public class VMSnapshotResponse extends BaseResponseWithTagInformation implement
|
|||
@Param(description = "the domain associated with the disk volume")
|
||||
private String domainName;
|
||||
|
||||
@SerializedName(ApiConstants.HYPERVISOR)
|
||||
@Param(description = "the type of hypervisor on which snapshot is stored")
|
||||
private Hypervisor.HypervisorType hypervisor;
|
||||
|
||||
public VMSnapshotResponse() {
|
||||
tags = new LinkedHashSet<ResourceTagResponse>();
|
||||
}
|
||||
|
|
@ -236,4 +241,12 @@ public class VMSnapshotResponse extends BaseResponseWithTagInformation implement
|
|||
public void setTags(Set<ResourceTagResponse> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public Hypervisor.HypervisorType getHypervisor() {
|
||||
return hypervisor;
|
||||
}
|
||||
|
||||
public void setHypervisor(Hypervisor.HypervisorType hypervisor) {
|
||||
this.hypervisor = hypervisor;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
UserVm vm = ApiDBUtils.findUserVmById(vmSnapshot.getVmId());
|
||||
if (vm != null) {
|
||||
vmSnapshotResponse.setVirtualMachineid(vm.getUuid());
|
||||
vmSnapshotResponse.setHypervisor(vm.getHypervisorType());
|
||||
DataCenterVO datacenter = ApiDBUtils.findZoneById(vm.getDataCenterId());
|
||||
if (datacenter != null) {
|
||||
vmSnapshotResponse.setZoneId(datacenter.getUuid());
|
||||
|
|
|
|||
Loading…
Reference in New Issue