mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
commit 3a3cb60e85c0254ebceff55d0b210ca1ff5386a6
Author: Likitha Shetty <likitha.shetty@citrix.com>
Date: Wed Jan 9 11:54:25 2013 +0530
CLOUDSTACK-614: ListTemplates API is not returning "Enable SSH Key" attribute for any given template. Update the TemplateResponse by adding 'sshkeyenabled' attribute to it. This attribute is set to the value that the user passes as input for parameter 'sshkeyenabled' while registering the template.
Signed-off-by: Min Chen <min.chen@citrix.com>
This commit is contained in:
parent
7c5c3c5dfc
commit
9924b64830
@ -135,8 +135,8 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
|
||||
@SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with tempate", responseObject = ResourceTagResponse.class)
|
||||
private List<ResourceTagResponse> tags;
|
||||
|
||||
|
||||
|
||||
@SerializedName(ApiConstants.SSHKEY_ENABLED) @Param(description="true if template is sshkey enabled, false otherwise")
|
||||
private Boolean sshKeyEnabled;
|
||||
|
||||
@Override
|
||||
public String getObjectId() {
|
||||
@ -290,4 +290,9 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
|
||||
public void setTags(List<ResourceTagResponse> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public void setSshKeyEnabled(boolean sshKeyEnabled) {
|
||||
this.sshKeyEnabled = sshKeyEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1265,6 +1265,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
templateResponse.setFeatured(template.isFeatured());
|
||||
templateResponse.setExtractable(template.isExtractable() && !(template.getTemplateType() == TemplateType.SYSTEM));
|
||||
templateResponse.setPasswordEnabled(template.getEnablePassword());
|
||||
templateResponse.setSshKeyEnabled(template.getEnableSshKey());
|
||||
templateResponse.setCrossZones(template.isCrossZones());
|
||||
templateResponse.setFormat(template.getFormat());
|
||||
templateResponse.setDetails(template.getDetails());
|
||||
@ -1346,6 +1347,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
templateResponse.setFeatured(template.isFeatured());
|
||||
templateResponse.setExtractable(template.isExtractable() && !(template.getTemplateType() == TemplateType.SYSTEM));
|
||||
templateResponse.setPasswordEnabled(template.getEnablePassword());
|
||||
templateResponse.setSshKeyEnabled(template.getEnableSshKey());
|
||||
templateResponse.setCrossZones(template.isCrossZones());
|
||||
templateResponse.setFormat(template.getFormat());
|
||||
if (template.getTemplateType() != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user