aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2020-04-30 09:58:21 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-04-30 09:58:21 -0400
commit07a1b496b61c0515b6aa2f6235496e60191991ec (patch)
tree46d06d77f6347ef807fca6c1ecfb71573961525a /adapters/mso-adapter-utils/src/main/java
parentf280dcfe416a0bcd279a4a091593c9097c23ce3c (diff)
Fight against the encoding in openstack
Fight against the encoding in openstack Fight against the encoding in openstack Issue-ID: SO-2854 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I239093e28f835a5de480f07b480c5ec3931ccc83
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java')
-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