summaryrefslogtreecommitdiffstats
path: root/artifactbroker/plugins/forwarding-plugins/src
diff options
context:
space:
mode:
Diffstat (limited to 'artifactbroker/plugins/forwarding-plugins/src')
-rw-r--r--artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java (renamed from artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/xacml/pdp/XacmlPdpArtifactForwarder.java)8
-rw-r--r--artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarderParameterGroup.java (renamed from artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/xacml/pdp/XacmlPdpArtifactForwarderParameterGroup.java)34
-rw-r--r--artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/engine/K8sArtifactForwarderParameterGroupTest.java (renamed from artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpArtifactForwarderParameterGroupTest.java)38
-rw-r--r--artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/engine/K8sArtifactForwarderTest.java (renamed from artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpArtifactForwarderTest.java)12
-rw-r--r--artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/testclasses/DummyReceptionHandler.java (renamed from artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java)2
5 files changed, 47 insertions, 47 deletions
diff --git a/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/xacml/pdp/XacmlPdpArtifactForwarder.java b/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java
index 4179fc7..d920907 100644
--- a/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/xacml/pdp/XacmlPdpArtifactForwarder.java
+++ b/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.distribution.forwarding.xacml.pdp;
+package org.onap.policy.distribution.forwarding.k8s;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -61,14 +61,14 @@ import org.onap.sdc.api.notification.IArtifactInfo;
/**
* Forwards policies to the XACML PDP.
*/
-public class XacmlPdpArtifactForwarder implements ArtifactForwarder {
+public class K8sArtifactForwarder implements ArtifactForwarder {
- private static final Logger LOGGER = FlexLogger.getLogger(XacmlPdpArtifactForwarder.class);
+ private static final Logger LOGGER = FlexLogger.getLogger(K8sArtifactForwarder.class);
private static final String BASE_PATH = "http://localhost:8081/v1/rb/definition";
private static final String CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT = "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT";
private Map<String, IArtifactInfo> artifactMap;
- private XacmlPdpArtifactForwarderParameterGroup configurationParameters = null;
+ private K8sArtifactForwarderParameterGroup configurationParameters = null;
diff --git a/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/xacml/pdp/XacmlPdpArtifactForwarderParameterGroup.java b/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarderParameterGroup.java
index d04bb3c..42e8d5a 100644
--- a/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/xacml/pdp/XacmlPdpArtifactForwarderParameterGroup.java
+++ b/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarderParameterGroup.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.distribution.forwarding.xacml.pdp;
+package org.onap.policy.distribution.forwarding.k8s;
import org.onap.policy.common.parameters.GroupValidationResult;
import org.onap.policy.common.parameters.ValidationStatus;
@@ -26,10 +26,10 @@ import org.onap.policy.common.utils.validation.ParameterValidationUtils;
import org.onap.policy.distribution.main.parameters.ArtifactForwarderConfigurationParameterGroup;
/**
- * Holds the parameters for the{@link XacmlPdpArtifactForwarder}.
+ * Holds the parameters for the{@link K8sArtifactForwarder}.
*/
-public class XacmlPdpArtifactForwarderParameterGroup extends ArtifactForwarderConfigurationParameterGroup {
- public static final String POLICY_FORWARDER_PLUGIN_CLASS = XacmlPdpArtifactForwarder.class.getCanonicalName();
+public class K8sArtifactForwarderParameterGroup extends ArtifactForwarderConfigurationParameterGroup {
+ public static final String POLICY_FORWARDER_PLUGIN_CLASS = K8sArtifactForwarder.class.getCanonicalName();
private boolean useHttps;
private String hostname;
@@ -45,7 +45,7 @@ public class XacmlPdpArtifactForwarderParameterGroup extends ArtifactForwarderCo
*
* @param builder the builder create the instance from
*/
- private XacmlPdpArtifactForwarderParameterGroup(final XacmlPdpArtifactForwarderParameterGroupBuilder builder) {
+ private K8sArtifactForwarderParameterGroup(final K8sArtifactForwarderParameterGroupBuilder builder) {
this.useHttps = builder.useHttps;
this.hostname = builder.hostname;
this.port = builder.port;
@@ -89,9 +89,9 @@ public class XacmlPdpArtifactForwarderParameterGroup extends ArtifactForwarderCo
}
/**
- * Builder for XacmlPdpArtifactForwarderParameterGroup.
+ * Builder for K8sArtifactForwarderParameterGroup.
*/
- public static class XacmlPdpArtifactForwarderParameterGroupBuilder {
+ public static class K8sArtifactForwarderParameterGroupBuilder {
private boolean useHttps = false;
private String hostname;
private int port;
@@ -101,42 +101,42 @@ public class XacmlPdpArtifactForwarderParameterGroup extends ArtifactForwarderCo
private boolean isManaged = true;
private String pdpGroup;
- public XacmlPdpArtifactForwarderParameterGroupBuilder setUseHttps(final boolean useHttps) {
+ public K8sArtifactForwarderParameterGroupBuilder setUseHttps(final boolean useHttps) {
this.useHttps = useHttps;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setHostname(final String hostname) {
+ public K8sArtifactForwarderParameterGroupBuilder setHostname(final String hostname) {
this.hostname = hostname;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setPort(final int port) {
+ public K8sArtifactForwarderParameterGroupBuilder setPort(final int port) {
this.port = port;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setUserName(final String userName) {
+ public K8sArtifactForwarderParameterGroupBuilder setUserName(final String userName) {
this.userName = userName;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setPassword(final String password) {
+ public K8sArtifactForwarderParameterGroupBuilder setPassword(final String password) {
this.password = password;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setClientAuth(final String clientAuth) {
+ public K8sArtifactForwarderParameterGroupBuilder setClientAuth(final String clientAuth) {
this.clientAuth = clientAuth;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setIsManaged(final boolean isManaged) {
+ public K8sArtifactForwarderParameterGroupBuilder setIsManaged(final boolean isManaged) {
this.isManaged = isManaged;
return this;
}
- public XacmlPdpArtifactForwarderParameterGroupBuilder setPdpGroup(final String pdpGroup) {
+ public K8sArtifactForwarderParameterGroupBuilder setPdpGroup(final String pdpGroup) {
this.pdpGroup = pdpGroup;
return this;
}
@@ -144,8 +144,8 @@ public class XacmlPdpArtifactForwarderParameterGroup extends ArtifactForwarderCo
/**
* Creates a new XacmlPapServletArtifactForwarderParameterGroup instance.
*/
- public XacmlPdpArtifactForwarderParameterGroup build() {
- return new XacmlPdpArtifactForwarderParameterGroup(this);
+ public K8sArtifactForwarderParameterGroup build() {
+ return new K8sArtifactForwarderParameterGroup(this);
}
}
diff --git a/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpArtifactForwarderParameterGroupTest.java b/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/engine/K8sArtifactForwarderParameterGroupTest.java
index d10ea62..b3525cc 100644
--- a/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpArtifactForwarderParameterGroupTest.java
+++ b/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/engine/K8sArtifactForwarderParameterGroupTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.distribution.forwarding.xacml.pdp.engine;
+package org.onap.policy.distribution.forwarding.k8s.engine;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -26,16 +26,16 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.onap.policy.common.parameters.ValidationStatus;
-import org.onap.policy.distribution.forwarding.xacml.pdp.XacmlPdpArtifactForwarderParameterGroup;
-import org.onap.policy.distribution.forwarding.xacml.pdp.XacmlPdpArtifactForwarderParameterGroup.XacmlPdpArtifactForwarderParameterGroupBuilder;
+import org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarderParameterGroup;
+import org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarderParameterGroup.K8sArtifactForwarderParameterGroupBuilder;
-public class XacmlPdpArtifactForwarderParameterGroupTest {
+public class K8sArtifactForwarderParameterGroupTest {
@Test
public void testBuilderAndGetters() {
- XacmlPdpArtifactForwarderParameterGroupBuilder builder =
- new XacmlPdpArtifactForwarderParameterGroupBuilder();
- XacmlPdpArtifactForwarderParameterGroup configurationParameters =
+ K8sArtifactForwarderParameterGroupBuilder builder =
+ new K8sArtifactForwarderParameterGroupBuilder();
+ K8sArtifactForwarderParameterGroup configurationParameters =
builder.setUseHttps(true).setHostname("10.10.10.10").setPort(1234).setUserName("myUser")
.setPassword("myPassword").setClientAuth("myClientAuth").setIsManaged(false).build();
@@ -50,9 +50,9 @@ public class XacmlPdpArtifactForwarderParameterGroupTest {
@Test
public void testInvalidHostName() {
- XacmlPdpArtifactForwarderParameterGroupBuilder builder =
- new XacmlPdpArtifactForwarderParameterGroupBuilder();
- XacmlPdpArtifactForwarderParameterGroup configurationParameters = builder.setUseHttps(true).setHostname("")
+ K8sArtifactForwarderParameterGroupBuilder builder =
+ new K8sArtifactForwarderParameterGroupBuilder();
+ K8sArtifactForwarderParameterGroup configurationParameters = builder.setUseHttps(true).setHostname("")
.setPort(1234).setUserName("myUser").setPassword("myPassword").setIsManaged(false).build();
configurationParameters.setName("myConfiguration");
@@ -61,9 +61,9 @@ public class XacmlPdpArtifactForwarderParameterGroupTest {
@Test
public void testInvalidPort() {
- XacmlPdpArtifactForwarderParameterGroupBuilder builder =
- new XacmlPdpArtifactForwarderParameterGroupBuilder();
- XacmlPdpArtifactForwarderParameterGroup configurationParameters =
+ K8sArtifactForwarderParameterGroupBuilder builder =
+ new K8sArtifactForwarderParameterGroupBuilder();
+ K8sArtifactForwarderParameterGroup configurationParameters =
builder.setUseHttps(true).setHostname("10.10.10.10").setPort(-1234).setUserName("myUser")
.setPassword("myPassword").setIsManaged(false).build();
configurationParameters.setName("myConfiguration");
@@ -73,9 +73,9 @@ public class XacmlPdpArtifactForwarderParameterGroupTest {
@Test
public void testInvalidUserName() {
- XacmlPdpArtifactForwarderParameterGroupBuilder builder =
- new XacmlPdpArtifactForwarderParameterGroupBuilder();
- XacmlPdpArtifactForwarderParameterGroup configurationParameters =
+ K8sArtifactForwarderParameterGroupBuilder builder =
+ new K8sArtifactForwarderParameterGroupBuilder();
+ K8sArtifactForwarderParameterGroup configurationParameters =
builder.setUseHttps(true).setHostname("10.10.10.10").setPort(1234).setUserName("")
.setPassword("myPassword").setIsManaged(false).build();
configurationParameters.setName("myConfiguration");
@@ -85,9 +85,9 @@ public class XacmlPdpArtifactForwarderParameterGroupTest {
@Test
public void testInvalidPassword() {
- XacmlPdpArtifactForwarderParameterGroupBuilder builder =
- new XacmlPdpArtifactForwarderParameterGroupBuilder();
- XacmlPdpArtifactForwarderParameterGroup configurationParameters =
+ K8sArtifactForwarderParameterGroupBuilder builder =
+ new K8sArtifactForwarderParameterGroupBuilder();
+ K8sArtifactForwarderParameterGroup configurationParameters =
builder.setUseHttps(true).setHostname("10.10.10.10").setPort(1234).setUserName("myUser").setPassword("")
.setIsManaged(false).build();
configurationParameters.setName("myConfiguration");
diff --git a/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpArtifactForwarderTest.java b/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/engine/K8sArtifactForwarderTest.java
index bad34c5..58c9c69 100644
--- a/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpArtifactForwarderTest.java
+++ b/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/engine/K8sArtifactForwarderTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.distribution.forwarding.xacml.pdp.engine;
+package org.onap.policy.distribution.forwarding.k8.engine;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -64,8 +64,8 @@ import org.junit.Test;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.parameters.ParameterGroup;
import org.onap.policy.common.parameters.ParameterService;
-import org.onap.policy.distribution.forwarding.xacml.pdp.XacmlPdpArtifactForwarder;
-import org.onap.policy.distribution.forwarding.xacml.pdp.XacmlPdpArtifactForwarderParameterGroup.XacmlPdpArtifactForwarderParameterGroupBuilder;
+import org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarder;
+import org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarderParameterGroup.K8sArtifactForwarderParameterGroupBuilder;
import org.onap.policy.distribution.main.PolicyDistributionException;
import org.onap.policy.distribution.model.CloudArtifact;
import org.onap.policy.distribution.model.GsonUtil;
@@ -74,7 +74,7 @@ import org.onap.policy.distribution.model.VfModuleModel;
import org.onap.sdc.api.notification.IArtifactInfo;
-public class XacmlPdpArtifactForwarderTest {
+public class K8sArtifactForwarderTest {
private static final BusTopicParams BUS_TOPIC_PARAMS = BusTopicParams.builder().useHttps(false).hostname("myHost")
.port(1234).userName("myUser").password("myPassword").managed(true).build();
@@ -89,7 +89,7 @@ public class XacmlPdpArtifactForwarderTest {
*/
@BeforeClass
public static void setUp() {
- ParameterGroup parameterGroup = new XacmlPdpArtifactForwarderParameterGroupBuilder()
+ ParameterGroup parameterGroup = new K8sArtifactForwarderParameterGroupBuilder()
.setUseHttps(BUS_TOPIC_PARAMS.isUseHttps()).setHostname(BUS_TOPIC_PARAMS.getHostname())
.setPort(BUS_TOPIC_PARAMS.getPort()).setUserName(BUS_TOPIC_PARAMS.getUserName())
.setPassword(BUS_TOPIC_PARAMS.getPassword()).setClientAuth(CLIENT_AUTH_VALUE)
@@ -117,7 +117,7 @@ public class XacmlPdpArtifactForwarderTest {
when(httpClientMock.execute(anyObject())).thenReturn(response);
- XacmlPdpArtifactForwarder forwarder = new XacmlPdpArtifactForwarder();
+ K8sArtifactForwarder forwarder = new K8sArtifactForwarder();
forwarder.configure("xacmlPdpConfiguration");
diff --git a/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java b/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/testclasses/DummyReceptionHandler.java
index c093481..6996bfd 100644
--- a/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java
+++ b/artifactbroker/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/k8s/testclasses/DummyReceptionHandler.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.distribution.forwarding.xacml.pdp.testclasses;
+package org.onap.policy.distribution.forwarding.k8s.testclasses;
import org.onap.policy.distribution.reception.handling.AbstractReceptionHandler;