FYI. Replying to gmail is blocked , resending to dev group.
Get Outlook for iOS<https://aka.ms/o0ukef> _____________________________ From: Muthukrishnan Thangasamy <[email protected]<mailto:[email protected]>> Sent: Friday, June 17, 2016 23:39 Subject: Re: [openflowplugin-dev] Adding Multiple flows using single REST call To: Luis Gomez <[email protected]<mailto:[email protected]>> Cc: <[email protected]<mailto:[email protected]>> Hi Luis Gomez , Thanks for your reply . Yes , I have checked the documentation . In Documentation add/Remove flows through RPC/DS is not yet documented. Moreover the operation mentioned in documentation are not exposed by restapi after installing the bulk-o-matic application . RestApi operation exposed only for the below operations 1) add-flows-ds 2)remove-flows-ds 3)add-flows-rpc 4)remove-flows-rpc I have even tried with specifying inventory node as input parameter , still same am getting Null Pointer exception , . curl -v --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -k -X POST -d ' <input xmlns="urn:opendaylight:bulk-flow:service"> <node xmlns:inv="urn:opendaylight:inventory">/inv:nodes/inv:node[inv:id="openflow:1"]</node> <always-create-parents>false</always-create-parents> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>3</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> <match> <in-port>2</in-port> </match> <flow_id>3</flow_id> </input>' https://10.45.0.227:8443/restconf/operations/sal-bulk-flow:add-flows-ds Regards Muthukrishnan 9952012433<tel:9952012433> ________________________________ From: Luis Gomez <[email protected]<mailto:[email protected]>> Sent: Friday, June 17, 2016 9:44:53 PM To: Muthukrishnan Thangasamy Cc: [email protected]<mailto:[email protected]> Subject: Re: [openflowplugin-dev] Adding Multiple flows using single REST call Have you checked this? https://github.com/opendaylight/openflowplugin/blob/master/applications/bulk-o-matic/src/site/asciidoc/bulk-o-matic.adoc [https://avatars2.githubusercontent.com/u/4093028?v=3&s=400]<https://github.com/opendaylight/openflowplugin/blob/master/applications/bulk-o-matic/src/site/asciidoc/bulk-o-matic.adoc> opendaylight/openflowplugin<https://github.com/opendaylight/openflowplugin/blob/master/applications/bulk-o-matic/src/site/asciidoc/bulk-o-matic.adoc> github.com<http://github.com> Mirror of the OpenDaylight openflowplugin gerrit project BR/Luis On Jun 16, 2016, at 11:52 PM, Muthukrishnan Thangasamy <[email protected]<mailto:[email protected]>> wrote: Hello Team , Can anyone tell how to add multiple ( more than 100 flows ) flows to switches using single REST API call either through Config Data store or RPC . I tried using Bulk-o-matic application But I am Getting Null Pointer Exception in org.opendaylight.openflowplugin.applications.bulk.o.matic.SalBulkFlowServiceImpl.addFlowsDs(SalBulkFlowServiceImpl.java:72) Can anyone tell me whats is the issue with my restcall? Bulk-o-matic yang ============== https://github.com/opendaylight/openflowplugin/blob/master/applications/bulk-o-matic/src/main/yang/sal-bulk-flow.yang REST Call ( tried to add only single flow ) ================== curl -v --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -k -X POST -d ' <input xmlns="urn:opendaylight:bulk-flow:service"> <always-create-parents>false</always-create-parents> <flow_id>3</flow_id> <cookie_mask>255</cookie_mask> <cookie>105</cookie> <table_id>0</table_id> <priority>65530</priority> <hard-timeout>0</hard-timeout> <idle-timeout>0</idle-timeout> <installHW>false</installHW> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>3</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> <match> <in-port>2</in-port> </match> </input>' https://10.45.0.227:8443/restconf/operations/sal-bulk-flow:add-flows-ds Curl Response ============ * Connection #0 to host 10.45.0.227 left intact tel@tel-ProLiant-ML150-Gen9:~$ curl -v --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -k -X POST -d ' > <input xmlns="urn:opendaylight:bulk-flow:service"> > <always-create-parents>false</always-create-parents> > <flow_id>3</flow_id> > <cookie_mask>255</cookie_mask> > <cookie>105</cookie> > <table_id>0</table_id> > <priority>65530</priority> > <hard-timeout>0</hard-timeout> > <idle-timeout>0</idle-timeout> > <installHW>false</installHW> > <instructions> > <instruction> > <order>0</order> > <apply-actions> > <action> > <order>0</order> > <output-action> > <output-node-connector>3</output-node-connector> > </output-action> > </action> > </apply-actions> > </instruction> > </instructions> > <match> > <in-port>2</in-port> > </match> > </input>' > https://10.45.0.227:8443/restconf/operations/sal-bulk-flow:add-flows-ds * Trying 10.45.0.227... * Connected to 10.45.0.227 (10.45.0.227) port 8443 (#0) * found 187 certificates in /etc/ssl/certs/ca-certificates.crt * found 753 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_CBC_SHA1 * server certificate verification SKIPPED * server certificate status verification SKIPPED * common name: Sanket Tandulwadkar (does not match '10.45.0.227') * server certificate expiration date OK * server certificate activation date OK * certificate public key: RSA * certificate version: #3 * subject: C=US,ST=MA,L=Billerica,O=Avaya,OU=VEGA,CN=Sanket Tandulwadkar * start date: Tue, 19 Jan 2016 15:10:59 GMT * expire date: Fri, 16 Jan 2026 15:10:59 GMT * issuer: C=US,ST=MA,L=Billerica,O=Avaya,OU=VEGA,CN=Sanket Tandulwadkar * compression: NULL * ALPN, server did not agree to a protocol * Server auth using Basic with user 'admin' > POST /restconf/operations/sal-bulk-flow:add-flows-ds HTTP/1.1 > Host: 10.45.0.227:8443 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.43.0 > Accept: application/xml > Content-type: application/xml > Content-Length: 813 > * upload completely sent off: 813 out of 813 bytes < HTTP/1.1 500 Server Error < Content-Type: text/html;charset=ISO-8859-1 < Cache-Control: must-revalidate,no-cache,no-store < Content-Length: 7648 < Server: Jetty(8.1.15.v20140411) < <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /restconf/operations/sal-bulk-flow:add-flows-ds. Reason: <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException at org.opendaylight.openflowplugin.applications.bulk.o.matic.SalBulkFlowServiceImpl.addFlowsDs(SalBulkFlowServiceImpl.java:72) at org.opendaylight.yangtools.yang.binding.util.RpcMethodInvokerWithInput.invokeOn(RpcMethodInvokerWithInput.java:30) at org.opendaylight.yangtools.yang.binding.util.AbstractMappedRpcInvoker.invokeRpc(AbstractMappedRpcInvoker.java:52) at org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcImplementationAdapter.invoke(BindingDOMRpcImplementationAdapter.java:85) at org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcImplementationAdapter.invokeRpc(BindingDOMRpcImplementationAdapter.java:72) at org.opendaylight.controller.md.sal.dom.broker.impl.GlobalDOMRpcRoutingTableEntry.invokeRpc(GlobalDOMRpcRoutingTableEntry.java:40) at org.opendaylight.controller.md.sal.dom.broker.impl.DOMRpcRoutingTable.invokeRpc(DOMRpcRoutingTable.java:186) at org.opendaylight.controller.md.sal.dom.broker.impl.DOMRpcRouter.invokeRpc(DOMRpcRouter.java:124) at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.invokeRpc(BrokerFacade.java:176) at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:449) at org.opendaylight.controller.sal.restconf.impl.StatisticsRestconfServiceWrapper.invokeRpc(StatisticsRestconfServiceWrapper.java:81) at org.opendaylight.controller.sal.rest.impl.RestconfCompositeWrapper.invokeRpc(RestconfCompositeWrapper.java:53) at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496) at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:247) at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:210) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467) at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82) at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:256) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:366) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745) </pre> <hr /><i><small>Powered by Jetty://</small></i><br/> _______________________________________________ openflowplugin-dev mailing list [email protected]<mailto:[email protected]> https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
_______________________________________________ openflowplugin-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
