From 7ef5f314eedc84ee48875ab3c5baf0ea469c2e20 Mon Sep 17 00:00:00 2001 From: Vijayendra Bhamidipati Date: Thu, 12 Jul 2012 17:36:12 -0700 Subject: [PATCH] CS-15526: Failed to create a guest network for basic zone. Description: vlanId isn't a db ID, so removing its inclusion in an IdentityProxy object when throwing an exception. It's a string, so it was causing problems since it was being converted to a Long. --- server/src/com/cloud/network/NetworkManagerImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index eb80d83b44d..6e5ae4d35f7 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -2943,17 +2943,15 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag if (ntwkOff.getGuestType() == GuestType.Isolated) { if (_networksDao.countByZoneAndUri(zoneId, uri) > 0) { List idList = new ArrayList(); - idList.add(new IdentityProxy("vlan", Long.valueOf(vlanId), "vlanId")); idList.add(new IdentityProxy("data_center", zoneId, "zoneId")); - throw new InvalidParameterValueException("Network with vlan of specified id already exists in zone with specified id", idList); + throw new InvalidParameterValueException("Network with vlan id: " + vlanId + " already exists in zone with specified id", idList); } } else { //don't allow to create Shared network with Vlan that already exists in the zone for Isolated networks List idList = new ArrayList(); - idList.add(new IdentityProxy("vlan", Long.valueOf(vlanId), "vlanId")); idList.add(new IdentityProxy("data_center", zoneId, "zoneId")); if (_networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Isolated) > 0) { - throw new InvalidParameterValueException("Isolated network with vlan of specified id already exists " + + throw new InvalidParameterValueException("Isolated network with vlan id: " + vlanId + " already exists " + "in zone with specified id", idList); } }