Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / topoprocessing / basic-topology-operations / 050_Aggregation_filtration.robot
1 *** Settings ***
2 Documentation       Test suite to verify fitration operation on different models.
3 ...                 Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIGURATION to OPERATIONAL.
4 ...                 Need for this change is also a reason why main feature (odl-topoprocessing-framework) is installed after file change and not during boot.
5 ...                 Tests themselves install feature required for specific model, clear karaf logs for futher synchronization, send configurational xmls and verify output.
6 ...                 Topology-id on the end of each urls must match topology-id from xml. Yang models of components in topology are defined in xmls.
7
8 Library             RequestsLibrary
9 Library             SSHLibrary
10 Library             XML
11 Variables           ../../../variables/topoprocessing/TopologyRequests.py
12 Variables           ../../../variables/topoprocessing/TargetFields.py
13 Variables           ../../../variables/Variables.py
14 Resource            ../../../libraries/KarafKeywords.robot
15 Resource            ../../../libraries/Utils.robot
16 Resource            ../../../libraries/TopoprocessingKeywords.robot
17
18 Suite Setup         Setup Environment
19 Suite Teardown      Clean Environment
20 Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
21 Test Teardown       Delete Overlay Topology
22
23
24 *** Test Cases ***
25 Unification Filtration Node Inside Network Topology model
26     [Documentation]    Test unification filtration inside operation on Network Topology model
27     ${model}    Set Variable    network-topology-model
28     ${request}    Prepare Unification Filtration Inside Topology Request
29     ...    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}
30     ...    ${model}
31     ...    node
32     ...    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
33     ...    network-topo:4
34     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    1
35     ${request}    Insert Apply Filters    ${request}    1    1
36     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
37     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
38     ${resp}    Wait Until Keyword Succeeds
39     ...    3x
40     ...    1s
41     ...    Output Topo Should Be Complete
42     ...    node_count=2
43     ...    supporting-node_count=3
44     ...    node-ref_count=3
45     ...    tp_count=0
46     ...    tp-ref_count=0
47     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:18    bgp:20
48     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:19
49
50 Unification Filtration Node Inside Inventory model
51     [Documentation]    Test unification filtration inside operation on Inventory model
52     ${model}    Set Variable    opendaylight-inventory-model
53     ${request}    Prepare Unification Filtration Inside Topology Request
54     ...    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}
55     ...    ${model}
56     ...    node
57     ...    ${OPENFLOW_NODE_IP_ADDRESS}
58     ...    openflow-topo:4
59     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}    1
60     ${request}    Insert Apply Filters    ${request}    1    1
61     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
62     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
63     ${resp}    Wait Until Keyword Succeeds
64     ...    3x
65     ...    1s
66     ...    Output Topo Should Be Complete
67     ...    node_count=2
68     ...    supporting-node_count=4
69     ...    node-ref_count=4
70     ...    tp_count=0
71     ...    tp-ref_count=0
72     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:18
73     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:17    of-node:19    of-node:20
74
75 Unification Filtration Termination Point Inside Network Topology model
76     [Documentation]    Test unification filtration inside operation on Network Topology model
77     ${model}    Set Variable    network-topology-model
78     ${request}    Prepare Unification Filtration Inside Topology Request
79     ...    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}
80     ...    ${model}
81     ...    termination-point
82     ...    ${OVSDB_TP_NAME}
83     ...    network-topo:5
84     ${request}    Insert Filter With ID    ${request}    ${FILTER_SPECIFIC_STRING}    ${OVSDB_TP_NAME}    1
85     ${request}    Insert Apply Filters    ${request}    1    1
86     ${request}    Set Specific String Filter    ${request}    portA
87     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
88     ${resp}    Wait Until Keyword Succeeds
89     ...    3x
90     ...    1s
91     ...    Output Topo Should Be Complete
92     ...    node_count=5
93     ...    supporting-node_count=5
94     ...    node-ref_count=5
95     ...    tp_count=3
96     ...    tp-ref_count=6
97     ${topology_id}    Set Variable    network-topo:5
98     Check Aggregated Termination Point in Node
99     ...    ${model}
100     ...    ${resp.content}
101     ...    ${topology_id}
102     ...    bgp:21
103     ...    tp:21:1
104     ...    tp:21:1
105     ...    tp:21:2
106     ...    tp:21:3
107     Check Aggregated Termination Point in Node
108     ...    ${model}
109     ...    ${resp.content}
110     ...    ${topology_id}
111     ...    bgp:24
112     ...    tp:24:1
113     ...    tp:24:1
114     ...    tp:24:2
115     Check Aggregated Termination Point in Node
116     ...    ${model}
117     ...    ${resp.content}
118     ...    ${topology_id}
119     ...    bgp:22
120     ...    tp:22:1
121     ...    tp:22:1
122
123 Unification Filtration Node Network Topology model
124     [Documentation]    Test unification filtration operation on Network Topology model
125     ${model}    Set Variable    network-topology-model
126     ${target_field}    Set Variable    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
127     ${request}    Prepare Unification Filtration Topology Request
128     ...    ${UNIFICATION_FILTRATION_NT}
129     ...    ${model}
130     ...    node
131     ...    ${target_field}
132     ...    network-topo:4
133     ...    ${target_field}
134     ...    network-topo:1
135     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    1
136     ${request}    Insert Apply Filters    ${request}    1    1
137     ${request}    Insert Apply Filters    ${request}    2    1
138     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
139     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
140     ${resp}    Wait Until Keyword Succeeds
141     ...    3x
142     ...    1s
143     ...    Output Topo Should Be Complete
144     ...    node_count=2
145     ...    supporting-node_count=4
146     ...    node-ref_count=4
147     ...    tp_count=3
148     ...    tp-ref_count=3
149     Check Aggregated Node in Topology    ${model}    ${resp.content}    3    bgp:1    bgp:16
150     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:2    bgp:17
151
152 Unification Filtration Node Inventory model
153     [Documentation]    Test unification filtration operation on Inventory model
154     ${model}    Set Variable    opendaylight-inventory-model
155     ${request}    Prepare Unification Filtration Topology Request
156     ...    ${UNIFICATION_FILTRATION_NT}
157     ...    ${model}
158     ...    node
159     ...    ${OPENFLOW_NODE_IP_ADDRESS}
160     ...    openflow-topo:4
161     ...    ${OPENFLOW_NODE_IP_ADDRESS}
162     ...    openflow-topo:6
163     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}    1
164     ${request}    Insert Apply Filters    ${request}    1    1
165     ${request}    Insert Apply Filters    ${request}    2    1
166     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
167     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
168     ${resp}    Wait Until Keyword Succeeds
169     ...    3x
170     ...    1s
171     ...    Output Topo Should Be Complete
172     ...    node_count=2
173     ...    supporting-node_count=3
174     ...    node-ref_count=3
175     ...    tp_count=0
176     ...    tp-ref_count=0
177     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:28
178     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:16    of-node:26