From 61a84fecc1eae8640fec2860f4b50102ed0baa64 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 27 Mar 2020 12:35:23 -0400 Subject: Test new actors against simulators Also modified HttpParams to allow "path" to be blank to support any cases that really have no "path" to append to the context URI base path. Issue-ID: POLICY-2405 Change-Id: I49eebde6759659d2804b5a11c1504c37674bd0c4 Signed-off-by: Jim Hahn --- .../policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java | 4 +--- .../java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java | 4 +--- .../java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'models-interactions/model-actors/actor.sdnc/src/main/java') diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java index ff1881302..daced6e81 100644 --- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java +++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java @@ -39,8 +39,6 @@ import org.onap.policy.sdnc.SdncRequest; public class BandwidthOnDemandOperation extends SdncOperation { public static final String NAME = "BandwidthOnDemand"; - public static final String URI = "/GENERIC-RESOURCE-API:vf-module-topology-operation"; - // fields in the enrichment data public static final String SERVICE_ID_KEY = "service-instance.service-instance-id"; public static final String VNF_ID = "vnfId"; @@ -92,7 +90,7 @@ public class BandwidthOnDemandOperation extends SdncOperation { SdncRequest request = new SdncRequest(); request.setNsInstanceId(serviceInstance); request.setRequestId(context.getRequestId()); - request.setUrl(URI); + request.setUrl("/" + getPath()); SdncHealVnfInfo vnfInfo = new SdncHealVnfInfo(); vnfInfo.setVnfId(context.getEnrichment().get(VNF_ID)); diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java index 753da1bb1..2e0d7b855 100644 --- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java +++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java @@ -35,8 +35,6 @@ import org.onap.policy.sdnc.SdncRequest; public class RerouteOperation extends SdncOperation { public static final String NAME = "Reroute"; - public static final String URI = "/GENERIC-RESOURCE-API:network-topology-operation"; - // fields in the enrichment data public static final String SERVICE_ID_KEY = "service-instance.service-instance-id"; public static final String NETWORK_ID_KEY = "network-information.network-id"; @@ -79,7 +77,7 @@ public class RerouteOperation extends SdncOperation { SdncRequest request = new SdncRequest(); request.setNsInstanceId(serviceInstance); request.setRequestId(context.getRequestId()); - request.setUrl(URI); + request.setUrl("/" + getPath()); SdncHealRequest healRequest = new SdncHealRequest(); healRequest.setRequestHeaderInfo(headerInfo); diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java index 1aed75ce6..0c0558282 100644 --- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java +++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java @@ -68,7 +68,7 @@ public abstract class SdncOperation extends HttpOperation { Map headers = makeHeaders(); headers.put("Accept", MediaType.APPLICATION_JSON); - String path = getPath() + request.getUrl(); + String path = getPath(); String url = getClient().getBaseUrl() + path; logMessage(EventType.OUT, CommInfrastructure.REST, url, request); -- cgit 1.2.3-korg