From f1011ac6986413306a3547c4eac9b7d8236d744d Mon Sep 17 00:00:00 2001 From: Vijayendra Bhamidipati Date: Thu, 31 May 2012 23:18:27 -0700 Subject: [PATCH] CS-15173: Additional Cluster is allowed to add with the same VSM IPaddress as the previous cluster reviewed-by: Vijay Description: Putting exception handling in place. --- .../hypervisor/vmware/mo/HypervisorHostHelper.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java index 443751946aa..cfbdc5614f6 100755 --- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java @@ -194,6 +194,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } List> params = new ArrayList>(); @@ -212,6 +213,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } } @@ -230,6 +232,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } try { @@ -241,7 +244,8 @@ public class HypervisorHostHelper { catch(CloudRuntimeException e) { msg = "Failed to associate policy map " + policyName + " with port profile " + networkName + ". Exception: " + e.toString(); - s_logger.error(msg); + s_logger.error(msg); + throw new CloudRuntimeException(msg); } finally { if (netconfClient != null) { netconfClient.disconnect(); @@ -301,6 +305,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } try { @@ -315,6 +320,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } } } @@ -352,6 +358,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } try { @@ -364,6 +371,7 @@ public class HypervisorHostHelper { netconfClient.disconnect(); s_logger.debug("Disconnected Nexus 1000v session."); } + throw new CloudRuntimeException(msg); } }