Claudine Chiu
Committed by Gerrit Code Review

ONOS-2184 - virtual network Intents for vnet STC.

Change-Id: Ic6b15ba20b45cae36ec873808641f7a1b9c9aa8c
......@@ -16,10 +16,10 @@
<scenario name="net-setup-vnets" description="Network (vnets) setup steps">
<group name="Net-Setup-Vnets">
<step name="Get-TenantId" requires="^" unless="${tenantId}"
<step name="Get-TenantId" unless="${tenantId}"
exec="echo @stc tenantId=TestTenant"/>
<step name="Create-Tenant" requires="^"
<step name="Create-Tenant" requires="~Get-TenantId"
exec="onos ${OCI} vnet-add-tenant ${tenantId}"/>
<step name="Query-Tenant" requires="^"
......@@ -46,8 +46,17 @@
<step name="Create-Bidirectional-Link" requires="^"
exec="onos -f ${OCI} vnet-create-link --bidirectional ${networkId} device2 2 device1 1"/>
<step name="Check-intents-installed" requires="^"
exec="onos-check-intent ${OCI} networkId=${networkId} INSTALLED 2"/>
<step name="Create-Intent-1" requires="^"
exec="onos -f ${OCI} add-vnet-intent --key 21 --encapsulation VLAN ${networkId} device2/2 device1/1"/>
<step name="Check-intents-installed-1" requires="^"
exec="onos-check-intent ${OCI} 21 INSTALLED 1"/>
<step name="Create-Intent-2" requires="^"
exec="onos -f ${OCI} add-vnet-intent --key 12 --encapsulation VLAN ${networkId} device1/1 device2/2"/>
<step name="Check-intents-installed-2" requires="^"
exec="onos-check-intent ${OCI} 12 INSTALLED 1"/>
<step name="Ping-hosts-1" requires="^"
exec="onos-mininet sendAndExpect h4 ping -c1 h9 --expect \ 0% packet loss"/>
......
......@@ -19,15 +19,24 @@
<step name="Check-NetworkId-Variable-Exists"
exec="test '${networkId}' != ''"/>
<step name="Remove-Intent-1" requires="^"
exec="onos -f ${OCI} remove-vnet-intent -p ${networkId} org.onosproject.cli 21"/>
<step name="Check-intents-removed-1" requires="^"
exec="onos-check-intent ${OCI} 21 WITHDRAWN 1"/>
<step name="Remove-Intent-2" requires="^"
exec="onos -f ${OCI} remove-vnet-intent -p ${networkId} org.onosproject.cli 12"/>
<step name="Check-intents-removed-2" requires="^"
exec="onos-check-intent ${OCI} 12 WITHDRAWN 1"/>
<step name="Check-Vnet-Link" requires="^"
exec="onos ${OCI} vnet-links ${networkId}"/>
<step name="Remove-Bidirectional-Link" requires="^"
exec="onos -f ${OCI} vnet-remove-link --bidirectional ${networkId} device2 2 device1 1"/>
<step name="Check-intents-removed" requires="^"
exec="onos-check-intent ${OCI} networkId=${networkId} IGNORE_STATE 0"/>
<step name="Ping-hosts-2" requires="^"
exec="onos-mininet sendAndExpect h4 ping -c1 h9 --expect \ 100% packet loss"/>
......
......@@ -17,8 +17,11 @@
<import file="${ONOS_SCENARIOS}/net-setup.xml"/>
<import file="${ONOS_SCENARIOS}/net-reactive-fwd.xml"/>
<dependency name="Net-Reactive-Fwd" requires="Net-Setup"/>
<import file="${ONOS_SCENARIOS}/net-setup-vnets.xml"/>
<dependency name="Net-Setup-Vnets" requires="Net-Setup"/>
<dependency name="Net-Setup-Vnets" requires="Net-Reactive-Fwd"/>
<import file="${ONOS_SCENARIOS}/net-teardown-vnets.xml"/>
<dependency name="Net-Teardown-Vnets" requires="Net-Setup-Vnets"/>
......