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