cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject git commit: updated refs/heads/4.2 to b67af37
Date Tue, 13 Aug 2013 12:04:02 GMT
Updated Branches:
  refs/heads/4.2 6e953ae87 -> b67af3708


CLOUDSTACK-3481, CLOUDSTACK-1812: create physical network fails while creating basic zone

Skip baremetal provider when it's not found.
(cherry-picked: 6070a8b3704f0ef0705971cf13dd601730ad79b7)


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

Branch: refs/heads/4.2
Commit: b67af370807df5f325cf68f2cd0a74cdad5ae908
Parents: 6e953ae
Author: frank <frank.zhang@citrix.com>
Authored: Tue Jul 30 11:09:57 2013 -0700
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Tue Aug 13 17:32:51 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b67af370/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 73c1290..6513f43 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3728,7 +3728,11 @@ 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