4 [[learn-end-to-end-for-inventory]]
5 ====== Learn End to End for Inventory
6 <<odl-ofp-end-to-end-inventory_introduction-introduction,End to End Inventory>>
11 * Run mininet with support for OF 1.3 as described in
12 <<odl-ofp-end-to-end-inventory_introduction-introduction,End to End Inventory>>
13 * Make sure you see the openflow:1 node come up as described in
14 <<odl-ofp-end-to-end-inventory_introduction-introduction,End to End Inventory>>
19 Current way to flush a flow to switch looks like this:
21 1. Create MD-SAL modeled flow and commit it into dataStore using two
22 phase commit https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:FAQ[MD-SAL FAQ]
23 2. FRM gets notified and invokes corresponding rpc (addFlow) on
24 particular service provider (if suitable provider for given node
26 3. The provider (plugin in this case) transforms MD-SAL modeled flow
27 into OF-API modeled flow
28 4. OF-API modeled flow is then flushed into OFLibrary
29 5. OFLibrary encodes flow into particular version of wire protocol and
30 sends it to particular switch
31 6. Check on mininet side if flow is set
38 *** Content-Type: application/xml
39 *** Accept: application/xml
41 ** Use URL: "http://<controller IP>:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1"
46 ---------------------------------------------------------
47 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
48 <flow xmlns="urn:opendaylight:flow:inventory">
49 <priority>2</priority>
50 <flow-name>Foo</flow-name>
57 <ipv4-destination>10.0.10.2/24</ipv4-destination>
60 <table_id>0</table_id>
73 ---------------------------------------------------------
75 **Note*: If you want to try a different flow id or a different table,
76 make sure the URL and the body stay in sync. For example, if you wanted
77 to try: table 2 flow 20 you'd change the URL to:
80 IP>:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/20"
82 but you would also need to update the 20 and 2 in the body of the XML.
84 Other caveat, we have a known bug with updates, so please only write to
85 a given flow id and table id on a given node once at this time until we
86 resolve it. Or you can use the DELETE method with the same URL in
87 PostMan to delete the flow information on switch and controller cache.
89 [[check-for-your-flow-on-the-switch]]
90 ====== Check for your flow on the switch
92 * See your flow on your mininet:
94 -----------------------------------------------------------------------------------------------------------------------------------------------------------------
95 mininet@mininet-vm:~$ sudo ovs-ofctl -O OpenFlow13 dump-flows s1
96 OFPST_FLOW reply (OF1.3) (xid=0x2):
97 cookie=0x0, duration=7.325s, table=0, n_packets=0, n_bytes=0, idle_timeout=300, hard_timeout=600, send_flow_rem priority=2,ip,nw_dst=10.0.10.0/24 actions=dec_ttl
98 -----------------------------------------------------------------------------------------------------------------------------------------------------------------
100 If you want to see the above information from the mininet prompt - use
101 "sh" instead of "sudo" i.e. use "sh ovs-ofctl -O OpenFlow13 dump-flows
104 [[check-for-your-flow-in-the-controller-config-via-restconf]]
105 ====== Check for your flow in the controller config via RESTCONF
107 * See your configured flow in POSTMAN with
108 ** URL http://<controller
109 IP>:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/
111 ** You no longer need to set Accept header
118 "flow-node-inventory:table": [
120 "flow-node-inventory:id": 0,
121 "flow-node-inventory:flow": [
123 "flow-node-inventory:priority": 1,
124 "flow-node-inventory:id": "10b1a23c-5299-4f7b-83d6-563bab472754",
125 "flow-node-inventory:table_id": 0,
126 "flow-node-inventory:hard-timeout": 0,
127 "flow-node-inventory:idle-timeout": 0,
128 "flow-node-inventory:instructions": {
129 "flow-node-inventory:instruction": [
131 "flow-node-inventory:apply-actions": {
132 "flow-node-inventory:action": [
134 "flow-node-inventory:output-action": {
135 "flow-node-inventory:output-node-connector": "openflow:1:1"
137 "flow-node-inventory:order": 0
141 "flow-node-inventory:order": 0
145 "flow-node-inventory:match": {
146 "flow-node-inventory:ethernet-match": {
147 "flow-node-inventory:ethernet-type": {
148 "flow-node-inventory:type": 2048
151 "flow-node-inventory:ipv4-destination": "10.0.0.2"
153 "flow-node-inventory:cookie": 0
156 "flow-node-inventory:priority": 1,
157 "flow-node-inventory:id": "020bf359-1299-4da6-b4f7-368bd83b5841",
158 "flow-node-inventory:table_id": 0,
159 "flow-node-inventory:hard-timeout": 0,
160 "flow-node-inventory:idle-timeout": 0,
161 "flow-node-inventory:instructions": {
162 "flow-node-inventory:instruction": [
164 "flow-node-inventory:apply-actions": {
165 "flow-node-inventory:action": [
167 "flow-node-inventory:output-action": {
168 "flow-node-inventory:output-node-connector": "openflow:1:1"
170 "flow-node-inventory:order": 0
174 "flow-node-inventory:order": 0
178 "flow-node-inventory:match": {
179 "flow-node-inventory:ethernet-match": {
180 "flow-node-inventory:ethernet-type": {
181 "flow-node-inventory:type": 2048
184 "flow-node-inventory:ipv4-destination": "10.0.0.1"
186 "flow-node-inventory:cookie": 0
189 "flow-node-inventory:priority": 1,
190 "flow-node-inventory:id": "42172bfc-9142-4a92-9e90-ee62529b1e85",
191 "flow-node-inventory:table_id": 0,
192 "flow-node-inventory:hard-timeout": 0,
193 "flow-node-inventory:idle-timeout": 0,
194 "flow-node-inventory:instructions": {
195 "flow-node-inventory:instruction": [
197 "flow-node-inventory:apply-actions": {
198 "flow-node-inventory:action": [
200 "flow-node-inventory:output-action": {
201 "flow-node-inventory:output-node-connector": "openflow:1:1"
203 "flow-node-inventory:order": 0
207 "flow-node-inventory:order": 0
211 "flow-node-inventory:match": {
212 "flow-node-inventory:ethernet-match": {
213 "flow-node-inventory:ethernet-type": {
214 "flow-node-inventory:type": 2048
217 "flow-node-inventory:ipv4-destination": "10.0.0.3"
219 "flow-node-inventory:cookie": 0
222 "flow-node-inventory:priority": 1,
223 "flow-node-inventory:id": "99bf566e-89f3-4c6f-ae9e-e26012ceb1e4",
224 "flow-node-inventory:table_id": 0,
225 "flow-node-inventory:hard-timeout": 0,
226 "flow-node-inventory:idle-timeout": 0,
227 "flow-node-inventory:instructions": {
228 "flow-node-inventory:instruction": [
230 "flow-node-inventory:apply-actions": {
231 "flow-node-inventory:action": [
233 "flow-node-inventory:output-action": {
234 "flow-node-inventory:output-node-connector": "openflow:1:1"
236 "flow-node-inventory:order": 0
240 "flow-node-inventory:order": 0
244 "flow-node-inventory:match": {
245 "flow-node-inventory:ethernet-match": {
246 "flow-node-inventory:ethernet-type": {
247 "flow-node-inventory:type": 2048
250 "flow-node-inventory:ipv4-destination": "10.0.0.4"
252 "flow-node-inventory:cookie": 0
255 "flow-node-inventory:priority": 1,
256 "flow-node-inventory:id": "019dcc2e-5b4f-44f0-90cc-de490294b862",
257 "flow-node-inventory:table_id": 0,
258 "flow-node-inventory:hard-timeout": 0,
259 "flow-node-inventory:idle-timeout": 0,
260 "flow-node-inventory:instructions": {
261 "flow-node-inventory:instruction": [
263 "flow-node-inventory:apply-actions": {
264 "flow-node-inventory:action": [
266 "flow-node-inventory:output-action": {
267 "flow-node-inventory:output-node-connector": "openflow:1:2"
269 "flow-node-inventory:order": 0
273 "flow-node-inventory:order": 0
277 "flow-node-inventory:match": {
278 "flow-node-inventory:ethernet-match": {
279 "flow-node-inventory:ethernet-type": {
280 "flow-node-inventory:type": 2048
283 "flow-node-inventory:ipv4-destination": "10.0.0.5"
285 "flow-node-inventory:cookie": 0
288 "flow-node-inventory:priority": 1,
289 "flow-node-inventory:id": "968cf81e-3f16-42f1-8b16-d01ff719c63c",
290 "flow-node-inventory:table_id": 0,
291 "flow-node-inventory:hard-timeout": 0,
292 "flow-node-inventory:idle-timeout": 0,
293 "flow-node-inventory:instructions": {
294 "flow-node-inventory:instruction": [
296 "flow-node-inventory:apply-actions": {
297 "flow-node-inventory:action": [
299 "flow-node-inventory:output-action": {
300 "flow-node-inventory:output-node-connector": "openflow:1:2"
302 "flow-node-inventory:order": 0
306 "flow-node-inventory:order": 0
310 "flow-node-inventory:match": {
311 "flow-node-inventory:ethernet-match": {
312 "flow-node-inventory:ethernet-type": {
313 "flow-node-inventory:type": 2048
316 "flow-node-inventory:ipv4-destination": "10.0.0.8"
318 "flow-node-inventory:cookie": 0
321 "flow-node-inventory:priority": 1,
322 "flow-node-inventory:id": "1c14ea3c-9dcc-4434-b566-7e99033ea252",
323 "flow-node-inventory:table_id": 0,
324 "flow-node-inventory:hard-timeout": 0,
325 "flow-node-inventory:idle-timeout": 0,
326 "flow-node-inventory:instructions": {
327 "flow-node-inventory:instruction": [
329 "flow-node-inventory:apply-actions": {
330 "flow-node-inventory:action": [
332 "flow-node-inventory:output-action": {
333 "flow-node-inventory:output-node-connector": "openflow:1:2"
335 "flow-node-inventory:order": 0
339 "flow-node-inventory:order": 0
343 "flow-node-inventory:match": {
344 "flow-node-inventory:ethernet-match": {
345 "flow-node-inventory:ethernet-type": {
346 "flow-node-inventory:type": 2048
349 "flow-node-inventory:ipv4-destination": "10.0.0.6"
351 "flow-node-inventory:cookie": 0
354 "flow-node-inventory:priority": 1,
355 "flow-node-inventory:id": "ed9deeb2-be8f-4b84-bcd8-9d12049383d6",
356 "flow-node-inventory:table_id": 0,
357 "flow-node-inventory:hard-timeout": 0,
358 "flow-node-inventory:idle-timeout": 0,
359 "flow-node-inventory:instructions": {
360 "flow-node-inventory:instruction": [
362 "flow-node-inventory:apply-actions": {
363 "flow-node-inventory:action": [
365 "flow-node-inventory:output-action": {
366 "flow-node-inventory:output-node-connector": "openflow:1:2"
368 "flow-node-inventory:order": 0
372 "flow-node-inventory:order": 0
376 "flow-node-inventory:match": {
377 "flow-node-inventory:ethernet-match": {
378 "flow-node-inventory:ethernet-type": {
379 "flow-node-inventory:type": 2048
382 "flow-node-inventory:ipv4-destination": "10.0.0.7"
384 "flow-node-inventory:cookie": 0
394 [[look-for-your-flow-stats-in-the-controller-operational-data-via-restconf]]
395 ====== Look for your flow stats in the controller operational data via
398 * See your operational flow stats in POSTMAN with
399 ** URL "http://<controller
400 IP>:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/"
406 ---------------------
409 "flow-node-inventory:table": [
411 "flow-node-inventory:id": 0,
412 "flow-node-inventory:flow": [
414 "flow-node-inventory:id": "10b1a23c-5299-4f7b-83d6-563bab472754",
415 "opendaylight-flow-statistics:flow-statistics": {
416 "opendaylight-flow-statistics:cookie": 0,
417 "opendaylight-flow-statistics:duration": {
418 "opendaylight-flow-statistics:nanosecond": 886000000,
419 "opendaylight-flow-statistics:second": 2707
421 "opendaylight-flow-statistics:hard-timeout": 0,
422 "opendaylight-flow-statistics:byte-count": 784,
423 "opendaylight-flow-statistics:match": {
424 "opendaylight-flow-statistics:ethernet-match": {
425 "opendaylight-flow-statistics:ethernet-type": {
426 "opendaylight-flow-statistics:type": 2048
429 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.2/32"
431 "opendaylight-flow-statistics:priority": 1,
432 "opendaylight-flow-statistics:packet-count": 8,
433 "opendaylight-flow-statistics:table_id": 0,
434 "opendaylight-flow-statistics:idle-timeout": 0,
435 "opendaylight-flow-statistics:instructions": {
436 "opendaylight-flow-statistics:instruction": [
438 "opendaylight-flow-statistics:order": 0,
439 "opendaylight-flow-statistics:apply-actions": {
440 "opendaylight-flow-statistics:action": [
442 "opendaylight-flow-statistics:order": 0,
443 "opendaylight-flow-statistics:output-action": {
444 "opendaylight-flow-statistics:output-node-connector": "1",
445 "opendaylight-flow-statistics:max-length": 0
456 "flow-node-inventory:id": "020bf359-1299-4da6-b4f7-368bd83b5841",
457 "opendaylight-flow-statistics:flow-statistics": {
458 "opendaylight-flow-statistics:cookie": 0,
459 "opendaylight-flow-statistics:duration": {
460 "opendaylight-flow-statistics:nanosecond": 826000000,
461 "opendaylight-flow-statistics:second": 2711
463 "opendaylight-flow-statistics:hard-timeout": 0,
464 "opendaylight-flow-statistics:byte-count": 1568,
465 "opendaylight-flow-statistics:match": {
466 "opendaylight-flow-statistics:ethernet-match": {
467 "opendaylight-flow-statistics:ethernet-type": {
468 "opendaylight-flow-statistics:type": 2048
471 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.1/32"
473 "opendaylight-flow-statistics:priority": 1,
474 "opendaylight-flow-statistics:packet-count": 16,
475 "opendaylight-flow-statistics:table_id": 0,
476 "opendaylight-flow-statistics:idle-timeout": 0,
477 "opendaylight-flow-statistics:instructions": {
478 "opendaylight-flow-statistics:instruction": [
480 "opendaylight-flow-statistics:order": 0,
481 "opendaylight-flow-statistics:apply-actions": {
482 "opendaylight-flow-statistics:action": [
484 "opendaylight-flow-statistics:order": 0,
485 "opendaylight-flow-statistics:output-action": {
486 "opendaylight-flow-statistics:output-node-connector": "1",
487 "opendaylight-flow-statistics:max-length": 0
498 "flow-node-inventory:id": "42172bfc-9142-4a92-9e90-ee62529b1e85",
499 "opendaylight-flow-statistics:flow-statistics": {
500 "opendaylight-flow-statistics:cookie": 0,
501 "opendaylight-flow-statistics:duration": {
502 "opendaylight-flow-statistics:nanosecond": 548000000,
503 "opendaylight-flow-statistics:second": 2708
505 "opendaylight-flow-statistics:hard-timeout": 0,
506 "opendaylight-flow-statistics:byte-count": 784,
507 "opendaylight-flow-statistics:match": {
508 "opendaylight-flow-statistics:ethernet-match": {
509 "opendaylight-flow-statistics:ethernet-type": {
510 "opendaylight-flow-statistics:type": 2048
513 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.3/32"
515 "opendaylight-flow-statistics:priority": 1,
516 "opendaylight-flow-statistics:packet-count": 8,
517 "opendaylight-flow-statistics:table_id": 0,
518 "opendaylight-flow-statistics:idle-timeout": 0,
519 "opendaylight-flow-statistics:instructions": {
520 "opendaylight-flow-statistics:instruction": [
522 "opendaylight-flow-statistics:order": 0,
523 "opendaylight-flow-statistics:apply-actions": {
524 "opendaylight-flow-statistics:action": [
526 "opendaylight-flow-statistics:order": 0,
527 "opendaylight-flow-statistics:output-action": {
528 "opendaylight-flow-statistics:output-node-connector": "1",
529 "opendaylight-flow-statistics:max-length": 0
540 "flow-node-inventory:id": "99bf566e-89f3-4c6f-ae9e-e26012ceb1e4",
541 "opendaylight-flow-statistics:flow-statistics": {
542 "opendaylight-flow-statistics:cookie": 0,
543 "opendaylight-flow-statistics:duration": {
544 "opendaylight-flow-statistics:nanosecond": 296000000,
545 "opendaylight-flow-statistics:second": 2710
547 "opendaylight-flow-statistics:hard-timeout": 0,
548 "opendaylight-flow-statistics:byte-count": 1274,
549 "opendaylight-flow-statistics:match": {
550 "opendaylight-flow-statistics:ethernet-match": {
551 "opendaylight-flow-statistics:ethernet-type": {
552 "opendaylight-flow-statistics:type": 2048
555 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.4/32"
557 "opendaylight-flow-statistics:priority": 1,
558 "opendaylight-flow-statistics:packet-count": 13,
559 "opendaylight-flow-statistics:table_id": 0,
560 "opendaylight-flow-statistics:idle-timeout": 0,
561 "opendaylight-flow-statistics:instructions": {
562 "opendaylight-flow-statistics:instruction": [
564 "opendaylight-flow-statistics:order": 0,
565 "opendaylight-flow-statistics:apply-actions": {
566 "opendaylight-flow-statistics:action": [
568 "opendaylight-flow-statistics:order": 0,
569 "opendaylight-flow-statistics:output-action": {
570 "opendaylight-flow-statistics:output-node-connector": "1",
571 "opendaylight-flow-statistics:max-length": 0
582 "flow-node-inventory:id": "019dcc2e-5b4f-44f0-90cc-de490294b862",
583 "opendaylight-flow-statistics:flow-statistics": {
584 "opendaylight-flow-statistics:cookie": 0,
585 "opendaylight-flow-statistics:duration": {
586 "opendaylight-flow-statistics:nanosecond": 392000000,
587 "opendaylight-flow-statistics:second": 2711
589 "opendaylight-flow-statistics:hard-timeout": 0,
590 "opendaylight-flow-statistics:byte-count": 1470,
591 "opendaylight-flow-statistics:match": {
592 "opendaylight-flow-statistics:ethernet-match": {
593 "opendaylight-flow-statistics:ethernet-type": {
594 "opendaylight-flow-statistics:type": 2048
597 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.5/32"
599 "opendaylight-flow-statistics:priority": 1,
600 "opendaylight-flow-statistics:packet-count": 15,
601 "opendaylight-flow-statistics:table_id": 0,
602 "opendaylight-flow-statistics:idle-timeout": 0,
603 "opendaylight-flow-statistics:instructions": {
604 "opendaylight-flow-statistics:instruction": [
606 "opendaylight-flow-statistics:order": 0,
607 "opendaylight-flow-statistics:apply-actions": {
608 "opendaylight-flow-statistics:action": [
610 "opendaylight-flow-statistics:order": 0,
611 "opendaylight-flow-statistics:output-action": {
612 "opendaylight-flow-statistics:output-node-connector": "2",
613 "opendaylight-flow-statistics:max-length": 0
624 "flow-node-inventory:id": "968cf81e-3f16-42f1-8b16-d01ff719c63c",
625 "opendaylight-flow-statistics:flow-statistics": {
626 "opendaylight-flow-statistics:cookie": 0,
627 "opendaylight-flow-statistics:duration": {
628 "opendaylight-flow-statistics:nanosecond": 344000000,
629 "opendaylight-flow-statistics:second": 2707
631 "opendaylight-flow-statistics:hard-timeout": 0,
632 "opendaylight-flow-statistics:byte-count": 784,
633 "opendaylight-flow-statistics:match": {
634 "opendaylight-flow-statistics:ethernet-match": {
635 "opendaylight-flow-statistics:ethernet-type": {
636 "opendaylight-flow-statistics:type": 2048
639 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.8/32"
641 "opendaylight-flow-statistics:priority": 1,
642 "opendaylight-flow-statistics:packet-count": 8,
643 "opendaylight-flow-statistics:table_id": 0,
644 "opendaylight-flow-statistics:idle-timeout": 0,
645 "opendaylight-flow-statistics:instructions": {
646 "opendaylight-flow-statistics:instruction": [
648 "opendaylight-flow-statistics:order": 0,
649 "opendaylight-flow-statistics:apply-actions": {
650 "opendaylight-flow-statistics:action": [
652 "opendaylight-flow-statistics:order": 0,
653 "opendaylight-flow-statistics:output-action": {
654 "opendaylight-flow-statistics:output-node-connector": "2",
655 "opendaylight-flow-statistics:max-length": 0
666 "flow-node-inventory:id": "ed9deeb2-be8f-4b84-bcd8-9d12049383d6",
667 "opendaylight-flow-statistics:flow-statistics": {
668 "opendaylight-flow-statistics:cookie": 0,
669 "opendaylight-flow-statistics:duration": {
670 "opendaylight-flow-statistics:nanosecond": 577000000,
671 "opendaylight-flow-statistics:second": 2706
673 "opendaylight-flow-statistics:hard-timeout": 0,
674 "opendaylight-flow-statistics:byte-count": 784,
675 "opendaylight-flow-statistics:match": {
676 "opendaylight-flow-statistics:ethernet-match": {
677 "opendaylight-flow-statistics:ethernet-type": {
678 "opendaylight-flow-statistics:type": 2048
681 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.7/32"
683 "opendaylight-flow-statistics:priority": 1,
684 "opendaylight-flow-statistics:packet-count": 8,
685 "opendaylight-flow-statistics:table_id": 0,
686 "opendaylight-flow-statistics:idle-timeout": 0,
687 "opendaylight-flow-statistics:instructions": {
688 "opendaylight-flow-statistics:instruction": [
690 "opendaylight-flow-statistics:order": 0,
691 "opendaylight-flow-statistics:apply-actions": {
692 "opendaylight-flow-statistics:action": [
694 "opendaylight-flow-statistics:order": 0,
695 "opendaylight-flow-statistics:output-action": {
696 "opendaylight-flow-statistics:output-node-connector": "2",
697 "opendaylight-flow-statistics:max-length": 0
708 "flow-node-inventory:id": "1c14ea3c-9dcc-4434-b566-7e99033ea252",
709 "opendaylight-flow-statistics:flow-statistics": {
710 "opendaylight-flow-statistics:cookie": 0,
711 "opendaylight-flow-statistics:duration": {
712 "opendaylight-flow-statistics:nanosecond": 659000000,
713 "opendaylight-flow-statistics:second": 2705
715 "opendaylight-flow-statistics:hard-timeout": 0,
716 "opendaylight-flow-statistics:byte-count": 784,
717 "opendaylight-flow-statistics:match": {
718 "opendaylight-flow-statistics:ethernet-match": {
719 "opendaylight-flow-statistics:ethernet-type": {
720 "opendaylight-flow-statistics:type": 2048
723 "opendaylight-flow-statistics:ipv4-destination": "10.0.0.6/32"
725 "opendaylight-flow-statistics:priority": 1,
726 "opendaylight-flow-statistics:packet-count": 8,
727 "opendaylight-flow-statistics:table_id": 0,
728 "opendaylight-flow-statistics:idle-timeout": 0,
729 "opendaylight-flow-statistics:instructions": {
730 "opendaylight-flow-statistics:instruction": [
732 "opendaylight-flow-statistics:order": 0,
733 "opendaylight-flow-statistics:apply-actions": {
734 "opendaylight-flow-statistics:action": [
736 "opendaylight-flow-statistics:order": 0,
737 "opendaylight-flow-statistics:output-action": {
738 "opendaylight-flow-statistics:output-node-connector": "2",
739 "opendaylight-flow-statistics:max-length": 0
750 "opendaylight-flow-table-statistics:flow-table-statistics": {
751 "opendaylight-flow-table-statistics:active-flows": 8,
752 "opendaylight-flow-table-statistics:packets-matched": 97683,
753 "opendaylight-flow-table-statistics:packets-looked-up": 101772
759 ---------------------
761 [[discovering-and-testing-new-flow-types]]
762 ===== Discovering and testing new Flow Types
764 Currently, the openflowplugin has a test-provider that allows you to
765 push various flows through the system from the OSGI command line. Once
766 those flows have been pushed through, you can see them as examples and
767 then use them to see in the config what a particular flow example looks
771 ====== Using addMDFlow
775 --------------------------------------------------------------------------------------------------------------------
776 cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
778 --------------------------------------------------------------------------------------------------------------------
780 Point your mininet at the controller as described above.
782 once you can see your node (probably openflow:1 if you've been following
783 along) in the inventory, at the OSGI command line try running:
785 -----------------------
786 addMDFlow openflow:1 f#
787 -----------------------
789 Where # is a number between 1 and 80. This will create one of 80
790 possible flows. You can go confirm they were created on the switch.
792 Once you've done that, use
795 * Accept: application/xml
797 "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/"
799 To see a full listing of the flows in table 2 (where they will be put).
800 If you want to see a particular flow, look at
803 "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/#"
805 Where # is 123 + the f# you used. So for example, for f22, your url
809 "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/145"
811 Note: You may have to trim out some of the sections like that contain
812 bitfields and binary types that are not correctly modeled.
814 Note: Before attempting to PUT a flow you have created via addMDFlow,
815 please change its URL and body to, for example, use table 1 instead of
816 table 2 or another Flow Id, so you don't collide.
818 Note: There are several test command providers and the one handling
819 flows is *OpenflowpluginTestCommandProvider*. Methods, which can be use
820 as *commands in OSGI-console* have prefix '_'.
825 Examples for XML for various flow matches, instructions & actions can be
826 found in following section
827 <<odl-ofp-example-flows_overview,here>>