Remove usage of removed RPC add-entry
[integration/test.git] / csit / suites / sxp / basic / 020_Restconf_CRUD.robot
1 *** Settings ***
2 Documentation     Test suite to verify CRUD operations
3 Suite Setup       Setup SXP Environment
4 Suite Teardown    Clean SXP Environment
5 Test Teardown     Clean Node
6 Library           RequestsLibrary
7 Library           ../../../libraries/Sxp.py
8 Resource          ../../../libraries/SxpLib.robot
9
10 *** Variables ***
11
12 *** Test Cases ***
13 Test Add Bindings
14     [Documentation]    Test if bindings are added to Master DB
15     [Tags]    Restconf CRUD    SXP
16     ${resp}    Get Bindings
17     Add Bindings    5230    1.1.1.1/32
18     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    5230    1.1.1.1/32
19     Add Bindings    30    2001:0:0:0:0:0:0:0/128
20     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    30    2001:0:0:0:0:0:0:0/128
21
22 Test Add Connection
23     [Documentation]    Test if connections are added to Node
24     [Tags]    Restconf CRUD    SXP
25     Add Connection    version4    speaker    10.1.0.0    60000
26     Wait Until Keyword Succeeds    3x    250ms    Connections Should Contain    10.1.0.0    60000    speaker
27     ...    version4
28     Add Connection    version1    listener    105.12.0.50    64000
29     Wait Until Keyword Succeeds    3x    250ms    Connections Should Contain    105.12.0.50    64000    listener
30     ...    version1
31
32 Test Delete Binding
33     [Documentation]    Test if bindings are deleted from Master DB
34     [Tags]    Restconf CRUD    SXP
35     Add Bindings    52301    12.1.1.1/32
36     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    52301    12.1.1.1/32
37     Run Keyword And Expect Error    *    Delete Binding    2631    12.1.1.1/32
38     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    52301    12.1.1.1/32
39     Delete Binding    52301    12.1.1.1/32
40     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Not Contain    52301    12.1.1.1/32
41
42 Test Delete Connection
43     [Documentation]    Test if conncetions are removed from Node
44     [Tags]    Restconf CRUD    SXP
45     Add Connection    version4    speaker    127.1.0.30    60000
46     Wait Until Keyword Succeeds    3x    250ms    Connections Should Contain    127.1.0.30    60000    speaker
47     ...    version4
48     Run Keyword And Expect Error    *    Delete Connections    127.1.0.30    65000
49     Wait Until Keyword Succeeds    3x    250ms    Connections Should Contain    127.1.0.30    60000    speaker
50     ...    version4
51     Delete Connections    127.1.0.30    60000
52     Wait Until Keyword Succeeds    3x    250ms    Connections Should Not Contain    127.1.0.30    60000    speaker
53     ...    version4
54
55 Test Update Binding
56     [Documentation]    Test if bindings can be updated to different values
57     [Tags]    Restconf CRUD    SXP
58     Add Bindings    3230    1.1.1.10/32
59     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    3230    1.1.1.10/32
60     Update Binding    3230    1.1.1.10/32    623    10.10.10.10/32
61     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Not Contain    3230    1.1.1.10/32
62     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    623    10.10.10.10/32
63
64 *** Keywords ***
65 Clean Node
66     Clean Bindings    127.0.0.1
67     Clean Connections    127.0.0.1