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

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #462
This commit is contained in:
Rafael da Fonseca 2015-06-15 19:40:47 +02:00 committed by Daan Hoogland
parent 6dbf476755
commit 3d48af41a8

View File

@ -705,7 +705,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
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);
} catch (Exception e) {
s_logger.warn("Fail to create file " + filePath + fileName + " in VR " + routerIp, e);
return new ExecutionResult(false, e.getMessage());