private static final long serialVersionUID = 5062964240000304989L;
+ private static final String DCAE_ONSET_MISSING = "dcae onset is missing ";
+
// state when waiting for a lock
public static final String LCM_WAIT_FOR_LOCK = "LCM.WAIT_FOR_LOCK";
// attempt to get a lock for the VM -- if we get it immediately,
// we can go to the 'LCM_GUARD_PENDING' or 'LCM_BEGIN' state
- target = this.onset.getAai().get(onset.getTarget()).toString();
+ target = this.onset.getAai().get(onset.getTarget());
String key = onset.getTargetType() + ":" + target;
if (transaction.getAdjunct(LockAdjunct.class).getLock(this, key,
transaction.getRequestId().toString(), false)) {
*/
private Map<String, String> setCommonPayload(Map<String, String> aai) throws ControlLoopException {
Map<String, String> payload = new HashMap<>();
-
for (Map.Entry<String, String> entry : aai.entrySet()) {
switch (entry.getKey()) {
case DCAE_VSERVER_SELF_LINK_FIELD:
if (entry.getValue() != null) {
payload.put(APPC_LCM_VM_ID_FIELD, entry.getValue());
} else {
- setErrorStatus("dcae onset is missing " + DCAE_VSERVER_SELF_LINK_FIELD);
+ setErrorStatus(DCAE_ONSET_MISSING + DCAE_VSERVER_SELF_LINK_FIELD);
}
break;
case DCAE_IDENTITY_FIELD:
if (entry.getValue() != null) {
payload.put(APPC_LCM_IDENTITY_URL_FIELD, entry.getValue());
} else {
- setErrorStatus("dcae onset is missing " + DCAE_IDENTITY_FIELD);
+ setErrorStatus(DCAE_ONSET_MISSING + DCAE_IDENTITY_FIELD);
}
break;
case DCAE_TENANT_ID_FIELD:
if (entry.getValue() != null) {
payload.put(APPC_LCM_TENANT_ID_FIELD, entry.getValue());
} else {
- setErrorStatus("dcae onset is missing " + DCAE_TENANT_ID_FIELD);
+ setErrorStatus(DCAE_ONSET_MISSING + DCAE_TENANT_ID_FIELD);
}
break;
default:
* @param result the value to store in the 'result' field
*/
void completeOperation(int attempt, String message, PolicyResult result) {
- logger.debug("LCM: completeOperation("
- + "this.attempt=" + this.attempt
- + ", attempt=" + attempt
- + ", result=" + result
- + ", message=" + message);
+ logger.debug("LCM: completeOperation(this.attempt={}, attempt={}, result={}, message ={})",
+ this.attempt, attempt, result, message);
if (this.attempt == attempt) {
// we need to verify that the attempt matches in order to reduce the
// chances that we are reacting to a prior 'Response' message that