cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject git commit: updated refs/heads/4.4-forward to 260e06d
Date Tue, 13 May 2014 06:04:29 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 594f66d12 -> 260e06d64


CLOUDSTACK-6519 [Hyper-V] while adding VM to Network it should throw error when it is in running
state


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

Branch: refs/heads/4.4-forward
Commit: 260e06d64c07c6e5f3c133d8bdc2779fad62c672
Parents: 594f66d
Author: Rajesh Battala <rajesh.battala@citrix.com>
Authored: Tue May 13 11:39:14 2014 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Tue May 13 11:39:33 2014 +0530

----------------------------------------------------------------------
 .../hypervisor/hyperv/resource/HypervDirectConnectResource.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/260e06d6/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
index 1816baf..f29839d 100644
--- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
+++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
@@ -531,6 +531,10 @@ public class HypervDirectConnectResource extends ServerResourceBase implements
S
         try {
 
             String vmName = cmd.getVmName();
+            if(cmd.getVMType() == VirtualMachine.Type.User) {
+                s_logger.error("Vm in Running state cannot be added to new network.Nic cannot
be plugged to VM in running state");
+                return new PlugNicAnswer(cmd, false, "Vm in Running state cannot be added
to new network.Nic cannot be plugged to VM in running state");
+            }
             NicTO nic = cmd.getNic();
             URI broadcastUri = nic.getBroadcastUri();
             if (BroadcastDomainType.getSchemeValue(broadcastUri) != BroadcastDomainType.Vlan)
{


Mime
View raw message