*** Settings ***
-Documentation Test suite to verify Domain data filtering
-Test Setup Setup Nodes Local
-Test Teardown Clean SXP Environment 10
-Library RequestsLibrary
-Library SSHLibrary
-Library ../../../libraries/Sxp.py
-Library ../../../libraries/Common.py
-Resource ../../../libraries/SxpLib.robot
+Documentation Test suite to verify Domain data filtering
+
+Library RequestsLibrary
+Library SSHLibrary
+Library ../../../libraries/Sxp.py
+Library ../../../libraries/Common.py
+Resource ../../../libraries/SxpLib.robot
+
+Test Setup Setup Nodes Local
+Test Teardown Clean SXP Environment 9
+
*** Variables ***
-${DOMAIN_1} guest
-${DOMAIN_2} trusted
-${DOMAIN_3} semitrusted
-${DOMAIN_4} secure
-${version} version4
+${DOMAIN_1} guest
+${DOMAIN_2} trusted
+${DOMAIN_3} semitrusted
+${DOMAIN_4} secure
+${version} version4
+
*** Test Cases ***
Non Transitivity Test
[Documentation] Test if Bindings are shared according to associated filters
- [Tags] SXP Domains Filtering
+ [Tags] sxp domains filtering
Wait Until Keyword Succeeds 15 1 Check Initialized
Add Filters
Wait Until Keyword Succeeds 15 1 Check Domain Sharing
Update Messages Test
[Documentation] Test if Bindings are shared according to associated filters while bindings are removed/added
- [Tags] SXP Domains Filtering
+ [Tags] sxp domains filtering
Wait Until Keyword Succeeds 15 1 Check Initialized
Add Filters
Wait Until Keyword Succeeds 15 1 Check Domain Sharing
- : FOR ${node} IN RANGE 2 5
- \ Delete Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
- \ Delete Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ FOR ${node} IN RANGE 2 5
+ Delete Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
+ Delete Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ END
Wait Until Keyword Succeeds 15 1 Check Domain Sharing After Update
- : FOR ${node} IN RANGE 2 5
- \ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ FOR ${node} IN RANGE 2 5
+ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ END
Wait Until Keyword Succeeds 15 1 Check Domain Sharing
Local Binding Non Transitivity Test
[Documentation] Test if Local Bindings are shared according to associated filters,
... and does not colide with other Bindings
- [Tags] SXP Domains Filtering
+ [Tags] sxp domains filtering
Wait Until Keyword Succeeds 15 1 Check Initialized Local
Add Filters
Wait Until Keyword Succeeds 15 1 Check Domain Sharing Local
Local Binding Update Test
[Documentation] Test if Local Bindings are shared according to associated filters while bindings are removed/added
- [Tags] SXP Domains Filtering
+ [Tags] sxp domains filtering
Wait Until Keyword Succeeds 15 1 Check Initialized Local
Add Filters
Wait Until Keyword Succeeds 15 1 Check Domain Sharing Local
Binding Replacement Test
[Documentation] Test situation where Local binding is replaced by other shared local binding,
... after shared binding is removed the original binding must be propagated to Peers
- [Tags] SXP Domains Filtering
+ [Tags] sxp domains filtering
Wait Until Keyword Succeeds 15 1 Check Initialized After Update
Add Bindings 400 35.35.35.35/32 127.0.0.4
- Add Bindings 450 35.35.35.35/32 127.0.0.1 ${DOMAIN_3}
+ Add Bindings 450 35.35.35.35/32 127.0.0.1 domain=${DOMAIN_3}
Wait Until Keyword Succeeds 15 1 Check After Update Part One
Add Filters After Update
Wait Until Keyword Succeeds 15 1 Check After Update Part Two
Delete Bindings 450 35.35.35.35/32 127.0.0.1 ${DOMAIN_3}
Wait Until Keyword Succeeds 15 1 Check After Update Part Three
+
*** Keywords ***
Setup Nodes Local
[Documentation] Setups Multi domain topology consisting of 3 specific domains and 1 default, data will be shared by filter.
- Setup SXP Environment 10
- : FOR ${node} IN RANGE 2 5
- \ Add Bindings ${node}0 ${node}0.${node}0.${node}0.${node}0/32 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
- \ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
- : FOR ${node} IN RANGE 5 10
- \ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
+ Setup SXP Environment 9
+ FOR ${node} IN RANGE 2 5
+ Add Bindings ${node}0 ${node}0.${node}0.${node}0.${node}0/32 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
+ END
+ FOR ${node} IN RANGE 5 10
+ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
+ END
Add Domain ${DOMAIN_1}
Add Domain ${DOMAIN_2}
Add Domain ${DOMAIN_3}
- Add Bindings 20 20.20.20.5/32 127.0.0.1 ${DOMAIN_1}
- Add Bindings 20 20.20.5.5/32 127.0.0.1 ${DOMAIN_1}
- Add Bindings 30 30.30.30.5/32 127.0.0.1 ${DOMAIN_2}
- Add Bindings 30 30.30.5.5/32 127.0.0.1 ${DOMAIN_2}
- Add Bindings 40 40.40.40.5/32 127.0.0.1 ${DOMAIN_3}
- Add Bindings 40 40.40.5.5/32 127.0.0.1 ${DOMAIN_3}
+ Add Bindings 20 20.20.20.5/32 127.0.0.1 domain=${DOMAIN_1}
+ Add Bindings 20 20.20.5.5/32 127.0.0.1 domain=${DOMAIN_1}
+ Add Bindings 30 30.30.30.5/32 127.0.0.1 domain=${DOMAIN_2}
+ Add Bindings 30 30.30.5.5/32 127.0.0.1 domain=${DOMAIN_2}
+ Add Bindings 40 40.40.40.5/32 127.0.0.1 domain=${DOMAIN_3}
+ Add Bindings 40 40.40.5.5/32 127.0.0.1 domain=${DOMAIN_3}
Add Bindings 300 25.25.25.25/32 127.0.0.4
Add Bindings 500 35.35.35.35/32
# NO DOMAIN
Should Contain Binding ${resp} 40 40.40.40.0/24
Should Contain Binding ${resp} 40 40.40.0.0/16
Should Contain Binding ${resp} 40 40.0.0.0/8
- : FOR ${node} IN RANGE 8 10
- \ ${resp} Get Bindings 127.0.0.${node}
- \ Should Not Contain Binding ${resp} 20 20.20.20.20/32
- \ Should Not Contain Binding ${resp} 20 20.20.20.0/24
- \ Should Not Contain Binding ${resp} 20 20.20.0.0/16
- \ Should Not Contain Binding ${resp} 20 20.0.0.0/8
- \ Should Not Contain Binding ${resp} 30 30.30.30.30/32
- \ Should Not Contain Binding ${resp} 30 30.30.30.0/24
- \ Should Not Contain Binding ${resp} 30 30.30.0.0/16
- \ Should Not Contain Binding ${resp} 30 30.0.0.0/8
- \ Should Not Contain Binding ${resp} 40 40.40.40.40/32
- \ Should Not Contain Binding ${resp} 40 40.40.40.0/24
- \ Should Not Contain Binding ${resp} 40 40.40.0.0/16
- \ Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ FOR ${node} IN RANGE 8 10
+ ${resp} Get Bindings 127.0.0.${node}
+ Should Not Contain Binding ${resp} 20 20.20.20.20/32
+ Should Not Contain Binding ${resp} 20 20.20.20.0/24
+ Should Not Contain Binding ${resp} 20 20.20.0.0/16
+ Should Not Contain Binding ${resp} 20 20.0.0.0/8
+ Should Not Contain Binding ${resp} 30 30.30.30.30/32
+ Should Not Contain Binding ${resp} 30 30.30.30.0/24
+ Should Not Contain Binding ${resp} 30 30.30.0.0/16
+ Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ Should Not Contain Binding ${resp} 40 40.40.40.40/32
+ Should Not Contain Binding ${resp} 40 40.40.40.0/24
+ Should Not Contain Binding ${resp} 40 40.40.0.0/16
+ Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ END
Check Initialized Local
[Documentation] Checks that Local Bindings are not shared between domains
Should Not Contain Binding ${resp} 30 30.30.5.5/32
Should Contain Binding ${resp} 40 40.40.40.5/32
Should Contain Binding ${resp} 40 40.40.5.5/32
- : FOR ${node} IN RANGE 8 10
- \ ${resp} Get Bindings 127.0.0.${node}
- \ Should Not Contain Binding ${resp} 20 20.20.20.5/32
- \ Should Not Contain Binding ${resp} 20 20.20.5.5/32
- \ Should Not Contain Binding ${resp} 30 30.30.30.5/32
- \ Should Not Contain Binding ${resp} 30 30.30.5.5/32
- \ Should Not Contain Binding ${resp} 40 40.40.40.5/32
- \ Should Not Contain Binding ${resp} 40 40.40.5.5/32
+ FOR ${node} IN RANGE 8 10
+ ${resp} Get Bindings 127.0.0.${node}
+ Should Not Contain Binding ${resp} 20 20.20.20.5/32
+ Should Not Contain Binding ${resp} 20 20.20.5.5/32
+ Should Not Contain Binding ${resp} 30 30.30.30.5/32
+ Should Not Contain Binding ${resp} 30 30.30.5.5/32
+ Should Not Contain Binding ${resp} 40 40.40.40.5/32
+ Should Not Contain Binding ${resp} 40 40.40.5.5/32
+ END
Check Initialized After Update
[Documentation] Checks that Local Bindings are not shared between domains