diff options
author | Amichai Hemli <amichai.hemli@intl.att.com> | 2019-09-23 21:45:26 +0300 |
---|---|---|
committer | Amichai Hemli <amichai.hemli@intl.att.com> | 2019-09-24 12:39:45 +0300 |
commit | 2d65dade2ac365b1baf9926b8d3de9c378a6f528 (patch) | |
tree | 93e86d9c3947139b921d74861dd545161fdbb12c /vid-app-common/src/main | |
parent | 5f7bd08676754cd28ed761365651c578854e25a1 (diff) |
Encoding path segments on reduced custom query
Need to URL-encode the path segments when sending URL in the custom queries to A&AI
Issue-ID: VID-596
Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com>
Change-Id: Ie551cccfc1a8c627984185324a59c18f13200e91
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java index 644309d95..7e96c93cd 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java @@ -315,13 +315,13 @@ public class AaiClient implements AaiClientInterface { if (cloudRegion != null){ return ImmutableMap.of( "start", ImmutableList - .of("/business/customers/customer/" + subscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances"), + .of("/business/customers/customer/" + encodePathSegment(subscriberId) + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances"), "query", "query/vnfs-fromServiceInstance-filterByCloudRegion?nfRole=" + nfRole + "&cloudRegionID=" + cloudRegion + "" ); }else { return ImmutableMap.of( "start", ImmutableList - .of("/business/customers/customer/" + subscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances"), + .of("/business/customers/customer/" + encodePathSegment(subscriberId) + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances"), "query", "query/vnfs-fromServiceInstance-filter?nfRole=" + nfRole + "" ); } @@ -330,14 +330,14 @@ public class AaiClient implements AaiClientInterface { if (cloudRegion != null){ return ImmutableMap.of( "start", ImmutableList - .of("/business/customers/customer/" + subscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances"), + .of("/business/customers/customer/" + encodePathSegment(subscriberId) + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances"), "query", "query/vnfs-fromServiceInstance-filterByCloudRegion?cloudRegionID=" + cloudRegion + "" ); } return ImmutableMap.of( "start", ImmutableList - .of("/business/customers/customer/" + subscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances"), + .of("/business/customers/customer/" + encodePathSegment(subscriberId) + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances"), "query", "query/vnfs-fromServiceInstance-filter" ); } |