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