mirror of https://github.com/apache/cloudstack.git
Bug 8932 - add md5 sum to list templates call
Modified TemplateResponse to contain a new field 'checksum' of the template. The value is pulled from the vm_template table, 'checksum' column. Conflicts: server/src/com/cloud/api/ApiResponseHelper.java
This commit is contained in:
parent
95cd5b6f3b
commit
65d589da73
|
|
@ -107,6 +107,9 @@ public class TemplateResponse extends BaseResponse {
|
|||
@SerializedName("isextractable") @Param(description="true if the template is extractable, false otherwise")
|
||||
private Boolean extractable;
|
||||
|
||||
@SerializedName("checksum") @Param(description="checksum of the template")
|
||||
private String checksum;
|
||||
|
||||
public Long getObjectId() {
|
||||
return getId();
|
||||
}
|
||||
|
|
@ -326,4 +329,12 @@ public class TemplateResponse extends BaseResponse {
|
|||
public void setExtractable(Boolean extractable) {
|
||||
this.extractable = extractable;
|
||||
}
|
||||
|
||||
public String getChecksum() {
|
||||
return checksum;
|
||||
}
|
||||
|
||||
public void setChecksum(String checksum) {
|
||||
this.checksum = checksum;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,8 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
templateResponse.setSize(templateSize);
|
||||
}
|
||||
|
||||
templateResponse.setChecksum(template.getChecksum());
|
||||
|
||||
templateResponse.setObjectName("template");
|
||||
responses.add(templateResponse);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue