aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api/provider/src
diff options
context:
space:
mode:
Diffstat (limited to 'generic-resource-api/provider/src')
-rw-r--r--generic-resource-api/provider/src/main/resources/OSGI-INF/blueprint/generic-resource-api-blueprint.xml34
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java5
2 files changed, 37 insertions, 2 deletions
diff --git a/generic-resource-api/provider/src/main/resources/OSGI-INF/blueprint/generic-resource-api-blueprint.xml b/generic-resource-api/provider/src/main/resources/OSGI-INF/blueprint/generic-resource-api-blueprint.xml
new file mode 100644
index 00000000..80d35574
--- /dev/null
+++ b/generic-resource-api/provider/src/main/resources/OSGI-INF/blueprint/generic-resource-api-blueprint.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ odl:use-default-for-reference-types="true">
+
+ <reference id="svcLogicService"
+ interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService" />
+
+ <bean id="client" class="org.onap.sdnc.northbound.GenericResourceApiSvcLogicServiceClient">
+ <argument ref="svcLogicService" />
+ </bean>
+
+ <reference id="dataBroker"
+ interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+ odl:type="default" />
+
+ <reference id="notificationService"
+ interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
+ odl:type="default" />
+
+ <reference id="rpcRegistry"
+ interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
+ odl:type="default" />
+
+ <bean id="provider" class="org.onap.sdnc.northbound.GenericResourceApiProvider">
+ <argument ref="dataBroker" />
+ <argument ref="notificationService" />
+ <argument ref="rpcRegistry" />
+ <argument ref="client" />
+ </bean>
+
+ <odl:rpc-implementation ref="provider"/>
+
+</blueprint> \ No newline at end of file
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
index bbd0afdf..cce03cc2 100644
--- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
@@ -146,6 +146,7 @@ public class ServiceTopologyOperationRPCTest extends GenericResourceApiProviderT
@Test
public void should_fail_when_client_execution_failed() throws Exception {
+
svcClient.mockHasGraph(true);
svcClient.mockExecute(new RuntimeException("test exception"));
@@ -157,7 +158,7 @@ public class ServiceTopologyOperationRPCTest extends GenericResourceApiProviderT
, input
, RpcResult::getResult
);
-
+
assertEquals("500", output.getResponseCode());
assertEquals("test exception", output.getResponseMessage());
assertEquals("Y", output.getAckFinalIndicator());
@@ -202,7 +203,7 @@ public class ServiceTopologyOperationRPCTest extends GenericResourceApiProviderT
, RpcResult::getResult
);
- assertEquals("500", output.getResponseCode());
+ assertEquals("200", output.getResponseCode());
assertEquals("Y", output.getAckFinalIndicator());
}