cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [4/7] git commit: Summary: Small fixes for issues found during unittests
Date Thu, 03 Jan 2013 16:33:24 GMT
Summary: Small fixes for issues found during unittests

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

Branch: refs/heads/api_refactoring
Commit: 00847482cc5cd4c9eda7c3d73b2a30aff4f44a5a
Parents: 6cf0c56
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Thu Jan 3 11:49:17 2013 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Jan 3 11:56:50 2013 +0100

----------------------------------------------------------------------
 .../network/guru/NiciraNvpGuestNetworkGuru.java    |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/00847482/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
index 1046a5a..99be680 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
@@ -29,6 +29,7 @@ import com.cloud.agent.api.CreateLogicalSwitchAnswer;
 import com.cloud.agent.api.CreateLogicalSwitchCommand;
 import com.cloud.agent.api.DeleteLogicalSwitchAnswer;
 import com.cloud.agent.api.DeleteLogicalSwitchCommand;
+import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
@@ -119,8 +120,9 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
             Network userSpecified, Account owner) {
         // Check of the isolation type of the related physical network is STT
         PhysicalNetworkVO physnet = _physicalNetworkDao.findById(plan.getPhysicalNetworkId());
-        if (physnet == null || physnet.getIsolationMethods() == null || !physnet.getIsolationMethods().contains("STT"))
{
-            s_logger.debug("Refusing to design this network, the physical isolation type
is not STT");
+        DataCenter dc = _dcDao.findById(plan.getDataCenterId());
+        if (!canHandle(offering,dc.getNetworkType(),physnet)) {
+            s_logger.debug("Refusing to design this network");
             return null;
         }
 
@@ -199,6 +201,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
             s_logger.info("Implemented OK, network linked to  = " + implemented.getBroadcastUri().toString());
         } catch (URISyntaxException e) {
             s_logger.error("Unable to store logical switch id in broadcast uri, uuid = "
+ implemented.getUuid(), e);
+            return null;
         }
         
         return implemented;


Mime
View raw message