Skip to content
Merged
Show file tree
Hide file tree
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 @@ -290,13 +290,17 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co
private String externalUuid;

@SerializedName(ApiConstants.VOLUME_CHECK_RESULT)
@Param(description = "details for the volume check result, they may vary for different hypervisors, since = 4.19.1")
@Param(description = "details for the volume check result, they may vary for different hypervisors", since = "4.19.1")
private Map<String, String> volumeCheckResult;

@SerializedName(ApiConstants.VOLUME_REPAIR_RESULT)
@Param(description = "details for the volume repair result, they may vary for different hypervisors, since = 4.19.1")
@Param(description = "details for the volume repair result, they may vary for different hypervisors", since = "4.19.1")
private Map<String, String> volumeRepairResult;

@SerializedName(ApiConstants.ENCRYPT_FORMAT)
@Param(description = "the encrypt format of the volume", since = "4.19.1")
private String encryptFormat;

public String getPath() {
return path;
}
Expand Down Expand Up @@ -842,4 +846,8 @@ public Map<String, String> getVolumeRepairResult() {
public void setVolumeRepairResult(Map<String, String> volumeRepairResult) {
this.volumeRepairResult = volumeRepairResult;
}

public void setEncryptFormat(String encryptFormat) {
this.encryptFormat = encryptFormat;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SELECT
`volumes`.`path` AS `path`,
`volumes`.`chain_info` AS `chain_info`,
`volumes`.`external_uuid` AS `external_uuid`,
`volumes`.`encrypt_format` AS `encrypt_format`,
`account`.`id` AS `account_id`,
`account`.`uuid` AS `account_uuid`,
`account`.`account_name` AS `account_name`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public VolumeResponse newVolumeResponse(ResponseView view, VolumeJoinVO volume)

if (view == ResponseView.Full) {
volResponse.setPath(volume.getPath());
volResponse.setEncryptFormat(volume.getEncryptFormat());
}

// populate owner.
Expand Down
7 changes: 7 additions & 0 deletions server/src/main/java/com/cloud/api/query/vo/VolumeJoinVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ public class VolumeJoinVO extends BaseViewWithTagInformationVO implements Contro
@Column(name = "external_uuid")
private String externalUuid = null;

@Column(name = "encrypt_format")
private String encryptFormat;

public VolumeJoinVO() {
}

Expand Down Expand Up @@ -610,6 +613,10 @@ public void setExternalUuid(String externalUuid) {
this.externalUuid = externalUuid;
}

public String getEncryptFormat() {
return encryptFormat;
}

@Override
public Class<?> getEntityType() {
return Volume.class;
Expand Down