server:
type: simple
- rootPath: '/onapapi/holmes-rule-mgmt/v1/*'
+ rootPath: '/api/holmes-rule-mgmt/v1/*'
applicationContextPath: /
adminContextPath: /admin
connector:
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
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<>();
public static final int STATUS_RULE_CLOSE = 0;\r
public static final int STATUS_RULE_ALL = 2;\r
public static final String PACKAGE = "package";\r
- public static final String ENGINE_PATH = "/onapapi/holmes-engine-mgmt/v1/rule";\r
+ public static final String ENGINE_PATH = "/api/holmes-engine-mgmt/v1/rule";\r
public static final int RESPONSE_STATUS_OK = 200;\r
}\r
\r
@GetGeneratedKeys\r
@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)")\r
- protected abstract int addRule(@BindBean CorrelationRule correlationRule);\r
+ protected abstract String addRule(@BindBean CorrelationRule correlationRule);\r
\r
- @SqlUpdate("UPDATE APLUS_RULE SET DESCRIPTION=:description,ENABLE=:enabled,CONTENT=:content,UPDATOR=:modifier,UPDATETIME=:updateTime WHERE RID=:rid")\r
+ @SqlUpdate("UPDATE APLUS_RULE SET DESCRIPTION=:description,ENABLE=:enabled,CONTENT=:content,UPDATOR=:modifier,UPDATETIME=:updateTime, PACKAGE=:packageName WHERE RID=:rid")\r
protected abstract int updateRuleByRid(@BindBean CorrelationRule correlationRule);\r
\r
@SqlUpdate("DELETE FROM APLUS_RULE WHERE RID=:rid")\r
correlationRule.setRid((String) value.get("rid"));\r
correlationRule.setDescription((String) value.get("description"));\r
correlationRule.setEnabled((Integer) value.get("enable"));\r
- correlationRule.setTemplateID((Integer) value.get("templateID"));\r
+ correlationRule.setTemplateID((Long) value.get("templateID"));\r
correlationRule.setEngineID((String) value.get("engineID"));\r
correlationRule.setEngineType((String) value.get("engineType"));\r
correlationRule.setCreator((String) value.get("creator"));\r
value.put("rid", "rule_" + System.currentTimeMillis());\r
value.put("description", "desc");\r
value.put("enable", 0);\r
- value.put("templateID", 1);\r
+ value.put("templateID", 1L);\r
value.put("engineId", "engine-001");\r
value.put("engineType", "engineType-001");\r
value.put("creator", "admin");\r