mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4698: Check DHCP service in the network before get dhcp service provider
This commit is contained in:
parent
af2951ad56
commit
b96aefee2f
|
|
@ -2519,6 +2519,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
|
|||
}
|
||||
|
||||
public boolean isDhcpAccrossMultipleSubnetsSupported(Network network) {
|
||||
if (!_networkModel.areServicesSupportedInNetwork(network.getId(), Service.Dhcp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network);
|
||||
Map <Network.Capability, String> capabilities = dhcpServiceProvider.getCapabilities().get(Network.Service.Dhcp);
|
||||
String supportsMultipleSubnets = capabilities.get(Network.Capability.DhcpAccrossMultipleSubnets);
|
||||
|
|
|
|||
Loading…
Reference in New Issue