go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/trafficIPv6/ip_route/test4_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  ${SYNC_WAIT}=          25s
    38  *** Test Cases ***
    39  
    40  ## Non default VRF table 2 used in Agent VPP Node agent_vpp_2
    41  ## Non default VRF table 3 used in Agent VPP Node agent_vpp_3
    42  
    43  *** Test Cases ***
    44  # Default VRF table ...
    45  Setup Agent1 for agent2
    46      Create loopback interface bvi_loop0 on agent_vpp_1 with ip ${IP_1}/${PREFIX} and mac ${MAC_LOOP1}
    47      Create Master memif0 on agent_vpp_1 with MAC ${MAC_MEMIF1}, key 1 and m0.sock socket
    48      Create bridge domain bd1 With Autolearn on agent_vpp_1 with interfaces bvi_loop0, memif0
    49  
    50  Setup1 Agent1 for Agent3
    51      Create loopback interface bvi_loop1 on agent_vpp_1 with ip ${IP_3}/${PREFIX} and mac ${MAC_LOOP2}
    52      Create Master memif1 on agent_vpp_1 with MAC ${MAC_MEMIF2}, key 2 and m1.sock socket
    53      Create bridge domain bd2 With Autolearn on agent_vpp_1 with interfaces bvi_loop1, memif1
    54  
    55  Setup Agent2
    56      Create Loopback Interface bvi_loop0 On agent_vpp_2 With VRF 2, Ip ${IP_2}/${PREFIX} And Mac ${MAC2_LOOP1}
    57      Create Slave memif0 on agent_vpp_2 with MAC ${MAC2_MEMIF1}, key 1 and m0.sock socket
    58      Create bridge domain bd1 With Autolearn on agent_vpp_2 with interfaces bvi_loop0, memif0
    59  
    60  Setup Agent3
    61      Create Loopback Interface bvi_loop0 On agent_vpp_3 With VRF 3, Ip ${IP_4}/${PREFIX} And Mac ${MAC3_LOOP1}
    62      Create Slave memif0 on agent_vpp_3 with MAC ${MAC3_MEMIF1}, key 2 and m1.sock socket
    63      Create bridge domain bd1 With Autolearn on agent_vpp_3 with interfaces bvi_loop0, memif0
    64  
    65  Setup route on Agent2
    66      Create Route On agent_vpp_2 With IP ${NET2}/${PREFIX} With Next Hop ${IP_1} And Vrf Id 2
    67  
    68  Setup route on Agent3
    69      Create Route On agent_vpp_3 With IP ${NET1}/${PREFIX} With Next Hop ${IP_3} And Vrf Id 3
    70  
    71  Start Three Agents
    72      Add Agent VPP Node    agent_vpp_1
    73      Add Agent VPP Node    agent_vpp_2
    74      Add Agent VPP Node    agent_vpp_3
    75      Sleep    ${SYNC_WAIT}
    76  
    77  Check Interfaces on Agent1 for Agent2
    78      vat_term: Check Loopback Interface State    agent_vpp_1    bvi_loop0    enabled=1     mac=${MAC_LOOP1}   ipv6=${IP_1}/${PREFIX}
    79      vat_term: Check Memif Interface State     agent_vpp_1  memif0  mac=${MAC_MEMIF1}  role=master  id=1   connected=1  enabled=1  socket=${AGENT_VPP_1_MEMIF_SOCKET_FOLDER}/m0.sock
    80  
    81  Check bd1 on Agent1 Is Created
    82      vat_term: BD Is Created    agent_vpp_1   bvi_loop0     memif0
    83      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
    84  
    85  Check Interfaces on Agent1 for Agent3
    86      vat_term: Check Loopback Interface State    agent_vpp_1    bvi_loop1    enabled=1     mac=${MAC_LOOP2}   ipv6=${IP_3}/${PREFIX}
    87      vat_term: Check Memif Interface State     agent_vpp_1  memif1  mac=${MAC_MEMIF2}  role=master  id=2   connected=1  enabled=1  socket=${AGENT_VPP_1_MEMIF_SOCKET_FOLDER}/m1.sock
    88  
    89  Check bd2 on Agent1 Is Created
    90      vat_term: BD Is Created    agent_vpp_1   bvi_loop1     memif1
    91      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
    92  
    93  
    94  Check Interfaces on Agent2
    95      vat_term: Check Loopback Interface State    agent_vpp_2    bvi_loop0    enabled=1     mac=${MAC2_LOOP1}   ipv6=${IP_2}/${PREFIX}
    96      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
    97  
    98  Check bd1 on Agent2 Is Created
    99      vat_term: BD Is Created    agent_vpp_2   bvi_loop0     memif0
   100      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
   101  
   102  
   103  Check Interfaces on Agent3
   104      vat_term: Check Loopback Interface State    agent_vpp_3    bvi_loop0    enabled=1     mac=${MAC3_LOOP1}   ipv6=${IP_4}/${PREFIX}
   105      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
   106  
   107  Check bd1 on Agent3 Is Created
   108      vat_term: BD Is Created    agent_vpp_3   bvi_loop0     memif0
   109      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
   110  
   111  
   112  
   113  Show Interfaces on Agent1
   114      Show Interfaces On agent_vpp_1
   115      Show Interfaces Address On agent_vpp_1
   116  
   117  Show Interfaces on Agent2
   118      Show Interfaces On agent_vpp_2
   119      Show Interfaces Address On agent_vpp_2
   120  
   121  Check Ip6 Fib on Agent2
   122      Show IP6 Fib On agent_vpp_2
   123      IP6 Fib Table 2 On agent_vpp_2 Should Contain Route With IP ${NET2}/64
   124  
   125  Show Interfaces on Agent3
   126      Show Interfaces On agent_vpp_3
   127      Show Interfaces Address On agent_vpp_3
   128  
   129  Check Ip6 Fib on Agent3
   130      Show IP6 Fib On agent_vpp_3
   131      IP6 Fib Table 3 On agent_vpp_3 Should Contain Route With IP ${NET1}/64
   132  
   133  Pinging
   134      Ping6 From agent_vpp_1 To ${IP_2}
   135      Ping6 From agent_vpp_1 To ${IP_4}
   136      #Ping From agent_vpp_2 To ${IP_4}
   137  
   138      ${int}=    Get Interface Internal Name    agent_vpp_2    bvi_loop0
   139      Ping On agent_vpp_2 With IP ${IP_4}, Source ${int}
   140      #Ping From agent_vpp_3 To ${IP_2}
   141      ${int}=    Get Interface Internal Name    agent_vpp_3    bvi_loop0
   142      Ping On agent_vpp_3 With IP ${IP_2}, Source ${int}
   143  
   144  
   145  *** Keywords ***
   146  
   147  List of interfaces On ${node} Should Contain Interface ${int}
   148      ${out}=   vpp_term: Show Interfaces    ${node}
   149      Should Match Regexp        ${out}  ${int}
   150  
   151  TestSetup
   152      Make Datastore Snapshots    ${TEST_NAME}_test_setup
   153  
   154  TestTeardown
   155      Make Datastore Snapshots    ${TEST_NAME}_test_teardown