diff options
Diffstat (limited to 'asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java')
-rw-r--r-- | asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java index a265639804..522a91f7d3 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java @@ -21,8 +21,7 @@ package org.openecomp.sdc.ci.tests.utils.rest; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; @@ -52,6 +51,15 @@ public class CatalogRestUtils extends BaseRestUtils { return sendGet(url, userId); } + public static RestResponse getCatalog(String userId, List<String> excludeList) throws IOException { + Config config = Utils.getConfig(); + String url = String.format(Urls.GET_CATALOG_DATA, config.getCatalogBeHost(), config.getCatalogBePort()); + StringBuilder sb = new StringBuilder(); + sb.append(url).append("?"); + Optional.ofNullable(excludeList).orElse(Collections.emptyList()).forEach(type -> sb.append("excludeTypes="+type+"&")); + return sendGet(sb.toString(), userId); + } + public static RestResponse getAllCategoriesTowardsCatalogBe() throws IOException { Config config = Utils.getConfig(); |