go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/crudIPv6/loopback_crudIPv6.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/vpp_api.robot
    10  Resource     ../../libraries/vpp_term.robot
    11  Resource     ../../libraries/docker.robot
    12  Resource     ../../libraries/setup-teardown.robot
    13  Resource     ../../libraries/configurations.robot
    14  Resource     ../../libraries/etcdctl.robot
    15  Resource     ../../libraries/linux.robot
    16  
    17  Resource     ../../libraries/interface/loopback.robot
    18  Resource     ../../libraries/interface/interface_generic.robot
    19  
    20  Force Tags        crud     IPv6
    21  Suite Setup       Testsuite Setup
    22  Suite Teardown    Testsuite Teardown
    23  Test Setup        TestSetup
    24  Test Teardown     TestTeardown
    25  
    26  *** Variables ***
    27  ${VARIABLES}=       common
    28  ${ENV}=             common
    29  ${NAME_LOOP1}=      vpp1_loop1
    30  ${NAME_LOOP2}=      vpp1_loop2
    31  ${MAC_LOOP1}=       12:21:21:11:11:11
    32  ${MAC_LOOP1_2}=     22:21:21:11:11:11
    33  ${MAC_LOOP2}=       32:21:21:11:11:11
    34  ${IP_LOOP1}=        fd30::1:e:0:0:1
    35  ${IP_LOOP1_2}=      fd30::1:e:0:0:2
    36  ${IP_LOOP2}=        fd31::1:e:0:0:1
    37  ${PREFIX}=          64
    38  ${MTU}=             4800
    39  ${WAIT_TIMEOUT}=     20s
    40  ${SYNC_SLEEP}=       3s
    41  
    42  *** Test Cases ***
    43  Configure Environment
    44      [Tags]    setup
    45      Configure Environment 1
    46  
    47  Show Interfaces Before Setup
    48      vpp_term: Show Interfaces    agent_vpp_1
    49  
    50  Add Loopback1 Interface
    51      vpp_term: Interface Not Exists  node=agent_vpp_1    mac=${MAC_LOOP1}
    52      Put Loopback Interface With IP    node=agent_vpp_1    name=${NAME_LOOP1}
    53      ...    mac=${MAC_LOOP1}    ip=${IP_LOOP1}    prefix=${PREFIX}    mtu=${MTU}    enabled=true
    54  
    55  Check Loopback1 Is Created
    56      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    57      ...    vpp_term: Interface Is Created    node=agent_vpp_1    mac=${MAC_LOOP1}
    58      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    59      ...    vpp_api: Check Loopback Interface State    agent_vpp_1    ${NAME_LOOP1}
    60      ...    enabled=1     mac=${MAC_LOOP1}    mtu=${MTU}  ipv6=${IP_LOOP1}/${PREFIX}
    61  
    62  Add Loopback2 Interface
    63      vpp_term: Interface Not Exists  node=agent_vpp_1    mac=${MAC_LOOP2}
    64      Put Loopback Interface With IP    node=agent_vpp_1     name=${NAME_LOOP2}
    65      ...    mac=${MAC_LOOP2}    ip=${IP_LOOP2}    prefix=${PREFIX}    mtu=${MTU}    enabled=true
    66  
    67  Check Loopback2 Is Created
    68      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    69      ...    vpp_term: Interface Is Created    node=agent_vpp_1    mac=${MAC_LOOP2}
    70      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    71      ...    vpp_api: Check Loopback Interface State    agent_vpp_1    ${NAME_LOOP2}
    72      ...    enabled=1     mac=${MAC_LOOP2}    mtu=${MTU}    ipv6=${IP_LOOP2}/${PREFIX}
    73  
    74  Check Loopback1 Is Still Configured
    75      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    76      ...    vpp_api: Check Loopback Interface State    agent_vpp_1    ${NAME_LOOP1}
    77      ...    enabled=1     mac=${MAC_LOOP1}    mtu=${MTU}         ipv6=${IP_LOOP1}/${PREFIX}
    78  
    79  Update Loopback1
    80      Put Loopback Interface With IP    node=agent_vpp_1     name=${NAME_LOOP1}
    81      ...    mac=${MAC_LOOP1_2}    ip=${IP_LOOP1_2}    prefix=${PREFIX}    mtu=${MTU}    enabled=true
    82      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    83      ...    vpp_term: Interface Is Deleted    node=agent_vpp_1    mac=${MAC_LOOP1}
    84      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    85      ...    vpp_term: Interface Is Created    node=agent_vpp_1    mac=${MAC_LOOP1_2}
    86      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    87      ...    vpp_api: Check Loopback Interface State    agent_vpp_1    ${NAME_LOOP1}
    88      ...    enabled=1     mac=${MAC_LOOP1_2}    mtu=${MTU}    ipv6=${IP_LOOP1_2}/${PREFIX}
    89  
    90  Check Loopback2 Is Not Changed
    91      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    92      ...    vpp_api: Check Loopback Interface State    agent_vpp_1    ${NAME_LOOP2}
    93      ...    enabled=1     mac=${MAC_LOOP2}    mtu=${MTU}         ipv6=${IP_LOOP2}/${PREFIX}
    94  
    95  Delete Loopback1_2 Interface
    96      Delete VPP Interface    node=agent_vpp_1    name=${NAME_LOOP1}
    97      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
    98      ...    vpp_term: Interface Is Deleted    node=agent_vpp_1    mac=${MAC_LOOP1_2}
    99  
   100  Check Loopback2 Interface Is Still Configured
   101      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}
   102      ...    vpp_api: Check Loopback Interface State    agent_vpp_1    ${NAME_LOOP2}
   103      ...    enabled=1     mac=${MAC_LOOP2}    mtu=${MTU}         ipv6=${IP_LOOP2}/${PREFIX}
   104  
   105  Show Interfaces And Other Objects After Setup
   106      vpp_term: Show Interfaces    agent_vpp_1
   107      Write To Machine    agent_vpp_1_term    show int addr
   108      Write To Machine    agent_vpp_1_term    show h
   109      Write To Machine    agent_vpp_1_term    show br
   110      Write To Machine    agent_vpp_1_term    show br 1 detail
   111      Write To Machine    agent_vpp_1_term    show err
   112      vpp_api: Interfaces Dump    agent_vpp_1
   113      Execute In Container    agent_vpp_1    ip a
   114  
   115  *** Keywords ***
   116  TestSetup
   117      Make Datastore Snapshots    ${TEST_NAME}_test_setup
   118  
   119  TestTeardown
   120      Make Datastore Snapshots    ${TEST_NAME}_test_teardown