aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java8
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NeutronClientImpl.java7
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.7__Update_Optical_Service_Recipe.sql6
3 files changed, 18 insertions, 3 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 698b605be3..b98811c490 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
@@ -26,11 +26,11 @@ import org.onap.so.openstack.exceptions.MsoException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
+import org.springframework.web.util.UriUtils;
import com.woorea.openstack.base.client.OpenStackRequest;
import com.woorea.openstack.glance.Glance;
import com.woorea.openstack.glance.model.Images;
-
@Component
public class GlanceClientImpl extends MsoCommonUtils {
@@ -70,10 +70,14 @@ public class GlanceClientImpl extends MsoCommonUtils {
public Images queryImages(String cloudSiteId, String tenantId, int limit, String visibility, String marker,
String name) throws MsoCloudSiteNotFound, GlanceClientException {
try {
+ String encodedName = null;
+ if (name != null) {
+ encodedName = UriUtils.encodeQueryParam(name, "UTF-8");
+ }
Glance glanceClient = getGlanceClient(cloudSiteId, tenantId);
// list is set to false, otherwise an invalid URL is appended
OpenStackRequest<Images> request = glanceClient.images().list(false).queryParam("visibility", visibility)
- .queryParam("limit", limit).queryParam("marker", marker).queryParam("name", name);
+ .queryParam("limit", limit).queryParam("marker", marker).queryParam("name", encodedName);
return executeAndRecordOpenstackRequest(request, false);
} catch (MsoException e) {
logger.error("Error building Glance Client", e);
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NeutronClientImpl.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NeutronClientImpl.java
index 8f9dbd1f5a..27ff86d7f7 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NeutronClientImpl.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NeutronClientImpl.java
@@ -26,6 +26,7 @@ import org.onap.so.openstack.exceptions.MsoException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
+import org.springframework.web.util.UriUtils;
import com.woorea.openstack.base.client.OpenStackRequest;
import com.woorea.openstack.quantum.Quantum;
import com.woorea.openstack.quantum.model.Networks;
@@ -73,9 +74,13 @@ public class NeutronClientImpl extends MsoCommonUtils {
public Networks queryNetworks(String cloudSiteId, String tenantId, int limit, String marker, String name, String id)
throws MsoCloudSiteNotFound, NeutronClientException {
try {
+ String encodedName = null;
+ if (name != null) {
+ encodedName = UriUtils.encodeQueryParam(name, "UTF-8");
+ }
Quantum neutronClient = getNeutronClient(cloudSiteId, tenantId);
OpenStackRequest<Networks> request = neutronClient.networks().list().queryParam("id", id)
- .queryParam("limit", limit).queryParam("marker", marker).queryParam("name", name);
+ .queryParam("limit", limit).queryParam("marker", marker).queryParam("name", encodedName);
return executeAndRecordOpenstackRequest(request, false);
} catch (MsoException e) {
logger.error("Error building Neutron Client", e);
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.7__Update_Optical_Service_Recipe.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.7__Update_Optical_Service_Recipe.sql
new file mode 100644
index 0000000000..e97df04ef6
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.7__Update_Optical_Service_Recipe.sql
@@ -0,0 +1,6 @@
+use catalogdb;
+
+INSERT INTO `vnf_recipe` (`id`, `VF_MODULE_ID`, `ACTION`, `SERVICE_TYPE`, `VERSION_STR`, `NF_ROLE`, `DESCRIPTION`, `ORCHESTRATION_URI`, `VNF_PARAM_XSD`, `RECIPE_TIMEOUT`, `CREATION_TIMESTAMP`) VALUES (15,NULL,'createInstance',NULL,'2.0','UNI-UNI','OTN UNI-UNI resource create recipe','/mso/async/services/CreateSDNCNetworkResource',NULL,180,'2017-10-05 18:52:03');
+INSERT INTO `vnf_recipe` (`id`, `VF_MODULE_ID`, `ACTION`, `SERVICE_TYPE`, `VERSION_STR`, `NF_ROLE`, `DESCRIPTION`, `ORCHESTRATION_URI`, `VNF_PARAM_XSD`, `RECIPE_TIMEOUT`, `CREATION_TIMESTAMP`) VALUES (16,NULL,'deleteInstance',NULL,'2.0','UNI-UNI','OTN UNI-UNI resource delete recipe','/mso/async/services/DeleteSDNCNetworkResource',NULL,180,'2017-10-05 18:52:03');
+INSERT INTO `vnf_recipe` (`id`, `VF_MODULE_ID`, `ACTION`, `SERVICE_TYPE`, `VERSION_STR`, `NF_ROLE`, `DESCRIPTION`, `ORCHESTRATION_URI`, `VNF_PARAM_XSD`, `RECIPE_TIMEOUT`, `CREATION_TIMESTAMP`) VALUES (17,NULL,'createInstance',NULL,'2.0','UNI-ENNI','OTN UNI-ENNI resource create recipe','/mso/async/services/CreateSDNCNetworkResource',NULL,180,'2017-10-05 18:52:03');
+INSERT INTO `vnf_recipe` (`id`, `VF_MODULE_ID`, `ACTION`, `SERVICE_TYPE`, `VERSION_STR`, `NF_ROLE`, `DESCRIPTION`, `ORCHESTRATION_URI`, `VNF_PARAM_XSD`, `RECIPE_TIMEOUT`, `CREATION_TIMESTAMP`) VALUES (18,NULL,'deleteInstance',NULL,'2.0','UNI-ENNI','OTN UNI-ENNI resource delete recipe','/mso/async/services/DeleteSDNCNetworkResource',NULL,180,'2017-10-05 18:52:03');