[GitHub] cloudstack pull request: Fix findbugs encoding issue in VmwareReso...

2015-06-15 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack/pull/462


---
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 feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fix findbugs encoding issue in VmwareReso...

2015-06-15 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/462#issuecomment-112313034
  
convinced, the router is a debian box (for now and will remain linux in the 
near future.

LGTM


---
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 feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fix findbugs encoding issue in VmwareReso...

2015-06-15 Thread rsafonseca
Github user rsafonseca commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/462#discussion_r32472663
  
--- Diff: 
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 ---
@@ -705,7 +705,7 @@ public ExecutionResult createFileInVR(String routerIp, 
String filePath, String f
 VmwareManager mgr = 
getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
 File keyFile = mgr.getSystemVMKeyFile();
 try {
-SshHelper.scpTo(routerIp, 3922, "root", keyFile, null, 
filePath, content.getBytes(), fileName, null);
+SshHelper.scpTo(routerIp, 3922, "root", keyFile, null, 
filePath, content.getBytes("UTF-8"), fileName, null);
--- End diff --

VR runs on a UTF-8 platform.
If you're running this on windows and output a specific set of bytes based 
on windows' encoding, the result will be different when VR reads the file. 
UTF-8 should be used specifically in this case, since we're outputting a 
specific array of bytes to a platform with known encoding. 
Charset.defaultCharset() would only work well if the platorm it is running on 
matches that encoding which it actually is in most cases since most peeps run 
this on a modern linux distro ;)


---
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 feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fix findbugs encoding issue in VmwareReso...

2015-06-15 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/462#discussion_r32466095
  
--- Diff: 
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 ---
@@ -705,7 +705,7 @@ public ExecutionResult createFileInVR(String routerIp, 
String filePath, String f
 VmwareManager mgr = 
getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
 File keyFile = mgr.getSystemVMKeyFile();
 try {
-SshHelper.scpTo(routerIp, 3922, "root", keyFile, null, 
filePath, content.getBytes(), fileName, null);
+SshHelper.scpTo(routerIp, 3922, "root", keyFile, null, 
filePath, content.getBytes("UTF-8"), fileName, null);
--- End diff --

please use Charset.defaultCharset() instead of "UTF8"


---
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 feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fix findbugs encoding issue in VmwareReso...

2015-06-15 Thread rsafonseca
GitHub user rsafonseca opened a pull request:

https://github.com/apache/cloudstack/pull/462

Fix findbugs encoding issue in VmwareResource.java

Key file should be UTF-8 encoded in VR

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rsafonseca/cloudstack findbugs77

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/462.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #462


commit f02aaf83b05e836ea1f4739baa8e60af833f51b6
Author: Rafael da Fonseca 
Date:   2015-06-15T17:40:47Z

Fix findbugs encoding issue in VmwareResource.java
Key file should be UTF-8 encoded in VR




---
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 feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---