Create Network ${NETWORKS[0]}
Create Network ${NETWORKS[1]}
${NET_LIST} List Networks
- Log ${NET_LIST}
Should Contain ${NET_LIST} ${NETWORKS[0]}
Should Contain ${NET_LIST} ${NETWORKS[1]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
Create SubNet ${NETWORKS[0]} ${SUBNETS[0]} ${SUBNETS_CIDR[0]}
Create SubNet ${NETWORKS[1]} ${SUBNETS[1]} ${SUBNETS_CIDR[1]}
${SUB_LIST} List Subnets
- Log ${SUB_LIST}
Should Contain ${SUB_LIST} ${SUBNETS[0]}
Should Contain ${SUB_LIST} ${SUBNETS[1]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
${VM_INSTANCES} = Create List @{VM_INSTANCES_NET10} @{VM_INSTANCES_NET20}
: FOR ${VM} IN @{VM_INSTANCES}
\ Poll VM Is ACTIVE ${VM}
- Log Check for routes
Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNETS_CIDR}
${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
... true @{VM_INSTANCES_NET10}
[Documentation] Create Router
Create Router ${ROUTERS[0]}
${router_output} = List Router
- Log ${router_output}
Should Contain ${router_output} ${ROUTERS[0]}
${router_list} = Create List ${ROUTERS[0]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${ROUTER_URL} ${router_list}
Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
Log L3 Datapath test across the networks using router
${dst_ip_list} = Create List ${VM_IP_NET10[1]} @{VM_IP_NET20}
- Log ${dst_ip_list}
Test Operations From Vm Instance ${NETWORKS[0]} ${VM_IP_NET10[0]} ${dst_ip_list}
${dst_ip_list} = Create List ${VM_IP_NET20[1]} @{VM_IP_NET10}
- Log ${dst_ip_list}
Test Operations From Vm Instance ${NETWORKS[1]} ${VM_IP_NET20[0]} ${dst_ip_list}
[Teardown] Test Teardown With Tcpdump Stop ${cn1_conn_id} ${cn2_conn_id} ${os_conn_id}
${vm_instances} = Create List @{VM_IP_NET10} @{VM_IP_NET20}
Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${VPN_IFACES_URL} ${vm_instances}
${RD} = Strip String ${RDS[0]} characters="[]
- Log ${RD}
Wait Until Keyword Succeeds 60s 5s Check For Elements At URI ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/ ${vm_instances}
Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances}
Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances}
Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
Log Check datapath from network1 to network2
${dst_ip_list} = Create List @{VM_IP_NET10}[1] @{VM_IP_NET20}
- Log ${dst_ip_list}
Test Operations From Vm Instance ${NETWORKS[0]} @{VM_IP_NET10}[0] ${dst_ip_list}
Log Check datapath from network2 to network1
${dst_ip_list} = Create List @{VM_IP_NET20}[1] @{VM_IP_NET10}
- Log ${dst_ip_list}
Test Operations From Vm Instance ${NETWORKS[1]} @{VM_IP_NET20}[0] ${dst_ip_list}
Dissociate L3VPN From Routers
# Delete Router and Interface to the subnets.
Delete Router ${ROUTERS[0]}
${router_output} = List Router
- Log ${router_output}
Should Not Contain ${router_output} ${ROUTERS[0]}
${router_list} = Create List ${ROUTERS[0]}
Wait Until Keyword Succeeds 3s 1s Check For Elements Not At URI ${ROUTER_URL} ${router_list}
Delete Router With NonExistentRouter Name
[Documentation] Delete router with nonExistentRouter name
${rc} ${output}= Run And Return Rc And Output neutron router-delete nonExistentRouter
- Log ${output}
- Log ${rc}
Should Match Regexp ${output} Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
Associate L3VPN To Networks
[Arguments] ${cnIp}
[Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
${flow_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- Log ${flow_output}
${group_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-groups br-int
- Log ${group_output}
#Verify DISPATCHER_TABLE - 17
Should Contain ${flow_output} table=${DISPATCHER_TABLE}
${dispatcher_table} = Get Lines Containing String ${flow_output} table=${DISPATCHER_TABLE}
- Log ${dispatcher_table}
Should Contain ${dispatcher_table} goto_table:${GWMAC_TABLE}
Should Not Contain ${dispatcher_table} goto_table:${ARP_RESPONSE_TABLE}
#Verify GWMAC_TABLE - 19
Should Contain ${flow_output} table=${GWMAC_TABLE}
${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
- Log ${gwmac_table}
#Verify GWMAC address present in table 19
: FOR ${macAdd} IN @{GWMAC_ADDRS}
\ Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
Should Match Regexp ${arpchk_table} ${ARP_RESPONSE_REGEX}
${match} = Should Match Regexp ${arpchk_table} ${ARP_REQUEST_REGEX}
${groupID} = Split String ${match} separator=:
- Log groupID
Verify ARP REQUEST in groupTable ${group_output} ${groupID[1]}
#Verify ARP_RESPONSE_TABLE - 81
Should Contain ${flow_output} table=${ARP_RESPONSE_TABLE}
${arpResponder_table} = Get Lines Containing String ${flow_output} table=${ARP_RESPONSE_TABLE}
- Log ${arpResponder_table}
Should Contain ${arpResponder_table} priority=0 actions=drop
: FOR ${macAdd} ${ipAdd} IN ZIP ${GWMAC_ADDRS} ${GWIP_ADDRS}
\ ${ARP_RESPONSE_IP_MAC_REGEX} = Set Variable arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
Create Network ${NETWORKS[0]}
Create Network ${NETWORKS[1]}
${NET_LIST} List Networks
- Log ${NET_LIST}
Should Contain ${NET_LIST} ${NETWORKS[0]}
Should Contain ${NET_LIST} ${NETWORKS[1]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
Create SubNet ${NETWORKS[0]} ${SUBNETS[0]} ${SUBNETS_CIDR[0]} ${net1_additional_args}
Create SubNet ${NETWORKS[1]} ${SUBNETS[1]} ${SUBNETS_CIDR[1]} ${net2_additional_args}
${SUB_LIST} List Subnets
- Log ${SUB_LIST}
Should Contain ${SUB_LIST} ${SUBNETS[0]}
Should Contain ${SUB_LIST} ${SUBNETS[1]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
[Documentation] Create Router
Create Router ${ROUTERS[0]}
${router_output} = List Router
- Log ${router_output}
Should Contain ${router_output} ${ROUTERS[0]}
${router_list} = Create List ${ROUTERS[0]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${ROUTER_URL} ${router_list}
\ ${subnet_id} = Get Subnet Id ${INTERFACE} ${devstack_conn_id}
\ Should Contain ${interface_output} ${subnet_id}
${GWMAC_ADDRS} ${GWIP_ADDRS} = Get Gateway MAC And IP Address ${ROUTERS[0]}
- Log ${GWMAC_ADDRS}
Set Suite Variable ${GWMAC_ADDRS}
- Log ${GWIP_ADDRS}
Set Suite Variable ${GWIP_ADDRS}
Add Ssh V6 Allow Rule
${VM_INSTANCES}= Create List @{VM_INSTANCES_NET10} @{VM_INSTANCES_NET20}
: FOR ${VM} IN @{VM_INSTANCES}
\ Poll VM Is ACTIVE ${VM}
- Log Check for routes
Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNETS_CIDR}
${prefix_net10}= Replace String ${SUBNETS_CIDR[0]} ::/64 (:[a-f0-9]{,4}){,4}
- Log ${prefix_net10}
${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 5x 60s Collect VM IPv6 SLAAC Addresses
... true ${prefix_net10} @{VM_INSTANCES_NET10}
${prefix_net20}= Replace String ${SUBNETS_CIDR[1]} ::/64 (:[a-f0-9]{,4}){,4}
- Log ${prefix_net20}
${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 5x 60s Collect VM IPv6 SLAAC Addresses
... true ${prefix_net20} @{VM_INSTANCES_NET20}
${VM_IP_NET10}= Collect VM IPv6 SLAAC Addresses false ${prefix_net10} @{VM_INSTANCES_NET10}
${VM_IP_NET20}= Collect VM IPv6 SLAAC Addresses false ${prefix_net20} @{VM_INSTANCES_NET20}
- Log ${VM_IP_NET10}
- Log ${VM_IP_NET20}
${VM_INSTANCES}= Collections.Combine Lists ${VM_INSTANCES_NET10} ${VM_INSTANCES_NET20}
${VM_IPS}= Collections.Combine Lists ${VM_IP_NET10} ${VM_IP_NET20}
Log Many Obtained IPs ${VM_IPS}
Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
Log L3 Datapath test across the networks using router
${dst_ip_list} = Create List ${VM_IP_NET10[1]} @{VM_IP_NET20}
- Log Many Destination IPs list ${dst_ip_list}
Log Many Source IP ${VM_IP_NET10[1]}
Test Operations From Vm Instance ${NETWORKS[0]} ${VM_IP_NET10[0]} ${dst_ip_list}
${dst_ip_list} = Create List ${VM_IP_NET20[1]} @{VM_IP_NET10}
- Log Many Destination IPs list ${dst_ip_list}
Log Many Source IP ${VM_IP_NET20[0]}
Test Operations From Vm Instance ${NETWORKS[1]} ${VM_IP_NET20[0]} ${dst_ip_list}
[Teardown] Test Teardown With Tcpdump Stop ${cn1_conn_id} ${cn2_conn_id} ${os_conn_id}
[Documentation] Add multiple extra routes and check data path before L3VPN creation
Log "Adding extra one route to VM"
${CONFIG_EXTRA_ROUTE_IP1} = Catenate sudo ip -6 addr add ${EXTRA_NW_IP[0]}/64 dev eth0
- Log ${CONFIG_EXTRA_ROUTE_IP1}
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP1}
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ip -6 a
${CONFIG_EXTRA_ROUTE_IP2} = Catenate sudo ip -6 addr add ${EXTRA_NW_IP[1]}/64 dev eth0
- Log ${CONFIG_EXTRA_ROUTE_IP2}
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP2}
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ip -6 a
${EXT_RT1} = Set Variable destination=${EXTRA_NW_SUBNET[0]},gateway=${VM_IP_NET10[0]}
${vm_instances} = Create List @{VM_IP_NET10} @{VM_IP_NET20}
Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${VPN_IFACES_URL} ${vm_instances}
${RD} = Strip String ${RDS[0]} characters="[]
- Log ${RD}
Wait Until Keyword Succeeds 60s 5s Check For Elements At URI ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/ ${vm_instances}
Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances}
Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances}
Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
Log Check datapath from network1 to network2
${dst_ip_list} = Create List @{VM_IP_NET10}[1] @{VM_IP_NET20}
- Log ${dst_ip_list}
Test Operations From Vm Instance ${NETWORKS[0]} @{VM_IP_NET10}[0] ${dst_ip_list}
Log Check datapath from network2 to network1
${dst_ip_list} = Create List @{VM_IP_NET20}[1] @{VM_IP_NET10}
- Log ${dst_ip_list}
Test Operations From Vm Instance ${NETWORKS[1]} @{VM_IP_NET20}[0] ${dst_ip_list}
Dissociate L3VPN From Routers
# Delete Router and Interface to the subnets.
Delete Router ${ROUTERS[0]}
${router_output} = List Router
- Log ${router_output}
Should Not Contain ${router_output} ${ROUTERS[0]}
${router_list} = Create List ${ROUTERS[0]}
Wait Until Keyword Succeeds 3s 1s Check For Elements Not At URI ${ROUTER_URL} ${router_list}
Delete Router With NonExistentRouter Name
[Documentation] Delete router with nonExistentRouter name
${rc} ${output}= Run And Return Rc And Output neutron router-delete nonExistentRouter
- Log ${output}
- Log ${rc}
Should Match Regexp ${output} Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
Associate L3VPN To Networks
[Arguments] ${cnIp}
[Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
${flow_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- Log ${flow_output}
${group_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-groups br-int
- Log ${group_output}
Should Contain ${flow_output} table=${DISPATCHER_TABLE}
${dispatcher_table} = Get Lines Containing String ${flow_output} table=${DISPATCHER_TABLE}
- Log ${dispatcher_table}
Should Contain ${dispatcher_table} goto_table:${GWMAC_TABLE}
Should Not Contain ${dispatcher_table} goto_table:${ARP_RESPONSE_TABLE}
Should Contain ${flow_output} table=${GWMAC_TABLE}
${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
- Log ${gwmac_table}
#Verify GWMAC address present in table 19
: FOR ${macAdd} IN @{GWMAC_ADDRS}
\ Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
Should Match Regexp ${arpchk_table} ${ARP_RESPONSE_REGEX}
${match} = Should Match Regexp ${arpchk_table} ${ARP_REQUEST_REGEX}
${groupID} = Split String ${match} separator=:
- Log groupID
Should Contain ${flow_output} table=${IPV6_TABLE}
${icmp_ipv6_flows} = Get Lines Containing String ${flow_output} icmp_type=135
- Log ${icmp_ipv6_flows}
: FOR ${ip_addr} IN @{GWIP_ADDRS}
\ ${rule} = Set Variable icmp_type=135,icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
\ Should Match Regexp ${icmp_ipv6_flows} ${rule}