summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.aai/src
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.aai/src')
-rw-r--r--models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java6
-rw-r--r--models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java3
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java6
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java6
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java6
5 files changed, 25 insertions, 2 deletions
diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java
index 718047cfc..caa8b9e1f 100644
--- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java
+++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.aai;
+import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.CompletableFuture;
@@ -36,6 +37,7 @@ import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.onap.policy.common.utils.coder.StandardCoderObject;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig;
@@ -57,6 +59,8 @@ public class AaiCustomQueryOperation extends HttpOperation<String> {
public static final String RESOURCE_LINK = "resource-link";
public static final String RESULT_DATA = "result-data";
+ private static final List<String> PROPERTY_NAMES = List.of(OperationProperties.AAI_VSERVER_LINK);
+
// TODO make this configurable
private static final String PREFIX = "/aai/v16";
@@ -70,7 +74,7 @@ public class AaiCustomQueryOperation extends HttpOperation<String> {
* @param config configuration for this operation
*/
public AaiCustomQueryOperation(ControlLoopOperationParams params, HttpConfig config) {
- super(params, config, String.class);
+ super(params, config, String.class, PROPERTY_NAMES);
this.vserver = params.getContext().getEnrichment().get(VSERVER_VSERVER_NAME);
if (StringUtils.isBlank(this.vserver)) {
diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java
index 07738b084..c18d06c95 100644
--- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java
+++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.aai;
+import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.CompletableFuture;
@@ -58,7 +59,7 @@ public class AaiGetOperation extends HttpOperation<StandardCoderObject> {
* @param config configuration for this operation
*/
public AaiGetOperation(ControlLoopOperationParams params, HttpConfig config) {
- super(params, config, StandardCoderObject.class);
+ super(params, config, StandardCoderObject.class, Collections.emptyList());
this.propertyPrefix = getFullName() + ".";
}
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
index 173eb2908..400096507 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
@@ -51,6 +51,7 @@ import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.coder.StandardCoderObject;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
import org.onap.policy.controlloop.actorserviceprovider.Util;
import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation;
import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator;
@@ -140,6 +141,11 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation {
}
@Test
+ public void testGetPropertyNames() {
+ assertThat(oper.getPropertyNames()).isEqualTo(List.of(OperationProperties.AAI_VSERVER_LINK));
+ }
+
+ @Test
public void testGenerateSubRequestId() {
oper.generateSubRequestId(3);
assertEquals("3", oper.getSubRequestId());
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
index 042b64f60..b211db261 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.aai;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -79,6 +80,11 @@ public class AaiGetPnfOperationTest extends BasicAaiOperation {
assertEquals(AaiGetPnfOperation.NAME, oper.getName());
}
+ @Test
+ public void testGetPropertyNames() {
+ assertThat(oper.getPropertyNames()).isEmpty();
+ }
+
/**
* Tests "success" case with simulator.
*/
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
index be8a26416..fe0327c10 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.aai;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -79,6 +80,11 @@ public class AaiGetTenantOperationTest extends BasicAaiOperation {
assertEquals(AaiGetTenantOperation.NAME, oper.getName());
}
+ @Test
+ public void testGetPropertyNames() {
+ assertThat(oper.getPropertyNames()).isEmpty();
+ }
+
/**
* Tests "success" case with simulator.
*/