00ef6167609b8fad09b5ffce5e6a8c25a6d10fe8
[integration/test.git] / csit / suites / unimgr / uni_operations / 020_unimanager_cli.robot
1 *** Settings ***
2 Documentation     Test suite for all Uni Manager operations
3 Suite Setup       Setup Unimgr Test Environment
4 Suite Teardown    Delete All Sessions
5 Library           OperatingSystem
6 Library           String
7 Library           Collections
8 Library           SSHLibrary
9 Library           RequestsLibrary
10 Library           ../../../libraries/Common.py
11 Variables         ../../../variables/Variables.py
12 Resource          ../../../libraries/Utils.robot
13 Resource          ../../../libraries/KarafKeywords.robot
14 Resource          ../../../libraries/UnimgrKeywords.robot
15
16 *** Variables ***
17 ${DEFAULT_LINUX_PROMPT}
18 ${Mininet1_IP}    ${TOOLS_SYSTEM_IP}
19 ${Mininet2_IP}    ${TOOLS_SYSTEM_2_IP}
20 ${UNI1_MAC}    68:5b:35:bb:f8:3e
21 ${UNI2_MAC}    52:7b:25:cb:a7:3c
22
23 *** Test Cases ***
24 Create source and destination UNIs at the OVS instances using Restconf API
25     [Documentation]    Create source and destination UNIs
26     [Tags]    UniMgr UNIs Create
27     ${elements}    Create List    ${Mininet1_IP}
28     Check For Elements On Karaf Command Output Message    uni-add -ip ${Mininet1_IP} -ma ${UNI1_MAC}    ${elements}
29     ${elements}    Create List    ${Mininet2_IP}
30     Check For Elements On Karaf Command Output Message    uni-add -ip ${Mininet2_IP} -ma ${UNI2_MAC}    ${elements}
31
32 List All UNIs
33     [Documentation]    List all existing UNIs in the config data store
34     [Tags]    UniMgr
35     ${elements}    Create List    ${Mininet1_IP}    ${Mininet2_IP}
36     Check For Elements On Karaf Command Output Message    uni-list -c    ${elements}
37
38 Show UNI
39     [Documentation]    Show the information of the created Unis from the operational data store
40     [Tags]    UniMgr
41     ${elements}    Create List    ${Mininet1_IP}
42     Wait Until Keyword Succeeds    16s    2s    Check For Elements On Karaf Command Output Message    uni-show ${Mininet1_IP}    ${elements}
43
44 Update the Unis Speed
45     [Documentation]    Update Created Unis speed
46     [Tags]    UniMgr
47     ${elements}    Create List    ${Mininet1_IP} updated
48     Check For Elements On Karaf Command Output Message    uni-update -ip ${Mininet1_IP} -ma ${UNI1_MAC} -s 10G    ${elements}
49     ${element}    Create List    Speed10G
50     Wait Until Keyword Succeeds    16s    2s    Check For Elements On Karaf Command Output Message    uni-show ${Mininet1_IP}    ${element}
51
52 Delete UNIs source and destination
53     [Documentation]    Delete both UNIs source and destination.
54     [Tags]    UniMgr UNI Delete
55     ${elements}    Create List    Uni successfully removed
56     Check For Elements On Karaf Command Output Message    uni-remove ${Mininet1_IP}    ${elements}
57     Check For Elements On Karaf Command Output Message    uni-remove ${Mininet2_IP}    ${elements}
58     ${elements}    Create List    No uni found
59     Wait Until Keyword Succeeds    16s    2s    Check For Elements On Karaf Command Output Message    uni-show ${Mininet1_IP}    ${elements}
60     Wait Until Keyword Succeeds    16s    2s    Check For Elements On Karaf Command Output Message    uni-show ${Mininet2_IP}    ${elements}