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