Skip to content

Commit d4f99cc

Browse files
committed
add encryption type to volume response
1 parent d561e13 commit d4f99cc

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

api/src/main/java/org/apache/cloudstack/api/response/VolumeResponse.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co
298298
private Map<String, String> volumeRepairResult;
299299

300300
@SerializedName(ApiConstants.ENCRYPT_FORMAT)
301-
@Param(description = "the encrypt format of the volume", since = "4.19.1")
302-
private String encryptFormat;
301+
@Param(description = "the format of the disk encryption if applicable", since = "4.19.1")
302+
private String encryptionFormat;
303303

304304
public String getPath() {
305305
return path;
@@ -847,7 +847,7 @@ public void setVolumeRepairResult(Map<String, String> volumeRepairResult) {
847847
this.volumeRepairResult = volumeRepairResult;
848848
}
849849

850-
public void setEncryptFormat(String encryptFormat) {
851-
this.encryptFormat = encryptFormat;
850+
public void setEncryptionFormat(String encryptionFormat) {
851+
this.encryptionFormat = encryptionFormat;
852852
}
853853
}

server/src/main/java/com/cloud/api/query/dao/VolumeJoinDaoImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public VolumeResponse newVolumeResponse(ResponseView view, VolumeJoinVO volume)
180180

181181
if (view == ResponseView.Full) {
182182
volResponse.setPath(volume.getPath());
183-
volResponse.setEncryptFormat(volume.getEncryptFormat());
183+
volResponse.setEncryptionFormat(volume.getEncryptionFormat());
184184
}
185185

186186
// populate owner.
@@ -279,6 +279,7 @@ public VolumeResponse newVolumeResponse(ResponseView view, VolumeJoinVO volume)
279279

280280
volResponse.setObjectName("volume");
281281
volResponse.setExternalUuid(volume.getExternalUuid());
282+
volResponse.setEncryptionFormat(volume.getEncryptionFormat());
282283
return volResponse;
283284
}
284285

server/src/main/java/com/cloud/api/query/vo/VolumeJoinVO.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public class VolumeJoinVO extends BaseViewWithTagInformationVO implements Contro
276276
private String externalUuid = null;
277277

278278
@Column(name = "encrypt_format")
279-
private String encryptFormat;
279+
private String encryptionFormat = null;
280280

281281
public VolumeJoinVO() {
282282
}
@@ -613,13 +613,12 @@ public void setExternalUuid(String externalUuid) {
613613
this.externalUuid = externalUuid;
614614
}
615615

616-
public String getEncryptFormat() {
617-
return encryptFormat;
616+
public String getEncryptionFormat() {
617+
return encryptionFormat;
618618
}
619619

620620
@Override
621621
public Class<?> getEntityType() {
622622
return Volume.class;
623623
}
624-
625624
}

0 commit comments

Comments
 (0)