Amend last commit, used 4 spaces in code formatting instead of 1 tab character.

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #560
This commit is contained in:
weingartner 2015-07-06 13:14:27 -03:00 committed by wilderrodrigues
parent 50c4836c9f
commit 25e9918c57
1 changed files with 29 additions and 31 deletions

View File

@ -35,38 +35,36 @@ import com.xensource.xenapi.VM;
@Local(value = ServerResource.class)
public class XcpOssResource extends CitrixResourceBase {
private static final long mem_32m = 33554432L;
private static final long mem_32m = 33554432L;
@Override
protected List<File> getPatchFiles() {
final List<File> files = new ArrayList<File>();
final String patch = "scripts/vm/hypervisor/xenserver/xcposs/patch";
final String patchfilePath = Script.findScript("", patch);
if (patchfilePath == null) {
throw new CloudRuntimeException("Unable to find patch file "
+ patch);
}
final File file = new File(patchfilePath);
files.add(file);
return files;
}
@Override
protected List<File> getPatchFiles() {
final List<File> files = new ArrayList<File>();
final String patch = "scripts/vm/hypervisor/xenserver/xcposs/patch";
final String patchfilePath = Script.findScript("", patch);
if (patchfilePath == null) {
throw new CloudRuntimeException("Unable to find patch file "
+ patch);
}
final File file = new File(patchfilePath);
files.add(file);
return files;
}
@Override
protected String getGuestOsType(final String stdType,
final String platformEmulator, final boolean bootFromCD) {
if (stdType.equalsIgnoreCase("Debian GNU/Linux 6(64-bit)")) {
return "Debian Squeeze 6.0 (64-bit)";
} else if (stdType.equalsIgnoreCase("CentOS 5.6 (64-bit)")) {
return "CentOS 5 (64-bit)";
} else {
return super.getGuestOsType(stdType, platformEmulator, bootFromCD);
}
}
@Override
protected String getGuestOsType(final String stdType,
final String platformEmulator, final boolean bootFromCD) {
if (stdType.equalsIgnoreCase("Debian GNU/Linux 6(64-bit)")) {
return "Debian Squeeze 6.0 (64-bit)";
} else if (stdType.equalsIgnoreCase("CentOS 5.6 (64-bit)")) {
return "CentOS 5 (64-bit)";
} else {
return super.getGuestOsType(stdType, platformEmulator, bootFromCD);
}
}
@Override
protected void setMemory(final Connection conn, final VM vm,
final long minMemsize, final long maxMemsize)
throws XmlRpcException, XenAPIException {
vm.setMemoryLimits(conn, mem_32m, maxMemsize, minMemsize, maxMemsize);
}
@Override
protected void setMemory(final Connection conn, final VM vm, long minMemsize, final long maxMemsize) throws XmlRpcException, XenAPIException {
vm.setMemoryLimits(conn, mem_32m, maxMemsize, minMemsize, maxMemsize);
}
}