import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Properties;
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
-
import org.apache.commons.lang3.tuple.Pair;
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.onap.aai.domain.yang.GenericVnf;
private PolicyResult policyResult = null;
private ControlLoopEventManager eventManager = null;
private String targetEntity;
- private String guardApprovalStatus = "NONE";// "NONE", "PERMIT", "DENY"
+ private String guardApprovalStatus = "NONE"; // "NONE", "PERMIT", "DENY"
private AaiCqResponse aaiCqResponse;
private transient Object operationRequest;
import java.util.List;
import java.util.Map;
import java.util.Queue;
-
import org.onap.policy.appc.Request;
import org.onap.policy.appclcm.AppcLcmDmaapWrapper;
import org.onap.policy.controlloop.ControlLoopNotification;
* 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.
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
-
import org.junit.Test;
public class ControlLoopExceptionTest {
*/
@GET
@Path("engine/controllers/{controller}/drools/facts/{session}/controlloops/{controlLoopName}")
- @ApiOperation( value = "Control Loop", notes = "Control Loop Parameters", responseContainer = "List")
+ @ApiOperation(value = "Control Loop", notes = "Control Loop Parameters", responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 404, message = "The Control Loop cannot be found")})
public Response controlLoop(
@ApiParam(value = "Policy Controller Name", required = true) @PathParam("controller") String controllerName,
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class PolicyGuardRequestTest {
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class PolicyGuardResponseTest {
}
@Test
- /**
+ /*
* Tests PolicyGuardXacmlHelper.callPdp method to determine if it returns DENY, PERMIT, or
* INDETERMINATE as expected.
*/
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class PolicyGuardXacmlRequestAttributesTest {
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.controlloop.policy.guard.Constraint;
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- /**
+ /*
* Attach appender to the logger.
*/
appender.setContext(logger.getLoggerContext());
</dependency>
</dependencies>
</plugin>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <id>onap-java-style</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
- <!-- Use Google Java Style Guide:
- https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
- with minor changes -->
- <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
- <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
- <includeResources>true</includeResources>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <includeTestResources>true</includeTestResources>
- <excludes>
- </excludes>
- <suppressionsLocation>/checkstyle-suppressions.xml</suppressionsLocation>
- <consoleOutput>true</consoleOutput>
- <failsOnViolation>true</failsOnViolation>
- <violationSeverity>warning</violationSeverity>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.onap.oparent</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${oparent.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- </plugin>
</plugins>
<pluginManagement>
<plugins>