incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject git commit: CS-15542: UnPlugNicCommand return success if vif doesn't exist
Date Sat, 08 Sep 2012 00:21:02 GMT
Updated Branches:
  refs/heads/master 56a1da9f1 -> 9214fa0af


 CS-15542: UnPlugNicCommand return success if vif doesn't exist


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

Branch: refs/heads/master
Commit: 9214fa0af6ec03b933a283a1f0dfdb8dc0fe6c63
Parents: 56a1da9
Author: Anthony Xu <anthony@cloud.com>
Authored: Fri Sep 7 17:21:14 2012 -0700
Committer: Anthony Xu <anthony@cloud.com>
Committed: Fri Sep 7 17:21:52 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9214fa0a/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 ba71faf..da7f901 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
@@ -1295,7 +1295,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
             }
 
             VirtualDevice nic = findVirtualNicDevice(vmMo, cmd.getNic().getMac());
-
+            if ( nic == null ) {
+                return new UnPlugNicAnswer(cmd, true, "success");
+            }
             VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
             VirtualDeviceConfigSpec[] deviceConfigSpecArray = new VirtualDeviceConfigSpec[1];
             deviceConfigSpecArray[0] = new VirtualDeviceConfigSpec();


Mime
View raw message