cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/4.2-forward to 3121133
Date Thu, 29 Aug 2013 21:16:16 GMT
Updated Branches:
  refs/heads/4.2-forward 1a333f369 -> 3121133c0


CLOUDSTACK-1192: GetVmDiskStatsCommand return null as disk I/O statistics does not support
xen/vmware


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

Branch: refs/heads/4.2-forward
Commit: 3121133c03c4db30c9bc0a3a5546e19678b2ee76
Parents: 1a333f3
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Thu Aug 29 23:14:42 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Thu Aug 29 23:14:42 2013 +0200

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/resource/VmwareResource.java | 8 ++++++++
 .../cloud/hypervisor/xen/resource/CitrixResourceBase.java    | 8 ++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3121133c/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 16b829a..97c9acc 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
@@ -91,6 +91,8 @@ import com.cloud.agent.api.GetHostStatsAnswer;
 import com.cloud.agent.api.GetHostStatsCommand;
 import com.cloud.agent.api.GetStorageStatsAnswer;
 import com.cloud.agent.api.GetStorageStatsCommand;
+import com.cloud.agent.api.GetVmDiskStatsAnswer;
+import com.cloud.agent.api.GetVmDiskStatsCommand;
 import com.cloud.agent.api.GetVmStatsAnswer;
 import com.cloud.agent.api.GetVmStatsCommand;
 import com.cloud.agent.api.GetVncPortAnswer;
@@ -445,6 +447,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                 answer = execute((GetHostStatsCommand) cmd);
             } else if (clz == GetVmStatsCommand.class) {
                 answer = execute((GetVmStatsCommand) cmd);
+            } else if (clz == GetVmDiskStatsCommand.class) {
+                answer = execute((GetDiskVmStatsCommand) cmd);
             } else if (clz == CheckHealthCommand.class) {
                 answer = execute((CheckHealthCommand) cmd);
             } else if (clz == StopCommand.class) {
@@ -3808,6 +3812,10 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
         return answer;
     }
 
+    protected Answer execute(GetVmDiskStatsCommand cmd) {
+        return new GetVmDiskStatsAnswer(cmd, null, null, null);
+    }
+
     protected Answer execute(CheckHealthCommand cmd) {
         if (s_logger.isInfoEnabled()) {
             s_logger.info("Executing resource CheckHealthCommand: " + _gson.toJson(cmd));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3121133c/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 4de9ab9..815299b 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -56,6 +56,8 @@ import com.cloud.agent.api.GetHostStatsAnswer;
 import com.cloud.agent.api.GetHostStatsCommand;
 import com.cloud.agent.api.GetStorageStatsAnswer;
 import com.cloud.agent.api.GetStorageStatsCommand;
+import com.cloud.agent.api.GetVmDiskStatsAnswer;
+import com.cloud.agent.api.GetVmDiskStatsCommand;
 import com.cloud.agent.api.GetVmStatsAnswer;
 import com.cloud.agent.api.GetVmStatsCommand;
 import com.cloud.agent.api.GetVncPortAnswer;
@@ -489,6 +491,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
             return execute((GetHostStatsCommand) cmd);
         } else if (clazz == GetVmStatsCommand.class) {
             return execute((GetVmStatsCommand) cmd);
+        } else if (clazz == GetVmDiskStatsCommand.class) {
+            return execute((GetVmDiskStatsCommand) cmd);
         } else if (clazz == CheckHealthCommand.class) {
             return execute((CheckHealthCommand) cmd);
         } else if (clazz == StopCommand.class) {
@@ -2757,6 +2761,10 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
         return vmResponseMap;
     }
 
+    protected GetVmDiskStatsAnswer execute(GetVmDiskStatsCommand cmd) {
+        return new GetVmDiskStatsAnswer(cmd, null, null, null);
+    }
+
     protected Object[] getRRDData(Connection conn, int flag) {
 
         /*


Mime
View raw message