Merge pull request #1622 from greenqloud/pr-template-bits

[CLOUDSTACK-9644] Adding missing bits field to TemplateResponseThis pull request adds a bits field for template size, and sets it equal to ISO size.

* pr/1622:
  CLOUDSTACK-9644: Adding missing bits field to TemplateResponse

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2016-12-08 00:20:41 +05:30
commit 136a0ca949
2 changed files with 8 additions and 0 deletions

View File

@ -169,6 +169,10 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
@Param(description = "additional key/value details tied with template")
private Map details;
@SerializedName(ApiConstants.BITS)
@Param(description="the processor bit size", since = "4.10")
private int bits;
@SerializedName(ApiConstants.SSHKEY_ENABLED)
@Param(description = "true if template is sshkey enabled, false otherwise")
private Boolean sshKeyEnabled;
@ -347,4 +351,7 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
return zoneId;
}
public void setBits(int bits) {
this.bits = bits;
}
}

View File

@ -284,6 +284,7 @@ public class TemplateJoinDaoImpl extends GenericDaoBaseWithTagInformation<Templa
isoResponse.setOsTypeId(iso.getGuestOSUuid());
isoResponse.setOsTypeName(iso.getGuestOSName());
isoResponse.setBits(iso.getBits());
// populate owner.
ApiResponseHelper.populateOwner(isoResponse, iso);