Moved missed condition.
This commit is contained in:
parent
7e650bf980
commit
7437a17c9f
2 changed files with 5 additions and 5 deletions
|
|
@ -75,13 +75,13 @@ public class Constants {
|
||||||
/** The Constant ASSIGNMENT. */
|
/** The Constant ASSIGNMENT. */
|
||||||
public static final String ASSIGNMENT = "assignment";
|
public static final String ASSIGNMENT = "assignment";
|
||||||
|
|
||||||
/** The Constant COND_RUNNING. */
|
|
||||||
public static final String COND_RUNNING = "Running";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conditions used in Status.
|
* Conditions used in Status.
|
||||||
*/
|
*/
|
||||||
public static class Condition {
|
public static class Condition {
|
||||||
|
/** The Constant COND_RUNNING. */
|
||||||
|
public static final String RUNNING = "Running";
|
||||||
|
|
||||||
/** The Constant COND_BOOTED. */
|
/** The Constant COND_BOOTED. */
|
||||||
public static final String BOOTED = "Booted";
|
public static final String BOOTED = "Booted";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ public class StatusUpdater extends VmDefUpdater {
|
||||||
}
|
}
|
||||||
status.getAsJsonArray("conditions").asList().stream()
|
status.getAsJsonArray("conditions").asList().stream()
|
||||||
.map(cond -> (JsonObject) cond)
|
.map(cond -> (JsonObject) cond)
|
||||||
.filter(cond -> Status.COND_RUNNING
|
.filter(cond -> Condition.RUNNING
|
||||||
.equals(cond.get("type").getAsString()))
|
.equals(cond.get("type").getAsString()))
|
||||||
.forEach(cond -> cond.addProperty("observedGeneration",
|
.forEach(cond -> cond.addProperty("observedGeneration",
|
||||||
from.getMetadata().getGeneration()));
|
from.getMetadata().getGeneration()));
|
||||||
|
|
@ -200,7 +200,7 @@ public class StatusUpdater extends VmDefUpdater {
|
||||||
}
|
}
|
||||||
vmStub.updateStatus(from -> {
|
vmStub.updateStatus(from -> {
|
||||||
boolean running = event.runState().vmRunning();
|
boolean running = event.runState().vmRunning();
|
||||||
updateCondition(vmDef, Status.COND_RUNNING, running, event.reason(),
|
updateCondition(vmDef, Condition.RUNNING, running, event.reason(),
|
||||||
event.message());
|
event.message());
|
||||||
JsonObject status = updateCondition(vmDef, Condition.BOOTED,
|
JsonObject status = updateCondition(vmDef, Condition.BOOTED,
|
||||||
event.runState() == RunState.BOOTED, event.reason(),
|
event.runState() == RunState.BOOTED, event.reason(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue