Issue-ID: HOLMES-104
Change-Id: I535050f7dcacc2caa75d9a8941d93000fd91c361
Signed-off-by: Shiwei Tian <tian.shiwei@zte.com.cn>
#ActiveMQ IP Configurations
sed -i "s|brokerIp:.*|brokerIp: $SERVICE_IP|" "$main_path/conf/engine-d.yml"
#ActiveMQ IP Configurations
sed -i "s|brokerIp:.*|brokerIp: $SERVICE_IP|" "$main_path/conf/engine-d.yml"
+KEY_PATH="$main_path/conf/holmes.keystore"
+KEY_PASSWORD="holmes"
+
+#HTTPS Configurations
+sed -i "s|keyStorePath:.*|keyStorePath: $KEY_PATH|" "$main_path/conf/engine-d.yml"
+sed -i "s|keyStorePassword:.*|keyStorePassword: $KEY_PASSWORD|" "$main_path/conf/engine-d.yml"
+
cat "$main_path/conf/engine-d.yml"
cat "$main_path/conf/engine-d.yml"
applicationContextPath: /\r
adminContextPath: /admin\r
connector:\r
applicationContextPath: /\r
adminContextPath: /admin\r
connector:\r
+ keyStorePath: /home/holmes/conf/holmes.keystore\r
+ keyStorePassword: holmes\r
+ validateCerts: false\r
+ validatePeers: false\r
\r
\r
# Logging settings.\r
\r
\r
# Logging settings.\r
msinfo.setUrl("/api/holmes-engine-mgmt/v1");
msinfo.setProtocol("REST");
msinfo.setVisualRange("0|1");
msinfo.setUrl("/api/holmes-engine-mgmt/v1");
msinfo.setProtocol("REST");
msinfo.setVisualRange("0|1");
+ msinfo.setEnable_ssl(true);
Set<Node> nodes = new HashSet<>();
Node node = new Node();
node.setIp(serviceAddrInfo[0]);
Set<Node> nodes = new HashSet<>();
Node node = new Node();
node.setIp(serviceAddrInfo[0]);
@Setter
public class CompileRuleRequest {
@Setter
public class CompileRuleRequest {
- @JsonProperty(value = "content")
@NotNull
private String content;
}
\ No newline at end of file
@NotNull
private String content;
}
\ No newline at end of file
*/
package org.onap.holmes.engine.request;
*/
package org.onap.holmes.engine.request;
-import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@Setter
public class DeployRuleRequest {
@Setter
public class DeployRuleRequest {
- @JsonProperty(value = "content")
@NotNull
private String content;
@NotNull
private String content;
- @JsonProperty(value = "engineid")
- @JsonProperty(value = "loopcontrolname")
@NotNull
private String loopControlName;
}
@NotNull
private String loopControlName;
}
+ " and <b>url</b>. Both fields are required.") DmaapConfigRequest config,
@Context HttpServletRequest request){
String url = config.getUrl();
+ " and <b>url</b>. Both fields are required.") DmaapConfigRequest config,
@Context HttpServletRequest request){
String url = config.getUrl();
- if (url.startsWith("http://")) {
+ if (url.startsWith("http://") || url.startsWith("https://")) {
Subscriber subscriber = new Subscriber();
subscriber.setTopic(config.getName());
subscriber.setUrl(url);
Subscriber subscriber = new Subscriber();
subscriber.setTopic(config.getName());
subscriber.setUrl(url);
return "{\"message\": \"Succeeded!\", \"topic\": \"" + config.getName() + "\"}";
}
return "{\"message\": \"Succeeded!\", \"topic\": \"" + config.getName() + "\"}";
}
- return "{\"message\": \"Only the HTTP protocol is supported!\"}";
+ return "{\"message\": \"Only the HTTP or HTTPS protocol is supported!\"}";
+ " and <b>url</b>. Both fields are required.") DmaapConfigRequest config,
@Context HttpServletRequest request){
String url = config.getUrl();
+ " and <b>url</b>. Both fields are required.") DmaapConfigRequest config,
@Context HttpServletRequest request){
String url = config.getUrl();
- if (url.startsWith("http://")) {
+ if (url.startsWith("http://") || url.startsWith("https://")) {
SecurityInfo securityInfo = new SecurityInfo();
SecurityInfo.DmaapInfo dmaapInfo = new SecurityInfo().new DmaapInfo();
dmaapInfo.setTopicUrl(config.getUrl());
SecurityInfo securityInfo = new SecurityInfo();
SecurityInfo.DmaapInfo dmaapInfo = new SecurityInfo().new DmaapInfo();
dmaapInfo.setTopicUrl(config.getUrl());
DcaeConfigurationsCache.addPubSecInfo(config.getName(), securityInfo);
return "{\"message\": \"Succeeded!\", \"topic\": \"" + config.getName() + "\"}";
}
DcaeConfigurationsCache.addPubSecInfo(config.getName(), securityInfo);
return "{\"message\": \"Succeeded!\", \"topic\": \"" + config.getName() + "\"}";
}
- return "{\"message\": \"Only the HTTP protocol is supported!\"}";
+ return "{\"message\": \"Only the HTTP or HTTPS protocol is supported!\"}";
@Timed
public CorrelationRuleResponse deployRule(
@ApiParam(value = "The request entity of the HTTP call, which comprises three "
@Timed
public CorrelationRuleResponse deployRule(
@ApiParam(value = "The request entity of the HTTP call, which comprises three "
- + "fields: \"content\" , \"loopcontrolname\" and \"engineid\". "
- + "The \"content\" should be a valid Drools rule string and the \"engineid\" "
+ + "fields: \"content\" , \"loopControlName\" and \"engineId\". "
+ + "The \"content\" should be a valid Drools rule string and the \"engineId\" "
+ "has to be \"engine-d\" in the Amsterdam release.", required = true) DeployRuleRequest deployRuleRequest,
@Context HttpServletRequest httpRequest) {
+ "has to be \"engine-d\" in the Amsterdam release.", required = true) DeployRuleRequest deployRuleRequest,
@Context HttpServletRequest httpRequest) {
*/
package org.onap.holmes.engine.response;
*/
package org.onap.holmes.engine.response;
-import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.Getter;
import lombok.Setter;
@Setter
public class CorrelationRuleResponse {
@Setter
public class CorrelationRuleResponse {
- @JsonProperty(value = "package")
private String packageName;
}
private String packageName;
}
<dependency>
<groupId>org.onap.msb.java-sdk</groupId>
<artifactId>msb-java-sdk</artifactId>
<dependency>
<groupId>org.onap.msb.java-sdk</groupId>
<artifactId>msb-java-sdk</artifactId>
- <version>1.0.0</version>
+ <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
</dependency>
<dependency>
<groupId>org.reflections</groupId>