Ray Milkey | 43ee97f | 2015-09-04 15:14:40 -0700 | [diff] [blame] | 1 | <!-- |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | ~ Copyright 2015-present Open Networking Laboratory |
Ray Milkey | 43ee97f | 2015-09-04 15:14:40 -0700 | [diff] [blame] | 3 | ~ |
| 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ~ you may not use this file except in compliance with the License. |
| 6 | ~ You may obtain a copy of the License at |
| 7 | ~ |
| 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ~ |
| 10 | ~ Unless required by applicable law or agreed to in writing, software |
| 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ~ See the License for the specific language governing permissions and |
| 14 | ~ limitations under the License. |
| 15 | --> |
| 16 | <scenario name="net-create-flows" |
| 17 | description="Network Flow Creation Test Using REST API"> |
| 18 | <!-- TODO: parametrize this via recipes --> |
| 19 | <group name="Net-Create-Flows"> |
| 20 | |
| 21 | <!-- Make sure that reactive forwarding is off --> |
| 22 | <step name="Net-Create-Flows.Uninstall-Reactive-Forwarding" |
| 23 | exec="onos ${OC1} app deactivate org.onosproject.fwd org.onosproject.ifwd"/> |
| 24 | <step name="Net-Create-Flows.Check-Apps" requires="^" |
| 25 | exec="onos-check-apps ${OC1} fwd,ifwd excludes"/> |
| 26 | |
| 27 | <!-- Force discovery of hosts --> |
| 28 | <step name="Net-Create-Flows.Find-Host-1" requires="^" |
| 29 | exec="onos-mininet sendAndExpect h1 ping -c1 -w1 h4 --expect 100% packet loss"/> |
| 30 | <step name="Net-Create-Flows.Find-Host-2" requires="^" |
| 31 | exec="onos-mininet sendAndExpect h4 ping -c1 -w1 h1 --expect 100% packet loss"/> |
| 32 | |
| 33 | |
| 34 | <!-- Use REST API to create a point to point intent in each direction --> |
| 35 | <step name="Net-Create-Flows.1-to-Host" requires="Net-Create-Flows.Find-Host-2" |
| 36 | exec="create-flow.py ${OC1} f1 of:0000000000000001 5 1"/> |
| 37 | <step name="Net-Create-Flows.1-to-19" requires="^" |
| 38 | exec="create-flow.py ${OC1} f2 of:0000000000000001 1 2"/> |
| 39 | <step name="Net-Create-Flows.19-to-7" requires="^" |
| 40 | exec="create-flow.py ${OC1} f3 of:0000000000000019 2 8"/> |
| 41 | <step name="Net-Create-Flows.7-to-4" requires="^" |
| 42 | exec="create-flow.py ${OC1} f4 of:0000000000000007 2 3"/> |
| 43 | <step name="Net-Create-Flows.4-to-Host" requires="^" |
| 44 | exec="create-flow.py ${OC1} f5 of:0000000000000004 1 3"/> |
| 45 | |
| 46 | <step name="Net-Create-Flows.Host-to-1" requires="^" |
| 47 | exec="create-flow.py ${OC1} f6 of:0000000000000001 1 5"/> |
| 48 | <step name="Net-Create-Flows.19-to-1" requires="^" |
| 49 | exec="create-flow.py ${OC1} f7 of:0000000000000001 2 1"/> |
| 50 | <step name="Net-Create-Flows.7-to-19" requires="^" |
| 51 | exec="create-flow.py ${OC1} f8 of:0000000000000019 8 2"/> |
| 52 | <step name="Net-Create-Flows.4-to-7" requires="^" |
| 53 | exec="create-flow.py ${OC1} f9 of:0000000000000007 3 2"/> |
| 54 | <step name="Net-Create-Flows.Host-to-4" requires="^" |
| 55 | exec="create-flow.py ${OC1} f10 of:0000000000000004 3 1"/> |
| 56 | |
Ray Milkey | 407ef25 | 2016-06-14 11:30:52 -0700 | [diff] [blame] | 57 | <!-- Make sure all flows are added --> |
| 58 | <step name="Net-Create-Flows.Check-Flows-Added" requires="^" |
| 59 | exec="onos-check-flows ${OC1}"/> |
| 60 | |
Ray Milkey | 43ee97f | 2015-09-04 15:14:40 -0700 | [diff] [blame] | 61 | <!-- Check that connectivity was established --> |
| 62 | <step name="Net-Create-Flows.Ping-XY" requires="^" |
| 63 | exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 0% packet loss"/> |
| 64 | <step name="Net-Create-Flows.Ping-YX" requires="^" |
| 65 | exec="onos-mininet sendAndExpect h4 ping -c1 h1 --expect \ 0% packet loss"/> |
| 66 | |
| 67 | <!-- Use REST API to remove the flows. --> |
| 68 | <step name="Net-Create-Flows.Delete-f1" requires="^" |
| 69 | exec="curl -f -X DELETE -uonos:rocks ${f1Location}"/> |
| 70 | <step name="Net-Create-Flows.Delete-f2" requires="^" |
| 71 | exec="curl -f -X DELETE -uonos:rocks ${f2Location}"/> |
| 72 | <step name="Net-Create-Flows.Delete-f3" requires="^" |
| 73 | exec="curl -f -X DELETE -uonos:rocks ${f3Location}"/> |
| 74 | <step name="Net-Create-Flows.Delete-f4" requires="^" |
| 75 | exec="curl -f -X DELETE -uonos:rocks ${f4Location}"/> |
| 76 | <step name="Net-Create-Flows.Delete-f5" requires="^" |
| 77 | exec="curl -f -X DELETE -uonos:rocks ${f5Location}"/> |
| 78 | <step name="Net-Create-Flows.Delete-f6" requires="^" |
| 79 | exec="curl -f -X DELETE -uonos:rocks ${f6Location}"/> |
| 80 | <step name="Net-Create-Flows.Delete-f7" requires="^" |
| 81 | exec="curl -f -X DELETE -uonos:rocks ${f7Location}"/> |
| 82 | <step name="Net-Create-Flows.Delete-f8" requires="^" |
| 83 | exec="curl -f -X DELETE -uonos:rocks ${f8Location}"/> |
| 84 | <step name="Net-Create-Flows.Delete-f9" requires="^" |
| 85 | exec="curl -f -X DELETE -uonos:rocks ${f9Location}"/> |
| 86 | <step name="Net-Create-Flows.Delete-f10" requires="^" |
| 87 | exec="curl -f -X DELETE -uonos:rocks ${f10Location}"/> |
| 88 | |
| 89 | <!-- Ping again to be sure the path was removed. --> |
| 90 | <step name="Net-Create-Flows.Fail-Ping-XY" requires="^" |
| 91 | exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 100% packet loss"/> |
| 92 | <step name="Net-Create-Flows.Fail-Ping-YX" requires="^" |
| 93 | exec="onos-mininet sendAndExpect h4 ping -c1 h1 --expect \ 100% packet loss"/> |
| 94 | |
| 95 | |
| 96 | </group> |
| 97 | </scenario> |