diff --git a/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/Reconciler.java b/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/Reconciler.java index 5a436da..c9b80db 100644 --- a/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/Reconciler.java +++ b/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/Reconciler.java @@ -103,12 +103,12 @@ public class Reconciler extends Component { // Update state if (event.type() != Type.DELETED) { - channel.setState( + channel.setVmDefinition( patchCr(K8s.get(vmCrApi, defMeta).get().getRaw().deepCopy())); } // Get common data for all reconciles - JsonObject vmDef = channel.state(); + JsonObject vmDef = channel.vmDefinition(); @SuppressWarnings("PMD.UseConcurrentHashMap") Map model = new HashMap<>(); model.put("cr", vmDef); diff --git a/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/VmChannel.java b/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/VmChannel.java index 90fa122..4336ca8 100644 --- a/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/VmChannel.java +++ b/org.jdrupes.vmoperator.manager/src/org/jdrupes/vmoperator/manager/VmChannel.java @@ -31,7 +31,7 @@ public class VmChannel extends DefaultSubchannel { private final EventPipeline pipeline; private final ApiClient client; - private JsonObject state; + private JsonObject vmDefinition; /** * Instantiates a new watch channel. @@ -48,24 +48,24 @@ public class VmChannel extends DefaultSubchannel { } /** - * Sets the last known state of the resource. + * Sets the last known definition of the resource. * - * @param state the state + * @param definition the definition * @return the watch channel */ @SuppressWarnings("PMD.LinguisticNaming") - public VmChannel setState(JsonObject state) { - this.state = state; + public VmChannel setVmDefinition(JsonObject definition) { + this.vmDefinition = definition; return this; } /** - * Returns the last known state of the resource. + * Returns the last known definition of the VM. * * @return the json object */ - public JsonObject state() { - return state; + public JsonObject vmDefinition() { + return vmDefinition; } /**