merged vbox conflict

This commit is contained in:
Adrian Cole 2011-09-27 15:38:46 -07:00
commit c54ce66ead
3 changed files with 3 additions and 2 deletions

View File

@ -51,6 +51,7 @@ public class IMachineToHardware implements Function<IMachine, Hardware> {
Boolean is64Bit = guestOSType.getIs64Bit(); Boolean is64Bit = guestOSType.getIs64Bit();
HardwareBuilder hardwareBuilder = new HardwareBuilder(); HardwareBuilder hardwareBuilder = new HardwareBuilder();
hardwareBuilder.ids(vm.getId()); hardwareBuilder.ids(vm.getId());
hardwareBuilder.supportsImage(ImagePredicates.idEquals(vm.getId()));
hardwareBuilder.is64Bit(is64Bit); hardwareBuilder.is64Bit(is64Bit);
hardwareBuilder.supportsImage(ImagePredicates.idEquals(vm.getId())); hardwareBuilder.supportsImage(ImagePredicates.idEquals(vm.getId()));
return hardwareBuilder.build(); return hardwareBuilder.build();

View File

@ -50,7 +50,6 @@ public class IMachineToImage implements Function<IMachine, Image> {
IGuestOSType guestOSType = virtualboxManager.getVBox().getGuestOSType(from.getOSTypeId()); IGuestOSType guestOSType = virtualboxManager.getVBox().getGuestOSType(from.getOSTypeId());
//Somehow this method gets called with the correct product item.
OsFamily family = osFamily().apply(guestOSType.getDescription()); OsFamily family = osFamily().apply(guestOSType.getDescription());
OperatingSystem os = OperatingSystem.builder() OperatingSystem os = OperatingSystem.builder()
.description(guestOSType.getDescription()) .description(guestOSType.getDescription())

View File

@ -49,12 +49,13 @@ public class IMachineToHardwareTest {
String machineId = "hw-machineId"; String machineId = "hw-machineId";
expect(vm.getOSTypeId()).andReturn("os-type").anyTimes(); expect(vm.getOSTypeId()).andReturn("os-type").anyTimes();
expect(vm.getId()).andReturn(machineId).anyTimes();
expect(vm.getDescription()).andReturn(linuxDescription).anyTimes(); expect(vm.getDescription()).andReturn(linuxDescription).anyTimes();
expect(vBox.getGuestOSType(eq("os-type"))).andReturn(guestOsType); expect(vBox.getGuestOSType(eq("os-type"))).andReturn(guestOsType);
expect(vbm.getVBox()).andReturn(vBox); expect(vbm.getVBox()).andReturn(vBox);
expect(guestOsType.getIs64Bit()).andReturn(true); expect(guestOsType.getIs64Bit()).andReturn(true);
expect(vm.getId()).andReturn(machineId).atLeastOnce();
replay(vbm, vBox, vm, guestOsType); replay(vbm, vBox, vm, guestOsType);