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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
On configuration update.protected void
updateCondition
(VmDefinitionModel from, com.google.gson.JsonObject status, String type, boolean state, String reason, String message) Update condition.Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setName
Methods 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, unregisterAsGenerator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 void updateCondition(VmDefinitionModel from, com.google.gson.JsonObject status, String type, boolean state, String reason, String message) Update condition.- Parameters:
from
- the vM definitionstatus
- the current statustype
- the condition typestate
- the new statereason
- the reason for the changeapiClient
- the api client
-