Rename methods.
This commit is contained in:
parent
65306f27b3
commit
cc77a81f8e
2 changed files with 10 additions and 10 deletions
|
|
@ -103,12 +103,12 @@ public class Reconciler extends Component {
|
||||||
|
|
||||||
// Update state
|
// Update state
|
||||||
if (event.type() != Type.DELETED) {
|
if (event.type() != Type.DELETED) {
|
||||||
channel.setState(
|
channel.setVmDefinition(
|
||||||
patchCr(K8s.get(vmCrApi, defMeta).get().getRaw().deepCopy()));
|
patchCr(K8s.get(vmCrApi, defMeta).get().getRaw().deepCopy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get common data for all reconciles
|
// Get common data for all reconciles
|
||||||
JsonObject vmDef = channel.state();
|
JsonObject vmDef = channel.vmDefinition();
|
||||||
@SuppressWarnings("PMD.UseConcurrentHashMap")
|
@SuppressWarnings("PMD.UseConcurrentHashMap")
|
||||||
Map<String, Object> model = new HashMap<>();
|
Map<String, Object> model = new HashMap<>();
|
||||||
model.put("cr", vmDef);
|
model.put("cr", vmDef);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class VmChannel extends DefaultSubchannel {
|
||||||
|
|
||||||
private final EventPipeline pipeline;
|
private final EventPipeline pipeline;
|
||||||
private final ApiClient client;
|
private final ApiClient client;
|
||||||
private JsonObject state;
|
private JsonObject vmDefinition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new watch channel.
|
* 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
|
* @return the watch channel
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("PMD.LinguisticNaming")
|
@SuppressWarnings("PMD.LinguisticNaming")
|
||||||
public VmChannel setState(JsonObject state) {
|
public VmChannel setVmDefinition(JsonObject definition) {
|
||||||
this.state = state;
|
this.vmDefinition = definition;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the last known state of the resource.
|
* Returns the last known definition of the VM.
|
||||||
*
|
*
|
||||||
* @return the json object
|
* @return the json object
|
||||||
*/
|
*/
|
||||||
public JsonObject state() {
|
public JsonObject vmDefinition() {
|
||||||
return state;
|
return vmDefinition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue