Use consistent naming in tempest suite
[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 Suite Setup       Setup Environment
8 Suite Teardown    Clean Environment
9 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
10 Test Teardown     Delete Overlay Topology
11 Library           RequestsLibrary
12 Library           SSHLibrary
13 Library           XML
14 Variables         ../../../variables/topoprocessing/TopologyRequests.py
15 Variables         ../../../variables/topoprocessing/TargetFields.py
16 Variables         ../../../variables/Variables.py
17 Resource          ../../../libraries/KarafKeywords.robot
18 Resource          ../../../libraries/Utils.robot
19 Resource          ../../../libraries/TopoprocessingKeywords.robot
20
21 *** Test Cases ***
22 Unification Filtration Node Inside Network Topology model
23     [Documentation]    Test unification filtration inside operation on Network Topology model
24     ${model}    Set Variable    network-topology-model
25     ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    network-topo:4
26     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    1
27     ${request}    Insert Apply Filters    ${request}    1    1
28     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
29     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
30     ${resp}    Wait Until Keyword Succeeds    3x    1s    Output Topo Should Be Complete    node_count=2    supporting-node_count=3
31     ...    node-ref_count=3    tp_count=0    tp-ref_count=0
32     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:18    bgp:20
33     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:19
34
35 Unification Filtration Node Inside Inventory model
36     [Documentation]    Test unification filtration inside operation on Inventory model
37     ${model}    Set Variable    opendaylight-inventory-model
38     ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:4
39     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}    1
40     ${request}    Insert Apply Filters    ${request}    1    1
41     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
42     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
43     ${resp}    Wait Until Keyword Succeeds    3x    1s    Output Topo Should Be Complete    node_count=2    supporting-node_count=4
44     ...    node-ref_count=4    tp_count=0    tp-ref_count=0
45     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:18
46     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:17    of-node:19    of-node:20
47
48 Unification Filtration Termination Point Inside Network Topology model
49     [Documentation]    Test unification filtration inside operation on Network Topology model
50     ${model}    Set Variable    network-topology-model
51     ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    termination-point    ${OVSDB_TP_NAME}    network-topo:5
52     ${request}    Insert Filter With ID    ${request}    ${FILTER_SPECIFIC_STRING}    ${OVSDB_TP_NAME}    1
53     ${request}    Insert Apply Filters    ${request}    1    1
54     ${request}    Set Specific String Filter    ${request}    portA
55     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
56     ${resp}    Wait Until Keyword Succeeds    3x    1s    Output Topo Should Be Complete    node_count=5    supporting-node_count=5
57     ...    node-ref_count=5    tp_count=3    tp-ref_count=6
58     ${topology_id}    Set Variable    network-topo:5
59     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    ${topology_id}    bgp:21    tp:21:1    tp:21:1
60     ...    tp:21:2    tp:21:3
61     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    ${topology_id}    bgp:24    tp:24:1    tp:24:1
62     ...    tp:24:2
63     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    ${topology_id}    bgp:22    tp:22:1    tp:22:1
64
65 Unification Filtration Node Network Topology model
66     [Documentation]    Test unification filtration operation on Network Topology model
67     ${model}    Set Variable    network-topology-model
68     ${target_field}    Set Variable    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
69     ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    ${model}    node    ${target_field}    network-topo:4
70     ...    ${target_field}    network-topo:1
71     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    1
72     ${request}    Insert Apply Filters    ${request}    1    1
73     ${request}    Insert Apply Filters    ${request}    2    1
74     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
75     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
76     ${resp}    Wait Until Keyword Succeeds    3x    1s    Output Topo Should Be Complete    node_count=2    supporting-node_count=4
77     ...    node-ref_count=4    tp_count=3    tp-ref_count=3
78     Check Aggregated Node in Topology    ${model}    ${resp.content}    3    bgp:1    bgp:16
79     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:2    bgp:17
80
81 Unification Filtration Node Inventory model
82     [Documentation]    Test unification filtration operation on Inventory model
83     ${model}    Set Variable    opendaylight-inventory-model
84     ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    ${model}    node    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:4
85     ...    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:6
86     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}    1
87     ${request}    Insert Apply Filters    ${request}    1    1
88     ${request}    Insert Apply Filters    ${request}    2    1
89     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
90     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
91     ${resp}    Wait Until Keyword Succeeds    3x    1s    Output Topo Should Be Complete    node_count=2    supporting-node_count=3
92     ...    node-ref_count=3    tp_count=0    tp-ref_count=0
93     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:28
94     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:16    of-node:26