mirror of https://github.com/apache/cloudstack.git
bug 6214: UpdateIso API - Adding account and domain tags.
This commit is contained in:
parent
0669c2c1d4
commit
87f1a96c29
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue