summaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/a1Adapter
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/northbound/a1Adapter')
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java24
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java25
2 files changed, 24 insertions, 25 deletions
diff --git a/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java b/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java
index 9e6e59391..b10177d8f 100644
--- a/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java
+++ b/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java
@@ -207,7 +207,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetNearRTRICs ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetNearRTRICs ");
}
RpcResult<GetNearRTRICsOutput> rpcResult =
@@ -277,7 +277,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetHealthCheck. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetHealthCheck. ");
}
RpcResult<GetHealthCheckOutput> rpcResult =
@@ -347,7 +347,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetPolicyTypes ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetPolicyTypes ");
}
RpcResult<GetPolicyTypesOutput> rpcResult =
@@ -418,7 +418,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for CreatePolicyType");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for CreatePolicyType");
}
RpcResult<CreatePolicyTypeOutput> rpcResult =
@@ -488,7 +488,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetPolicyType. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetPolicyType. ");
}
RpcResult<GetPolicyTypeOutput> rpcResult =
@@ -559,7 +559,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for DeletePolicyType ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for DeletePolicyType ");
}
RpcResult<DeletePolicyTypeOutput> rpcResult =
@@ -630,7 +630,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetPolicyInstances ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetPolicyInstances ");
}
RpcResult<GetPolicyInstancesOutput> rpcResult =
@@ -703,7 +703,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for CreatePolicyInstance. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for CreatePolicyInstance. ");
}
RpcResult<CreatePolicyInstanceOutput> rpcResult = RpcResultBuilder.<CreatePolicyInstanceOutput>status(true)
@@ -776,7 +776,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetPolicyInstance. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetPolicyInstance. ");
}
RpcResult<GetPolicyInstanceOutput> rpcResult =
@@ -850,7 +850,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for DeletePolicyInstance. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for DeletePolicyInstance. ");
}
RpcResult<DeletePolicyInstanceOutput> rpcResult = RpcResultBuilder.<DeletePolicyInstanceOutput>status(true)
@@ -922,7 +922,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for GetStatus. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for GetStatus. ");
}
RpcResult<GetStatusOutput> rpcResult =
@@ -995,7 +995,7 @@ public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService {
LOG.error("Returned FAILED for " + svcOperation + " error code: '" + errorCode + "'");
} else {
LOG.info("Returned SUCCESS for " + svcOperation + " ");
- serviceDataBuilder.setResponseCode("A1 Adapter Executed for notifyPolicyEnforcementUpdate. ");
+ serviceDataBuilder.setResponseMessage("A1 Adapter Executed for notifyPolicyEnforcementUpdate. ");
}
RpcResult<NotifyPolicyEnforcementUpdateOutput> rpcResult = RpcResultBuilder
diff --git a/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java b/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java
index c5bdb99f7..fa8a82c8f 100644
--- a/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java
+++ b/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java
@@ -21,7 +21,6 @@
package org.onap.ccsdk.features.sdnr.northbound.a1Adapter;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
@@ -148,7 +147,7 @@ public class A1AdapterProviderTest {
when(a1AdapterProviderMock.getServiceData(rpc)).thenReturn((Builder) nearRTRICsOutputBuilder);
ListenableFuture<RpcResult<GetNearRTRICsOutput>> result =
a1AdapterProviderMock.getNearRTRICs(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -215,7 +214,7 @@ public class A1AdapterProviderTest {
any(Properties.class))).thenReturn(respProps);
ListenableFuture<RpcResult<GetHealthCheckOutput>> result =
a1AdapterProviderMock.getHealthCheck(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -282,7 +281,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<GetPolicyTypesOutput>> result =
a1AdapterProviderMock.getPolicyTypes(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -349,7 +348,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<CreatePolicyTypeOutput>> result =
a1AdapterProviderMock.createPolicyType(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -417,7 +416,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<GetPolicyTypeOutput>> result =
a1AdapterProviderMock.getPolicyType(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -484,7 +483,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<DeletePolicyTypeOutput>> result =
a1AdapterProviderMock.deletePolicyType(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -552,7 +551,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<GetPolicyInstancesOutput>> result =
a1AdapterProviderMock.getPolicyInstances(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -621,7 +620,7 @@ public class A1AdapterProviderTest {
any(CreatePolicyInstanceOutputBuilder.class), eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<CreatePolicyInstanceOutput>> result =
a1AdapterProviderMock.createPolicyInstance(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -691,7 +690,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<GetPolicyInstanceOutput>> result =
a1AdapterProviderMock.getPolicyInstance(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -759,7 +758,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<DeletePolicyInstanceOutput>> result =
a1AdapterProviderMock.deletePolicyInstance(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -826,7 +825,7 @@ public class A1AdapterProviderTest {
when(a1AdapterClient.execute(eq(module), eq(rpc), eq(null), eq(mode), any(GetPolicyTypeOutputBuilder.class),
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<GetStatusOutput>> result = a1AdapterProviderMock.getStatus(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}
@Test
@@ -845,7 +844,7 @@ public class A1AdapterProviderTest {
eq(null))).thenReturn(respProps);
ListenableFuture<RpcResult<NotifyPolicyEnforcementUpdateOutput>> result =
a1AdapterProviderMock.notifyPolicyEnforcementUpdate(inputBuilder.build());
- assertNotNull(result.get().getResult().getResponseCode());
+ assertEquals("200",result.get().getResult().getResponseCode());
}