diff options
Diffstat (limited to 'asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api')
-rw-r--r-- | asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java (renamed from asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/SdcTest.java) | 24 | ||||
-rw-r--r-- | asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java | 223 | ||||
-rw-r--r-- | asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java | 1 | ||||
-rw-r--r-- | asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java | 22 |
4 files changed, 231 insertions, 39 deletions
diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/SdcTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java index ebad749097..6c0b96e15c 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/SdcTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java @@ -20,6 +20,8 @@ package org.openecomp.sdc.ci.tests.api; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.File; @@ -36,17 +38,18 @@ import org.junit.Rule; import org.junit.rules.TestName; import org.junit.rules.TestWatcher; import org.openecomp.sdc.ci.tests.config.Config; +import org.openecomp.sdc.ci.tests.execute.artifacts.CrudArt; import org.openecomp.sdc.ci.tests.rules.MyTestWatcher; import org.openecomp.sdc.ci.tests.run.StartTest; import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.FileUtils; -import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -public abstract class SdcTest { +public abstract class AttSdcTest { public static StringBuilder doc = new StringBuilder(); public static String file = null; @@ -55,17 +58,17 @@ public abstract class SdcTest { protected Gson prettyGson = new GsonBuilder().setPrettyPrinting().create(); protected TestName testName = null; - protected Logger logger = null; protected static boolean displayException = false; - - public SdcTest(TestName testName, String className) { + static Logger logger = LoggerFactory.getLogger(CrudArt.class.getName()); + + + public AttSdcTest(TestName testName, String className) { super(); StartTest.enableLogger(); this.testName = testName; - this.logger = LoggerFactory.getLogger(className); String displayEx = System.getProperty("displayException"); if (displayEx != null && Boolean.valueOf(displayEx).booleanValue()) { @@ -108,6 +111,7 @@ public abstract class SdcTest { @AfterClass public static void afterClass() { doc.append("<table>"); + // writeToFile("./" + ConfigAttOdlIt.REPORT_FILE , doc.toString()); FileUtils.writeToFile( Config.instance().getOutputFolder() + File.separator + file + StartTest.timeOfTest + ".html", doc.toString()); @@ -120,13 +124,13 @@ public abstract class SdcTest { config = Utils.getConfig(); assertTrue(config != null); - // logger.info("Start running test " + testName.getMethodName()); + logger.info("Start running test {}", testName.getMethodName()); } @After public void afterTest() throws FileNotFoundException { - // logger.info("Finish running test " + testName.getMethodName()); + logger.info("Finish running test {}", testName.getMethodName()); } public void addTestSummary(String testName, boolean isSuccess) { @@ -161,9 +165,9 @@ public abstract class SdcTest { doc.append("</tr>"); if (isSuccess) { - logger.debug("Test {} succeeded.", testName); + logger.debug("Test {} {}", testName, (isSuccess ? " SUCCEEDED " : " FAILED with error " + message)); } else { - logger.error("Test {} failed with error: {}", testName, message); + logger.error("Test {} {}", testName, (isSuccess ? " SUCCEEDED " : " FAILED with error " + message)); } } diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java index 370c195f53..0f85cc792d 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java @@ -27,10 +27,14 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; +import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.stream.Collectors; -import com.thinkaurelius.titan.core.TitanGraphQuery; +import org.apache.commons.collections.CollectionUtils; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.ImmutableTriple; @@ -39,17 +43,27 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels; import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.Product; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.config.Config; +import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.cassandra.CassandraUtils; +import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; +import org.openecomp.sdc.ci.tests.utils.rest.CatalogRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ProductRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; +import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,6 +76,7 @@ import org.testng.annotations.BeforeSuite; import com.relevantcodes.extentreports.ExtentReports; import com.relevantcodes.extentreports.ExtentTest; import com.relevantcodes.extentreports.LogStatus; +import com.relevantcodes.extentreports.NetworkMode; import com.thinkaurelius.titan.core.TitanFactory; import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanVertex; @@ -99,7 +114,7 @@ public abstract class ComponentBaseTest { } @BeforeSuite(alwaysRun = true) - public static void openTitan() throws FileNotFoundException { + public static void openTitan() throws Exception { File dir = new File(REPORT_FOLDER); try { @@ -107,19 +122,36 @@ public abstract class ComponentBaseTest { } catch (IOException e) { } extentReport = new ExtentReports(REPORT_FOLDER + REPORT_FILE_NAME); + // extentReport = new ExtentReports(REPORT_FOLDER + + // REPORT_FILE_NAME,true , NetworkMode.ONLINE); + // extentReport.x(); + openTitanLogic(); + } + + protected static void openTitanLogic() throws Exception { + initGraph(); + cleanComponents(); + // DbUtils.deleteFromEsDbByPattern("_all"); + CassandraUtils.truncateAllKeyspaces(); + } + + protected static void initGraph() throws FileNotFoundException { myconfig = Utils.getConfig(); config = Utils.getConfig(); logger.trace(config.toString()); String titanConfigFilePath = myconfig.getTitanPropertiesFile(); - System.out.println("titan configuration path:\n"+titanConfigFilePath); titanGraph = TitanFactory.open(titanConfigFilePath); - System.out.println("is open:\n"+titanGraph.isOpen()); assertNotNull(titanGraph); } @AfterSuite(alwaysRun = true) - public static void shutdownTitan() { + public static void shutdownTitan() throws Exception { + shutdownTitanLogic(); + extentReport.flush(); + } + + protected static void shutdownTitanLogic() { if (titanGraph.isOpen()) { titanGraph.close(); } @@ -129,8 +161,9 @@ public abstract class ComponentBaseTest { @BeforeMethod(alwaysRun = true) public void beforeState(java.lang.reflect.Method method) throws Exception { - cleanComponents(); - CassandraUtils.truncateAllKeyspaces(); + // deleteCreatedComponents(getCatalogAsMap()); + + performeClean(); extendTest = extentReport.startTest(method.getName()); extendTest.log(LogStatus.INFO, "Test started"); @@ -138,8 +171,7 @@ public abstract class ComponentBaseTest { @AfterMethod(alwaysRun = true) public void afterState(ITestResult result) throws Exception { - cleanComponents(); - CassandraUtils.truncateAllKeyspaces(); + performeClean(); if (result.isSuccess()) { extendTest.log(LogStatus.PASS, "Test Result : <span class='label success'>Success</span>"); @@ -150,17 +182,21 @@ public abstract class ComponentBaseTest { } extentReport.endTest(extendTest); - extentReport.flush(); } + protected void performeClean() throws Exception, FileNotFoundException { + cleanComponents(); + CassandraUtils.truncateAllKeyspaces(); + } + public void verifyErrorCode(RestResponse response, String action, int expectedCode) { assertNotNull("check response object is not null after " + action, response); assertNotNull("check error code exists in response after " + action, response.getErrorCode()); assertEquals("Check response code after + action" + action, expectedCode, response.getErrorCode().intValue()); } - private void cleanComponents() throws Exception { + private static void cleanComponents() throws Exception { // Components to delete List<String> vfResourcesToDelete = new ArrayList<String>(); @@ -179,10 +215,8 @@ public abstract class ComponentBaseTest { List<String> resourcesNotToDelete = config.getResourcesNotToDelete(); List<String> resourceCategoriesNotToDelete = config.getResourceCategoriesNotToDelete(); List<String> serviceCategoriesNotToDelete = config.getServiceCategoriesNotToDelete(); - TitanGraphQuery<? extends TitanGraphQuery> query = titanGraph.query(); - query = query.has(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.Resource.getName()); - Iterable<TitanVertex> vertices=query.vertices(); -// Iterable<TitanVertex> vertices = titanGraph.query().has(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.Resource.getName()).vertices(); + + Iterable<TitanVertex> vertices = titanGraph.query().has(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.Resource.getName()).vertices(); if (vertices != null) { Iterator<TitanVertex> iter = vertices.iterator(); while (iter.hasNext()) { @@ -195,13 +229,13 @@ public abstract class ComponentBaseTest { if ((resourcesNotToDelete != null && !resourcesNotToDelete.contains(name)) || (version != null && !version.equals("1.0"))) { String id = vertex.value(GraphPropertiesDictionary.UNIQUE_ID.getProperty()); String resourceType = vertex.value(GraphPropertiesDictionary.RESOURCE_TYPE.getProperty()); - // if (name.startsWith("ci")) { - if (resourceType.equals(ResourceTypeEnum.VF.name())) { - vfResourcesToDelete.add(id); - } else { - nonVfResourcesToDelete.add(id); + if (name.startsWith("ci")) { + if (resourceType.equals(ResourceTypeEnum.VF.name())) { + vfResourcesToDelete.add(id); + } else { + nonVfResourcesToDelete.add(id); + } } - // } } else if ((resourcesNotToDelete != null && !resourcesNotToDelete.contains(name)) || (version != null && version.equals("1.0"))) { if ((boolean) vertex.value(GraphPropertiesDictionary.IS_HIGHEST_VERSION.getProperty()) == false) { vertex.property(GraphPropertiesDictionary.IS_HIGHEST_VERSION.getProperty(), true); @@ -217,9 +251,9 @@ public abstract class ComponentBaseTest { Vertex vertex = iter.next(); String id = vertex.value(GraphPropertiesDictionary.UNIQUE_ID.getProperty()); String name = vertex.value(GraphPropertiesDictionary.NAME.getProperty()); - // if (name.startsWith("ci")){ - servicesToDelete.add(id); - // } + if (name.startsWith("ci")) { + servicesToDelete.add(id); + } } } @@ -230,9 +264,9 @@ public abstract class ComponentBaseTest { Vertex vertex = iter.next(); String id = vertex.value(GraphPropertiesDictionary.UNIQUE_ID.getProperty()); String name = vertex.value(GraphPropertiesDictionary.NAME.getProperty()); - //if (name.startsWith("ci")) { + if (name.startsWith("Ci")) { productsToDelete.add(id); - //} + } } } @@ -345,4 +379,141 @@ public abstract class ComponentBaseTest { } + private void deleteCreatedComponents(Map<String, List<Component>> convertCatalogResponseToJavaObject) throws IOException { + final String userId = UserRoleEnum.DESIGNER.getUserId(); + List<Component> resourcesArrayList = convertCatalogResponseToJavaObject.get(ComponentTypeEnum.RESOURCE_PARAM_NAME); + + // List<String> collect = resourcesArrayList.stream().filter(s -> + // s.getName().startsWith("ci")).map(e -> + // e.getUniqueId()).collect(Collectors.toList()); + + // List<Map<String, String>> collect = + // resourcesArrayList.stream().filter(s -> + // s.getName().startsWith("ci")).map(e -> + // e.getAllVersions()).collect(Collectors.toList()); + /* + * List<String> collect = resourcesArrayList.stream().filter(s -> s.getName().startsWith("ci")) .flatMap(e -> e.getAllVersions().values().stream()).collect(Collectors.toList()); + */ + + if (!CollectionUtils.isEmpty(resourcesArrayList)) { + List<String> collect = buildCollectionUniqueId(resourcesArrayList); + for (String uId : collect) { + ResourceRestUtils.deleteResource(uId, userId); + } + } + + resourcesArrayList = convertCatalogResponseToJavaObject.get(ComponentTypeEnum.SERVICE_PARAM_NAME); + if (resourcesArrayList.size() > 0) { + List<String> collect = buildCollectionUniqueId(resourcesArrayList); + for (String uId : collect) { + ServiceRestUtils.deleteServiceById(uId, userId); + } + } + resourcesArrayList = convertCatalogResponseToJavaObject.get(ComponentTypeEnum.PRODUCT_PARAM_NAME); + if (resourcesArrayList.size() > 0) { + List<String> collect = buildCollectionUniqueId(resourcesArrayList); + for (String uId : collect) { + ProductRestUtils.deleteProduct(uId, userId); + } + } + + } + + private void deleteCollection(List<Component> componentArrayList, Consumer<String> deleteHandler) { + + if (componentArrayList.size() > 0) { + List<String> collect = buildCollectionUniqueId(componentArrayList); + for (String uId : collect) { + deleteHandler.accept(uId); + // ProductRestUtils.deleteProduct(uId, userId); + } + } + } + + private List<String> buildCollectionUniqueId(List<Component> resourcesArrayList) { + + // Stream<String> flatMap = resourcesArrayList.stream().filter(s -> + // s.getName().startsWith("ci")).map(e -> e.getAllVersions()).map( e -> + // e.values()).flatMap( e -> e.stream()); + + // List<String> collect = resourcesArrayList.stream() + // // + // .filter(s -> s.getName().startsWith("ci") ) + // // + // .map(e -> e.getUniqueId()) + + // .map( e -> e.values()) + // .filter(out -> out!=null ) + // .flatMap( e -> e.stream()) + // .collect(Collectors.toList()); + + // List<String> collect = resourcesArrayList.stream().filter(s -> + // s.getName().startsWith("ci")) + // .flatMap(e -> + // e.getAllVersions().values().stream()).collect(Collectors.toList()); + ComponentTypeEnum componentTypeEnum = resourcesArrayList.get(0).getComponentType(); + + List<String> genericCollection = new ArrayList<String>(); + resourcesArrayList.stream().filter(s -> s.getName().toLowerCase().startsWith("ci")).map(e -> e.getUniqueId()).collect(Collectors.toList()).forEach((i) -> { + try { + switch (componentTypeEnum) { + case RESOURCE: + RestResponse resource = ResourceRestUtils.getResource(i); + Resource convertResourceResponseToJavaObject = ResponseParser.convertResourceResponseToJavaObject(resource.getResponse()); + Map<String, String> allVersions = convertResourceResponseToJavaObject.getAllVersions(); + Collection<String> values = allVersions.values(); + genericCollection.addAll(values); + + break; + case SERVICE: + RestResponse service = ServiceRestUtils.getService(i); + Service convertServiceResponseToJavaObject = ResponseParser.convertServiceResponseToJavaObject(service.getResponse()); + allVersions = convertServiceResponseToJavaObject.getAllVersions(); + values = allVersions.values(); + genericCollection.addAll(values); + + break; + + + case PRODUCT: + RestResponse product = ProductRestUtils.getProduct(i); + Product convertProductResponseToJavaObject = ResponseParser.convertProductResponseToJavaObject(product.getResponse()); + allVersions = convertProductResponseToJavaObject.getAllVersions(); + values = allVersions.values(); + genericCollection.addAll(values); + + break; + + // default: + // break; + } + } catch (Exception e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + }); + // + + // List<String> collect = + // genericCollection.stream().collect(Collectors.toList()); + + return genericCollection; + } + + private Map<String, List<Component>> getCatalogAsMap() throws Exception { + RestResponse catalog = CatalogRestUtils.getCatalog(UserRoleEnum.DESIGNER.getUserId()); + Map<String, List<Component>> convertCatalogResponseToJavaObject = ResponseParser.convertCatalogResponseToJavaObject(catalog.getResponse()); + return convertCatalogResponseToJavaObject; + } + protected Resource createVfFromCSAR(User sdncModifierDetails, String csarId) throws Exception { + // create new resource from Csar + ResourceReqDetails resourceDetails = ElementFactory.getDefaultResource(); + + resourceDetails.setCsarUUID(csarId); + resourceDetails.setResourceType(ResourceTypeEnum.VF.name()); + RestResponse createResource = ResourceRestUtils.createResource(resourceDetails, sdncModifierDetails); + BaseRestUtils.checkCreateResponse(createResource); + Resource createdResource = ResponseParser.convertResourceResponseToJavaObject(createResource.getResponse()); + return createdResource; + } } diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java index 2b0a35d472..9428a9b695 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java @@ -326,6 +326,7 @@ public class ComponentInstanceBaseTest extends ComponentBaseTest { if (resourceRequirements == null) { resourceRequirements = new HashMap<>(); } + Function<Entry<String, List<RequirementDefinition>>, List<RequirementDefinition>> requirementDefinitionMapper = e -> new ArrayList<>(e.getValue().stream().map(item -> new RequirementDefinition(item)).collect(Collectors.toList())); Map<String, List<RequirementDefinition>> reqCopy = resourceRequirements.entrySet().stream().collect(Collectors.toMap(e -> e.getKey(), requirementDefinitionMapper)); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java index 5aceb4fae3..a8342f8879 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java @@ -184,8 +184,15 @@ public interface Urls { // ***********************************External API's // (AssetData)**************************************** + + final String DELETE_EXTRNAL_API_DELETE_ARTIFACT_OF_ASSET = "http://%s:%s/asdc/v1/catalog/%s/%s/artifacts/%s"; + final String DELETE_EXTRNAL_API_DELETE_ARTIFACT_OF_COMPONENTINSTANCE_ON_ASSET = "http://%s:%s/asdc/v1/catalog/%s/%s/resourceInstances/%s/artifacts/%s"; + final String POST_EXTERNAL_API_UPDATE_ARTIFACT_OF_ASSET = "http://%s:%s/asdc/v1/catalog/%s/%s/artifacts/%s"; + final String POST_EXTERNAL_API_UPDATE_ARTIFACT_OF_COMPONENTINSTANCE_ON_ASSET = "http://%s:%s/asdc/v1/catalog/%s/%s/resourceInstances/%s/artifacts/%s"; + final String POST_EXTERNAL_API_UPLOAD_ARTIFACT_OF_ASSET = "http://%s:%s/asdc/v1/catalog/%s/%s/artifacts"; + final String POST_EXTERNAL_API_UPLOAD_ARTIFACT_OF_COMPONENTINSTANCE_ON_ASSET = "http://%s:%s/asdc/v1/catalog/%s/%s/resourceInstances/%s/artifacts"; final String GET_DOWNLOAD_RESOURCE_ARTIFACT_OF_ASSET = "http://%s:%s/asdc/v1/catalog/resources/%s/artifacts/%s"; final String GET_DOWNLOAD_SERVICE_ARTIFACT_OF_ASSET = "http://%s:%s/asdc/v1/catalog/services/%s/artifacts/%s"; @@ -202,6 +209,11 @@ public interface Urls { final String POST_AUTHORIZATION = "http://%s:%s/sdc2/rest/v1/consumers"; final String GET_DOWNLOAD_SERVICE_RI_ARTIFACT = "http://%s:%s/asdc/v1/catalog/services/%s/resourceInstances/%s/artifacts/%s"; final String GET_DOWNLOAD_SERVICE_ARTIFACT = "http://%s:%s/asdc/v1/catalog/services/%s/artifacts/%s"; + + final String POST_EXTERNAL_API_CREATE_RESOURCE = "http://%s:%s/asdc/v1/catalog/resources"; + + final String CHANGE_RESOURCE_LIFECYCLE_STATE_EXTERNAL_API = "http://%s:%s/asdc/v1/catalog/resources/%s/lifecycleState/%s"; + final String CHANGE_SERVICE_LIFECYCLE_STATE_EXTERNAL_API = "http://%s:%s/asdc/v1/catalog/services/%s/lifecycleState/%s"; // ***************************************************************************************************** @@ -243,6 +255,7 @@ public interface Urls { // ***************************************************************************************************** final String VALIDATE_RESOURCE_NAME = "http://%s:%s/sdc2/rest/v1/catalog/resources/validate-name/%s"; + final String VALIDATE_CONFORMANCE_LEVEL = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/conformanceLevelValidation"; final String CREATE_SERVICE = "http://%s:%s/sdc2/rest/v1/catalog/services"; final String DELETE_SERVICE = "http://%s:%s/sdc2/rest/v1/catalog/services/%s"; @@ -255,14 +268,16 @@ public interface Urls { final String DELETE_COMPONENT_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/%s"; final String UPDATE_COMPONENT_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/%s"; final String GET_COMPONENT_INSTANCES = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/componentInstances"; + //{containerComponentType}/{containerComponentId}/componentInstances/{componentInstanceUniqueId}/properties + final String GET_COMPONENT_INSTANCE_PROPERTIES_BY_ID = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/componentInstances/%s/properties"; // Tal New API final String UPDATE_MULTIPLE_COMPONENT_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/multipleComponentInstance"; - final String CHANGE__RESOURCE_INSTANCE_VERSION = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/%s/changeVersion"; + final String CHANGE_RESOURCE_INSTANCE_VERSION = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/%s/changeVersion"; final String CREATE_AND_ASSOCIATE_RESOURCE_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/services/%s/resourceInstance/createAndAssociate"; - final String ASSOCIATE__RESOURCE_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/associate"; - final String DISSOCIATE__RESOURCE_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/dissociate"; + final String ASSOCIATE_RESOURCE_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/associate"; + final String DISSOCIATE_RESOURCE_INSTANCE = "http://%s:%s/sdc2/rest/v1/catalog/%s/%s/resourceInstance/dissociate"; final String DISTRIBUTION_INIT = "http://%s:%s/init"; final String DISTRIBUTION_INIT_RESET = "http://%s:%s/initReset"; @@ -270,6 +285,7 @@ public interface Urls { final String REJECT_DISTRIBUTION = "http://%s:%s/sdc2/rest/v1/catalog/services/%s/distribution-state/reject"; final String DISTRIBUTION_DOWNLOAD_ARTIFACT = "http://%s:%s/download"; final String ACTIVATE_DISTRIBUTION = "http://%s:%s/sdc2/rest/v1/catalog/services/%s/distribution/%s/activate"; + final String DISTRIBUTION_SERVICE_LIST = "http://%s:%s/sdc2/rest/v1/catalog/services/%s/distribution"; final String DEPLOY_SERVICE = "http://%s:%s/sdc2/rest/v1/catalog/services/%s/distribution/%s/markDeployed"; final String UPDATE_SERVICE_METADATA = "http://%s:%s/sdc2/rest/v1/catalog/services/%s/metadata"; |