cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From frankzh...@apache.org
Subject git commit: updated refs/heads/master to 6070a8b
Date Tue, 30 Jul 2013 18:01:34 GMT
Updated Branches:
  refs/heads/master 405f73267 -> 6070a8b37


CloudStack CLOUDSTACK-1812
create physical network fails while creating basic zone


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

Branch: refs/heads/master
Commit: 6070a8b3704f0ef0705971cf13dd601730ad79b7
Parents: 405f732
Author: frank <frank.zhang@citrix.com>
Authored: Tue Jul 30 11:09:57 2013 -0700
Committer: frank <frank.zhang@citrix.com>
Committed: Tue Jul 30 11:11:17 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkServiceImpl.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6070a8b3/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 23bed01..cdc1cdb 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3725,7 +3725,13 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
         PhysicalNetworkVO pvo = _physicalNetworkDao.findById(physicalNetworkId);
         DataCenterVO dvo = _dcDao.findById(pvo.getDataCenterId());
         if (dvo.getNetworkType() == NetworkType.Basic) {
-
+
+            Provider provider = Network.Provider.getProvider("BaremetalDhcpProvider");
+            if (provider == null) {
+                // baremetal is not loaded
+                return null;
+            }
+            
             addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalDhcpProvider", null,
null);
             addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalPxeProvider", null,
null);
             addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalUserdataProvider",
null, null);


Mime
View raw message