go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/misc/etcd_clear.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        misc    ExpectedFailure
    13  Suite Setup       Testsuite Setup
    14  Suite Teardown    Testsuite Teardown
    15  Test Setup        TestSetup
    16  Test Teardown     TestTeardown
    17  *** Variables ***
    18  ${VARIABLES}=          common
    19  ${ENV}=                common
    20  ${CONFIG_SLEEP}=       1s
    21  ${RESYNC_SLEEP}=       1s
    22  ${SYNC_SLEEP}=         10s
    23  # wait for resync vpps after restart
    24  ${RESYNC_WAIT}=        20s
    25  
    26  *** Test Cases ***
    27  Configure Environment
    28      [Tags]    setup
    29      Add Agent VPP Node    agent_vpp_1
    30  
    31  
    32  Show Interfaces Before Setup
    33      vpp_term: Show Interfaces    agent_vpp_1
    34      vpp_term: Show Interfaces    agent_vpp_2
    35  
    36  Setup Interfaces
    37      Put Veth Interface Via Linux Plugin    node=agent_vpp_1    namespace=ns1    name=ns1_veth1    host_if_name=ns1_veth1_linux    mac=d2:74:8c:12:67:d2    peer=ns2_veth2    ip=192.168.22.1    prefix=30
    38      Put Veth Interface Via Linux Plugin    node=agent_vpp_1    namespace=ns2    name=ns2_veth2    host_if_name=ns2_veth2_linux    mac=92:c7:42:67:ab:cd    peer=ns1_veth1    ip=192.168.22.2    prefix=30
    39  
    40      Put Afpacket Interface    node=agent_vpp_1    name=vpp1_afpacket1    mac=a2:a1:a1:a1:a1:a1    host_int=vpp1_veth2
    41      @{ints}=    Create List    vpp1_vxlan1    vpp1_afpacket1
    42      Put Bridge Domain    node=agent_vpp_1    name=vpp1_bd1    ints=${ints}
    43  
    44      Sleep    ${SYNC_SLEEP}
    45  
    46  Check Linux Interfaces On VPP1
    47      ${out}=    Execute In Container    agent_vpp_1    ip a
    48      Should Contain    ${out}    vpp1_veth2@vpp1_veth1
    49      Should Contain    ${out}    vpp1_veth1@vpp1_veth2
    50      Should Contain    ${out}    linux_vpp1_tap1
    51  
    52  Check Interfaces On VPP1
    53      ${out}=    vpp_term: Show Interfaces    agent_vpp_1
    54      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_memif1
    55      Should Contain    ${out}    ${int}
    56      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_afpacket1
    57      Should Contain    ${out}    ${int}
    58      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_vxlan1
    59      Should Contain    ${out}    ${int}
    60      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_loop1
    61      Should Contain    ${out}    ${int}
    62      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_tap1
    63      Should Contain    ${out}    ${int}
    64  
    65  Check Linux Interfaces On VPP2
    66      ${out}=    Execute In Container    agent_vpp_2    ip a
    67      Should Contain    ${out}    vpp2_veth2@vpp2_veth1
    68      Should Contain    ${out}    vpp2_veth1@vpp2_veth2
    69      Should Contain    ${out}    linux_vpp2_tap1            
    70  
    71  Check Interfaces On VPP2
    72      ${out}=    vpp_term: Show Interfaces    agent_vpp_2
    73      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_memif1
    74      Should Contain    ${out}    ${int}
    75      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_afpacket1
    76      Should Contain    ${out}    ${int}
    77      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_vxlan1
    78      Should Contain    ${out}    ${int}
    79      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_loop1
    80      Should Contain    ${out}    ${int}
    81      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_tap1
    82      Should Contain    ${out}    ${int}
    83  
    84  Check Bridge Domain On VPP1 Is Created
    85      vat_term: BD Is Created    agent_vpp_1    vpp1_vxlan1    vpp1_afpacket1
    86  
    87  Check Bridge Domain On VPP2 Is Created
    88      vat_term: BD Is Created    agent_vpp_2    vpp2_vxlan1    vpp2_afpacket1
    89  
    90  Show Interfaces And Other Objects After Config
    91      vpp_term: Show Interfaces    agent_vpp_1
    92      vpp_term: Show Interfaces    agent_vpp_2            
    93      Write To Machine    agent_vpp_1_term    show int addr
    94      Write To Machine    agent_vpp_2_term    show int addr
    95      Write To Machine    agent_vpp_1_term    show h
    96      Write To Machine    agent_vpp_2_term    show h
    97      Write To Machine    agent_vpp_1_term    show br
    98      Write To Machine    agent_vpp_2_term    show br
    99      Write To Machine    agent_vpp_1_term    show br 1 detail
   100      Write To Machine    agent_vpp_2_term    show br 1 detail
   101      Write To Machine    agent_vpp_1_term    show vxlan tunnel
   102      Write To Machine    agent_vpp_2_term    show vxlan tunnel
   103      Write To Machine    agent_vpp_1_term    show err     
   104      Write To Machine    agent_vpp_2_term    show err     
   105      vat_term: Interfaces Dump    agent_vpp_1
   106      vat_term: Interfaces Dump    agent_vpp_2
   107      Execute In Container    agent_vpp_1    ip a
   108      Execute In Container    agent_vpp_2    ip a
   109  
   110  Check Ping From VPP1 to VPP2
   111      linux: Check Ping    agent_vpp_1    10.10.1.2
   112  
   113  Check Ping From VPP2 to VPP1
   114      linux: Check Ping    agent_vpp_2    10.10.1.1
   115  
   116  Config Done
   117      No Operation
   118  
   119  
   120  Remove VPP Nodes
   121      Remove All Nodes
   122      Sleep    ${SYNC_SLEEP}
   123  
   124  Start VPP1 And VPP2 Again
   125      Add Agent VPP Node    agent_vpp_1
   126      Add Agent VPP Node    agent_vpp_2
   127      Sleep    ${RESYNC_WAIT}
   128  
   129  Check Linux Interfaces On VPP1 After Resync
   130      ${out}=    Execute In Container    agent_vpp_1    ip a
   131      Should Contain    ${out}    vpp1_veth2@vpp1_veth1
   132      Should Contain    ${out}    vpp1_veth1@vpp1_veth2
   133      Should Contain    ${out}    linux_vpp1_tap1
   134  
   135  Check Interfaces On VPP1 After Resync
   136      ${out}=    vpp_term: Show Interfaces    agent_vpp_1
   137      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_memif1
   138      Should Contain    ${out}    ${int}
   139      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_afpacket1
   140      Should Contain    ${out}    ${int}
   141      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_vxlan1
   142      Should Contain    ${out}    ${int}
   143      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_loop1
   144      Should Contain    ${out}    ${int}
   145      ${int}=    Get Interface Internal Name    agent_vpp_1    vpp1_tap1
   146      Should Contain    ${out}    ${int}
   147  
   148  Check Linux Interfaces On VPP2 After Resync
   149      ${out}=    Execute In Container    agent_vpp_2    ip a
   150      Should Contain    ${out}    vpp2_veth2@vpp2_veth1
   151      Should Contain    ${out}    vpp2_veth1@vpp2_veth2
   152      Should Contain    ${out}    linux_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    agent_vpp_2    vpp2_memif1
   157      Should Contain    ${out}    ${int}
   158      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_afpacket1
   159      Should Contain    ${out}    ${int}
   160      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_vxlan1
   161      Should Contain    ${out}    ${int}
   162      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_loop1
   163      Should Contain    ${out}    ${int}
   164      ${int}=    Get Interface Internal Name    agent_vpp_2    vpp2_tap1
   165      Should Contain    ${out}    ${int}
   166  
   167  Check Bridge Domain On VPP1 Is Created After Resync
   168      vat_term: BD Is Created    agent_vpp_1    vpp1_vxlan1    vpp1_afpacket1
   169  
   170  Check Bridge Domain On VPP2 Is Created After Resync
   171      vat_term: BD Is Created    agent_vpp_2    vpp2_vxlan1    vpp2_afpacket1
   172  
   173  Show Interfaces And Other Objects After Resync
   174      vpp_term: Show Interfaces    agent_vpp_1
   175      vpp_term: Show Interfaces    agent_vpp_2  
   176      Write To Machine    agent_vpp_1_term    show int addr
   177      Write To Machine    agent_vpp_2_term    show int addr
   178      Write To Machine    agent_vpp_1_term    show h
   179      Write To Machine    agent_vpp_2_term    show h
   180      Write To Machine    agent_vpp_1_term    show br
   181      Write To Machine    agent_vpp_2_term    show br
   182      Write To Machine    agent_vpp_1_term    show br 1 detail
   183      Write To Machine    agent_vpp_2_term    show br 1 detail
   184      Write To Machine    agent_vpp_1_term    show vxlan tunnel
   185      Write To Machine    agent_vpp_2_term    show vxlan tunnel
   186      Write To Machine    agent_vpp_1_term    show err
   187      Write To Machine    agent_vpp_2_term    show err
   188      vat_term: Interfaces Dump    agent_vpp_1
   189      vat_term: Interfaces Dump    agent_vpp_2
   190      Execute In Container    agent_vpp_1    ip a
   191      Execute In Container    agent_vpp_2    ip a
   192      Sleep    ${SYNC_SLEEP}
   193  Check Ping From VPP1 to VPP2 After Resync
   194      linux: Check Ping    agent_vpp_1    10.10.1.2
   195  
   196  Check Ping From VPP2 to VPP1 After Resync
   197      linux: Check Ping    agent_vpp_2    10.10.1.1
   198  
   199  Remove VPP Nodes 2
   200      Remove All Nodes
   201      Sleep    ${SYNC_SLEEP}
   202  
   203  Start VPP1 And VPP2 Again 2
   204      Add Agent VPP Node    agent_vpp_1
   205      Add Agent VPP Node    agent_vpp_2
   206      Sleep    ${RESYNC_WAIT}
   207  
   208  Check Ping From VPP1 to VPP2 After Resync 2
   209      linux: Check Ping    agent_vpp_1    10.10.1.2
   210  
   211  Check Ping From VPP2 to VPP1 After Resync 2
   212      linux: Check Ping    agent_vpp_2    10.10.1.1
   213  
   214  Remove VPP Nodes 3
   215      Remove All Nodes
   216      Sleep    ${SYNC_SLEEP}
   217  
   218  Start VPP1 And VPP2 Again 3
   219      Add Agent VPP Node    agent_vpp_1
   220      Add Agent VPP Node    agent_vpp_2
   221      Sleep    ${RESYNC_WAIT}
   222  
   223  Check Ping From VPP1 to VPP2 After Resync 3
   224      linux: Check Ping    agent_vpp_1    10.10.1.2
   225  
   226  Check Ping From VPP2 to VPP1 After Resync 3
   227      linux: Check Ping    agent_vpp_2    10.10.1.1
   228  
   229  
   230  Resync Done
   231      No Operation
   232  
   233  Final Sleep After Resync For Manual Checking
   234      Sleep   ${RESYNC_SLEEP}
   235  
   236  
   237  *** Keywords ***
   238  TestSetup
   239      Make Datastore Snapshots    ${TEST_NAME}_test_setup
   240  
   241  TestTeardown
   242      Make Datastore Snapshots    ${TEST_NAME}_test_teardown