diff options
author | Marcus Williams <marcus.williams@intel.com> | 2018-08-30 20:15:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-30 20:15:24 +0000 |
commit | 929ca89b1bfb7262b96433f32d7520d517990e5b (patch) | |
tree | ab0f9e8ba4fd2a7171bd497a345a37ad796517d2 /mso-catalog-db/src | |
parent | cb8b310ee2daaa18ba6bd7d14d741db0daac7501 (diff) | |
parent | add0df04cc24deae1f16a215dffa32393ed586ca (diff) |
Merge "Create a Reference Table for Controller Selection"
Diffstat (limited to 'mso-catalog-db/src')
4 files changed, 3 insertions, 21 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java index a0e2409023..dbe69d9d08 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java @@ -433,13 +433,6 @@ public class CatalogDbClient { .queryParam(ACTION,action).build()); } - public ControllerSelectionReference getControllerSelectionReferenceByVnfType(String vnfType) { - return this.getSingleResource(controllerSelectionReferenceClient, UriBuilder - .fromUri(endpoint + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfType") - .queryParam("VNF_TYPE", vnfType).build()); - - } - public ControllerSelectionReference getControllerSelectionReferenceByVnfTypeAndActionCategory(String vnfType, String actionCategory) { return this.getSingleResource(controllerSelectionReferenceClient, UriBuilder .fromUri(endpoint + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfTypeAndActionCategory") diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java index ad1bbc3f68..ad162b547a 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java @@ -29,9 +29,7 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "controllerSelectionReference", path = "controllerSelectionReference") public interface ControllerSelectionReferenceRepository extends JpaRepository<ControllerSelectionReference, String> { - public ControllerSelectionReference findControllerSelectionReferenceByVnfType(@Param("VNF_TYPE") String vnfType); - public ControllerSelectionReference findControllerSelectionReferenceByVnfTypeAndActionCategory(@Param("VNF_TYPE") String vnfType, @Param("ACTION_CATEGORY") String actionCategory); - }
\ No newline at end of file + } diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java index f793fd79e3..9aa2ca0c73 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java @@ -42,16 +42,6 @@ public class ControllerSelectionReferenceTest { @Autowired private ControllerSelectionReferenceRepository controllerSelectionReferenceRepository; - - @Test - public void Find_ControllerNameByVnfType_Test() { - String vnfType = "vLoadBalancerMS/vLoadBalancerMS 0"; - String controllerName = "APPC"; - ControllerSelectionReference controller = controllerSelectionReferenceRepository.findControllerSelectionReferenceByVnfType(vnfType); - assertEquals(vnfType, controller.getVnfType()); - assertEquals(controllerName, controller.getControllerName()); - } - @Test public void Find_ControllerNameByVnfTypeAndAction_Test() { String vnfType = "vLoadBalancerMS/vLoadBalancerMS 0"; diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql index 58bde0e532..9da6d13e49 100644 --- a/mso-catalog-db/src/test/resources/data.sql +++ b/mso-catalog-db/src/test/resources/data.sql @@ -649,4 +649,5 @@ INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `AD INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28'); INSERT INTO `controller_selection_reference` (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES -('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut'); +('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut'), +('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'HealthCheck'); |