Class VmDefUpdater
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jdrupes.vmoperator.runner.qemu.VmDefUpdater
- All Implemented Interfaces:
Iterable<ComponentType>,Channel,ComponentType,Eligible,Manager
- Direct Known Subclasses:
ConsoleTracker,StatusUpdater
Updates the CR status.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidOn configuration update.protected com.google.gson.JsonObjectupdateCondition(VmDefinition from, String type, boolean state, String reason, String message) Update condition.Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setNameMethods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, channelReplacements, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGeneratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
namespace
-
vmName
-
apiClient
-
-
Constructor Details
-
VmDefUpdater
Instantiates a new status updater.- Parameters:
componentChannel- the component channel- Throws:
IOException
-
-
Method Details
-
onConfigurationUpdate
On configuration update.- Parameters:
event- the event
-
updateCondition
protected com.google.gson.JsonObject updateCondition(VmDefinition from, String type, boolean state, String reason, String message) Update condition.The
fromVM definition is used to determine the observed generation and the current status. This method is intended to be called in the function passed toK8sGenericStub.updateStatus(O, java.util.function.Function<O, java.lang.Object>).- Parameters:
from- the VM definitiontype- the condition typestate- the new statereason- the reason for the changemessage- the message- Returns:
- the updated status
-