summaryrefslogtreecommitdiffstats
path: root/config/dynamic
diff options
context:
space:
mode:
authorGeora Barsky <georab@amdocs.com>2018-10-12 11:46:52 -0400
committerPhillip Leigh <phillip.leigh@amdocs.com>2018-10-12 17:06:49 -0400
commit696b3aab041353afd74e26c0b9a569d0b1b9e254 (patch)
tree31830f0df17dc5c01bcf0eb72eeae845d8ed3257 /config/dynamic
parenta2423cf3ba54da34bb865befd44d56bbb925a94b (diff)
Adding API Mapping infrastructure
Issue-ID: LOG-391 Change-Id: I30d954bcdf1cf0748bb5249cbf10defb8dbc8ff6 Signed-off-by: Geora Barsky <georab@amdocs.com>
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>
+
+