You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/11/02 13:39:08 UTC
[4/5] git commit: updated refs/heads/master to 9c90eff
CLOUDSTACK-8964 side effect isolation
extract side effect away to emphasize the main commandDelegation
objective
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fc18d1e8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fc18d1e8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fc18d1e8
Branch: refs/heads/master
Commit: fc18d1e8b11c82a18854234b0c8c827896a5b78d
Parents: c4afb76
Author: Daan Hoogland <da...@onecht.net>
Authored: Fri Oct 30 09:00:47 2015 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Fri Oct 30 09:00:47 2015 +0100
----------------------------------------------------------------------
.../hypervisor/ovm3/resources/Ovm3HypervisorGuru.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fc18d1e8/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
index 5a2e39b..3711bbf 100755
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
@@ -87,6 +87,15 @@ public class Ovm3HypervisorGuru extends HypervisorGuruBase implements Hypervisor
*/
public Pair<Boolean, Long> getCommandHostDelegation(long hostId, Command cmd) {
LOGGER.debug("getCommandHostDelegation: " + cmd.getClass());
+ performSideEffectsForDelegationOnCommand(hostId, cmd);
+ return new Pair<Boolean, Long>(Boolean.FALSE, Long.valueOf(hostId));
+ }
+
+ /**
+ * @param hostId
+ * @param cmd
+ */
+ void performSideEffectsForDelegationOnCommand(long hostId, Command cmd) {
if (cmd instanceof StorageSubSystemCommand) {
StorageSubSystemCommand c = (StorageSubSystemCommand)cmd;
c.setExecuteInSequence(true);
@@ -108,6 +117,5 @@ public class Ovm3HypervisorGuru extends HypervisorGuruBase implements Hypervisor
}
}
}
- return new Pair<Boolean, Long>(Boolean.FALSE, Long.valueOf(hostId));
}
}