Ray Milkey
Committed by Gerrit Code Review

Add a single point to multi point intent scenario

Change-Id: I53d7d56e90fd95ac0b019ab025ad52998d2aad8a
...@@ -15,8 +15,11 @@ name=$2 ...@@ -15,8 +15,11 @@ name=$2
15 type=$3 15 type=$3
16 arg1=$4 16 arg1=$4
17 arg2=$5 17 arg2=$5
18 +arg3=$6
19 +arg4=$7
20 +arg5=$8
18 21
19 set -x 22 set -x
20 23
21 -onos $target "onos:add-${type}-intent" --key $name "${arg1}" "${arg2}" 24 +onos $target "onos:add-${type}-intent" --key $name "${arg1}" "${arg2}" "${arg3}" "${arg4}" "${arg5}"
22 25
......
1 +<!--
2 + ~ Copyright 2016 Open Networking Laboratory
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-single-to-multi-intent"
17 + description="Network single point to multi point intent connectivity test">
18 + <!-- TODO: parametrize this via recipes -->
19 + <group name="S2M-Intent-Connectivity">
20 + <step name="S2M-Intent.Uninstall-Reactive-Forwarding"
21 + exec="onos ${OC1} app deactivate org.onosproject.fwd org.onosproject.ifwd"/>
22 + <step name="S2M-Intent.Check-Apps" requires="^"
23 + exec="onos-check-apps ${OC1} fwd,ifwd excludes"/>
24 +
25 + <!-- Create a single point to three points intent -->
26 + <step name="S2M-Intent.Create-Intent-forward" requires="^"
27 + exec="onos-create-intent ${OC1} forward single-to-multi of:0000000000000011/1 of:0000000000000014/1 of:0000000000000002/1 of:000000000000000E/1"/>
28 +
29 + <!-- Create back links from the 3 points back to the source -->
30 + <step name="S2M-Intent.Create-Intent-back1" requires="^"
31 + exec="onos-create-intent ${OC1} back1 point of:0000000000000014/1 of:0000000000000011/1"/>
32 + <step name="S2M-Intent.Create-Intent-back2" requires="^"
33 + exec="onos-create-intent ${OC1} back2 point of:0000000000000002/1 of:0000000000000011/1"/>
34 + <step name="S2M-Intent.Create-Intent-back3" requires="^"
35 + exec="onos-create-intent ${OC1} back3 point of:000000000000000E/1 of:0000000000000011/1"/>
36 +
37 + <!-- Make sure intents installed properly -->
38 + <step name="S2M-Intent.Validate-Intent-forward-Installed" requires="S2M-Intent.Create-Intent-forward"
39 + exec="onos-check-intent ${OC1} forward INSTALLED"/>
40 + <step name="S2M-Intent.Validate-Intent-back1-Installed" requires="S2M-Intent.Create-Intent-back1"
41 + exec="onos-check-intent ${OC1} back1 INSTALLED"/>
42 + <step name="S2M-Intent.Validate-Intent-back2-Installed" requires="S2M-Intent.Create-Intent-back2"
43 + exec="onos-check-intent ${OC1} back2 INSTALLED"/>
44 + <step name="S2M-Intent.Validate-Intent-back3-Installed" requires="S2M-Intent.Create-Intent-back3"
45 + exec="onos-check-intent ${OC1} back3 INSTALLED"/>
46 +
47 + <!-- Check the connectivity of the 11 <-> 14 intent -->
48 + <step name="S2M-Intent.Ping-1-forward"
49 + exec="onos-mininet sendAndExpect h17 ping -c1 h20 --expect \ 0% packet loss" requires="S2M-Intent.Create-Intent-forward,
50 + S2M-Intent.Create-Intent-back1" />
51 + <step name="S2M-Intent.Ping-1-back"
52 + exec="onos-mininet sendAndExpect h20 ping -c1 h17 --expect \ 0% packet loss" requires="S2M-Intent.Create-Intent-forward,
53 + S2M-Intent.Create-Intent-back1" />
54 +
55 + <!-- Check the connectivity of the 11 <-> 2 intent -->
56 + <step name="S2M-Intent.Ping-2-forward"
57 + exec="onos-mininet sendAndExpect h17 ping -c1 h2 --expect \ 0% packet loss" requires="S2M-Intent.Create-Intent-forward,
58 + S2M-Intent.Create-Intent-back1" />
59 + <step name="S2M-Intent.Ping-2-back"
60 + exec="onos-mininet sendAndExpect h2 ping -c1 h17 --expect \ 0% packet loss" requires="S2M-Intent.Create-Intent-forward,
61 + S2M-Intent.Create-Intent-back1" />
62 +
63 + <!-- Check the connectivity of the 11 <-> E intent -->
64 + <step name="S2M-Intent.Ping-3-forward"
65 + exec="onos-mininet sendAndExpect h17 ping -c1 h14 --expect \ 0% packet loss" requires="S2M-Intent.Create-Intent-forward,
66 + S2M-Intent.Create-Intent-back2" />
67 + <step name="S2M-Intent.Ping-3-back"
68 + exec="onos-mininet sendAndExpect h14 ping -c1 h17 --expect \ 0% packet loss" requires="S2M-Intent.Create-Intent-forward,
69 + S2M-Intent.Create-Intent-back3" />
70 +
71 + <!-- Clean up intents -->
72 + <step name="S2M-Intent.Remove-Intent-forward" requires="~S2M-Intent.Ping-3-back"
73 + exec="onos ${OC1} remove-intent -p org.onosproject.cli forward"/>
74 + <step name="S2M-Intent.Remove-Intent-back1" requires="~S2M-Intent.Ping-3-back"
75 + exec="onos ${OC1} remove-intent -p org.onosproject.cli back1"/>
76 + <step name="S2M-Intent.Remove-Intent-back2" requires="~S2M-Intent.Ping-3-back"
77 + exec="onos ${OC1} remove-intent -p org.onosproject.cli back2"/>
78 + <step name="S2M-Intent.Remove-Intent-back3" requires="~S2M-Intent.Ping-3-back"
79 + exec="onos ${OC1} remove-intent -p org.onosproject.cli back3"/>
80 + </group>
81 +</scenario>
...@@ -29,8 +29,12 @@ ...@@ -29,8 +29,12 @@
29 <import file="${ONOS_SCENARIOS}/net-point-intent.xml"/> 29 <import file="${ONOS_SCENARIOS}/net-point-intent.xml"/>
30 <dependency name="P2P-Intent-Connectivity" requires="Net-Setup,~Reactive-Forwarding.Net-Link-Down-Up,Host-Intent-Connectivity"/> 30 <dependency name="P2P-Intent-Connectivity" requires="Net-Setup,~Reactive-Forwarding.Net-Link-Down-Up,Host-Intent-Connectivity"/>
31 31
32 + <import file="${ONOS_SCENARIOS}/net-single-to-multi-intent.xml"/>
33 + <dependency name="S2M-Intent-Connectivity"
34 + requires="Net-Setup,~Reactive-Forwarding.Net-Link-Down-Up,Host-Intent-Connectivity,P2P-Intent-Connectivity"/>
35 +
32 <import file="${ONOS_SCENARIOS}/net-rest.xml"/> 36 <import file="${ONOS_SCENARIOS}/net-rest.xml"/>
33 - <dependency name="Net-REST" requires="Net-Setup,P2P-Intent-Connectivity"/> 37 + <dependency name="Net-REST" requires="Net-Setup,P2P-Intent-Connectivity,S2M-Intent-Connectivity"/>
34 38
35 <import file="${ONOS_SCENARIOS}/net-create-flows.xml"/> 39 <import file="${ONOS_SCENARIOS}/net-create-flows.xml"/>
36 <dependency name="Net-Create-Flows" requires="Net-Setup,P2P-Intent-Connectivity,Net-REST"/> 40 <dependency name="Net-Create-Flows" requires="Net-Setup,P2P-Intent-Connectivity,Net-REST"/>
......