use of com.vmware.vim25.VirtualFloppyDeviceBackingInfo in project photon-model by vmware.
the class ClientUtils method createFloppy.
public static VirtualDeviceConfigSpec createFloppy(VirtualDevice sioController, int unitNumber) {
VirtualFloppy floppy = new VirtualFloppy();
floppy.setControllerKey(sioController.getKey());
floppy.setUnitNumber(unitNumber);
VirtualDeviceConnectInfo info = new VirtualDeviceConnectInfo();
info.setAllowGuestControl(true);
info.setConnected(true);
info.setStartConnected(true);
floppy.setConnectable(info);
VirtualFloppyDeviceBackingInfo backing = new VirtualFloppyDeviceBackingInfo();
backing.setDeviceName(String.format("floppy-%d", unitNumber));
floppy.setBacking(backing);
VirtualDeviceConfigSpec spec = new VirtualDeviceConfigSpec();
spec.setDevice(floppy);
spec.setOperation(VirtualDeviceConfigSpecOperation.ADD);
return spec;
}
Aggregations