Javadoc fixes.
This commit is contained in:
parent
a2f00eb1ec
commit
3e43d02931
23 changed files with 50 additions and 149 deletions
|
|
@ -44,7 +44,8 @@ public class VmDefChanged extends Event<Void> {
|
||||||
* Instantiates a new VM changed event.
|
* Instantiates a new VM changed event.
|
||||||
*
|
*
|
||||||
* @param type the type
|
* @param type the type
|
||||||
* @param metadata the metadata
|
* @param crd the crd
|
||||||
|
* @param object the object
|
||||||
*/
|
*/
|
||||||
public VmDefChanged(Type type, V1APIResource crd, V1Namespace object) {
|
public VmDefChanged(Type type, V1APIResource crd, V1Namespace object) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import org.jdrupes.vmoperator.runner.qemu.commands.QmpOpenTray;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.commands.QmpRemoveMedium;
|
import org.jdrupes.vmoperator.runner.qemu.commands.QmpRemoveMedium;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.ConfigureQemu;
|
import org.jdrupes.vmoperator.runner.qemu.events.ConfigureQemu;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorResult;
|
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.TrayMovedEvent;
|
import org.jdrupes.vmoperator.runner.qemu.events.TrayMovedEvent;
|
||||||
import org.jgrapes.core.Channel;
|
import org.jgrapes.core.Channel;
|
||||||
|
|
@ -55,7 +54,6 @@ public class CdMediaController extends Component {
|
||||||
* Instantiates a new cdrom controller.
|
* Instantiates a new cdrom controller.
|
||||||
*
|
*
|
||||||
* @param componentChannel the component channel
|
* @param componentChannel the component channel
|
||||||
* @param monitor the monitor
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("PMD.AssignmentToNonFinalStatic")
|
@SuppressWarnings("PMD.AssignmentToNonFinalStatic")
|
||||||
public CdMediaController(Channel componentChannel) {
|
public CdMediaController(Channel componentChannel) {
|
||||||
|
|
@ -120,29 +118,4 @@ public class CdMediaController extends Component {
|
||||||
changeMedium(event.driveId());
|
changeMedium(event.driveId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* On monitor result.
|
|
||||||
*
|
|
||||||
* @param result the result
|
|
||||||
*/
|
|
||||||
@Handler
|
|
||||||
public void onMonitorResult(MonitorResult result) {
|
|
||||||
if (result.executed() instanceof QmpOpenTray) {
|
|
||||||
// if (!result.executed().equals(changeMedium.get("execute").asText())
|
|
||||||
// && !result.executed()
|
|
||||||
// .equals(removeMedium.get("execute").asText())) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// String drive = result.arguments().get("id").asText();
|
|
||||||
// String newFile = pending.get(drive);
|
|
||||||
// if (newFile == null) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (result.successful()) {
|
|
||||||
// fire(new MonitorCommandCompleted(CHANGE_MEDIUM, drive, newFile));
|
|
||||||
// pending.remove(drive);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import org.jdrupes.vmoperator.runner.qemu.commands.QmpQueryHotpluggableCpus;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.ConfigureQemu;
|
import org.jdrupes.vmoperator.runner.qemu.events.ConfigureQemu;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.CpuAdded;
|
import org.jdrupes.vmoperator.runner.qemu.events.CpuAdded;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.CpuDeleted;
|
import org.jdrupes.vmoperator.runner.qemu.events.CpuDeleted;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.HotpluggableCpuResult;
|
import org.jdrupes.vmoperator.runner.qemu.events.HotpluggableCpuStatus;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||||
import org.jgrapes.core.Channel;
|
import org.jgrapes.core.Channel;
|
||||||
import org.jgrapes.core.Component;
|
import org.jgrapes.core.Component;
|
||||||
|
|
@ -50,7 +50,6 @@ public class CpuController extends Component {
|
||||||
* Instantiates a new CPU controller.
|
* Instantiates a new CPU controller.
|
||||||
*
|
*
|
||||||
* @param componentChannel the component channel
|
* @param componentChannel the component channel
|
||||||
* @param monitor the monitor
|
|
||||||
*/
|
*/
|
||||||
public CpuController(Channel componentChannel) {
|
public CpuController(Channel componentChannel) {
|
||||||
super(componentChannel);
|
super(componentChannel);
|
||||||
|
|
@ -81,7 +80,7 @@ public class CpuController extends Component {
|
||||||
* @param result the result
|
* @param result the result
|
||||||
*/
|
*/
|
||||||
@Handler
|
@Handler
|
||||||
public void onHotpluggableCpuResult(HotpluggableCpuResult result) {
|
public void onHotpluggableCpuStatus(HotpluggableCpuStatus result) {
|
||||||
// Sort
|
// Sort
|
||||||
List<ObjectNode> used = new ArrayList<>();
|
List<ObjectNode> used = new ArrayList<>();
|
||||||
List<ObjectNode> unused = new ArrayList<>();
|
List<ObjectNode> unused = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ public class RamController extends Component {
|
||||||
* Instantiates a new CPU controller.
|
* Instantiates a new CPU controller.
|
||||||
*
|
*
|
||||||
* @param componentChannel the component channel
|
* @param componentChannel the component channel
|
||||||
* @param monitor the monitor
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("PMD.AssignmentToNonFinalStatic")
|
@SuppressWarnings("PMD.AssignmentToNonFinalStatic")
|
||||||
public RamController(Channel componentChannel) {
|
public RamController(Channel componentChannel) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class QmpAddCpu.
|
* A {@link QmpCommand} that plugs a CPU into an unused slot.
|
||||||
*/
|
*/
|
||||||
public class QmpAddCpu extends QmpCommand {
|
public class QmpAddCpu extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -41,11 +41,6 @@ public class QmpAddCpu extends QmpCommand {
|
||||||
this.cpuId = cpuId;
|
this.cpuId = cpuId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
ObjectNode cmd = mapper.createObjectNode();
|
ObjectNode cmd = mapper.createObjectNode();
|
||||||
|
|
@ -58,11 +53,6 @@ public class QmpAddCpu extends QmpCommand {
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpAddCpu(" + unused.get("type") + ", " + cpuId + ")";
|
return "QmpAddCpu(" + unused.get("type") + ", " + cpuId + ")";
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class QmpCapabilities.
|
* A {@link QmpCommand} that configures the Qmp capabilities.
|
||||||
*/
|
*/
|
||||||
public class QmpCapabilities extends QmpCommand {
|
public class QmpCapabilities extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -30,21 +30,11 @@ public class QmpCapabilities extends QmpCommand {
|
||||||
private static final JsonNode jsonTemplate
|
private static final JsonNode jsonTemplate
|
||||||
= parseJson("{ \"execute\": \"qmp_capabilities\" }");
|
= parseJson("{ \"execute\": \"qmp_capabilities\" }");
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
return jsonTemplate.deepCopy();
|
return jsonTemplate.deepCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpCapabilities()";
|
return "QmpCapabilities()";
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The Class QmpChangeMedium.
|
* A {@link QmpCommand} that triggers a media change in a CDROM drive.
|
||||||
*/
|
*/
|
||||||
public class QmpChangeMedium extends QmpCommand {
|
public class QmpChangeMedium extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -36,20 +37,16 @@ public class QmpChangeMedium extends QmpCommand {
|
||||||
private final String file;
|
private final String file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new sets the current ram.
|
* Instantiates a new qmp change medium.
|
||||||
*
|
*
|
||||||
* @param driveId the drive id
|
* @param driveId the drive id
|
||||||
|
* @param file the file
|
||||||
*/
|
*/
|
||||||
public QmpChangeMedium(String driveId, String file) {
|
public QmpChangeMedium(String driveId, String file) {
|
||||||
this.driveId = driveId;
|
this.driveId = driveId;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
var cmd = jsonTemplate.deepCopy();
|
var cmd = jsonTemplate.deepCopy();
|
||||||
|
|
@ -58,11 +55,6 @@ public class QmpChangeMedium extends QmpCommand {
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpRemoveMedium(" + driveId + ")";
|
return "QmpRemoveMedium(" + driveId + ")";
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public abstract class QmpCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To json.
|
* Returns the Json to be sent to the Qemu process.
|
||||||
*
|
*
|
||||||
* @return the json node
|
* @return the json node
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class QmpCont.
|
* A {@link QmpCommand} that causes the Qemu process to continue execution.
|
||||||
*/
|
*/
|
||||||
public class QmpCont extends QmpCommand {
|
public class QmpCont extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -30,21 +30,11 @@ public class QmpCont extends QmpCommand {
|
||||||
private static final JsonNode jsonTemplate
|
private static final JsonNode jsonTemplate
|
||||||
= parseJson("{ \"execute\": \"cont\" }");
|
= parseJson("{ \"execute\": \"cont\" }");
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
return jsonTemplate.deepCopy();
|
return jsonTemplate.deepCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpCont()";
|
return "QmpCont()";
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The Class QmpDelCpu.
|
* A {@link QmpCommand} that removes a CPU with the given id.
|
||||||
*/
|
*/
|
||||||
public class QmpDelCpu extends QmpCommand {
|
public class QmpDelCpu extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -34,19 +35,14 @@ public class QmpDelCpu extends QmpCommand {
|
||||||
private final String cpuId;
|
private final String cpuId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new sets the current ram.
|
* Instantiates a new qmp del cpu.
|
||||||
*
|
*
|
||||||
* @param size the size
|
* @param cpuId the cpu id
|
||||||
*/
|
*/
|
||||||
public QmpDelCpu(String cpuId) {
|
public QmpDelCpu(String cpuId) {
|
||||||
this.cpuId = cpuId;
|
this.cpuId = cpuId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
var cmd = jsonTemplate.deepCopy();
|
var cmd = jsonTemplate.deepCopy();
|
||||||
|
|
@ -54,11 +50,6 @@ public class QmpDelCpu extends QmpCommand {
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpDelCpu(" + cpuId + ")";
|
return "QmpDelCpu(" + cpuId + ")";
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The Class QmpOpenTray.
|
* A {@link QmpCommand} that causes a CDROM drive's tray to be opened.
|
||||||
*/
|
*/
|
||||||
public class QmpOpenTray extends QmpCommand {
|
public class QmpOpenTray extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -34,7 +35,7 @@ public class QmpOpenTray extends QmpCommand {
|
||||||
private final String driveId;
|
private final String driveId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new sets the current ram.
|
* Instantiates a new qmp open tray.
|
||||||
*
|
*
|
||||||
* @param driveId the drive id
|
* @param driveId the drive id
|
||||||
*/
|
*/
|
||||||
|
|
@ -42,11 +43,6 @@ public class QmpOpenTray extends QmpCommand {
|
||||||
this.driveId = driveId;
|
this.driveId = driveId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
var cmd = jsonTemplate.deepCopy();
|
var cmd = jsonTemplate.deepCopy();
|
||||||
|
|
@ -54,11 +50,6 @@ public class QmpOpenTray extends QmpCommand {
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpOpenTray(" + driveId + ")";
|
return "QmpOpenTray(" + driveId + ")";
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class QmpSetBalloon.
|
* A {@link QmpCommand} that send a powerdown to the VM.
|
||||||
*/
|
*/
|
||||||
public class QmpPowerdown extends QmpCommand {
|
public class QmpPowerdown extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -30,11 +30,6 @@ public class QmpPowerdown extends QmpCommand {
|
||||||
private static final JsonNode jsonTemplate
|
private static final JsonNode jsonTemplate
|
||||||
= parseJson("{ \"execute\": \"system_powerdown\" }");
|
= parseJson("{ \"execute\": \"system_powerdown\" }");
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
return jsonTemplate.deepCopy();
|
return jsonTemplate.deepCopy();
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,8 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
|
||||||
// TODO: Auto-generated Javadoc
|
|
||||||
/**
|
/**
|
||||||
* The Class QmpQueryHotpluggableCpus.
|
* A {@link QmpCommand} that queries the hotpluggable CPUs.
|
||||||
*/
|
*/
|
||||||
public class QmpQueryHotpluggableCpus extends QmpCommand {
|
public class QmpQueryHotpluggableCpus extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -31,21 +30,11 @@ public class QmpQueryHotpluggableCpus extends QmpCommand {
|
||||||
private static final JsonNode jsonTemplate = parseJson(
|
private static final JsonNode jsonTemplate = parseJson(
|
||||||
"{\"execute\":\"query-hotpluggable-cpus\",\"arguments\":{}}");
|
"{\"execute\":\"query-hotpluggable-cpus\",\"arguments\":{}}");
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
return jsonTemplate.deepCopy();
|
return jsonTemplate.deepCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QmpQueryHotpluggableCpus()";
|
return "QmpQueryHotpluggableCpus()";
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@ package org.jdrupes.vmoperator.runner.qemu.commands;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The Class QmpRemoveMedium.
|
* A {@link QmpCommand} that removes the medium from a CDROM drive.
|
||||||
*/
|
*/
|
||||||
public class QmpRemoveMedium extends QmpCommand {
|
public class QmpRemoveMedium extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -34,7 +35,7 @@ public class QmpRemoveMedium extends QmpCommand {
|
||||||
private final String driveId;
|
private final String driveId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new sets the current ram.
|
* Instantiates a new qmp remove medium.
|
||||||
*
|
*
|
||||||
* @param driveId the drive id
|
* @param driveId the drive id
|
||||||
*/
|
*/
|
||||||
|
|
@ -42,11 +43,6 @@ public class QmpRemoveMedium extends QmpCommand {
|
||||||
this.driveId = driveId;
|
this.driveId = driveId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
var cmd = jsonTemplate.deepCopy();
|
var cmd = jsonTemplate.deepCopy();
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,9 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The Class QmpSetBalloon.
|
* A {@link QmpCommand} that sets the balloon value.
|
||||||
*/
|
*/
|
||||||
public class QmpSetBalloon extends QmpCommand {
|
public class QmpSetBalloon extends QmpCommand {
|
||||||
|
|
||||||
|
|
@ -35,17 +36,14 @@ public class QmpSetBalloon extends QmpCommand {
|
||||||
private final BigInteger size;
|
private final BigInteger size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new sets the current ram.
|
* Instantiates a new qmp set balloon.
|
||||||
|
*
|
||||||
|
* @param size the size
|
||||||
*/
|
*/
|
||||||
public QmpSetBalloon(BigInteger size) {
|
public QmpSetBalloon(BigInteger size) {
|
||||||
this.size = size;
|
this.size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To Json.
|
|
||||||
*
|
|
||||||
* @return the json node
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JsonNode toJson() {
|
public JsonNode toJson() {
|
||||||
var cmd = jsonTemplate.deepCopy();
|
var cmd = jsonTemplate.deepCopy();
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,12 @@ import org.jgrapes.core.Channel;
|
||||||
import org.jgrapes.core.Event;
|
import org.jgrapes.core.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class ConfigureQemu.
|
* An {@link Event} that notifies controllers about an updated
|
||||||
|
* configuration. Controllers should adapt the resource that they
|
||||||
|
* manage to the new configuration. If the adaption cannot be
|
||||||
|
* made by the handler alone, it should call {@link Event#suspendHandling()}
|
||||||
|
* on the event and only {@link Event#resumeHandling() resume handling}
|
||||||
|
* when the adaption has completed.
|
||||||
*/
|
*/
|
||||||
public class ConfigureQemu extends Event<Void> {
|
public class ConfigureQemu extends Event<Void> {
|
||||||
|
|
||||||
|
|
@ -32,7 +37,7 @@ public class ConfigureQemu extends Event<Void> {
|
||||||
private final State state;
|
private final State state;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new configure qemu.
|
* Instantiates a new configuration event.
|
||||||
*
|
*
|
||||||
* @param channels the channels
|
* @param channels the channels
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,7 +58,7 @@ public class ConfigureQemu extends Event<Void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the runner's state.
|
* Returns the runner's state when the event was fired.
|
||||||
*
|
*
|
||||||
* @return the state
|
* @return the state
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand;
|
import org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class CpuAdded.
|
* A {@link MonitorResult} that indicates that a CPU has been added.
|
||||||
*/
|
*/
|
||||||
public class CpuAdded extends MonitorResult {
|
public class CpuAdded extends MonitorResult {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand;
|
import org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class CpuDeleted.
|
* A {@link MonitorResult} that indicates that a CPU has been deleted.
|
||||||
*/
|
*/
|
||||||
public class CpuDeleted extends MonitorResult {
|
public class CpuDeleted extends MonitorResult {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand;
|
import org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class HotpluggableCpuResult.
|
* A {@link MonitorResult} that reports the hot pluggable CPU status.
|
||||||
*/
|
*/
|
||||||
public class HotpluggableCpuResult extends MonitorResult {
|
public class HotpluggableCpuStatus extends MonitorResult {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new hotpluggable cpu result.
|
* Instantiates a new hotpluggable cpu result.
|
||||||
|
|
@ -32,7 +32,7 @@ public class HotpluggableCpuResult extends MonitorResult {
|
||||||
* @param command the command
|
* @param command the command
|
||||||
* @param response the response
|
* @param response the response
|
||||||
*/
|
*/
|
||||||
public HotpluggableCpuResult(QmpCommand command, JsonNode response) {
|
public HotpluggableCpuStatus(QmpCommand command, JsonNode response) {
|
||||||
super(command, response);
|
super(command, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -24,7 +24,8 @@ import org.jgrapes.core.Components;
|
||||||
import org.jgrapes.core.Event;
|
import org.jgrapes.core.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A command to be executed by the monitor.
|
* An {@link Event} that causes some component to send a QMP
|
||||||
|
* command to the Qemu process.
|
||||||
*/
|
*/
|
||||||
public class MonitorCommand extends Event<Void> {
|
public class MonitorCommand extends Event<Void> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ import java.util.Optional;
|
||||||
import org.jgrapes.core.Event;
|
import org.jgrapes.core.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signals the reception of an event from the monitor.
|
* An {@link Event} that signals the reception of a QMP event from
|
||||||
|
* the Qemu process.
|
||||||
*/
|
*/
|
||||||
public class MonitorEvent extends Event<Void> {
|
public class MonitorEvent extends Event<Void> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import org.jgrapes.core.Components;
|
||||||
import org.jgrapes.core.Event;
|
import org.jgrapes.core.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signals the reception of a result from the monitor.
|
* Signals the reception of a result from executing a QMP command.
|
||||||
*/
|
*/
|
||||||
public class MonitorResult extends Event<Void> {
|
public class MonitorResult extends Event<Void> {
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class MonitorResult extends Event<Void> {
|
||||||
*/
|
*/
|
||||||
public static MonitorResult from(QmpCommand command, JsonNode response) {
|
public static MonitorResult from(QmpCommand command, JsonNode response) {
|
||||||
if (command instanceof QmpQueryHotpluggableCpus) {
|
if (command instanceof QmpQueryHotpluggableCpus) {
|
||||||
return new HotpluggableCpuResult(command, response);
|
return new HotpluggableCpuStatus(command, response);
|
||||||
}
|
}
|
||||||
if (command instanceof QmpAddCpu) {
|
if (command instanceof QmpAddCpu) {
|
||||||
return new CpuAdded(command, response);
|
return new CpuAdded(command, response);
|
||||||
|
|
@ -58,7 +58,7 @@ public class MonitorResult extends Event<Void> {
|
||||||
/**
|
/**
|
||||||
* Instantiates a new monitor result.
|
* Instantiates a new monitor result.
|
||||||
*
|
*
|
||||||
* @param executed the executed
|
* @param command the command
|
||||||
* @param response the response
|
* @param response the response
|
||||||
*/
|
*/
|
||||||
protected MonitorResult(QmpCommand command, JsonNode response) {
|
protected MonitorResult(QmpCommand command, JsonNode response) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.jdrupes.vmoperator.runner.qemu.CdMediaController.TrayState;
|
import org.jdrupes.vmoperator.runner.qemu.CdMediaController.TrayState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class TrayMovedEvent.
|
* Signals a change of tray state of one of the VM's CDROM drives.
|
||||||
*/
|
*/
|
||||||
public class TrayMovedEvent extends MonitorEvent {
|
public class TrayMovedEvent extends MonitorEvent {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue