You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2012/09/10 22:55:52 UTC

[45/50] [abbrv] git commit: CS-15542, return success when vif is not there on deipassoc

 CS-15542, return success when vif is not there on deipassoc


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

Branch: refs/heads/4.0
Commit: fbba8c2ef3a34bfa5fcb02b40f61c9c5dd48f4b8
Parents: b58123e
Author: Anthony Xu <an...@cloud.com>
Authored: Fri Sep 7 17:29:49 2012 -0700
Committer: Anthony Xu <an...@cloud.com>
Committed: Fri Sep 7 17:29:49 2012 -0700

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fbba8c2e/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index da7f901..cf4f335 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1326,7 +1326,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
         int ethDeviceNum = this.findRouterEthDeviceIndex(domrName, routerIp, ip.getVifMacAddress());
         if (ethDeviceNum < 0) {
-            throw new InternalErrorException("Failed to find DomR VIF to associate/disassociate IP with.");
+            if (ip.isAdd()) {
+                throw new InternalErrorException("Failed to find DomR VIF to associate/disassociate IP with.");
+            } else {
+                 s_logger.debug("VIF to deassociate IP with does not exist, return success");
+                return;
+            }
         }
 
         String args = "";