bug 6214: UpdateIso API - Adding account and domain tags.

This commit is contained in:
nit 2010-09-21 16:17:48 +05:30
parent 0669c2c1d4
commit 87f1a96c29
1 changed files with 8 additions and 1 deletions

9
server/src/com/cloud/api/commands/UpdateIsoCmd.java Normal file → Executable file
View File

@ -103,7 +103,14 @@ public class UpdateIsoCmd extends BaseCmd {
isoData.add(new Pair<String, Object>(BaseCmd.Properties.CREATED.getName(), getDateString(updatedIso.getCreated())));
isoData.add(new Pair<String, Object>(BaseCmd.Properties.FORMAT.getName(), updatedIso.getFormat()));
isoData.add(new Pair<String, Object>(BaseCmd.Properties.OS_TYPE_ID.getName(), updatedIso.getGuestOSId()));
isoData.add(new Pair<String, Object>(BaseCmd.Properties.BOOTABLE.getName(), updatedIso.isBootable()));
isoData.add(new Pair<String, Object>(BaseCmd.Properties.BOOTABLE.getName(), updatedIso.isBootable()));
// add account ID and name
Account owner = getManagementServer().findAccountById(updatedIso.getAccountId());
if (owner != null) {
isoData.add(new Pair<String, Object>(BaseCmd.Properties.ACCOUNT.getName(), owner.getAccountName()));
isoData.add(new Pair<String, Object>(BaseCmd.Properties.DOMAIN_ID.getName(), owner.getDomainId()));
isoData.add(new Pair<String, Object>(BaseCmd.Properties.DOMAIN.getName(), getManagementServer().findDomainIdById(owner.getDomainId()).getName()));
}
return isoData;
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "internal error updating ISO");