* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.controlloop.actor.vfc;
+import jakarta.ws.rs.core.Response;
import java.util.List;
-import javax.ws.rs.core.Response;
import org.apache.commons.lang3.StringUtils;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
* @param params operation parameters
* @param config configuration for this operation
*/
- public VfcOperation(ControlLoopOperationParams params, HttpConfig config) {
+ protected VfcOperation(ControlLoopOperationParams params, HttpConfig config) {
super(params, config, VfcResponse.class, PROPERTY_NAMES);
setUsePolling();
/**
* Treats everything as a success, so we always go into
- * {@link #postProcessResponse(OperationOutcome, String, Response, SoResponse)}.
+ * {@link #postProcessResponse (OperationOutcome, String, Response, SoResponse)}.
*/
@Override
protected boolean isSuccess(Response rawResponse, VfcResponse response) {
"Missing enrichment data for service instance, server id, or server name.");
}
- VfcHealActionVmInfo vmActionInfo = new VfcHealActionVmInfo();
+ var vmActionInfo = new VfcHealActionVmInfo();
vmActionInfo.setVmid(vmId);
vmActionInfo.setVmname(vmName);
- VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
+ var additionalParams = new VfcHealAdditionalParams();
additionalParams.setAction(getName());
additionalParams.setActionInfo(vmActionInfo);
- VfcHealRequest healRequest = new VfcHealRequest();
+ var healRequest = new VfcHealRequest();
healRequest.setVnfInstanceId(vnfId);
healRequest.setCause(getName());
healRequest.setAdditionalParams(additionalParams);
- VfcRequest request = new VfcRequest();
+ var request = new VfcRequest();
request.setHealRequest(healRequest);
request.setNsInstanceId(serviceInstance);
request.setRequestId(params.getRequestId());