Updated Branches:
  refs/heads/master 6fccd74ae -> 37f4a120f

CLOUDSTACK-4698: Check DHCP service in the network before get dhcp service 
provider


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/37f4a120
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/37f4a120
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/37f4a120

Branch: refs/heads/master
Commit: 37f4a120fdb719e595d554ded6f659245796b15e
Parents: 6fccd74
Author: Sheng Yang <[email protected]>
Authored: Tue Sep 17 15:12:53 2013 -0700
Committer: Sheng Yang <[email protected]>
Committed: Tue Sep 17 16:01:29 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/engine/orchestration/NetworkOrchestrator.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/37f4a120/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git 
a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
 
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index cd32e8c..d8c3b8e 100755
--- 
a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ 
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -1535,6 +1535,10 @@ public class NetworkOrchestrator extends ManagerBase 
implements NetworkOrchestra
     }
 
     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);

Reply via email to