Add tests of node removal processing during unification op.
[integration/test.git] / csit / suites / topoprocessing / basic-topology-operations / 080_Underlay_item_removal.robot
1 *** Settings ***
2 Documentation     Test suite to verify processing of removal requests on different models.
3 ...               Before tests start, configurational files have to be rewriten to change listeners registration datastore type from CONFIG_API to OPERATIONAL_API.
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 ...               Suite setup also installs features required for tested models and clears karaf logs for further synchronization. Tests themselves send configurational
6 ...               xmls and verify output. Topology-id on the end of each url 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     Test Teardown With Underlay Topologies Refresh    network-topology:network-topology/topology/topo:1
10 Library           RequestsLibrary
11 Library           SSHLibrary
12 Library           XML
13 Variables         ../../../variables/topoprocessing/TopologyRequests.py
14 Variables         ../../../variables/Variables.py
15 Resource          ../../../libraries/KarafKeywords.robot
16 Resource          ../../../libraries/Utils.robot
17 Resource          ../../../libraries/TopoprocessingKeywords.robot
18
19 *** Variables ***
20 ${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
21
22 *** Test Cases ***
23 Unification Node Removal NT
24     [Documentation]    Test processing of node removal using unification operation on Network Topology model
25     ${model}    Set Variable    network-topology-model
26     #Create the original topology
27     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    network-topology-model    node    network-topo:1    network-topo:2
28     ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
29     ${request}    Insert Target Field    ${request}    1    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
30     Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    8
31     #Remove an underlay aggregated node, preserving the overlay node
32     Delete Underlay Node    network-topo:1    bgp:3
33     ${resp}    Wait Until Keyword Succeeds    10x    250ms    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <supporting-node>    9
34     Check Aggregated Node in Topology    ${model}    ${resp.content}    2    bgp:4
35     #Remove an underlay aggregated node, expecting removal of the overlay node
36     Delete Underlay Node    network-topo:1    bgp:4
37     Wait Until Keyword Succeeds    10x    250ms    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <supporting-node>    8
38
39 Unification Node Removal Inventory
40     [Documentation]    Test processing of node removal using unification operation on Inventory model
41     ${model}    Set Variable    opendaylight-inventory-model
42     #Create the original topology
43     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    openflow-topo:1    openflow-topo:2
44     ${request}    Insert Target Field    ${request}    0    flow-node-inventory:ip-address    0
45     ${request}    Insert Target Field    ${request}    1    flow-node-inventory:ip-address    0
46     Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    7
47     #Remove an underlay aggregated node, preserving the overlay node
48     Delete Underlay Node    openflow-topo:2    of-node:6
49     ${resp}    Wait Until Keyword Succeeds    10x    250ms    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <supporting-node>    9
50     Check Aggregated Node in Topology    ${model}    ${resp.content}    2    of-node:1
51     #Remove an underlay aggregated node, expecting removal of the overlay node
52     Delete Underlay Node    openflow-topo:1    of-node:1
53     Wait Until Keyword Succeeds    10x    250ms    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <supporting-node>    8