Source:
public Response start(Action action) { RunVmParams params; ActionType actionType; if (action.isSetVm()) { Vm vm = action.getVm(); actionType = ActionType.RunVmOnce; params = createRunVmOnceParams(vm, action.isSetVolatile() && action.isVolatile()); } else { actionType = ActionType.RunVm; params = new RunVmParams(guid); } if (action.isSetPause() && action.isPause()) { params.setRunAndPause(true); } boolean sysPrepSet = action.isSetUseSysprep(); boolean useSysPrep = sysPrepSet && action.isUseSysprep(); boolean cloudInitSet = action.isSetUseCloudInit(); boolean useCloudInit = cloudInitSet && action.isUseCloudInit(); boolean ignitionSet = action.isSetUseIgnition(); boolean useIgnition = ignitionSet && action.isUseIgnition(); boolean initializeSet = action.isSetUseInitialize(); boolean useInitialize = initializeSet && action.isUseInitialize(); if (useSysPrep && useCloudInit || useSysPrep && useIgnition || useCloudInit && useIgnition) { Fault fault = new Fault(); fault.setReason(localize(Messages.CANT_USE_MIXED_INIT_SIMULTANEOUSLY)); return Response.status(Response.Status.CONFLICT).entity(fault).build(); } if (useSysPrep) { params.setInitializationType(InitializationType.Sysprep); } else if (useCloudInit) { params.setInitializationType(InitializationType.CloudInit); } else if (useIgnition) { params.setInitializationType(InitializationType.Ignition); } else if ((sysPrepSet && !useSysPrep) || (cloudInitSet && !useCloudInit) || (ignitionSet && !useIgnition)) { params.setInitializationType(InitializationType.None); } else { params.setInitializationType(null); } if (useInitialize) { params.setInitialize(true); } return doAction(actionType, params, action); }

Target:
public Response start(Action action) { RunVmParams params; ActionType actionType; if (action.isSetVm()) { Vm vm = action.getVm(); actionType = ActionType.RunVmOnce; params = createRunVmOnceParams(vm, action.isSetVolatile() && action.isVolatile()); } else { actionType = ActionType.RunVm; params = new RunVmParams(guid); } if (action.isSetPause() && action.isPause()) { params.setRunAndPause(true); } boolean sysPrepSet = action.isSetUseSysprep(); boolean useSysPrep = sysPrepSet && action.isUseSysprep(); boolean cloudInitSet = action.isSetUseCloudInit(); boolean useCloudInit = cloudInitSet && action.isUseCloudInit(); boolean ignitionSet = action.isSetUseIgnition(); boolean useIgnition = ignitionSet && action.isUseIgnition(); boolean useInitialization = action.isSetUseInitialization() && action.isUseInitialization(); if (useSysPrep && useCloudInit || useSysPrep && useIgnition || useCloudInit && useIgnition) { Fault fault = new Fault(); fault.setReason(localize(Messages.CANT_USE_MIXED_INIT_SIMULTANEOUSLY)); return Response.status(Response.Status.CONFLICT).entity(fault).build(); } if (useSysPrep) { params.setInitializationType(InitializationType.Sysprep); } else if (useCloudInit) { params.setInitializationType(InitializationType.CloudInit); } else if (useIgnition) { params.setInitializationType(InitializationType.Ignition); } else if ((sysPrepSet && !useSysPrep) || (cloudInitSet && !useCloudInit) || (ignitionSet && !useIgnition)) { params.setInitializationType(InitializationType.None); } else { params.setInitializationType(null); } params.setInitialize(useInitialization); return doAction(actionType, params, action); }