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

     1  *** Settings ***
     2  
     3  Library     OperatingSystem
     4  Library     String
     5  #Library     RequestsLibrary
     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
    12  Suite Setup       Testsuite Setup
    13  Suite Teardown    Testsuite Teardown
    14  Test Setup        TestSetup
    15  Test Teardown     TestTeardown
    16  
    17  *** Variables ***
    18  ${VARIABLES}=          common
    19  ${ENV}=                common
    20  ${IP_1}=               fd30::1:b:0:0:1
    21  ${IP_2}=               fd30::1:b:0:0:2
    22  ${IP_3}=               fd31::1:b:0:0:1
    23  ${IP_4}=               fd31::1:b:0:0:2
    24  ${NET1}=               fd30:0:0:1::
    25  ${NET2}=               fd31:0:0:1::
    26  ${MAC_LOOP1}=          8a:f1:be:90:00:00
    27  ${MAC_LOOP2}=          8a:f1:be:90:02:00
    28  ${MAC_MEMIF1}=         02:f1:be:90:00:00
    29  ${MAC_MEMIF2}=         02:f1:be:90:02:00
    30  
    31  ${MAC2_LOOP1}=          8a:f1:be:90:00:02
    32  ${MAC3_LOOP1}=          8a:f1:be:90:00:03
    33  ${MAC2_MEMIF1}=         02:f1:be:90:00:02
    34  ${MAC3_MEMIF1}=         02:f1:be:90:00:03
    35  
    36  ${PREFIX}=             64
    37  ${WAIT_TIMEOUT}=     20s
    38  ${SYNC_SLEEP}=       3s
    39  ${SYNC_WAIT}=          25s
    40  *** Test Cases ***
    41  # Default VRF table ...
    42  Start Three Agents
    43  
    44      Add Agent VPP Node    agent_vpp_1
    45      Add Agent VPP Node    agent_vpp_2
    46      Add Agent VPP Node    agent_vpp_3
    47      Sleep    ${SYNC_WAIT}
    48  
    49  Setup Agent1 for agent2
    50      Create loopback interface bvi_loop0 on agent_vpp_1 with ip ${IP_1}/${PREFIX} and mac ${MAC_LOOP1}
    51      Create Master memif0 on agent_vpp_1 with MAC ${MAC_MEMIF1}, key 1 and m0.sock socket
    52      Create bridge domain bd1 With Autolearn on agent_vpp_1 with interfaces bvi_loop0, memif0
    53  
    54  
    55  Check Interfaces on Agent1 for Agent2
    56      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Loopback Interface State    agent_vpp_1    bvi_loop0    enabled=1     mac=${MAC_LOOP1}   ipv6=${IP_1}/${PREFIX}
    57      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Memif Interface State     agent_vpp_1  memif0  mac=${MAC_MEMIF1}  role=master  id=1   connected=0  enabled=1  socket=${AGENT_VPP_1_MEMIF_SOCKET_FOLDER}/m0.sock
    58  
    59  Create BD on Agent1
    60      Create bridge domain bd1 With Autolearn on agent_vpp_1 with interfaces bvi_loop0, memif0
    61  
    62  
    63  Check1 bd1 on Agent1 Is Created
    64      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: BD Is Created    agent_vpp_1   bvi_loop0     memif0
    65      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Bridge Domain State    agent_vpp_1  bd1  flood=1  unicast=1  forward=1  learn=1  arp_term=1  interface=memif0  interface=bvi_loop0
    66  
    67  Check2 Interfaces on Agent1 for Agent2
    68      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Loopback Interface State    agent_vpp_1    bvi_loop0    enabled=1     mac=${MAC_LOOP1}   ipv6=${IP_1}/${PREFIX}
    69      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Memif Interface State     agent_vpp_1  memif0  mac=${MAC_MEMIF1}  role=master  id=1   connected=0  enabled=1  socket=${AGENT_VPP_1_MEMIF_SOCKET_FOLDER}/m0.sock
    70  
    71  Setup Agent1 for Agent3
    72      Create loopback interface bvi_loop1 on agent_vpp_1 with ip ${IP_3}/${PREFIX} and mac ${MAC_LOOP2}
    73      Create Master memif1 on agent_vpp_1 with MAC ${MAC_MEMIF2}, key 2 and m1.sock socket
    74      Create bridge domain bd2 With Autolearn on agent_vpp_1 with interfaces bvi_loop1, memif1
    75  
    76  Check Interfaces on Agent1 for Agent3
    77      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Loopback Interface State    agent_vpp_1    bvi_loop1    enabled=1     mac=${MAC_LOOP2}   ipv6=${IP_3}/${PREFIX}
    78      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Memif Interface State     agent_vpp_1  memif1  mac=${MAC_MEMIF2}  role=master  id=2   connected=0  enabled=1  socket=${AGENT_VPP_1_MEMIF_SOCKET_FOLDER}/m1.sock
    79  
    80  Check bd2 on Agent1 Is Created
    81      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: BD Is Created    agent_vpp_1   bvi_loop1     memif1
    82      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Bridge Domain State    agent_vpp_1  bd2  flood=1  unicast=1  forward=1  learn=1  arp_term=1  interface=memif1  interface=bvi_loop1
    83  
    84  Setup Agent2
    85      Create Loopback Interface bvi_loop0 On agent_vpp_2 With VRF 2, Ip ${IP_2}/${PREFIX} And Mac ${MAC2_LOOP1}
    86      Create Slave memif0 on agent_vpp_2 with MAC ${MAC2_MEMIF1}, key 1 and m0.sock socket
    87      Create bridge domain bd1 With Autolearn on agent_vpp_2 with interfaces bvi_loop0, memif0
    88  
    89  
    90  Check Interfaces on Agent2
    91      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Loopback Interface State    agent_vpp_2    bvi_loop0    enabled=1     mac=${MAC2_LOOP1}   ipv6=${IP_2}/${PREFIX}
    92      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Memif Interface State     agent_vpp_2  memif0  mac=${MAC2_MEMIF1}  role=slave  id=1   connected=1  enabled=1  socket=${AGENT_VPP_2_MEMIF_SOCKET_FOLDER}/m0.sock
    93  
    94  Check bd1 on Agent2 Is Created
    95      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: BD Is Created    agent_vpp_2   bvi_loop0     memif0
    96      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Bridge Domain State    agent_vpp_2  bd1  flood=1  unicast=1  forward=1  learn=1  arp_term=1  interface=memif0  interface=bvi_loop0
    97  
    98  Setup Agent3
    99      Create Loopback Interface bvi_loop0 On agent_vpp_3 With VRF 3, Ip ${IP_4}/${PREFIX} And Mac ${MAC3_LOOP1}
   100      Create Slave memif0 on agent_vpp_3 with MAC ${MAC3_MEMIF1}, key 2 and m1.sock socket
   101      Create bridge domain bd1 With Autolearn on agent_vpp_3 with interfaces bvi_loop0, memif0
   102  
   103  
   104  Check Interfaces on Agent3
   105      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Loopback Interface State    agent_vpp_3    bvi_loop0    enabled=1     mac=${MAC3_LOOP1}   ipv6=${IP_4}/${PREFIX}
   106      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Memif Interface State     agent_vpp_3  memif0  mac=${MAC3_MEMIF1}  role=slave  id=2   connected=1  enabled=1  socket=${AGENT_VPP_3_MEMIF_SOCKET_FOLDER}/m1.sock
   107  
   108  Check bd1 on Agent3 Is Created
   109      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: BD Is Created    agent_vpp_3   bvi_loop0     memif0
   110      Wait Until Keyword Succeeds   ${WAIT_TIMEOUT}   ${SYNC_SLEEP}    vat_term: Check Bridge Domain State    agent_vpp_3  bd1  flood=1  unicast=1  forward=1  learn=1  arp_term=1  interface=memif0  interface=bvi_loop0
   111  
   112  Create Routes
   113      Create Route On agent_vpp_2 With IP ${NET2}/64 With Next Hop ${IP_1} And Vrf Id 2
   114      Create Route On agent_vpp_3 With IP ${NET1}/64 With Next Hop ${IP_3} And Vrf Id 3
   115      Sleep    ${SYNC_WAIT}
   116      Sleep    ${SYNC_WAIT}
   117  
   118  Check Interfaces And FIB
   119      Show Interfaces On agent_vpp_1
   120      Show Interfaces Address On agent_vpp_2
   121      Show IP6 Fib On agent_vpp_2
   122      IP6 Fib Table 2 On agent_vpp_2 Should Contain Route With IP ${NET2}/64
   123      Show Interfaces Address On agent_vpp_3
   124      Show IP6 Fib On agent_vpp_3
   125      IP6 Fib Table 3 On agent_vpp_3 Should Contain Route With IP ${NET1}/64
   126  
   127  Check Pinging
   128      # try ping
   129      Ping6 From agent_vpp_1 To ${IP_2}
   130      Ping6 From agent_vpp_1 To ${IP_4}
   131      #Ping From agent_vpp_2 To ${IP_4}
   132  
   133      ${int}=    Get Interface Internal Name    agent_vpp_2    bvi_loop0
   134      Ping On agent_vpp_2 With IP ${IP_4}, Source ${int}
   135      #Ping From agent_vpp_3 To ${IP_2}
   136      ${int}=    Get Interface Internal Name    agent_vpp_3    bvi_loop0
   137      Ping On agent_vpp_3 With IP ${IP_2}, Source ${int}
   138  
   139  
   140  *** Keywords ***
   141  List of interfaces On ${node} Should Contain Interface ${int}
   142      ${out}=   vpp_term: Show Interfaces    ${node}
   143      Should Match Regexp        ${out}  ${int}
   144  
   145  TestSetup
   146      Make Datastore Snapshots    ${TEST_NAME}_test_setup
   147  
   148  TestTeardown
   149      Make Datastore Snapshots    ${TEST_NAME}_test_teardown