diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-09-06 17:52:01 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-09-06 20:23:27 +0800 |
commit | 99db451cbc9ddabc1085e4734ce3ea8ed0d83b61 (patch) | |
tree | ffd637f84d6854167dbc9c0002fb76f1e6e2277f | |
parent | d1876e4be7d974f5d326ca5d34fcc15bb5671ec4 (diff) |
Change the API Path
Change the API path from onapapi to api
Change-Id: Ie607942ce1554f0e3bb0abf72c3ed6a2d54dacc9
Issue-ID: HOLMES-39
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
6 files changed, 8 insertions, 8 deletions
diff --git a/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml b/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml index 0b9a24a..29d56d7 100644 --- a/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml +++ b/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml @@ -9,7 +9,7 @@ apidescription: ZTE Holmes rule Management rest API server: type: simple - rootPath: '/onapapi/holmes-rule-mgmt/v1/*' + rootPath: '/api/holmes-rule-mgmt/v1/*' applicationContextPath: / adminContextPath: /admin connector: @@ -50,7 +50,7 @@ database: driverClass: org.postgresql.Driver user: holmes password: holmespwd - url: jdbc:postgresql://169.254.59.196:5432/holmes + url: jdbc:postgresql://10.74.156.206:5432/holmes properties: charSet: UTF-8 maxWaitForConnection: 1s diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java index 0aeb584..0ee539b 100644 --- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java +++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java @@ -58,7 +58,7 @@ public class RuleActiveApp extends IOCApplication<RuleAppConfig> { MicroServiceInfo msinfo = new MicroServiceInfo(); msinfo.setServiceName("holmes-rule-mgmt"); msinfo.setVersion("v1"); - msinfo.setUrl("/onapapi/holmes-rule-mgmt/v1"); + msinfo.setUrl("/api/holmes-rule-mgmt/v1"); msinfo.setProtocol("REST"); msinfo.setVisualRange("0|1"); Set<Node> nodes = new HashSet<>(); diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/constant/RuleMgtConstant.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/constant/RuleMgtConstant.java index debfb05..a5ec87c 100644 --- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/constant/RuleMgtConstant.java +++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/constant/RuleMgtConstant.java @@ -24,6 +24,6 @@ public class RuleMgtConstant { public static final int STATUS_RULE_CLOSE = 0;
public static final int STATUS_RULE_ALL = 2;
public static final String PACKAGE = "package";
- public static final String ENGINE_PATH = "/onapapi/holmes-engine-mgmt/v1/rule";
+ public static final String ENGINE_PATH = "/api/holmes-engine-mgmt/v1/rule";
public static final int RESPONSE_STATUS_OK = 200;
}
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleDao.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleDao.java index 2a422c4..6b55d98 100644 --- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleDao.java +++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleDao.java @@ -31,9 +31,9 @@ public abstract class CorrelationRuleDao { @GetGeneratedKeys
@SqlUpdate("INSERT INTO APLUS_RULE (NAME,DESCRIPTION,ENABLE,TEMPLATEID,ENGINETYPE,CREATOR,UPDATOR,PARAMS,CONTENT ,VENDOR,CREATETIME,UPDATETIME,ENGINEID,PACKAGE,RID) VALUES (:name,:description,:enabled,:templateID,:engineType,:creator,:modifier,:params,:content,:vendor,:createTime,:updateTime,:engineID,:packageName,:rid)")
- protected abstract int addRule(@BindBean CorrelationRule correlationRule);
+ protected abstract String addRule(@BindBean CorrelationRule correlationRule);
- @SqlUpdate("UPDATE APLUS_RULE SET DESCRIPTION=:description,ENABLE=:enabled,CONTENT=:content,UPDATOR=:modifier,UPDATETIME=:updateTime WHERE RID=:rid")
+ @SqlUpdate("UPDATE APLUS_RULE SET DESCRIPTION=:description,ENABLE=:enabled,CONTENT=:content,UPDATOR=:modifier,UPDATETIME=:updateTime, PACKAGE=:packageName WHERE RID=:rid")
protected abstract int updateRuleByRid(@BindBean CorrelationRule correlationRule);
@SqlUpdate("DELETE FROM APLUS_RULE WHERE RID=:rid")
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDao.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDao.java index 322006d..648be06 100644 --- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDao.java +++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDao.java @@ -69,7 +69,7 @@ public class CorrelationRuleQueryDao { correlationRule.setRid((String) value.get("rid"));
correlationRule.setDescription((String) value.get("description"));
correlationRule.setEnabled((Integer) value.get("enable"));
- correlationRule.setTemplateID((Integer) value.get("templateID"));
+ correlationRule.setTemplateID((Long) value.get("templateID"));
correlationRule.setEngineID((String) value.get("engineID"));
correlationRule.setEngineType((String) value.get("engineType"));
correlationRule.setCreator((String) value.get("creator"));
diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java index 3854cdc..e028a2c 100644 --- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java +++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java @@ -131,7 +131,7 @@ public class CorrelationRuleQueryDaoTest { value.put("rid", "rule_" + System.currentTimeMillis());
value.put("description", "desc");
value.put("enable", 0);
- value.put("templateID", 1);
+ value.put("templateID", 1L);
value.put("engineId", "engine-001");
value.put("engineType", "engineType-001");
value.put("creator", "admin");
|