Claudine Chiu | ab8d7cd | 2017-11-14 11:39:26 -0500 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2017-present Open Networking Foundation |
| 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-vnet2" description="Virtual Network (vnet2) setup steps"> |
| 17 | <group name="Net-Setup-Vnet2"> |
| 18 | |
| 19 | <step name="Get-TenantId" unless="${tenantId}" |
| 20 | exec="echo @stc tenantId=TestTenant"/> |
| 21 | |
| 22 | <step name="Set-PhysicalDevice1" unless="${physicalDevice1}" |
| 23 | exec="echo @stc physicalDevice1=of:0000000000000003"/> |
| 24 | |
| 25 | <step name="Set-PhysicalPort1" unless="${physicalPort1}" |
| 26 | exec="echo @stc physicalPort1=2"/> |
| 27 | |
| 28 | <step name="Set-PhysicalDevice2" unless="${physicalDevice2}" |
| 29 | exec="echo @stc physicalDevice2=of:0000000000000002"/> |
| 30 | |
| 31 | <step name="Set-PhysicalPort2" unless="${physicalPort2}" |
| 32 | exec="echo @stc physicalPort2=3"/> |
| 33 | |
| 34 | <step name="Set-VirtualDevice1-Setup" unless="${virtualDevice1}" |
| 35 | exec="echo @stc virtualDevice1=of:1122334455660003"/> |
| 36 | |
| 37 | <step name="Set-VirtualDevice2-Setup" unless="${virtualDevice2}" |
| 38 | exec="echo @stc virtualDevice2=of:1122334455660004"/> |
| 39 | |
| 40 | <step name="Set-VirtualHost1-Id-Setup" unless="${virtualHost1Id}" |
| 41 | exec="echo @stc virtualHost1Id=00:00:00:00:00:03"/> |
| 42 | |
| 43 | <step name="Set-VirtualHost2-Id-Setup" unless="${virtualHost2Id}" |
| 44 | exec="echo @stc virtualHost2Id=00:00:00:00:00:02"/> |
| 45 | |
| 46 | <step name="Create-Tenant" requires="~Get-TenantId" |
| 47 | exec="onos ${OCI} vnet-add-tenant ${tenantId}"/> |
| 48 | |
| 49 | <step name="Query-Tenant" requires="^" |
| 50 | exec="onos-check-vnet ${OCI} checkTenant ${tenantId}"/> |
| 51 | |
| 52 | <step name="Create-Vnet" requires="^" |
| 53 | exec="onos ${OCI} vnet-create ${tenantId}"/> |
| 54 | |
| 55 | <step name="Query-Vnet" requires="^" |
| 56 | exec="onos-check-vnet ${OCI} getNetworkId ${tenantId}"/> |
| 57 | |
| 58 | <step name="Create-VirtualDevice-1" requires="^" |
| 59 | exec="onos ${OCI} vnet-create-device ${networkId} ${virtualDevice1}"/> |
| 60 | |
| 61 | <step name="Create-VirtualDevice-2" requires="^" |
| 62 | exec="onos ${OCI} vnet-create-device ${networkId} ${virtualDevice2}"/> |
| 63 | |
| 64 | <step name="Show-VirtualDevice" requires="^" |
| 65 | exec="onos ${OCI} vnet-devices ${networkId}"/> |
| 66 | |
| 67 | <step name="Create-VirtualPort-11" requires="^" |
| 68 | exec="onos ${OCI} vnet-create-port ${networkId} ${virtualDevice1} 1 ${physicalDevice1} 1"/> |
| 69 | |
| 70 | <step name="Create-VirtualPort-12" requires="^" |
| 71 | exec="onos ${OCI} vnet-create-port ${networkId} ${virtualDevice1} 2 ${physicalDevice1} ${physicalPort1}"/> |
| 72 | |
| 73 | <step name="Create-VirtualPort-21" requires="^" |
| 74 | exec="onos ${OCI} vnet-create-port ${networkId} ${virtualDevice2} 1 ${physicalDevice2} 1"/> |
| 75 | |
| 76 | <step name="Create-VirtualPort-22" requires="^" |
| 77 | exec="onos ${OCI} vnet-create-port ${networkId} ${virtualDevice2} 2 ${physicalDevice2} ${physicalPort2}"/> |
| 78 | |
| 79 | <step name="Show-VirtualPorts-1" requires="^" |
| 80 | exec="onos ${OCI} vnet-ports ${networkId} ${virtualDevice1}"/> |
| 81 | |
| 82 | <step name="Show-VirtualPorts-2" requires="^" |
| 83 | exec="onos ${OCI} vnet-ports ${networkId} ${virtualDevice2}"/> |
| 84 | |
| 85 | <step name="Check-PhysicalPorts" requires="^" |
| 86 | exec="onos ${OCI} links | grep ${physicalDevice1}/${physicalPort1} | grep ${physicalDevice2}/${physicalPort2}"/> |
| 87 | |
| 88 | <step name="Create-Bidirectional-VirtualLink" requires="^" |
Ray Milkey | 481ec33 | 2018-03-09 13:47:23 -0800 | [diff] [blame] | 89 | exec="onos ${OCI} vnet-create-link --bidirectional ${networkId} ${virtualDevice2} 2 ${virtualDevice1} 2"/> |
Claudine Chiu | ab8d7cd | 2017-11-14 11:39:26 -0500 | [diff] [blame] | 90 | |
| 91 | <step name="Show-VirtualLink-Setup" requires="^" |
Ray Milkey | 481ec33 | 2018-03-09 13:47:23 -0800 | [diff] [blame] | 92 | exec="onos ${OCI} vnet-links ${networkId}"/> |
Claudine Chiu | ab8d7cd | 2017-11-14 11:39:26 -0500 | [diff] [blame] | 93 | |
| 94 | <step name="Create-VirtualHost-1" requires="^" |
| 95 | exec="onos ${OCI} vnet-create-host ${networkId} ${virtualHost1Id} 65535 ${virtualDevice1} 1"/> |
| 96 | |
| 97 | <step name="Create-VirtualHost-2" requires="^" |
| 98 | exec="onos ${OCI} vnet-create-host ${networkId} ${virtualHost2Id} 65535 ${virtualDevice2} 1"/> |
| 99 | |
| 100 | <step name="Show-VirtualHosts-Setup" requires="^" |
| 101 | exec="onos ${OCI} vnet-hosts ${networkId}"/> |
| 102 | |
| 103 | <step name="Show-PhysicalHosts-1" requires="^" |
| 104 | exec="onos ${OCI} hosts"/> |
| 105 | |
| 106 | <step name="Show-PhysicalLinks-1" requires="^" |
| 107 | exec="onos ${OCI} links"/> |
| 108 | </group> |
| 109 | </scenario> |