fb5943d5ccc8f9ec9017e484087500dad5e14ed1
[integration/test.git] / test / csit / suites / base / 010__statistics_manager.txt
1 *** Settings ***
2 Documentation     Test suite for the statistics manager module
3 Suite Setup       Create Session   session   http://${CONTROLLER}:8080   auth=${AUTH}   headers=${HEADERS}
4 Suite Teardown    Delete All Sessions
5 Library           Collections
6 Library           ../../libraries/RequestsLibrary.py
7 Library           ../../libraries/Common.py
8 Variables         ../../variables/Variables.py
9
10 *** Variables ***
11 ${node1}       "node":{"type":"OF","id":"00:00:00:00:00:00:00:01"}
12 ${node2}       "node":{"type":"OF","id":"00:00:00:00:00:00:00:02"}
13 ${node3}       "node":{"type":"OF","id":"00:00:00:00:00:00:00:03"}
14 ${nodeconn1}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"}
15 ${nodeconn2}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"}
16 ${nodeconn3}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"1"}
17 ${nodeconn4}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"2"}
18 ${nodeconn5}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"}
19 ${nodeconn6}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"1"}
20 ${nodeconn7}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"2"}
21 ${nodeconn8}   "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"}
22
23 ${key}             portStatistics
24 ${REST_CONTEXT}    /controller/nb/v2/statistics
25
26 *** Test Cases ***
27 get port stats
28     [Documentation]    Show port stats and validate result
29     [Tags]    get
30     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/port
31     Should Be Equal As Strings    ${resp.status_code}    200 
32     Should Contain    ${resp.content}    ${nodeconn1}
33     Should Contain    ${resp.content}    ${nodeconn2}
34     Should Contain    ${resp.content}    ${nodeconn3}
35     Should Contain    ${resp.content}    ${nodeconn4}
36     Should Contain    ${resp.content}    ${nodeconn5}
37     Should Contain    ${resp.content}    ${nodeconn6}
38     Should Contain    ${resp.content}    ${nodeconn7}
39     Should Contain    ${resp.content}    ${nodeconn8}
40 get flow stats
41     [Documentation]    Show flow stats and validate result
42     [Tags]    get
43     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/flow
44     Should Be Equal As Strings    ${resp.status_code}    200 
45     Should Contain    ${resp.content}    ${node1}
46     Should Contain    ${resp.content}    ${node2}
47     Should Contain    ${resp.content}    ${node3}
48 get table stats
49     [Documentation]    Show flow stats and validate result
50     [Tags]    get
51     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/table
52     Should Be Equal As Strings    ${resp.status_code}    200 
53     Should Contain    ${resp.content}    ${node1}
54     Should Contain    ${resp.content}    ${node2}
55     Should Contain    ${resp.content}    ${node3}
56
57