Delete preprocessed flag from actors
[policy/models.git] / models-interactions / model-actors / actor.aai / src / main / java / org / onap / policy / controlloop / actor / aai / AaiGetPnfOperation.java
index fbf4096..c1582c5 100644 (file)
@@ -26,11 +26,11 @@ import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 import javax.ws.rs.client.Invocation.Builder;
 import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
 import org.onap.policy.aai.AaiConstants;
 import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig;
 
@@ -70,11 +70,10 @@ public class AaiGetPnfOperation extends AaiGetOperation {
     protected CompletableFuture<OperationOutcome> startOperationAsync(int attempt, OperationOutcome outcome) {
         Map<String, Object> headers = makeHeaders();
 
-        headers.put("Accept", MediaType.APPLICATION_JSON);
-
         StringBuilder str = new StringBuilder(getClient().getBaseUrl());
 
-        String path = getPath() + URI_SEP + URLEncoder.encode(params.getTargetEntity(), StandardCharsets.UTF_8);
+        String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+        String path = getPath() + URI_SEP + URLEncoder.encode(target, StandardCharsets.UTF_8);
         WebTarget web = getClient().getWebTarget().path(path);
         str.append(path);