#
actors:
CDS:
- any:
- timeout: 10
- port: 6700
- host: my-host
- username: my-user
- password: my-pass
+ operations:
+ any:
+ timeout: 10
+ port: 6700
+ host: my-host
+ username: my-user
+ password: my-pass
* <dd>generated</dd>
* </dl>
*/
-public class GuardOperation extends HttpOperation<DecisionResponse> {
- private static final Logger logger = LoggerFactory.getLogger(GuardOperation.class);
+public class DecisionOperation extends HttpOperation<DecisionResponse> {
+ private static final Logger logger = LoggerFactory.getLogger(DecisionOperation.class);
// operation name
public static final String NAME = OperationPartial.GUARD_OPERATION_NAME;
* @param params operation parameters
* @param config configuration for this operation
*/
- public GuardOperation(ControlLoopOperationParams params, HttpConfig config) {
+ public DecisionOperation(ControlLoopOperationParams params, HttpConfig config) {
super(params, config, DecisionResponse.class);
this.config = (GuardConfig) config;
}
/**
* Guard Operator.
*/
-public class GuardOperator extends HttpOperator {
+public class DecisionOperator extends HttpOperator {
- public GuardOperator(String actorName, String name,
+ public DecisionOperator(String actorName, String name,
@SuppressWarnings("rawtypes") OperationMaker<HttpConfig, HttpOperation> operationMaker) {
super(actorName, name, operationMaker);
}
public GuardActorServiceProvider() {
super(NAME, GuardActorParams.class);
- addOperator(new GuardOperator(NAME, GuardOperation.NAME, GuardOperation::new));
+ addOperator(new DecisionOperator(NAME, DecisionOperation.NAME, DecisionOperation::new));
}
}
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.simulators.GuardSimulatorJaxRs;
-public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> {
+public class DecisionOperationTest extends BasicHttpOperation<DecisionRequest> {
@Mock
private Consumer<OperationOutcome> started;
private Consumer<OperationOutcome> completed;
private GuardConfig guardConfig;
- private GuardOperation oper;
+ private DecisionOperation oper;
/**
* Starts the simulator.
params = params.toBuilder().startCallback(started).completeCallback(completed).build();
- oper = new GuardOperation(params, config);
+ oper = new DecisionOperation(params, config);
}
/**
config = new GuardConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
- oper = new GuardOperation(params, config);
+ oper = new DecisionOperation(params, config);
outcome = oper.start().get();
assertEquals(PolicyResult.SUCCESS, outcome.getResult());
params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor)
.payload(Map.of("clname", GuardSimulatorJaxRs.DENY_CLNAME)).build();
- oper = new GuardOperation(params, config);
+ oper = new DecisionOperation(params, config);
outcome = oper.start().get();
assertEquals(PolicyResult.FAILURE, outcome.getResult());
assertFalse(future2.isDone());
DecisionResponse resp = new DecisionResponse();
- resp.setStatus(GuardOperation.PERMIT);
+ resp.setStatus(DecisionOperation.PERMIT);
when(rawResponse.readEntity(String.class)).thenReturn(Util.translate("", resp, String.class));
verify(client).post(callbackCaptor.capture(), any(), requestCaptor.capture(), any());
// null payload - start with fresh parameters and operation
params = params.toBuilder().payload(null).build();
- oper = new GuardOperation(params, config);
+ oper = new DecisionOperation(params, config);
assertThatIllegalArgumentException().isThrownBy(() -> oper.makeRequest());
}
import org.onap.policy.controlloop.actorserviceprovider.Util;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
-public class GuardOperatorTest {
+public class DecisionOperatorTest {
private static final String ACTOR = "my-actor";
private static final String OPERATION = "my-name";
private static final String CLIENT = "my-client";
private HttpClientFactory factory;
- private GuardOperator oper;
+ private DecisionOperator oper;
/**
* Initializes fields, including {@link #oper}, and resets the static fields used by
}
- private class MyOperator extends GuardOperator {
+ private class MyOperator extends DecisionOperator {
public MyOperator() {
super(ACTOR, OPERATION, null);
}
import org.junit.Test;
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.controlloop.actorserviceprovider.Util;
-import org.onap.policy.controlloop.actorserviceprovider.parameters.CommonActorParams;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.ActorParams;
public class GuardActorParamsTest {
private static final String CONTAINER = "my-container";
assertTrue(params.validate(CONTAINER).isValid());
// only a few fields are required
- GuardActorParams sparse = Util.translate(CONTAINER, Map.of(CommonActorParams.OPERATIONS_FIELD, operations),
+ GuardActorParams sparse = Util.translate(CONTAINER, Map.of(ActorParams.OPERATIONS_FIELD, operations),
GuardActorParams.class);
assertTrue(sparse.validate(CONTAINER).isValid());
assertEquals(GuardActorParams.DEFAULT_ACTION, sparse.getAction());
// check fields from superclass
- testValidateField(CommonActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
+ testValidateField(ActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
testValidateField("timeoutSec", "minimum", params2 -> params2.setTimeoutSec(-1));
}
final GuardActorServiceProvider prov = new GuardActorServiceProvider();
// verify that it has the operators we expect
- var expected = Arrays.asList(GuardOperation.NAME).stream().sorted().collect(Collectors.toList());
+ var expected = Arrays.asList(DecisionOperation.NAME).stream().sorted().collect(Collectors.toList());
var actual = prov.getOperationNames().stream().sorted().collect(Collectors.toList());
assertEquals(expected.toString(), actual.toString());
// verify that it all plugs into the ActorService
verifyActorService(GuardActorServiceProvider.NAME, "service.yaml");
- assertTrue(prov.getOperator(GuardOperation.NAME) instanceof GuardOperator);
+ assertTrue(prov.getOperator(DecisionOperation.NAME) instanceof DecisionOperator);
}
}
import org.junit.Test;
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.controlloop.actorserviceprovider.Util;
-import org.onap.policy.controlloop.actorserviceprovider.parameters.CommonActorParams;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.ActorParams;
public class SoActorParamsTest {
assertTrue(params.validate(CONTAINER).isValid());
// only a few fields are required
- SoActorParams sparse = Util.translate(CONTAINER, Map.of(CommonActorParams.OPERATIONS_FIELD, operations),
+ SoActorParams sparse = Util.translate(CONTAINER, Map.of(ActorParams.OPERATIONS_FIELD, operations),
SoActorParams.class);
assertTrue(sparse.validate(CONTAINER).isValid());
testValidateField("waitSecGet", "minimum", params2 -> params2.setWaitSecGet(0));
// check fields from superclass
- testValidateField(CommonActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
+ testValidateField(ActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
testValidateField("timeoutSec", "minimum", params2 -> params2.setTimeoutSec(-1));
// check edge cases
#
actors:
MyActor:
- MyOperationA: {}
- MyOperationB: {}
\ No newline at end of file
+ operations:
+ MyOperationA: {}
+ MyOperationB: {}
managed: true
actors:
MyActor:
- MyOperationA: {}
- MyOperationB: {}
\ No newline at end of file
+ operations:
+ MyOperationA: {}
+ MyOperationB: {}
managed: true
actors:
MyActor:
- MyOperationA: {}
- MyOperationB: {}
\ No newline at end of file
+ operations:
+ MyOperationA: {}
+ MyOperationB: {}
managed: true
actors:
VFC:
- Restart:
+ operations:
+ Restart:
clientName: my-client
pathGet: jobs
maxGets: 20
import java.util.function.Function;
import org.onap.policy.controlloop.actorserviceprovider.Operator;
import org.onap.policy.controlloop.actorserviceprovider.Util;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.ActorParams;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
import org.slf4j.Logger;
/**
* Extracts the operator parameters from the actor parameters, for a given operator.
- * This method assumes each operation has its own set of parameters.
+ * This method translates the parameters to an {@link ActorParams} and then creates a function
+ * that will extract operator-specific parameters.
*
* @param actorParameters actor parameters
* @return a function to extract the operator parameters from the actor parameters.
* the given operation name
*/
protected Function<String, Map<String, Object>> makeOperatorParameters(Map<String, Object> actorParameters) {
+ String actorName = getName();
- return operName -> Util.translateToMap(getName() + "." + operName, actorParameters.get(operName));
+ // @formatter:off
+ return Util.translate(actorName, actorParameters, ActorParams.class)
+ .doValidation(actorName)
+ .makeOperationParameters(actorName);
+ // @formatter:on
}
/**
@Getter
@Setter
@EqualsAndHashCode
-public class CommonActorParams {
+public class ActorParams {
/**
* Name of the "operations" field contained within actor parameters.
*/
* @return "this"
* @throws IllegalArgumentException if the parameters are invalid
*/
- public CommonActorParams doValidation(String name) {
+ public ActorParams doValidation(String name) {
ValidationResult result = validate(name);
if (!result.isValid()) {
throw new ParameterValidationRuntimeException("invalid parameters", result);
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
-public class BidirectionalTopicActorParams extends CommonActorParams {
+public class BidirectionalTopicActorParams extends ActorParams {
/*
* Optional, default values that are used if missing from the operation-specific
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
-public class HttpActorParams extends CommonActorParams {
+public class HttpActorParams extends ActorParams {
/*
* Optional, default values that are used if missing from the operation-specific
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import org.onap.policy.common.parameters.ObjectValidationResult;
import org.onap.policy.common.parameters.ValidationStatus;
import org.onap.policy.controlloop.actorserviceprovider.impl.ActorImpl;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.ActorParams;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
actor3 = spy(new ActorImpl(ACTOR3));
actor4 = spy(new ActorImpl(ACTOR4));
- sub1 = Map.of("sub A", "value A");
- sub2 = Map.of("sub B", "value B");
- sub3 = Map.of("sub C", "value C");
- sub4 = Map.of("sub D", "value D");
+ sub1 = Map.of("sub A", "value A", ActorParams.OPERATIONS_FIELD, Collections.emptyMap());
+ sub2 = Map.of("sub B", "value B", ActorParams.OPERATIONS_FIELD, Collections.emptyMap());
+ sub3 = Map.of("sub C", "value C", ActorParams.OPERATIONS_FIELD, Collections.emptyMap());
+ sub4 = Map.of("sub D", "value D", ActorParams.OPERATIONS_FIELD, Collections.emptyMap());
params = Map.of(ACTOR1, sub1, ACTOR2, sub2, ACTOR3, sub3, ACTOR4, sub4);
import java.util.Iterator;
import java.util.Map;
-import java.util.TreeMap;
import java.util.stream.Collectors;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.parameters.ValidationStatus;
import org.onap.policy.controlloop.actorserviceprovider.Operation;
import org.onap.policy.controlloop.actorserviceprovider.Operator;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.ActorParams;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
sub3 = Map.of("sub C", "value C");
sub4 = Map.of("sub D", "value D");
- params = Map.of(OPER1, sub1, OPER2, sub2, OPER3, sub3, OPER4, sub4);
+ params = Map.of(ActorParams.OPERATIONS_FIELD, Map.of(OPER1, sub1, OPER2, sub2, OPER3, sub3, OPER4, sub4));
actor = makeActor(oper1, oper2, oper3, oper4);
}
*/
@Test
public void testDoConfigureConfigure() {
- // need mutable parameters
- params = new TreeMap<>(params);
-
// configure one operator
oper1.configure(sub1);
// configure another and remove its parameters
oper2.configure(sub2);
- params.remove(OPER2);
+ params = Map.of(ActorParams.OPERATIONS_FIELD, Map.of(OPER1, sub1, OPER3, sub3, OPER4, sub4));
// create a new, unconfigured actor
Operator oper5 = spy(new MyOper("UNCONFIGURED"));
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.controlloop.actorserviceprovider.Util;
-public class CommonActorParamsTest {
+public class ActorParamsTest {
private static final String CONTAINER = "my-container";
private static final String TEXT2B = "bye";
private Map<String, Map<String, Object>> operations;
- private CommonActorParams params;
+ private ActorParams params;
/**
* Initializes {@link #operations} with two items and {@link params} with a fully
operations.put(PATH1, Map.of("path", URI1));
operations.put(PATH2, Map.of("path", URI2, "text2", TEXT2B));
- params = makeCommonActorParams();
+ params = makeActorParams();
}
@Test
assertTrue(params.validate(CONTAINER).isValid());
// only a few fields are required
- CommonActorParams sparse = Util.translate(CONTAINER,
- Map.of(CommonActorParams.OPERATIONS_FIELD, operations, "timeoutSec", 1),
- CommonActorParams.class);
+ ActorParams sparse = Util.translate(CONTAINER,
+ Map.of(ActorParams.OPERATIONS_FIELD, operations, "timeoutSec", 1),
+ ActorParams.class);
assertTrue(sparse.validate(CONTAINER).isValid());
- testValidateField(CommonActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
+ testValidateField(ActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
}
- private void testValidateField(String fieldName, String expected, Consumer<CommonActorParams> makeInvalid) {
+ private void testValidateField(String fieldName, String expected, Consumer<ActorParams> makeInvalid) {
// original params should be valid
ValidationResult result = params.validate(CONTAINER);
assertTrue(fieldName, result.isValid());
// make invalid params
- CommonActorParams params2 = makeCommonActorParams();
+ ActorParams params2 = makeActorParams();
makeInvalid.accept(params2);
result = params2.validate(CONTAINER);
assertFalse(fieldName, result.isValid());
assertThat(result.getResult()).contains(CONTAINER).contains(fieldName).contains(expected);
}
- private CommonActorParams makeCommonActorParams() {
+ private ActorParams makeActorParams() {
MyParams params2 = new MyParams();
params2.setOperations(operations);
params2.setText1(TEXT1);
}
@Setter
- public static class MyParams extends CommonActorParams {
+ public static class MyParams extends ActorParams {
@SuppressWarnings("unused")
private String text1;
// only a few fields are required
BidirectionalTopicActorParams sparse =
- Util.translate(CONTAINER, Map.of(CommonActorParams.OPERATIONS_FIELD, operMap, "timeoutSec", 1),
+ Util.translate(CONTAINER, Map.of(ActorParams.OPERATIONS_FIELD, operMap, "timeoutSec", 1),
BidirectionalTopicActorParams.class);
assertTrue(sparse.validate(CONTAINER).isValid());
- testValidateField(CommonActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
+ testValidateField(ActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
testValidateField("timeoutSec", "minimum", params2 -> params2.setTimeoutSec(-1));
// check edge cases
// only a few fields are required
HttpActorParams sparse = Util.translate(CONTAINER,
- Map.of(CommonActorParams.OPERATIONS_FIELD, operations, "timeoutSec", 1), HttpActorParams.class);
+ Map.of(ActorParams.OPERATIONS_FIELD, operations, "timeoutSec", 1), HttpActorParams.class);
assertTrue(sparse.validate(CONTAINER).isValid());
- testValidateField(CommonActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
+ testValidateField(ActorParams.OPERATIONS_FIELD, "null", params2 -> params2.setOperations(null));
testValidateField("timeoutSec", "minimum", params2 -> params2.setTimeoutSec(-1));
// check edge cases
<!--
============LICENSE_START=======================================================
Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- Modifications Copyright (C) 2019 Nordix Foundation.
+ Modifications Copyright (C) 2020 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
-
+
<parent>
<groupId>org.onap.policy.models</groupId>
<artifactId>policy-models-interactions</artifactId>
<version>2.3.0-SNAPSHOT</version>
</parent>
-
+
<groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>model-actors</artifactId>
<properties>
- <jacoco.dataFile>${project.basedir}/../../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
+ <jacoco.dataFile>${project.basedir}/../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
</properties>
<modules>
controlloop-model-impl
================================================================================
Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- Modifications Copyright (C) 2019 Nordix Foundation
+ Modifications Copyright (C) 2020 Nordix Foundation
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
-
+
<parent>
<groupId>org.onap.policy.models</groupId>
<artifactId>policy-models-interactions</artifactId>
<version>2.3.0-SNAPSHOT</version>
</parent>
-
+
<groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>model-impl</artifactId>
<properties>
- <jacoco.dataFile>${project.basedir}/../../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
+ <jacoco.dataFile>${project.basedir}/../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
</properties>
<modules>
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019 Nordix Foundation.
+# Modifications copyright (C) 2020 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
-Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" \
-Djavax.net.ssl.trustStore="$TRUSTSTORE" \
-Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" \
- -Dlogback.configurationFile=$DMAAP_SIM_HOME/etc/logback.xml \
org.onap.policy.models.sim.dmaap.startstop.Main \
-c $CONFIG_FILE
<!--
============LICENSE_START=======================================================
Copyright (C) 2019 Nordix Foundation.
+ Modifications copyright (C) 2020 Bell Canada. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<lineEnding>unix</lineEnding>
<fileMode>755</fileMode>
</fileSet>
- <fileSet>
- <directory>${project.basedir}/src/main/resources
- </directory>
- <includes>
- <include>logback.xml</include>
- </includes>
- <outputDirectory>etc</outputDirectory>
- <lineEnding>unix</lineEnding>
- </fileSet>
<fileSet>
<directory>${project.basedir}/src/main/resources/etc
</directory>
+++ /dev/null
-<!--
- ============LICENSE_START=======================================================
- Copyright (C) 2019 Nordix Foundation.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- SPDX-License-Identifier: Apache-2.0
- ============LICENSE_END=========================================================
--->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
- <contextName>DMaaPSim</contextName>
- <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
- <property name="LOG_DIR" value="${java.io.tmpdir}/pf_logging/" />
-
- <!-- USE FOR STD OUT ONLY -->
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
- </encoder>
- </appender>
-
- <root level="info">
- <appender-ref ref="STDOUT" />
- </root>
-
- <logger name="org.eclipse.jetty" level="info" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <logger name="org.onap.policy.models.sim.dmaap" level="debug" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
-</configuration>
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2020 Nordix Foundation.
+# Modifications copyright (C) 2020 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
-Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" \
-Djavax.net.ssl.trustStore="$TRUSTSTORE" \
-Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" \
- -Dlogback.configurationFile=$PDP_SIM_HOME/etc/logback.xml \
org.onap.policy.models.sim.pdp.PdpSimulatorMain \
-c $CONFIG_FILE
<!--
============LICENSE_START=======================================================
Copyright (C) 2019 Nordix Foundation.
+ Modifications copyright (C) 2020 Bell Canada. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
</dependencySet>
</dependencySets>
<fileSets>
- <fileSet>
- <directory>${project.basedir}/src/main/resources
- </directory>
- <includes>
- <include>logback.xml</include>
- </includes>
- <outputDirectory>etc</outputDirectory>
- <lineEnding>unix</lineEnding>
- </fileSet>
<fileSet>
<directory>${project.basedir}/src/main/resources/config
</directory>
+++ /dev/null
-<!--
- ============LICENSE_START=======================================================
- Copyright (C) 2019 Nordix Foundation.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- SPDX-License-Identifier: Apache-2.0
- ============LICENSE_END=========================================================
--->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
- <contextName>DMaaPSim</contextName>
- <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
- <property name="LOG_DIR" value="${java.io.tmpdir}/pf_logging/" />
-
- <!-- USE FOR STD OUT ONLY -->
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
- </encoder>
- </appender>
-
- <root level="info">
- <appender-ref ref="STDOUT" />
- </root>
-
- <logger name="org.eclipse.jetty" level="info" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <logger name="org.onap.policy.models.sim.pdp" level="debug" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
-</configuration>
# ONAP
# ================================================================================
# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# Modifications copyright (C) 2020 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
${JAVA_HOME}/bin/java \
-cp "${SIMULATOR_HOME}/etc:${SIMULATOR_HOME}/lib/*" \
- -Dlogback.configurationFile=${SIMULATOR_HOME}/etc/logback.xml \
-Djavax.net.ssl.keyStore="${KEYSTORE}" \
-Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \
-Djavax.net.ssl.trustStore="${TRUSTSTORE}" \
<!--
============LICENSE_START=======================================================
Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ Modifications copyright (C) 2020 Bell Canada. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
</dependencySet>
</dependencySets>
<fileSets>
- <fileSet>
- <directory>${project.basedir}/src/main/resources</directory>
- <includes>
- <include>logback.xml</include>
- </includes>
- <outputDirectory>etc</outputDirectory>
- <lineEnding>unix</lineEnding>
- </fileSet>
<fileSet>
<directory>${project.basedir}/src/main/resources/ssl
</directory>
+++ /dev/null
-<!--
- ============LICENSE_START=======================================================
- Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- SPDX-License-Identifier: Apache-2.0
- ============LICENSE_END=========================================================
--->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
- <contextName>Simulators</contextName>
- <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
- <property name="logDir" value="${POLICY_LOGS}" />
-
- <appender name="DebugOut"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/debug.log</file>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/debug.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>10</maxHistory>
- <totalSizeCap>500MB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n
- </Pattern>
- </encoder>
- </appender>
-
- <root level="info">
- <appender-ref ref="DebugOut" />
- </root>
-
- <logger name="org.eclipse.jetty" level="info" additivity="false">
- <appender-ref ref="DebugOut" />
- </logger>
-
- <logger name="org.onap.policy.models.sim.dmaap" level="debug" additivity="false">
- <appender-ref ref="DebugOut" />
- </logger>
-
-</configuration>