Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2016-present 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-setup-vnets" description="Network (vnets) setup steps"> |
| 17 | <group name="Net-Setup-Vnets"> |
| 18 | |
Claudine Chiu | cc5f03e | 2016-07-14 17:09:04 -0400 | [diff] [blame] | 19 | <step name="Get-TenantId" unless="${tenantId}" |
Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 20 | exec="echo @stc tenantId=TestTenant"/> |
| 21 | |
Claudine Chiu | cc5f03e | 2016-07-14 17:09:04 -0400 | [diff] [blame] | 22 | <step name="Create-Tenant" requires="~Get-TenantId" |
Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 23 | exec="onos ${OCI} vnet-add-tenant ${tenantId}"/> |
| 24 | |
| 25 | <step name="Query-Tenant" requires="^" |
| 26 | exec="onos-check-vnet ${OCI} checkTenant ${tenantId}"/> |
| 27 | |
| 28 | <step name="Create-Vnet" requires="^" |
| 29 | exec="onos ${OCI} vnet-create ${tenantId}"/> |
| 30 | |
| 31 | <step name="Query-Vnet" requires="^" |
| 32 | exec="onos-check-vnet ${OCI} getNetworkId ${tenantId}"/> |
| 33 | |
| 34 | <step name="Create-Device-1" requires="^" |
| 35 | exec="onos ${OCI} vnet-create-device ${networkId} device1"/> |
| 36 | |
| 37 | <step name="Create-Device-2" requires="^" |
| 38 | exec="onos ${OCI} vnet-create-device ${networkId} device2"/> |
| 39 | |
| 40 | <step name="Create-Port-1" requires="^" |
| 41 | exec="onos ${OCI} vnet-create-port ${networkId} device1 1 of:0000000000000004 1"/> |
| 42 | |
| 43 | <step name="Create-Port-2" requires="^" |
| 44 | exec="onos ${OCI} vnet-create-port ${networkId} device2 2 of:0000000000000009 1"/> |
| 45 | |
Claudine Chiu | b0d0ada | 2016-06-06 18:03:09 -0400 | [diff] [blame] | 46 | <step name="Create-Bidirectional-Link" requires="^" |
| 47 | exec="onos -f ${OCI} vnet-create-link --bidirectional ${networkId} device2 2 device1 1"/> |
Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 48 | |
Claudine Chiu | cc5f03e | 2016-07-14 17:09:04 -0400 | [diff] [blame] | 49 | <step name="Create-Intent-1" requires="^" |
| 50 | exec="onos -f ${OCI} add-vnet-intent --key 21 --encapsulation VLAN ${networkId} device2/2 device1/1"/> |
| 51 | |
| 52 | <step name="Check-intents-installed-1" requires="^" |
| 53 | exec="onos-check-intent ${OCI} 21 INSTALLED 1"/> |
| 54 | |
| 55 | <step name="Create-Intent-2" requires="^" |
| 56 | exec="onos -f ${OCI} add-vnet-intent --key 12 --encapsulation VLAN ${networkId} device1/1 device2/2"/> |
| 57 | |
| 58 | <step name="Check-intents-installed-2" requires="^" |
| 59 | exec="onos-check-intent ${OCI} 12 INSTALLED 1"/> |
Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 60 | |
Claudine Chiu | b0d0ada | 2016-06-06 18:03:09 -0400 | [diff] [blame] | 61 | <step name="Ping-hosts-1" requires="^" |
Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 62 | exec="onos-mininet sendAndExpect h4 ping -c1 h9 --expect \ 0% packet loss"/> |
Claudine Chiu | 0005a4d | 2016-05-25 12:13:43 -0400 | [diff] [blame] | 63 | |
| 64 | </group> |
| 65 | </scenario> |