mirror of https://github.com/apache/cloudstack.git
bug 13722: When we try to create a network when there is no capacity in F5, we should not attempt to create the network
Reviewed-By:Jana status 13722: resolved fixed thorwing resource unavaiable exception when there is not enough capacity to implement network
This commit is contained in:
parent
563cdf3a9c
commit
e86425b717
|
|
@ -41,6 +41,7 @@ import com.cloud.api.response.F5LoadBalancerResponse;
|
|||
import com.cloud.configuration.Config;
|
||||
import com.cloud.configuration.ConfigurationManager;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
|
|
@ -138,9 +139,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan
|
|||
try {
|
||||
return manageGuestNetworkWithExternalLoadBalancer(true, guestConfig);
|
||||
} catch (InsufficientCapacityException capacityException) {
|
||||
// TODO: handle out of capacity exception in graceful manner when multiple providers are avaialble for the
|
||||
// network
|
||||
return false;
|
||||
throw new ResourceUnavailableException("There are no F5 load balancer devices with the free capacity for implementing this network", DataCenter.class, guestConfig.getDataCenterId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue