go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/trafficIPv6/tapv2_int_traffic/tapv2_int_trafficIPv6.robot (about)

     1  *** Settings ***
     2  Library      OperatingSystem
     3  #Library      RequestsLibrary
     4  #Library      SSHLibrary      timeout=60s
     5  #Library      String
     6  
     7  Resource     ../../../variables/${VARIABLES}_variables.robot
     8  Resource     ../../../libraries/all_libs.robot
     9  Resource    ../../../libraries/pretty_keywords.robot
    10  
    11  Force Tags        traffic     IPv6    ExpectedFailure
    12  Suite Setup       Testsuite Setup
    13  Suite Teardown    Testsuite Teardown
    14  
    15  *** Variables ***
    16  ${VARIABLES}=               common
    17  ${ENV}=                     common
    18  ${NAME_VPP1_TAP1}=          vpp1_tap1
    19  ${NAME_VPP2_TAP1}=          vpp2_tap1
    20  ${MAC_VPP1_TAP1}=           12:21:21:11:11:11
    21  ${MAC_VPP2_TAP1}=           22:21:21:22:22:22
    22  ${IP_VPP1_TAP1}=            fd30::1:a:0:0:1
    23  ${IP_VPP2_TAP1}=            fd31::1:a:0:0:1
    24  ${IP_LINUX_VPP1_TAP1}=      fd30::1:a:0:0:2
    25  ${IP_LINUX_VPP2_TAP1}=      fd31::1:a:0:0:2
    26  ${IP_VPP1_TAP1_NETWORK}=    fd30::1:0:0:0:0
    27  ${IP_VPP2_TAP1_NETWORK}=    fd31::1:0:0:0:0
    28  ${NAME_VPP1_MEMIF1}=        vpp1_memif1
    29  ${NAME_VPP2_MEMIF1}=        vpp2_memif1
    30  ${MAC_VPP1_MEMIF1}=         13:21:21:11:11:11
    31  ${MAC_VPP2_MEMIF1}=         23:21:21:22:22:22
    32  ${IP_VPP1_MEMIF1}=          fd33::1:a:0:0:1
    33  ${IP_VPP2_MEMIF1}=          fd33::1:a:0:0:2
    34  ${PREFIX}=                  64
    35  ${UP_STATE}=                up
    36  ${WAIT_TIMEOUT}=     20s
    37  ${SYNC_SLEEP}=       3s
    38  # wait for resync vpps after restart
    39  ${RESYNC_WAIT}=        50s
    40  
    41  *** Test Cases ***
    42  Configure Environment
    43      [Tags]    setup
    44      Configure Environment 1
    45  
    46  Show Interfaces Before Setup
    47      vpp_term: Show Interfaces    agent_vpp_1
    48      vpp_term: Show Interfaces    agent_vpp_2
    49  
    50  Add VPP1_TAP1 Interface
    51      vpp_term: Interface Not Exists  node=agent_vpp_1    mac=${MAC_VPP1_TAP1}
    52      Put TAPv2 Interface With IP    node=agent_vpp_1    name=${NAME_VPP1_TAP1}    mac=${MAC_VPP1_TAP1}    ip=${IP_VPP1_TAP1}    prefix=${PREFIX}    host_if_name=linux_${NAME_VPP1_TAP1}
    53      linux: Set Host TAP Interface    node=agent_vpp_1    host_if_name=linux_${NAME_VPP1_TAP1}    ip=${IP_LINUX_VPP1_TAP1}    prefix=${PREFIX}
    54  
    55  Check VPP1_TAP1 Interface Is Created
    56      ${interfaces}=       vat_term: Interfaces Dump    node=agent_vpp_1
    57      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vpp_term: Interface Is Created    node=agent_vpp_1    mac=${MAC_VPP1_TAP1}
    58      ${actual_state}=    vpp_term: Check TAPv2 interface State    agent_vpp_1    ${NAME_VPP1_TAP1}    mac=${MAC_VPP1_TAP1}    ipv6=${IP_VPP1_TAP1}/${PREFIX}    state=${UP_STATE}
    59  
    60  Check Ping Between VPP1 and linux_VPP1_TAP1 Interface
    61      linux: Check Ping    node=agent_vpp_1    ip=${IP_VPP1_TAP1}
    62      vpp_term: Check Ping    node=agent_vpp_1    ip=${IP_LINUX_VPP1_TAP1}
    63  
    64  Add VPP1_memif1 Interface
    65      vpp_term: Interface Not Exists    node=agent_vpp_1    mac=${MAC_VPP1_MEMIF1}
    66      Put Memif Interface With IP    node=agent_vpp_1    name=${NAME_VPP1_MEMIF1}    mac=${MAC_VPP1_MEMIF1}    master=true    id=1    ip=${IP_VPP1_MEMIF1}    prefix=24    socket=memif.sock
    67      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vpp_term: Interface Is Created    node=agent_vpp_1    mac=${MAC_VPP1_MEMIF1}
    68  
    69  Add VPP2_TAP1 Interface
    70      vpp_term: Interface Not Exists  node=agent_vpp_2    mac=${MAC_VPP2_TAP1}
    71      Put TAPv2 Interface With IP    node=agent_vpp_2    name=${NAME_VPP2_TAP1}    mac=${MAC_VPP2_TAP1}    ip=${IP_VPP2_TAP1}    prefix=${PREFIX}    host_if_name=linux_${NAME_VPP2_TAP1}
    72      linux: Set Host TAP Interface    node=agent_vpp_2    host_if_name=linux_${NAME_VPP2_TAP1}    ip=${IP_LINUX_VPP2_TAP1}    prefix=${PREFIX}
    73  
    74  Check VPP2_TAP1 Interface Is Created
    75      ${interfaces}=       vat_term: Interfaces Dump    node=agent_vpp_1
    76      vpp_term: Interface Is Created    node=agent_vpp_2    mac=${MAC_VPP2_TAP1}
    77      ${actual_state}=    vpp_term: Check TAPv2 interface State    agent_vpp_2    ${NAME_VPP2_TAP1}    mac=${MAC_VPP2_TAP1}    ipv6=${IP_VPP2_TAP1}/${PREFIX}    state=${UP_STATE}
    78  
    79  Check Ping Between VPP2 And linux_VPP2_TAP1 Interface
    80      linux: Check Ping    node=agent_vpp_2    ip=${IP_VPP2_TAP1}
    81      vpp_term: Check Ping    node=agent_vpp_2    ip=${IP_LINUX_VPP2_TAP1}
    82  
    83  Add VPP2_memif1 Interface
    84      vpp_term: Interface Not Exists    node=agent_vpp_2    mac=${MAC_VPP2_MEMIF1}
    85      Put Memif Interface With IP    node=agent_vpp_2    name=${NAME_VPP2_MEMIF1}    mac=${MAC_VPP2_MEMIF1}    master=false    id=1    ip=${IP_VPP2_MEMIF1}    prefix=24    socket=memif.sock
    86      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vpp_term: Interface Is Created    node=agent_vpp_1    mac=${MAC_VPP1_MEMIF1}
    87  
    88  Check Ping From VPP1 To VPP2_memif1
    89      vpp_term: Check Ping    node=agent_vpp_1    ip=${IP_VPP2_MEMIF1}
    90  
    91  Check Ping From VPP2 To VPP1_memif1
    92      vpp_term: Check Ping    node=agent_vpp_2    ip=${IP_VPP1_MEMIF1}
    93  
    94  Ping From VPP1 Linux To VPP2_TAP1 And LINUX_VPP2_TAP1 Should Not Pass
    95      ${status1}=    Run Keyword And Return Status    linux: Check Ping    node=agent_vpp_1    ip=${IP_VPP2_TAP1}
    96      ${status2}=    Run Keyword And Return Status    linux: Check Ping    node=agent_vpp_1    ip=${IP_LINUX_VPP2_TAP1}
    97      Should Be Equal As Strings    ${status1}    False
    98      Should Be Equal As Strings    ${status2}    False
    99  
   100  Ping From VPP2 Linux To VPP1_TAP1 And LINUX_VPP1_TAP1 Should Not Pass
   101      ${status1}=    Run Keyword And Return Status    linux: Check Ping    node=agent_vpp_2    ip=${IP_VPP1_TAP1}
   102      ${status2}=    Run Keyword And Return Status    linux: Check Ping    node=agent_vpp_2    ip=${IP_LINUX_VPP1_TAP1}
   103      Should Be Equal As Strings    ${status1}    False
   104      Should Be Equal As Strings    ${status2}    False
   105  
   106  Add Static Route From VPP1 Linux To VPP2
   107      linux: Add Route    node=agent_vpp_1    destination_ip=${IP_VPP2_TAP1_NETWORK}    prefix=${PREFIX}    next_hop_ip=${IP_VPP1_TAP1}
   108  
   109  Add Static Route From VPP1 To VPP2
   110      Create Route On agent_vpp_1 With IP 20.20.1.0/24 With Next Hop 192.168.1.2 And Vrf Id 0
   111  
   112  Add Static Route From VPP2 Linux To VPP1
   113      linux: Add Route    node=agent_vpp_2    destination_ip=${IP_VPP1_TAP1_NETWORK}    prefix=${PREFIX}    next_hop_ip=${IP_VPP2_TAP1}
   114  
   115  Add Static Route From VPP2 To VPP1
   116      Create Route On agent_vpp_2 With IP 10.10.1.0/24 With Next Hop 192.168.1.1 And Vrf Id 0
   117  
   118  Check Ping From VPP1 Linux To VPP2_TAP1 And LINUX_VPP2_TAP1
   119      linux: Check Ping    node=agent_vpp_1    ip=${IP_VPP2_TAP1}
   120      linux: Check Ping    node=agent_vpp_1    ip=${IP_LINUX_VPP2_TAP1}
   121  
   122  Check Ping From VPP2 Linux To VPP1_TAP1 And LINUX_VPP1_TAP1
   123      linux: Check Ping    node=agent_vpp_2    ip=${IP_VPP1_TAP1}
   124      linux: Check Ping    node=agent_vpp_2    ip=${IP_LINUX_VPP1_TAP1}
   125  
   126  Remove VPP Nodes
   127      Remove All Nodes
   128      Sleep    ${SYNC_SLEEP}
   129  
   130  Start VPP1 And VPP2 Again
   131      Add Agent VPP Node    agent_vpp_1
   132      Add Agent VPP Node    agent_vpp_2
   133      Sleep    ${RESYNC_WAIT}
   134  
   135  Create linux_VPP1_TAP1 And linux_VPP2_TAP1 Interfaces After Resync
   136      linux: Set Host TAP Interface    node=agent_vpp_1    host_if_name=linux_${NAME_VPP1_TAP1}    ip=${IP_LINUX_VPP1_TAP1}    prefix=${PREFIX}
   137      linux: Set Host TAP Interface    node=agent_vpp_2    host_if_name=linux_${NAME_VPP2_TAP1}    ip=${IP_LINUX_VPP2_TAP1}    prefix=${PREFIX}
   138  
   139  Check Linux Interfaces On VPP1 After Resync
   140      ${out}=    Execute In Container    agent_vpp_1    ip a
   141      Should Contain    ${out}    linux_${NAME_VPP1_TAP1}
   142  
   143  Check Interfaces On VPP1 After Resync
   144      ${out}=    vpp_term: Show Interfaces    agent_vpp_1
   145      ${int}=    Get Interface Internal Name    node=agent_vpp_1    interface=${NAME_VPP1_MEMIF1}
   146      Should Contain    ${out}    ${int}
   147      ${int}=    Get Interface Internal Name    node=agent_vpp_1    interface=${NAME_VPP1_TAP1}
   148      Should Contain    ${out}    ${int}
   149  
   150  Check Linux Interfaces On VPP2 After Resync
   151      ${out}=    Execute In Container    agent_vpp_2    ip a
   152      Should Contain    ${out}    linux_${NAME_VPP2_TAP1}
   153  
   154  Check Interfaces On VPP2 After Resync
   155      ${out}=    vpp_term: Show Interfaces    agent_vpp_2
   156      ${int}=    Get Interface Internal Name    node=agent_vpp_2    interface=${NAME_VPP2_MEMIF1}
   157      Should Contain    ${out}    ${int}
   158      ${int}=    Get Interface Internal Name    node=agent_vpp_2    interface=${NAME_VPP2_TAP1}
   159      Should Contain    ${out}    ${int}
   160  
   161  Add Static Route From VPP1 Linux To VPP2 After Resync
   162      linux: Add Route    node=agent_vpp_1    destination_ip=${IP_VPP2_TAP1_NETWORK}    prefix=${PREFIX}    next_hop_ip=${IP_VPP1_TAP1}
   163  
   164  Add Static Route From VPP2 Linux To VPP1 After Resync
   165      linux: Add Route    node=agent_vpp_2    destination_ip=${IP_VPP1_TAP1_NETWORK}    prefix=${PREFIX}    next_hop_ip=${IP_VPP2_TAP1}
   166  
   167  Check Ping From VPP1 Linux To VPP2_TAP1 And LINUX_VPP2_TAP1 After Resync
   168      linux: Check Ping    node=agent_vpp_1    ip=${IP_VPP2_TAP1}
   169      linux: Check Ping    node=agent_vpp_1    ip=${IP_LINUX_VPP2_TAP1}
   170  
   171  Check Ping From VPP2 Linux To VPP1_TAP1 And LINUX_VPP1_TAP1 After Resync
   172      linux: Check Ping    node=agent_vpp_2    ip=${IP_VPP1_TAP1}
   173      linux: Check Ping    node=agent_vpp_2    ip=${IP_LINUX_VPP1_TAP1}
   174  
   175  #*** Keywords ***