mirror of https://github.com/apache/cloudstack.git
bug 10712: Display name instead of id
This commit is contained in:
parent
3c1f6fd24b
commit
b35e85c571
|
|
@ -98,7 +98,8 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd {
|
|||
if (zone.getNetworkType() == NetworkType.Advanced) {
|
||||
List<? extends Network> networks = _networkService.getVirtualNetworksOwnedByAccountInZone(getAccountName(), getDomainId(), getZoneId());
|
||||
if (networks.size() == 0) {
|
||||
throw new InvalidParameterValueException("Account name=" + getAccountName() + " domainId=" + getDomainId() + " doesn't have virtual networks in zone " + getZoneId());
|
||||
String domain = _accountService.getDomain(getDomainId()).getName();
|
||||
throw new InvalidParameterValueException("Account name=" + getAccountName() + " domain=" + domain + " doesn't have virtual networks in zone=" + zone.getName());
|
||||
}
|
||||
assert (networks.size() <= 1) : "Too many virtual networks. This logic should be obsolete";
|
||||
return networks.get(0).getId();
|
||||
|
|
|
|||
Loading…
Reference in New Issue