[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155855273 didn't do the xenserver change yet removed the ovm3 code that seems to have no use at all --- If your project is set up for it, you can reply to this email

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
GitHub user DaanHoogland reopened a pull request: https://github.com/apache/cloudstack/pull/1056 CID-1338387: handle unknown storage endpoint I have removed the paramoia null check and created a specific exception as i think we always should for any specific condition. This would re

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155846413 Sorry for that. Bear in mind that the same occurs to “Ovm3HypervisorGuru.java”. However, the change is a little different, in that class you can re

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155843339 @rafaelweingartner now you are editting XenServerGuru instead of Ovm3HypervisorGuru. Of coure that can be improved as well but now the scope of this PR has not

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
Github user DaanHoogland closed the pull request at: https://github.com/apache/cloudstack/pull/1056 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feat

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155838061 Actually, My bad, I think the best thing to do is to change the method “com.cloud.hypervisor.XenServerGuru.getCommandHostDelegation(long, Comm

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155837263 Well, I would remover the method: “com.cloud.hypervisor.XenServerGuru.getCommandHostDelegation(long, Command)”, because it is already coded into

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155834298 we can remove the entire ```if (cmd instanceof CopyCommand) {}``` block --- If your project is set up for it, you can reply to this email and have your reply a

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155833511 That is it. We can remove the “org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector.selectHypervisorHost” method --- If your project is s

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155831862 @rafaelweingartner nice analysis. meaning, all of my change is senseless. I think the conclusion of your research is that the side effects for CopyCommand are

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155821415 Hi @DaanHoogland, About the method: “endPointSelector.selectHypervisorHost”. I debugged the use of that method in my environment. I am usi

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread miguelaferreira
Github user miguelaferreira commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155703549 I don't think so @DaanHoogland. But if I've miss interpreted what you said, I'll be happy to have you explain to me what that is. --- If your project is se

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155703357 @miguelaferreira you are assigning claims to me that I did not make. --- If your project is set up for it, you can reply to this email and have your reply appe

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-11 Thread miguelaferreira
Github user miguelaferreira commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155702506 @DaanHoogland both Optional and Exception will give the opportunity to handle the "null case", the difference is in the semantics. Optional means that you e

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155694568 @miguelaferreira Optional is very clear indeed. So is exception handling. When you need to handle a possible null return one level deep optional is fine. Newb

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread miguelaferreira
Github user miguelaferreira commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155679945 We don't need Java 8 to use optional. And yes, optional is meant for expressing that a value may be present or not. The API is quite clear, I don't see the

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155595167 @DaanHoogland, sorry if I am being stubborn, but I really do not see what the method “endPointSelector.selectHypervisorHost” is used for; at the end w

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155565847 @rafaelweingartner the compile of cloudstack with 1.8 completes but not with unit tests. I think we need to work hard for this. --- If your project is set up

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-13509 @rafaelweingartner I think the method configures the host to have the right storage endpoint. It is kind of an obfuscated side effect but I think the call to `

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155545730 Got it. Shouldn’t we create a PR changing the Java compilation level to 1.8? @DaanHoogland, I still have a doubt about the need of that “selectHyp

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155541260 yeah, you had me at 'Are we'. I am now building with 1.8. change in the pom and et the java_home should be all --- If your project is set up for it, you can r

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155538342 That is great if we can use Java 8. However, I checked the maven compiler configuration, and it is using Java 1.7 --- If your project is set up for it, y

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155536608 Optionals are great whether we need to handle or not, right? Especially in this one level case. I was thinking it would get more complicated in some cases. Eve

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155535685 Are we already migrating to Java 8? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If you

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread miguelaferreira
Github user miguelaferreira commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155525984 If there will be no error recovery for the exception thrown on host == null, then you will probably be better off with using Optional. It's in Java8, but al

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155515107 @ DaanHoogland, I noticed that the select is limiting the RS in one element. That is actually my point, if the register does not matter, I would rather or

[GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155485478 @miguelaferreira @rafaelweingartner you guys care to discuss this further? (this as in this case but also this as in this pattern) --- If your project is set