Adapt netconf device configuration in daexim CSIT
[integration/test.git] / csit / suites / topoprocessing / basic-topology-operations / 060_Link_computation.robot
1 *** Settings ***
2 Documentation       Test suite to verify link computation 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 Link Computation Aggregation Inside
26     [Documentation]    Test of link computation with unification inside on Network Topology model
27     ${model}    Set Variable    network-topology-model
28     ${request}    Prepare Unification Inside Topology Request
29     ...    ${UNIFICATION_NT_AGGREGATE_INSIDE}
30     ...    ${model}
31     ...    node
32     ...    network-topo:6
33     ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
34     ${request}    Insert Link Computation Inside
35     ...    ${request}
36     ...    ${LINK_COMPUTATION_INSIDE}
37     ...    n:network-topology-model
38     ...    network-topo:6
39     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
40     ${resp}    Wait Until Keyword Succeeds
41     ...    3x
42     ...    1s
43     ...    Output Topo Should Be Complete
44     ...    node_count=4
45     ...    supporting-node_count=5
46     ...    node-ref_count=5
47     ...    link_count=4
48     ...    link-ref_count=4
49     ${overlay_node_id_28_29}    Check Aggregated Node in Topology
50     ...    ${model}
51     ...    ${resp.content}
52     ...    0
53     ...    bgp:28
54     ...    bgp:29
55     ${overlay_node_id_26}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:26
56     ${overlay_node_id_30}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:30
57     ${overlay_node_id_27}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:27
58     ${topology_id}    Set Variable    network-topo:6
59     Check Overlay Link Source And Destination
60     ...    ${model}
61     ...    ${resp.content}
62     ...    ${topology_id}
63     ...    link:26:28
64     ...    ${overlay_node_id_26}
65     ...    ${overlay_node_id_28_29}
66     Check Overlay Link Source And Destination
67     ...    ${model}
68     ...    ${resp.content}
69     ...    ${topology_id}
70     ...    link:28:29
71     ...    ${overlay_node_id_28_29}
72     ...    ${overlay_node_id_28_29}
73     Check Overlay Link Source And Destination
74     ...    ${model}
75     ...    ${resp.content}
76     ...    ${topology_id}
77     ...    link:29:30-1
78     ...    ${overlay_node_id_28_29}
79     ...    ${overlay_node_id_30}
80     Check Overlay Link Source And Destination
81     ...    ${model}
82     ...    ${resp.content}
83     ...    ${topology_id}
84     ...    link:29:30-2
85     ...    ${overlay_node_id_28_29}
86     ...    ${overlay_node_id_30}
87
88 Link Computation Filtration
89     [Documentation]    Test of link computation with filtration on Network Topology model
90     ${model}    Set Variable    network-topology-model
91     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    ${model}    node    network-topo:6
92     ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
93     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/32
94     ${request}    Insert Link Computation Inside
95     ...    ${request}
96     ...    ${LINK_COMPUTATION_INSIDE}
97     ...    n:network-topology-model
98     ...    network-topo:6
99     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
100     ${resp}    Wait Until Keyword Succeeds
101     ...    3x
102     ...    1s
103     ...    Output Topo Should Be Complete
104     ...    node_count=2
105     ...    supporting-node_count=2
106     ...    node-ref_count=2
107     ...    link_count=1
108     ...    link-ref_count=1
109     ${overlay_node_id_28}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:28
110     ${overlay_node_id_29}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:29
111     Check Overlay Link Source And Destination
112     ...    ${model}
113     ...    ${resp.content}
114     ...    network-topo:6
115     ...    link:28:29
116     ...    ${overlay_node_id_28}
117     ...    ${overlay_node_id_29}
118
119 Link Computation Aggregation Filtration
120     [Documentation]    Test of link computation with aggregation filtration on Network Topology model
121     ${model}    Set Variable    network-topology-model
122     ${target_field}    Set Variable    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
123     ${request}    Prepare Unification Filtration Topology Request
124     ...    ${UNIFICATION_FILTRATION_NT}
125     ...    ${model}
126     ...    node
127     ...    ${target_field}
128     ...    network-topo:6
129     ...    ${target_field}
130     ...    network-topo:1
131     ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    1
132     ${request}    Insert Apply Filters    ${request}    1    1
133     ${request}    Insert Apply Filters    ${request}    2    1
134     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
135     ${request}    Insert Link Computation
136     ...    ${request}
137     ...    ${LINK_COMPUTATION}
138     ...    n:network-topology-model
139     ...    network-topo:6
140     ...    network-topo:1
141     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
142     ${resp}    Wait Until Keyword Succeeds
143     ...    3x
144     ...    1s
145     ...    Output Topo Should Be Complete
146     ...    node_count=2
147     ...    supporting-node_count=4
148     ...    node-ref_count=4
149     ...    link_count=2
150     ...    link-ref_count=2
151     ${overlay_node_id_1_26}    Check Aggregated Node in Topology    ${model}    ${resp.content}    3    bgp:26    bgp:1
152     ${overlay_node_id_2_27}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:27    bgp:2
153     ${topology_id}    Set Variable    network-topo:1
154     Check Overlay Link Source And Destination
155     ...    ${model}
156     ...    ${resp.content}
157     ...    ${topology_id}
158     ...    link:1:2-1
159     ...    ${overlay_node_id_1_26}
160     ...    ${overlay_node_id_2_27}
161     Check Overlay Link Source And Destination
162     ...    ${model}
163     ...    ${resp.content}
164     ...    ${topology_id}
165     ...    link:1:2-2
166     ...    ${overlay_node_id_1_26}
167     ...    ${overlay_node_id_2_27}