rafaelweingartner commented on a change in pull request #2315: A comprehensive
solution for #CLOUDSTACK-9025.
URL: https://github.com/apache/cloudstack/pull/2315#discussion_r150220323
##########
File path: server/src/com/cloud/hypervisor/HypervisorGuruBase.java
##########
@@ -194,6 +193,13 @@ protected VirtualMachineTO
toVirtualMachineTO(VirtualMachineProfile vmProfile) {
}
@Override
+ /**
+ * The basic implementation assumes that the initial "host" defined to
execute the command is the host that is in fact going to execute it.
+ * However, subclasses can extend this behavior, changing the host that is
going to execute the command in runtime.
+ * The first element of the 'Pair' indicates if the hostId has been
changed; this means, if you change the hostId, but you do not inform this
action in the return 'Pair' object, we will use the original "hostId".
+ *
+ * Side note: it seems that the 'hostId' received here is normally the ID
of the SSVM that has an entry at the host table. Therefore, this methods gives
the opportunity to change from the SSVM to a real host to execute a command.
+ */
Review comment:
yep, this is the Java doc type I keep telling people about; this type of
documentation in the code is important (for the ones that do not have great
memory as me, and for newcomers).
It took me quite a long time to understand the purpose of the method
"getCommandHostDelegation" that was overridden in some classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services