cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaya...@apache.org
Subject [2/2] git commit: updated refs/heads/master to fcd21eb
Date Thu, 16 Jan 2014 06:00:11 GMT
CLOUDSTACK-5867 Fixed service monitor command path


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

Branch: refs/heads/master
Commit: a41c9b963125552e163c1b9132a475c9764cb22c
Parents: dd50210
Author: Jayapal <jayapalreddy.uradi@citrix.com>
Authored: Tue Jan 14 18:53:04 2014 +0530
Committer: Jayapal <jayapalreddy.uradi@citrix.com>
Committed: Thu Jan 16 11:29:03 2014 +0530

----------------------------------------------------------------------
 .../virtualnetwork/VirtualRoutingResource.java     | 17 +++++++++++++++++
 .../kvm/resource/LibvirtComputingResource.java     | 16 ----------------
 2 files changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a41c9b96/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
index 15f1c40..8478b31 100755
--- a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
+++ b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
@@ -35,6 +35,7 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
+import com.cloud.agent.api.routing.SetMonitorServiceCommand;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
 
@@ -169,6 +170,8 @@ public class VirtualRoutingResource implements Manager {
                 return execute((Site2SiteVpnCfgCommand)cmd);
             } else if (cmd instanceof CheckS2SVpnConnectionsCommand) {
                 return execute((CheckS2SVpnConnectionsCommand)cmd);
+            } else if (cmd instanceof SetMonitorServiceCommand) {
+                return execute((SetMonitorServiceCommand) cmd);
             } else {
                 return Answer.createUnsupportedCommandAnswer(cmd);
             }
@@ -956,6 +959,20 @@ public class VirtualRoutingResource implements Manager {
         }
     }
 
+    private Answer execute(SetMonitorServiceCommand cmd) {
+
+        String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
+        String config = cmd.getConfiguration();
+
+        String result = configureMonitor(routerIp, config);
+
+        if (result != null) {
+            return new Answer(cmd, false, "SetMonitorServiceCommand failed");
+        }
+        return new Answer(cmd);
+
+    }
+
     public String assignPublicIpAddress(final String vmName, final String privateIpAddress,
final String publicIpAddress, final boolean add, final boolean firstIP,
         final boolean sourceNat, final String broadcastUri, final String vlanGateway, final
String vlanNetmask, final String vifMacAddress, int nicNum, boolean newNic) {
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a41c9b96/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 71c8e97..c40cd75 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -178,7 +178,6 @@ import com.cloud.agent.api.routing.IpAssocAnswer;
 import com.cloud.agent.api.routing.IpAssocCommand;
 import com.cloud.agent.api.routing.IpAssocVpcCommand;
 import com.cloud.agent.api.routing.NetworkElementCommand;
-import com.cloud.agent.api.routing.SetMonitorServiceCommand;
 import com.cloud.agent.api.routing.SetNetworkACLAnswer;
 import com.cloud.agent.api.routing.SetNetworkACLCommand;
 import com.cloud.agent.api.routing.SetSourceNatAnswer;
@@ -1291,8 +1290,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
                 return storageHandler.handleStorageCommands((StorageSubSystemCommand)cmd);
             } else if (cmd instanceof PvlanSetupCommand) {
                 return execute((PvlanSetupCommand)cmd);
-            } else if (cmd instanceof SetMonitorServiceCommand) {
-                return execute((SetMonitorServiceCommand)cmd);
             } else if (cmd instanceof CheckOnHostCommand) {
                 return execute((CheckOnHostCommand)cmd);
             } else if (cmd instanceof OvsFetchInterfaceCommand) {
@@ -2031,19 +2028,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
         }
     }
 
-    private Answer execute(SetMonitorServiceCommand cmd) {
-
-        String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
-        String config = cmd.getConfiguration();
-
-        String result = _virtRouterResource.configureMonitor(routerIp, config);
-
-        if (result != null) {
-            return new Answer(cmd, false, "SetMonitorServiceCommand failed");
-        }
-        return new Answer(cmd);
-
-    }
 
     private SetNetworkACLAnswer execute(SetNetworkACLCommand cmd) {
         String[] results = new String[cmd.getRules().length];


Mime
View raw message