summaryrefslogtreecommitdiffstats
path: root/config/dynamic
diff options
context:
space:
mode:
Diffstat (limited to 'config/dynamic')
-rw-r--r--config/dynamic/conf/api-handlers.xml13
-rw-r--r--config/dynamic/routes/sdnc-api.route17
2 files changed, 30 insertions, 0 deletions
diff --git a/config/dynamic/conf/api-handlers.xml b/config/dynamic/conf/api-handlers.xml
new file mode 100644
index 0000000..8ad08c5
--- /dev/null
+++ b/config/dynamic/conf/api-handlers.xml
@@ -0,0 +1,13 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="vnfApiHandler" class="org.onap.pomba.contextbuilder.sdnc.handlers.VnfApiHandler" >
+ </bean>
+
+ <bean id="genericResourceApiHandler" class="org.onap.pomba.contextbuilder.sdnc.handlers.GenericResourceApiHandler" >
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/config/dynamic/routes/sdnc-api.route b/config/dynamic/routes/sdnc-api.route
new file mode 100644
index 0000000..19bc5ec
--- /dev/null
+++ b/config/dynamic/routes/sdnc-api.route
@@ -0,0 +1,17 @@
+<route xmlns="http://camel.apache.org/schema/spring" trace="true" id="apiMapperRoute">
+ <from uri="direct:startRoutingProcess" />
+ <choice>
+ <when>
+ <simple>${in.body.apiName} == 'VNF-API'</simple>
+ <log message="Processing ${in.body.apiName} by Camel Routing Context"/>
+ <to uri="bean:vnfApiHandler?method=process"/>
+ </when>
+ <when>
+ <simple>${in.body.apiName} == 'GENERIC-RESOURCE-API'</simple>
+ <log message="Processing ${in.body.apiName} by Camel Routing Context"/>
+ <to uri="bean:genericResourceApiHandler?method=process"/>
+ </when>
+ </choice>
+</route>
+
+