go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/traffic/physical_int_traffic/physical_int_traffic.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  
     9  Resource     ../../../libraries/all_libs.robot
    10  Resource     ../../libraries/interface/vxlan.robot
    11  
    12  Force Tags        traffic     IPv4    ExpectedFailure
    13  Suite Setup       Testsuite Setup
    14  Suite Teardown    Testsuite Teardown
    15  
    16  *** Variables ***
    17  ${VARIABLES}=          common
    18  ${ENV}=                common
    19  ${WAIT_TIMEOUT}=     20s
    20  ${SYNC_SLEEP}=       3s
    21  ${RESYNC_SLEEP}=       1s
    22  # wait for resync vpps after restart
    23  ${RESYNC_WAIT}=        30s
    24  
    25  *** Test Cases ***
    26  Configure Environment
    27      [Tags]    setup
    28      ${phys_ints}=    Create List    1
    29      Add Agent VPP Node With Physical Int    agent_vpp_1    ${phys_ints}
    30      ${phys_ints}=    Create List    2
    31      Add Agent VPP Node With Physical Int    agent_vpp_2    ${phys_ints}
    32  
    33  Show Interfaces Before Setup
    34      vpp_term: Show Interfaces    agent_vpp_1
    35      vpp_term: Show Interfaces    agent_vpp_2
    36  
    37  Setup Interfaces
    38      Put Physical Interface With IP    node=agent_vpp_1    name=GigabitEthernet0/9/0    ip=192.168.1.1
    39  #    Put Memif Interface With IP    node=agent_vpp_1    name=vpp1_memif1    mac=62:61:61:61:61:61    master=true    id=1    ip=192.168.1.1
    40  ##    Put Veth Interface With IP    node=agent_vpp_1    name=vpp1_veth1    mac=12:11:11:11:11:11    peer=vpp1_veth2    ip=10.10.1.1
    41  ##    Put Veth Interface    node=agent_vpp_1    name=vpp1_veth2    mac=12:12:12:12:12:12    peer=vpp1_veth1
    42  ##    Put Afpacket Interface    node=agent_vpp_1    name=vpp1_afpacket1    mac=a2:a1:a1:a1:a1:a1    host_int=vpp1_veth2
    43  ##    Put VXLan Interface    node=agent_vpp_1    name=vpp1_vxlan1    src=192.168.1.1    dst=192.168.1.2    vni=5
    44  ##    @{ints}=    Create List    vpp1_vxlan1    vpp1_afpacket1
    45  ##    Put Bridge Domain    node=agent_vpp_1    name=vpp1_bd1    ints=${ints}
    46  ##    Put Loopback Interface With IP    node=agent_vpp_1    name=vpp1_loop1    mac=12:21:21:11:11:11    ip=20.20.1.1
    47  ##    Put TAP Interface With IP    node=agent_vpp_1    name=vpp1_tap1    mac=32:21:21:11:11:11    ip=30.30.1.1    host_if_name=linux_vpp1_tap1
    48  
    49      Put Physical Interface With IP    node=agent_vpp_2    name=GigabitEthernet0/a/0    ip=192.168.1.2
    50  #    Put Memif Interface With IP    node=agent_vpp_2    name=vpp2_memif1    mac=62:62:62:62:62:62    master=false    id=1    ip=192.168.1.2
    51      Put Veth Interface With IP    node=agent_vpp_2    name=vpp2_veth1    mac=22:21:21:21:21:21    peer=vpp2_veth2    ip=10.10.1.2
    52      Put Veth Interface    node=agent_vpp_2    name=vpp2_veth2    mac=22:22:22:22:22:22    peer=vpp2_veth1
    53      Put Afpacket Interface    node=agent_vpp_2    name=vpp2_afpacket1    mac=a2:a2:a2:a2:a2:a2    host_int=vpp2_veth2
    54      Put VXLan Interface    node=agent_vpp_2    name=vpp2_vxlan1    src=192.168.1.2    dst=192.168.1.1    vni=5
    55      @{ints}=    Create List    vpp2_vxlan1    vpp2_afpacket1
    56      Put Bridge Domain    node=agent_vpp_2    name=vpp2_bd1    ints=${ints}
    57      Put Loopback Interface With IP    node=agent_vpp_2    name=vpp2_loop1    mac=22:21:21:11:11:11    ip=20.20.1.2
    58      Put TAPv2 Interface With IP    node=agent_vpp_2    name=vpp2_tap1    mac=32:22:22:11:11:11    ip=30.30.1.2    host_if_name=linux_vpp2_tap1
    59   
    60  Check Linux Interfaces On VPP1
    61      ${out}=    Execute In Container    agent_vpp_1    ip a
    62      Should Contain    ${out}    vpp1_veth2@vpp1_veth1
    63      Should Contain    ${out}    vpp1_veth1@vpp1_veth2
    64      Should Contain    ${out}    linux_vpp1_tap1
    65  
    66  Check Interfaces On VPP1
    67      ${out}=    vpp_term: Show Interfaces    agent_vpp_1
    68  #    ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_memif1
    69  #    Should Contain    ${out}    ${int}
    70      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_afpacket1
    71      Should Contain    ${out}    ${int}
    72      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_vxlan1
    73      Should Contain    ${out}    ${int}
    74      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_loop1
    75      Should Contain    ${out}    ${int}
    76      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_tap1
    77      Should Contain    ${out}    ${int}
    78      ${int}=    Get Interface Internal Name    agent_vpp_1    GigabitEthernet0/9/0
    79      Should Contain    ${out}    ${int}
    80  
    81  Check Linux Interfaces On VPP2
    82      ${out}=    Execute In Container    agent_vpp_2    ip a
    83      Should Contain    ${out}    vpp2_veth2@vpp2_veth1
    84      Should Contain    ${out}    vpp2_veth1@vpp2_veth2
    85      Should Contain    ${out}    linux_vpp2_tap1            
    86  
    87  Check Interfaces On VPP2
    88      ${out}=    vpp_term: Show Interfaces    agent_vpp_2
    89  #   ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_memif1
    90  #    Should Contain    ${out}    ${int}
    91      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_afpacket1
    92      Should Contain    ${out}    ${int}
    93      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_vxlan1
    94      Should Contain    ${out}    ${int}
    95      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_loop1
    96      Should Contain    ${out}    ${int}
    97      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_tap1
    98      Should Contain    ${out}    ${int}
    99      ${int}=    Get Interface Internal Name    agent_vpp_2    GigabitEthernet0/a/0
   100      Should Contain    ${out}    ${int}
   101  
   102  Show Interfaces And Other Objects After Config
   103      vpp_term: Show Interfaces    agent_vpp_1
   104      vpp_term: Show Interfaces    agent_vpp_2            
   105      Write To Machine    agent_vpp_1_term    show int addr
   106      Write To Machine    agent_vpp_2_term    show int addr
   107      Write To Machine    agent_vpp_1_term    show h
   108      Write To Machine    agent_vpp_2_term    show h
   109      Write To Machine    agent_vpp_1_term    show br
   110      Write To Machine    agent_vpp_2_term    show br
   111      Write To Machine    agent_vpp_1_term    show br 1 detail
   112      Write To Machine    agent_vpp_2_term    show br 1 detail
   113      Write To Machine    agent_vpp_1_term    show vxlan tunnel
   114      Write To Machine    agent_vpp_2_term    show vxlan tunnel
   115      Write To Machine    agent_vpp_1_term    show err     
   116      Write To Machine    agent_vpp_2_term    show err     
   117      vat_term: Interfaces Dump    agent_vpp_1
   118      vat_term: Interfaces Dump    agent_vpp_2
   119      Execute In Container    agent_vpp_1    ip a
   120      Execute In Container    agent_vpp_2    ip a
   121  
   122  Check Ping From VPP1 to VPP2
   123      linux: Check Ping    agent_vpp_1    10.10.1.2
   124  
   125  Check Ping From VPP2 to VPP1
   126      linux: Check Ping    agent_vpp_2    10.10.1.1
   127  
   128  fdsasdf
   129  #    Delete VPP Interface    node=agent_vpp_1    name=${DOCKER_PHYSICAL_INT_1_VPP_NAME}
   130  #    Delete VPP Interface    node=agent_vpp_2    name=${DOCKER_PHYSICAL_INT_2_VPP_NAME}
   131      sleep    5
   132      vpp_term: Show Interfaces    agent_vpp_1
   133      vpp_term: Show Interfaces    agent_vpp_2
   134      Write To Machine    agent_vpp_1_term    show int addr
   135      Write To Machine    agent_vpp_2_term    show int addr
   136  
   137  
   138  Config Done
   139      No Operation
   140  
   141  Final Sleep After Config For Manual Checking
   142      Sleep   ${CONFIG_SLEEP}
   143  
   144  Remove VPP Nodes
   145      Remove All Nodes
   146  
   147  Start VPP1 And VPP2 Again
   148      ${phys_ints}=    Create List    1
   149      Add Agent VPP Node With Physical Int    agent_vpp_1    ${phys_ints}
   150      ${phys_ints}=    Create List    2
   151      Add Agent VPP Node With Physical Int    agent_vpp_2    ${phys_ints}
   152      Sleep    ${RESYNC_WAIT}
   153  
   154  Show Interfaces And Other Objects After Resync
   155      vpp_term: Show Interfaces    agent_vpp_1
   156      vpp_term: Show Interfaces    agent_vpp_2  
   157      Write To Machine    agent_vpp_1_term    show int addr
   158      Write To Machine    agent_vpp_2_term    show int addr
   159      Write To Machine    agent_vpp_1_term    show h
   160      Write To Machine    agent_vpp_2_term    show h
   161      Write To Machine    agent_vpp_1_term    show br
   162      Write To Machine    agent_vpp_2_term    show br
   163      Write To Machine    agent_vpp_1_term    show br 1 detail
   164      Write To Machine    agent_vpp_2_term    show br 1 detail
   165      Write To Machine    agent_vpp_1_term    show vxlan tunnel
   166      Write To Machine    agent_vpp_2_term    show vxlan tunnel
   167      Write To Machine    agent_vpp_1_term    show err
   168      Write To Machine    agent_vpp_2_term    show err
   169      vat_term: Interfaces Dump    agent_vpp_1
   170      vat_term: Interfaces Dump    agent_vpp_2
   171      Execute In Container    agent_vpp_1    ip a
   172      Execute In Container    agent_vpp_2    ip a
   173  
   174  Check Ping After Resync From VPP1 to VPP2
   175      linux: Check Ping    agent_vpp_1    10.10.1.2
   176  
   177  Check Ping After Resync From VPP2 to VPP1
   178      linux: Check Ping    agent_vpp_2    10.10.1.1
   179  
   180  asdf
   181      Delete VPP Interface    node=agent_vpp_1    name=${DOCKER_PHYSICAL_INT_1_VPP_NAME}
   182      Delete VPP Interface    node=agent_vpp_2    name=${DOCKER_PHYSICAL_INT_2_VPP_NAME}
   183      sleep    5
   184      vpp_term: Show Interfaces    agent_vpp_1
   185      vpp_term: Show Interfaces    agent_vpp_2
   186      Write To Machine    agent_vpp_1_term    show int addr
   187      Write To Machine    agent_vpp_2_term    show int addr
   188  
   189  
   190  Resync Done
   191      No Operation
   192  
   193  Final Sleep After Resync For Manual Checking
   194      Sleep   ${RESYNC_SLEEP}
   195  
   196  
   197  *** Keywords ***