mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7729: listVMSnapshot API not returning parent id in response
This commit is contained in:
parent
55e11cddca
commit
7fe3c45142
|
|
@ -184,7 +184,15 @@ public class VMSnapshotResponse extends BaseResponse implements ControlledEntity
|
|||
return parentName;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
public String getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(String parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -529,7 +529,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
vmSnapshotResponse.setVirtualMachineid(vm.getUuid());
|
||||
}
|
||||
if (vmSnapshot.getParent() != null) {
|
||||
vmSnapshotResponse.setParentName(ApiDBUtils.getVMSnapshotById(vmSnapshot.getParent()).getDisplayName());
|
||||
VMSnapshot vmSnapshotParent = ApiDBUtils.getVMSnapshotById(vmSnapshot.getParent());
|
||||
vmSnapshotResponse.setParent(vmSnapshotParent.getUuid());
|
||||
vmSnapshotResponse.setParentName(vmSnapshotParent.getDisplayName());
|
||||
}
|
||||
vmSnapshotResponse.setCurrent(vmSnapshot.getCurrent());
|
||||
vmSnapshotResponse.setType(vmSnapshot.getType().toString());
|
||||
|
|
|
|||
Loading…
Reference in New Issue