cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [4/5] git commit: updated refs/heads/master to 9c90eff
Date Mon, 02 Nov 2015 12:39:08 GMT
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 <daan@onecht.net>
Authored: Fri Oct 30 09:00:47 2015 +0100
Committer: Daan Hoogland <daan@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));
     }
 }


Mime
View raw message