diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-21 20:08:11 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-24 15:30:14 -0400 |
commit | a24a985d328b97f50a41d3448d235866af625ca9 (patch) | |
tree | 06c95950000fc2b512ec1e4da5aded2c5bc84e78 /controlloop/common/actors | |
parent | 3c52de0725c942fe1f2fdeb05c8960645bc66f01 (diff) |
Fix checkstyle declarations
I fixed what I thought would be tolerable for this release.
Same issue as policy/common I had to defined the checkstyle
in each repo where the suppressions were needed.
Issue-ID: POLICY-1135
Change-Id: I8f30bee7e9cddc692ddad3cf88acedb2e6b4781b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/actors')
10 files changed, 48 insertions, 47 deletions
diff --git a/controlloop/common/actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/APPCActorServiceProvider.java b/controlloop/common/actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java index 8960ee022..865584972 100644 --- a/controlloop/common/actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/APPCActorServiceProvider.java +++ b/controlloop/common/actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java @@ -37,7 +37,7 @@ import org.onap.policy.vnf.trafficgenerator.PGStream; import org.onap.policy.vnf.trafficgenerator.PGStreams; -public class APPCActorServiceProvider implements Actor { +public class AppcActorServiceProvider implements Actor { // Strings for targets private static final String TARGET_VM = "VM"; private static final String TARGET_VNF = "VNF"; diff --git a/controlloop/common/actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/controlloop/common/actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor index 8181582b5..f1002a301 100644 --- a/controlloop/common/actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor +++ b/controlloop/common/actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor @@ -1 +1 @@ -org.onap.policy.controlloop.actor.appc.APPCActorServiceProvider
\ No newline at end of file +org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider
\ No newline at end of file diff --git a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java index 1fffe043c..9f8528fe0 100644 --- a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java +++ b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java @@ -125,7 +125,7 @@ public class AppcServiceProviderTest { public void constructModifyConfigRequestTest() { Request appcRequest; - appcRequest = APPCActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01"); + appcRequest = AppcActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01"); /* The service provider must return a non null APPC request */ assertNotNull(appcRequest); @@ -168,7 +168,7 @@ public class AppcServiceProviderTest { @Test public void testMethods() { - APPCActorServiceProvider sp = new APPCActorServiceProvider(); + AppcActorServiceProvider sp = new AppcActorServiceProvider(); assertEquals("APPC", sp.actor()); assertEquals(4, sp.recipes().size()); diff --git a/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java b/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java index c9feb0d2a..12fad9e84 100644 --- a/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java +++ b/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java @@ -3,6 +3,7 @@ * * ================================================================================ * Copyright (C) 2018 Nokia Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2018 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. @@ -21,9 +22,8 @@ package org.onap.policy.controlloop.actor.appclcm; import com.google.common.collect.Lists; -import org.apache.commons.lang.StringUtils; - import java.util.stream.Collectors; +import org.apache.commons.lang.StringUtils; class AppcLcmRecipeFormatter { diff --git a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java index 7c0214bfb..8edddbb40 100644 --- a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java +++ b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java @@ -49,8 +49,8 @@ import org.onap.policy.so.util.Serialization; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class SOActorServiceProvider implements Actor { - private static final Logger logger = LoggerFactory.getLogger(SOActorServiceProvider.class); +public class SoActorServiceProvider implements Actor { + private static final Logger logger = LoggerFactory.getLogger(SoActorServiceProvider.class); // Strings for SO Actor private static final String SO_ACTOR = "SO"; @@ -184,7 +184,7 @@ public class SOActorServiceProvider implements Actor { } /** - * Construct SO request to create vf-module + * Construct SO request to create vf-module. * * @param aaiResponseWrapper the AAI response containing the VF modules * @param policy the policy @@ -287,7 +287,7 @@ public class SOActorServiceProvider implements Actor { } /** - * Construct SO request to delete vf-module + * Construct SO request to delete vf-module. * * @param tenantItem tenant item from A&AI named-query response * @param vnfItem vnf item from A&AI named-query response @@ -320,7 +320,7 @@ public class SOActorServiceProvider implements Actor { } /** - * construct requestInfo for the SO requestDetails + * Construct requestInfo for the SO requestDetails. * * @return SO request information */ @@ -333,7 +333,7 @@ public class SOActorServiceProvider implements Actor { } /** - * construct modelInfo of the vfModule for the SO requestDetails + * Construct modelInfo of the vfModule for the SO requestDetails. * * @param vfModuleItem vf module item from A&AI named-query response * @return SO Model info for the vfModule @@ -355,7 +355,7 @@ public class SOActorServiceProvider implements Actor { } /** - * construct cloudConfiguration for the SO requestDetails + * Construct cloudConfiguration for the SO requestDetails. * * @param tenantItem tenant item from A&AI named-query response * @return SO cloud configuration diff --git a/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor index ad136e98f..a955eb71c 100644 --- a/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor +++ b/controlloop/common/actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor @@ -1 +1 @@ -org.onap.policy.controlloop.actor.so.SOActorServiceProvider
\ No newline at end of file +org.onap.policy.controlloop.actor.so.SoActorServiceProvider
\ No newline at end of file diff --git a/controlloop/common/actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java b/controlloop/common/actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java index 9c1d87888..90a4c2868 100644 --- a/controlloop/common/actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java +++ b/controlloop/common/actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java @@ -63,15 +63,15 @@ public class SoActorServiceProviderTest { policy.setActor("Dorothy"); policy.setRecipe("GoToOz"); - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); policy.setActor("SO"); - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); policy.setRecipe(VF_MODULE_CREATE); // empty policy payload - SORequest request = new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); + SORequest request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); assertNotNull(request); assertEquals("my_module_3", request.getRequestDetails().getRequestInfo().getInstanceName()); @@ -80,7 +80,7 @@ public class SoActorServiceProviderTest { // non-empty policy payload policy.setPayload(makePayload()); - request = new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); + request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); assertNotNull(request); assertEquals(true, request.getRequestDetails().getRequestParameters().isUsePreload()); assertEquals("avalue", request.getRequestDetails().getRequestParameters().getUserParams().get(0).get("akey")); @@ -89,33 +89,33 @@ public class SoActorServiceProviderTest { // payload with config, but no request params policy.setPayload(makePayload()); - policy.getPayload().remove(SOActorServiceProvider.REQ_PARAM_NM); - request = new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); + policy.getPayload().remove(SoActorServiceProvider.REQ_PARAM_NM); + request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); assertNotNull(request); assertNull(request.getRequestDetails().getRequestParameters()); assertNotNull(request.getRequestDetails().getConfigurationParameters()); // payload with request, but no config params policy.setPayload(makePayload()); - policy.getPayload().remove(SOActorServiceProvider.CONFIG_PARAM_NM); - request = new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); + policy.getPayload().remove(SoActorServiceProvider.CONFIG_PARAM_NM); + request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); assertNotNull(request); assertNotNull(request.getRequestDetails().getRequestParameters()); assertNull(request.getRequestDetails().getConfigurationParameters()); // null response - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, null)); + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, null)); // response has no base VF module - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, loadAaiResponse(onset, "aai/AaiNqResponse-NoBase.json"))); // response has no non-base VF modules (other than the "dummy") - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, loadAaiResponse(onset, "aai/AaiNqResponse-NoNonBase.json"))); policy.setRecipe(VF_MODULE_DELETE); - SORequest deleteRequest = new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); + SORequest deleteRequest = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp); assertNotNull(deleteRequest); assertEquals(SoOperationType.DELETE_VF_MODULE, deleteRequest.getOperationType()); @@ -128,22 +128,22 @@ public class SoActorServiceProviderTest { // null tenant aaiNqResp.getAaiNqResponse().getInventoryResponseItems().get(0).getItems().getInventoryResponseItems() .remove(1); - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); // null service item aaiNqResp.getAaiNqResponse().getInventoryResponseItems().get(0).getItems().getInventoryResponseItems().get(0) .setItems(null); - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); // null response aaiNqResp.setAaiNqResponse(null); - assertNull(new SOActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); + assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp)); } @Test public void testSendRequest() { try { - SOActorServiceProvider.sendRequest(UUID.randomUUID().toString(), null, null); + SoActorServiceProvider.sendRequest(UUID.randomUUID().toString(), null, null); } catch (Exception e) { fail("Test should not throw an exception"); } @@ -151,7 +151,7 @@ public class SoActorServiceProviderTest { @Test public void testMethods() { - SOActorServiceProvider sp = new SOActorServiceProvider(); + SoActorServiceProvider sp = new SoActorServiceProvider(); assertEquals("SO", sp.actor()); assertEquals(2, sp.recipes().size()); @@ -170,8 +170,8 @@ public class SoActorServiceProviderTest { private Map<String, String> makePayload() { Map<String, String> payload = new TreeMap<>(); - payload.put(SOActorServiceProvider.REQ_PARAM_NM, makeReqParams()); - payload.put(SOActorServiceProvider.CONFIG_PARAM_NM, makeConfigParams()); + payload.put(SoActorServiceProvider.REQ_PARAM_NM, makeReqParams()); + payload.put(SoActorServiceProvider.CONFIG_PARAM_NM, makeConfigParams()); return payload; } diff --git a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java index b8aaf854a..8660aa3e2 100644 --- a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java +++ b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2017-2018 Intel Corp. All rights reserved. + * Modifications Copyright (C) 2018 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. @@ -40,8 +41,8 @@ import org.onap.policy.vfc.VFCRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class VFCActorServiceProvider implements Actor { - private static final Logger logger = LoggerFactory.getLogger(VFCActorServiceProvider.class); +public class VfcActorServiceProvider implements Actor { + private static final Logger logger = LoggerFactory.getLogger(VfcActorServiceProvider.class); // Strings for VFC Actor private static final String VFC_ACTOR = "VFC"; diff --git a/controlloop/common/actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/controlloop/common/actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor index 1476eac1d..e43c726cf 100644 --- a/controlloop/common/actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor +++ b/controlloop/common/actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor @@ -1 +1 @@ -org.onap.policy.controlloop.actor.vfc.VFCActorServiceProvider +org.onap.policy.controlloop.actor.vfc.VfcActorServiceProvider diff --git a/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java b/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java index 934ea134c..02387b641 100644 --- a/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java +++ b/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java @@ -68,37 +68,37 @@ public class VfcActorServiceProviderTest { Policy policy = new Policy(); policy.setRecipe("GoToOz"); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); onset.getAai().put("generic-vnf.vnf-id", "dorothy.gale.1939"); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666"); PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI"); PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI"); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); UUID requestId = UUID.randomUUID(); onset.setRequestId(requestId); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); onset.getAai().put("generic-vnf.vnf-name", "Dorothy"); PolicyEngine.manager.getEnvironment().remove("aai.password"); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI"); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); onset.getAai().put("service-instance.service-instance-id", ""); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null)); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null)); - assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse())); + assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse())); policy.setRecipe("Restart"); - assertNotNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse())); + assertNotNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse())); VFCRequest request = - VFCActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()); + VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()); assertEquals(requestId, Objects.requireNonNull(request).getRequestId()); assertEquals("dorothy.gale.1939", request.getHealRequest().getVnfInstanceId()); @@ -107,7 +107,7 @@ public class VfcActorServiceProviderTest { @Test public void testMethods() { - VFCActorServiceProvider sp = new VFCActorServiceProvider(); + VfcActorServiceProvider sp = new VfcActorServiceProvider(); assertEquals("VFC", sp.actor()); assertEquals(1, sp.recipes().size()); |