bug 6837 : UpdateIso and UpdateTemplate API should return ostypename. Removing incorrect domainId creeping in because it was of primitive type.

status 6837: resolved fixed
This commit is contained in:
nit 2010-11-12 18:08:43 +05:30
parent 5215f6f817
commit dd8f02589d
3 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package com.cloud.api.commands;
import org.apache.log4j.Logger;
import com.cloud.api.ApiDBUtils;
import com.cloud.api.BaseCmd;
import com.cloud.api.Implementation;
import com.cloud.api.ServerApiException;
@ -69,6 +70,7 @@ public class UpdateIsoCmd extends UpdateTemplateOrIsoCmd {
response.setCreated(result.getCreated());
response.setFormat(result.getFormat());
response.setOsTypeId(result.getGuestOSId());
response.setOsTypeName(ApiDBUtils.findGuestOSById(result.getGuestOSId()).getDisplayName());
response.setBootable(result.isBootable());
response.setObjectName("iso");
response.setResponseName(getName());

View File

@ -19,6 +19,7 @@ package com.cloud.api.commands;
import org.apache.log4j.Logger;
import com.cloud.api.ApiDBUtils;
import com.cloud.api.BaseCmd;
import com.cloud.api.Implementation;
import com.cloud.api.ServerApiException;
@ -70,6 +71,7 @@ public class UpdateTemplateCmd extends UpdateTemplateOrIsoCmd {
response.setCreated(result.getCreated());
response.setFormat(result.getFormat());
response.setOsTypeId(result.getGuestOSId());
response.setOsTypeName(ApiDBUtils.findGuestOSById(result.getGuestOSId()).getDisplayName());
response.setPasswordEnabled(result.getEnablePassword());
response.setCrossZones(result.isCrossZones());
response.setObjectName("template");

View File

@ -102,7 +102,7 @@ public class TemplateResponse extends BaseResponse {
private String domainName;
@SerializedName("domainid") @Param(description="the ID of the domain to which the template belongs")
private long domainId;
private Long domainId;
public Long getZoneId() {
return zoneId;