Fix CCVPN Instance Update Bug 13/88213/1
authorguochuyicmri <guochuyi@chinamobile.com>
Wed, 22 May 2019 02:37:29 +0000 (10:37 +0800)
committerguochuyicmri <guochuyi@chinamobile.com>
Wed, 22 May 2019 02:37:38 +0000 (10:37 +0800)
Change-Id: I7bad3e04d055dabc2cde554afa1d8307ca0fd152
Issue-ID: USECASEUI-271
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
server/src/main/java/org/onap/usecaseui/server/constant/Constant.java
server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
standalone/src/main/assembly/resources/dbscripts/postgres/uui_init_data.sql

index b384b80..b8a7dc6 100755 (executable)
@@ -41,6 +41,8 @@ public final class Constant
     \r
     public static final String HEALING_CODE="1004";\r
     \r
+    public static final String UPDATING_CODE="1005";\r
+    \r
     public static final String SUCCESS_CODE="2001";\r
     \r
     public static final String FAIL_CODE="2002";\r
index 9b3e382..68e74ac 100644 (file)
@@ -139,7 +139,7 @@ public class ServiceLcmController {
     @RequestMapping(value = {"/uui-lcm/services/updateService/{serviceId}"}, method = RequestMethod.PUT , produces = "application/json")
     public SaveOrUpdateOperationRsp updateServices(@PathVariable(value = "serviceId") String serviceId, HttpServletRequest request) throws ParseException{
        SaveOrUpdateOperationRsp saveOrUpdateOperationRsp =serviceLcmService.scaleService(serviceId, request);
-       ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId,saveOrUpdateOperationRsp.getOperationId(),"UPDATING","0",Constant.IN_PROGRESS_CODE,DateUtils.dateToString(DateUtils.now()),null);
+       ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId,saveOrUpdateOperationRsp.getOperationId(),Constant.UPDATING_CODE,"0",Constant.IN_PROGRESS_CODE,DateUtils.dateToString(DateUtils.now()),null);
        serviceLcmService.saveOrUpdateServiceInstanceOperation(serviceOpera);
        return saveOrUpdateOperationRsp;
     }
index 110c4e0..b2e68eb 100644 (file)
@@ -21,10 +21,12 @@ INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('op
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1002', 'Deleting', 'en');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1003', 'Scaling', 'en');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1004', 'Healing', 'en');
+INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1005', 'Updating', 'en');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1001', '创建', 'cn');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1002', '删除', 'cn');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1003', '缩扩容', 'cn');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1004', '自愈', 'cn');
+INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationType', '1005', '更新', 'cn');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationResult', '2001', 'Successful', 'en');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationResult', '2002', 'Failed', 'en');
 INSERT INTO sort_master (sort_type, sort_code, sort_value, language) VALUES ('operationResult', '2003', 'In Progress', 'en');