| <!-- |
| ~ Copyright 2017-present Open Networking Foundation |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| <scenario name="net-teardown-vnet2" description="Virtual Network (vnet2) teardown steps"> |
| <group name="Net-Teardown-Vnet2"> |
| |
| <step name="Check-NetworkId-Variable-Exists" exec="test '${networkId}' != ''"/> |
| |
| <step name="Set-VirtualDevice1-Teardown" unless="${virtualDevice1}" |
| exec="echo @stc virtualDevice1=of:1122334455660003"/> |
| |
| <step name="Set-VirtualDevice2-Teardown" unless="${virtualDevice2}" |
| exec="echo @stc virtualDevice2=of:1122334455660004"/> |
| |
| <step name="Set-VirtualHost1-Id-Teardown" unless="${virtualHost1Id}" |
| exec="echo @stc virtualHost1Id=00:00:00:00:00:03"/> |
| |
| <step name="Set-VirtualHost2-Id-Teardown" unless="${virtualHost2Id}" |
| exec="echo @stc virtualHost2Id=00:00:00:00:00:02"/> |
| |
| <step name="Remove-Bidirectional-VirtualLink" requires="^" |
| exec="onos ${OCI} vnet-remove-link --bidirectional ${networkId} ${virtualDevice2} 2 ${virtualDevice1} 2"/> |
| |
| <step name="Show-VirtualLink-Teardown" requires="^" |
| exec="onos ${OCI} vnet-links ${networkId}"/> |
| |
| <step name="Remove-VirtualHost-2" requires="^" |
| exec="onos ${OCI} vnet-remove-host ${networkId} ${virtualHost2Id}/None"/> |
| |
| <step name="Remove-VirtualHost-1" requires="^" |
| exec="onos ${OCI} vnet-remove-host ${networkId} ${virtualHost1Id}/None"/> |
| |
| <step name="Show-VirtualHosts-Teardown" requires="^" |
| exec="onos ${OCI} vnet-hosts ${networkId}"/> |
| |
| <step name="Remove-VirtualPort-11" requires="^" |
| exec="onos ${OCI} vnet-remove-port ${networkId} ${virtualDevice1} 1"/> |
| |
| <step name="Remove-VirtualPort-12" requires="^" |
| exec="onos ${OCI} vnet-remove-port ${networkId} ${virtualDevice1} 2"/> |
| |
| <step name="Remove-VirtualPort-21" requires="^" |
| exec="onos ${OCI} vnet-remove-port ${networkId} ${virtualDevice2} 1"/> |
| |
| <step name="Remove-VirtualPort-22" requires="^" |
| exec="onos ${OCI} vnet-remove-port ${networkId} ${virtualDevice2} 2"/> |
| |
| <step name="Remove-VirtualDevice-1" requires="^" |
| exec="onos ${OCI} vnet-remove-device ${networkId} ${virtualDevice1}"/> |
| |
| <step name="Remove-VirtualDevice-2" requires="^" |
| exec="onos ${OCI} vnet-remove-device ${networkId} ${virtualDevice2}"/> |
| |
| <step name="Remove-Vnet" requires="^" |
| exec="onos ${OCI} vnet-remove ${networkId}"/> |
| |
| <step name="Check-TenantId-Variable-Exists" requires="^" |
| exec="test '${tenantId}' != ''"/> |
| |
| <step name="Remove-Tenant" requires="Check-TenantId-Variable-Exists" |
| exec="onos ${OCI} vnet-remove-tenant ${tenantId}"/> |
| </group> |
| </scenario> |