aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-05-01 14:10:02 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-01 14:10:02 +0000
commit9d305608206854a1820e742aaccd69fab2974353 (patch)
tree8178ef1921e4e5345f7d71d352440438372bec7e /adapters
parentb503889326deea3fe0869b6ae07d6ce1d2810006 (diff)
parent07a1b496b61c0515b6aa2f6235496e60191991ec (diff)
Merge "Fight against the encoding in openstack"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
index 740eb778b0..687afeda40 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
@@ -74,10 +74,13 @@ public class GlanceClientImpl extends MsoCommonUtils {
String encodedName = null;
if (name != null) {
try {
- encodedName = URLEncoder.encode(name, "UTF-8");
+ encodedName =
+ "in:\"" + URLEncoder.encode(name, "UTF-8").replace("+", "%20").replace("%3A", ":") + "\"";
} catch (UnsupportedEncodingException e) {
- logger.error("error encoding query parameter: {}", encodedName);
+ logger.error("Error Encoding Image Name", e);
+ throw new GlanceClientException("Error Endcoding Name", e);
}
+
}
Glance glanceClient = getGlanceClient(cloudSiteId, tenantId);
// list is set to false, otherwise an invalid URL is appended