go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/libraries/interface/interface_generic.robot (about)

     1  [Documentation]     Keywords for working with interfaces using VPP API
     2  
     3  *** Settings ***
     4  Library     interface_generic.py
     5  
     6  Resource    ../vpp_api.robot
     7  
     8  *** Variables ***
     9  ${terminal_timeout}=      30s
    10  ${bd_timeout}=            15s
    11  
    12  *** Keywords ***
    13  
    14  vpp_api: Interfaces Dump
    15      [Arguments]        ${node}
    16      ${out}=            Execute API Command    ${node}    sw_interface_dump
    17      [Return]           ${out}
    18  
    19  vpp_api: Get Interface Index
    20      [Arguments]        ${node}    ${name}
    21      [Documentation]    Return interface index with specified name
    22      ${out}=            vpp_api: Interfaces Dump    ${node}
    23      ${index}=          Get Interface Index From API    ${out[0]["api_reply"]}    ${name}
    24      [Return]           ${index}
    25  
    26  vpp_api: Get Interface Name
    27      [Arguments]        ${node}    ${index}
    28      [Documentation]    Return interface index with specified name
    29      ${out}=            vpp_api: Interfaces Dump    ${node}
    30      ${index}=          Get Interface Name From API    ${out[0]["api_reply"]}    ${index}
    31      [Return]           ${index}
    32  
    33  vpp_api: Get Interface State By Name
    34      [Arguments]        ${node}    ${name}
    35      ${out}=            vpp_api: Interfaces Dump    ${node}
    36      ${state}=          Get Interface State From API    ${out[0]["api_reply"]}    name=${name}
    37      [Return]           ${state}
    38  
    39  vpp_api: Get Interface State By Index
    40      [Arguments]        ${node}    ${index}
    41      ${out}=            vpp_api: Interfaces Dump    ${node}
    42      ${state}=          Get Interface State From API    ${out[0]["api_reply"]}    index=${index}
    43      [Return]           ${state}