Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / unimgr / uni_operations / 020_unimanager_cli.robot
1 *** Settings ***
2 Documentation       Test suite for all Uni Manager operations
3
4 Library             OperatingSystem
5 Library             String
6 Library             Collections
7 Library             SSHLibrary
8 Library             RequestsLibrary
9 Library             ../../../libraries/Common.py
10 Variables           ../../../variables/Variables.py
11 Resource            ../../../libraries/Utils.robot
12 Resource            ../../../libraries/KarafKeywords.robot
13 Resource            ../../../libraries/UnimgrKeywords.robot
14
15 Suite Setup         Setup Unimgr Test Environment
16 Suite Teardown      Delete All Sessions
17
18
19 *** Variables ***
20 ${DEFAULT_LINUX_PROMPT}     ${EMPTY}
21 ${Mininet1_IP}              ${TOOLS_SYSTEM_IP}
22 ${Mininet2_IP}              ${TOOLS_SYSTEM_2_IP}
23 ${UNI1_MAC}                 68:5b:35:bb:f8:3e
24 ${UNI2_MAC}                 52:7b:25:cb:a7:3c
25
26
27 *** Test Cases ***
28 Create source and destination UNIs at the OVS instances using Restconf API
29     [Documentation]    Create source and destination UNIs
30     [Tags]    unimgr unis create
31     ${elements}    Create List    ${Mininet1_IP}
32     Wait Until Keyword Succeeds
33     ...    16s
34     ...    2s
35     ...    Check For Elements On Karaf Command Output Message
36     ...    uni-add -ip ${Mininet1_IP} -ma ${UNI1_MAC}
37     ...    ${elements}
38     ${elements}    Create List    ${Mininet2_IP}
39     Wait Until Keyword Succeeds
40     ...    16s
41     ...    2s
42     ...    Check For Elements On Karaf Command Output Message
43     ...    uni-add -ip ${Mininet2_IP} -ma ${UNI2_MAC}
44     ...    ${elements}
45
46 List All UNIs
47     [Documentation]    List all existing UNIs in the config data store
48     [Tags]    unimgr
49     ${elements}    Create List    ${Mininet1_IP}    ${Mininet2_IP}
50     Wait Until Keyword Succeeds
51     ...    16s
52     ...    2s
53     ...    Check For Elements On Karaf Command Output Message
54     ...    uni-list -c
55     ...    ${elements}
56
57 Show UNI
58     [Documentation]    Show the information of the created Unis from the operational data store
59     [Tags]    unimgr
60     ${elements}    Create List    ${Mininet1_IP}
61     Wait Until Keyword Succeeds
62     ...    16s
63     ...    2s
64     ...    Check For Elements On Karaf Command Output Message
65     ...    uni-show ${Mininet1_IP}
66     ...    ${elements}
67
68 Update the Unis Speed
69     [Documentation]    Update Created Unis speed
70     [Tags]    unimgr
71     ${elements}    Create List    ${Mininet1_IP} updated
72     Check For Elements On Karaf Command Output Message
73     ...    uni-update -ip ${Mininet1_IP} -ma ${UNI1_MAC} -s 10G
74     ...    ${elements}
75     ${element}    Create List    Speed10G
76     Wait Until Keyword Succeeds
77     ...    16s
78     ...    2s
79     ...    Check For Elements On Karaf Command Output Message
80     ...    uni-show ${Mininet1_IP}
81     ...    ${element}
82
83 Delete UNIs source and destination
84     [Documentation]    Delete both UNIs source and destination.
85     [Tags]    unimgr uni delete
86     ${elements}    Create List    Uni successfully removed
87     Check For Elements On Karaf Command Output Message    uni-remove ${Mininet1_IP}    ${elements}
88     Check For Elements On Karaf Command Output Message    uni-remove ${Mininet2_IP}    ${elements}
89     ${elements}    Create List    No uni found
90     Wait Until Keyword Succeeds
91     ...    16s
92     ...    2s
93     ...    Check For Elements On Karaf Command Output Message
94     ...    uni-show ${Mininet1_IP}
95     ...    ${elements}
96     Wait Until Keyword Succeeds
97     ...    16s
98     ...    2s
99     ...    Check For Elements On Karaf Command Output Message
100     ...    uni-show ${Mininet2_IP}
101     ...    ${elements}