ee848da440c65cb46b8f2c4403bbf4c44351c600
[integration/test.git] / test / tools / Robot_Tool / suites / base / host_tracker.txt
1 *** Settings ***
2 Documentation     Test suite for the arp handler bundle.
3 Library           Collections
4 Library           RequestsLibrary
5 Library           ../../libraries/Common.py
6 Library           ../../libraries/HostTracker.py
7 Variables         ../../variables/Variables.py
8
9 *** Variables ***
10 ${name}           10.0.1.4
11 ${key}            hostConfig
12
13 *** Test Cases ***
14 Add and remove a host
15     [Documentation]    Add and remove a host. After each operation, list to validate the result.
16     [Tags]    add_remove_info
17     ${body}    Create Dictionary    nodeType    OF    dataLayerAddress    5e:bf:79:84:10:a6    vlan
18     ...    1    nodeId    00:00:00:00:00:00:00:03    nodeConnectorId    9    networkAddress
19     ...    10.0.1.4    staticHost    ${True}    nodeConnectorType    OF
20     Add Host    ${name}    ${body}
21     ${result}    Get Hosts
22     Dictionary Should Contain Key    ${result}    ${key}
23     ${content}    Get From Dictionary    ${result}    ${key}
24     List Should Contain Value    ${content}    ${body}
25     Remove Host    ${name}
26     ${result}    Get Hosts
27     Dictionary Should Contain Key    ${result}    ${key}
28     ${content}    Get From Dictionary    ${result}    ${key}
29     List Should Not Contain Value    ${content}    ${body}