diff options
Diffstat (limited to 'appc-inbound/appc-design-services')
5 files changed, 27 insertions, 27 deletions
diff --git a/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang b/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang index b43ce0fad..1cd80c98b 100644 --- a/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang +++ b/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang @@ -97,7 +97,7 @@ module design-services { grouping status { description "The specific response codes are to be aligned with APPC/ECOMP messaging Systems"; container status { - description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement"; + description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement"; leaf code { description "Response code"; type string; diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java index ba126aff2..86c895fd5 100644 --- a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java +++ b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java @@ -188,13 +188,13 @@ public class DesignDBService { ArtifactHandlerClient ac = new ArtifactHandlerClient(); String requestString = ac.createArtifactData(payload, requestID); ac.execute(requestString, "POST"); - int asdc_artifact_id = getASDCArtifactIDbyRequestID(requestID); - int asdc_reference_id = getASDCReferenceID(payload); - createArtifactTrackingRecord(payload, requestID,asdc_artifact_id, asdc_reference_id ); + int sdc_artifact_id = getSDCArtifactIDbyRequestID(requestID); + int sdc_reference_id = getSDCReferenceID(payload); + createArtifactTrackingRecord(payload, requestID,sdc_artifact_id, sdc_reference_id ); String status = getDataFromActionStatus(payload, "STATUS"); if(status == null || status.isEmpty()) setActionStatus(payload, "Not Tested"); - linkstatusRelationShip(asdc_artifact_id,asdc_reference_id, payload); + linkstatusRelationShip(sdc_artifact_id,sdc_reference_id, payload); } catch(Exception e){ @@ -205,13 +205,13 @@ public class DesignDBService { } - private void linkstatusRelationShip(int asdc_artifact_id, int asdc_reference_id, String payload) throws Exception { + private void linkstatusRelationShip(int sdc_artifact_id, int sdc_reference_id, String payload) throws Exception { ObjectMapper objectMapper = new ObjectMapper(); JsonNode payloadObject = objectMapper.readTree(payload); ArrayList<String> argList = new ArrayList<>(); - argList.add(String.valueOf(asdc_artifact_id)); - argList.add(String.valueOf(asdc_reference_id)); + argList.add(String.valueOf(sdc_artifact_id)); + argList.add(String.valueOf(sdc_reference_id)); argList.add(payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue()); argList.add(payloadObject.get(DesignServiceConstants.ACTION).textValue()); argList.add(payloadObject.get(DesignServiceConstants.USER_ID).textValue()); @@ -233,7 +233,7 @@ public class DesignDBService { throw new Exception("Error while updating RealtionShip table"); } - private int getASDCReferenceID(String payload) throws Exception { + private int getSDCReferenceID(String payload) throws Exception { String vnfc_type = null; ObjectMapper objectMapper = new ObjectMapper(); @@ -259,12 +259,12 @@ public class DesignDBService { log.info("Query String :" + queryString); ResultSet data = dbservice.getDBData(queryString, argList); - int asdc_reference_id = 0; + int sdc_reference_id = 0; while(data.next()) { - asdc_reference_id = data.getInt("ASDC_REFERENCE_ID"); + sdc_reference_id = data.getInt("ASDC_REFERENCE_ID"); } - log.info("Got asdc_reference_id = " + asdc_reference_id ); - return asdc_reference_id; + log.info("Got sdc_reference_id = " + sdc_reference_id ); + return sdc_reference_id; } @@ -320,14 +320,14 @@ public class DesignDBService { return updateStatus; } - private void createArtifactTrackingRecord(String payload, String requestID, int asdc_artifact_id, int asdc_reference_id) throws Exception { + private void createArtifactTrackingRecord(String payload, String requestID, int sdc_artifact_id, int sdc_reference_id) throws Exception { String vnfc_type = null; ObjectMapper objectMapper = new ObjectMapper(); JsonNode payloadObject = objectMapper.readTree(payload); ArrayList<String> argList = new ArrayList<>(); - argList.add(String.valueOf(asdc_artifact_id)); - argList.add(String.valueOf(asdc_reference_id)); + argList.add(String.valueOf(sdc_artifact_id)); + argList.add(String.valueOf(sdc_reference_id)); argList.add(payloadObject.get(DesignServiceConstants.USER_ID).textValue()); if (payloadObject.get(DesignServiceConstants.TECHNOLOGY) != null &&! payloadObject.get(DesignServiceConstants.TECHNOLOGY).textValue().isEmpty()) argList.add(payloadObject.get(DesignServiceConstants.TECHNOLOGY).textValue()); @@ -350,7 +350,7 @@ public class DesignDBService { } - private int getASDCArtifactIDbyRequestID(String requestID) throws Exception { + private int getSDCArtifactIDbyRequestID(String requestID) throws Exception { log.info("Starting getArtifactIDbyRequestID DB Operation"); int artifact_id = 0; try{ @@ -367,7 +367,7 @@ public class DesignDBService { e.printStackTrace(); throw e; } - log.info("Got ASDC_ARTIFACTS_ID As :" + artifact_id); + log.info("Got SDC_ARTIFACTS_ID As :" + artifact_id); return artifact_id; } @@ -567,8 +567,8 @@ public class DesignDBService { // localContext.setAttribute("userID", UserId); // if (serviceLogic != null && localContext != null) { // String queryString = "SELECT AR.VNF_TYPE, AR.VNFC_TYPE, DAT.PROTOCOL, DAT.IN_CART from " + - // DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_ASDC_REFERENCE + - // " AR where DAT.ASDC_REFERENCE_ID= AR.ASDC_REFERENCE_ID and DAT.USER = $userID" ; + // DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_SDC_REFERENCE + + // " AR where DAT.SDC_REFERENCE_ID= AR.SDC_REFERENCE_ID and DAT.USER = $userID" ; // // log.info(fn + "Query String : " + queryString); // try { @@ -607,7 +607,7 @@ public class DesignDBService { argList.add(UserID); String queryString = "SELECT AR.VNF_TYPE, AR.VNFC_TYPE, DAT.PROTOCOL, DAT.IN_CART, AR.ACTION, AR.ARTIFACT_NAME, AR.ARTIFACT_TYPE from " + - DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_ASDC_REFERENCE + + DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_SDC_REFERENCE + " AR where DAT.ASDC_REFERENCE_ID= AR.ASDC_REFERENCE_ID and DAT.USER = ? "; DesignResponse designResponse = new DesignResponse(); diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java index 6254728ee..331c48e34 100644 --- a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java +++ b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java @@ -94,7 +94,7 @@ public class ArtifactHandlerClient { ObjectNode requestInfo = objectMapper.createObjectNode(); requestInfo.put(DesignServiceConstants.REQUETS_ID, requestID); - requestInfo.put(DesignServiceConstants.REQUEST_ACTION, "StoreAsdcDocumentRequest"); + requestInfo.put(DesignServiceConstants.REQUEST_ACTION, "StoreSdcDocumentRequest"); requestInfo.put(DesignServiceConstants.SOURCE, DesignServiceConstants.DESIGN_TOOL); String random = getRandom(); diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java index 702d1d1fa..73e6ba93f 100644 --- a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java +++ b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java @@ -83,7 +83,7 @@ public class DesignServiceConstants { public static final String DB_DT_ARTIFACT_TRACKING = "DT_ARTIFACT_TRACKING"; - public static final String DB_ASDC_REFERENCE = "ASDC_REFERENCE"; + public static final String DB_SDC_REFERENCE = "ASDC_REFERENCE"; public static final String SCHEMA_SDNCTL = "SDNCTL"; public static final String GETARTIFACT = "getArtifact"; public static final String USER_ID = "userID"; diff --git a/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java b/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java index d14abceb6..d1a899d14 100644 --- a/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java +++ b/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java @@ -175,13 +175,13 @@ public class TestDBService { } @Test - public void testGetASDCReferenceID() { + public void testGetSDCReferenceID() { try { String content = FileUtils.readFileToString(new File("src/test/resources/uploadArtifact")); String payload = " { \"userID\": \"0000\",\"status\":\"Test\", \"vnf-type\" : \"DesigTest-VNF\", \"action\" : \"Configure\", \"artifact-name\":\"DesignRestArtifact_reference\",\"artifact-version\" :\"0.01\",\"artifact-type\" :\"DESIGNTOOL-TEST\",\"artifact-status\":\"\",\"artifact-contents\": "+ content + " } "; DesignDBService design = DesignDBService.initialise(); - Whitebox.invokeMethod(design, "getASDCReferenceID", payload); + Whitebox.invokeMethod(design, "getSDCReferenceID", payload); } catch (Exception e) { } } @@ -209,12 +209,12 @@ public class TestDBService { } @Test - public void testGetASDCArtifactIDbyRequestID() { + public void testGetSDCArtifactIDbyRequestID() { try { String content = FileUtils.readFileToString(new File("src/test/resources/uploadArtifact")); String payload = " { \"userID\": \"0000\",\"status\":\"Test\", \"vnf-type\" : \"DesigTest-VNF\", \"action\" : \"Configure\", \"artifact-name\":\"DesignRestArtifact_reference\",\"artifact-version\" :\"0.01\",\"artifact-type\" :\"DESIGNTOOL-TEST\",\"artifact-status\":\"\",\"artifact-contents\": "+ content + " } "; DesignDBService design = DesignDBService.initialise(); - Whitebox.invokeMethod(design, "getASDCArtifactIDbyRequestID", "0"); + Whitebox.invokeMethod(design, "getSDCArtifactIDbyRequestID", "0"); } catch (Exception e) { } } |