return False
+def parse_bindings(bindings_json):
+ """Parse JSON string into Array of Bindings
+
+ :param bindings_json: JSON containing Bindings
+ :type bindings_json: string
+ :returns: Array containing Bindings.
+
+ """
+ data = json.loads(bindings_json)
+ output = []
+ for bindings_json in data['output'].values():
+ for binding in bindings_json:
+ output.append(binding)
+ return output
+
+
+def find_binding(bindings, sgt, prefix):
+ """Test if Binding with specified values is contained in JSON
+
+ :param bindings: JSON containing Bindings
+ :type bindings: string
+ :param sgt: Source Group Tag
+ :type sgt: string
+ :param prefix: Ipv4/6 prefix
+ :type prefix: string
+ :returns: True if Binding with specified params was found, otherwise False.
+
+ """
+ for binding in parse_bindings(bindings):
+ if binding['sgt'] == int(sgt):
+ for ip_prefix in binding['ip-prefix']:
+ if ip_prefix == prefix:
+ return True
+ return False
+
+
def parse_prefix_groups(prefix_groups_json, source_):
"""Parse JSON string into Array of PrefixGroups
output = []
for binding in bindings.values():
for binding_source in binding:
- if binding_source['binding-source'] == source_:
+ if source_ == "any" or binding_source['binding-source'] == source_:
for prefix_group in binding_source['prefix-group']:
output.append(prefix_group)
return output
-def find_binding(prefix_groups_json, sgt, prefix, source_, action):
+def find_binding_legacy(prefix_groups_json, sgt, prefix, source_, action):
"""Test if Binding with specified values is contained in JSON
:param prefix_groups_json: JSON containing Bindings and PrefixGroups
return found
-def find_binding_with_peer_sequence(prefix_groups_json, sgt, prefix, source_, action, node_id, peer_seq):
- """Test if Binding with specified values is contained in JSON
-
- :param prefix_groups_json: JSON containing Bindings and PrefixGroups
- :type prefix_groups_json: string
- :param sgt: Source Group Tag
- :type sgt: string
- :param prefix: Ipv4/6 prefix
- :type prefix: string
- :param source_: Source of binding (local/sxp)
- :type source_: string
- :param action: Action for binding (add/delete)
- :type action: string
- :param node_id: NodeId of from where Binding came from
- :type node_id: string
- :param peer_seq: Hop of specified NodeId from where Binding came from
- :type peer_seq: string
- :returns: True if Binding with specified params was found, otherwise False.
-
- """
- correct_sequence = False
- found_source = False
- for prefixgroup in parse_prefix_groups(prefix_groups_json, source_):
- if prefixgroup['sgt'] == int(sgt):
- for binding in prefixgroup['binding']:
- if binding['ip-prefix'] == prefix and binding['action'] == action:
- for peer in binding['peer-sequence']['peer']:
- if peer['seq'] == int(peer_seq) and peer['node-id'] == node_id:
- correct_sequence = True
- for peer_source in binding['sources']['source']:
- if peer_source == node_id:
- found_source = True
- return found_source and correct_sequence
-
-
def add_entry_xml(sgt, prefix, ip):
"""Generate xml for Add Bindings request
return data
-def get_bindings_from_node_xml(ip):
+def get_bindings_from_node_xml(ip, range):
"""Generate xml for Get Bindings request
+ :param range: All or only Local bindings
+ :type ip: string
:param ip: Ipv4 address of node
:type ip: string
:returns: String containing xml data for request
"""
templ = Template('''<input>
<requested-node xmlns="urn:opendaylight:sxp:controller">$ip</requested-node>
+ <bindings-range xmlns="urn:opendaylight:sxp:controller">$range</bindings-range>
</input>''')
- data = templ.substitute({'ip': ip})
+ data = templ.substitute({'ip': ip, 'range': range})
return data
Get Bindings
[Arguments] ${node}=127.0.0.1 ${session}=session
[Documentation] Gets all binding via RPC from Master DB of node
- ${DATA} Get Bindings From Node Xml ${node}
- ${resp} Post Request ${session} ${REST_CONTEXT}:get-node-bindings data=${DATA} headers=${HEADERS_XML}
+ ${DATA} Get Bindings From Node Xml ${node} all
+ ${resp} Run Keyword If '${ODL_STREAM}' == 'boron' Post Request ${session} ${REST_CONTEXT}:get-node-bindings data=${DATA}
+ ... headers=${HEADERS_XML}
+ ... ELSE Get Request ${session} /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/master-database/ headers=${HEADERS_XML}
Should be Equal As Strings ${resp.status_code} 200
[Return] ${resp.content}
Clean Bindings
[Arguments] ${node}=127.0.0.1 ${session}=session
[Documentation] Delete all bindings via RPC from Master DB of node
- ${resp} Get Bindings Master Database ${node} ${session}
- @{prefixes} Parse Prefix Groups ${resp} local
- : FOR ${prefix} IN @{prefixes}
- \ Clean Binding ${prefix} ${prefix['binding']} ${node} ${session}
+ ${resp} Get Bindings ${node} ${session}
+ @{bindings} Run Keyword If '${ODL_STREAM}' == 'boron' Parse Bindings ${resp}
+ ... ELSE Parse Prefix Groups ${resp} local
+ : FOR ${binding} IN @{bindings}
+ \ Run Keyword If '${ODL_STREAM}' == 'boron' Clean Binding ${binding['sgt']} ${binding['ip-prefix']} ${node}
+ \ ... ${session}
+ \ ... ELSE Clean Binding ${binding} ${binding['binding']} ${node}
+ \ ... ${session}
Clean Binding
- [Arguments] ${prefix} ${bindings} ${node} ${session}
+ [Arguments] ${sgt} ${prefixes} ${node} ${session}
[Documentation] Used for nester FOR loop
- : FOR ${binding} IN @{bindings}
- \ Delete Binding ${prefix['sgt']} ${binding['ip-prefix']} ${node} ${session}
-
-Get Bindings Master Database
- [Arguments] ${node}=127.0.0.1 ${session}=session
- [Documentation] Gets content of Master DB from node
- ${resp} Get Request ${session} /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/master-database/ headers=${HEADERS_XML}
- Should be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.content}
+ : FOR ${prefix} IN @{prefixes}
+ \ Run Keyword If '${ODL_STREAM}' == 'boron' Delete Binding ${sgt} ${prefix} ${node}
+ \ ... ${session}
+ \ ... ELSE Delete Binding ${sgt['sgt']} ${prefix['ip-prefix']} ${node}
+ \ ... ${session}
Update Binding
[Arguments] ${sgtOld} ${prefixOld} ${sgtNew} ${prefixNew} ${node}=127.0.0.1 ${session}=session
Should be Equal As Strings ${resp.status_code} 200
Should Contain Binding
- [Arguments] ${resp} ${sgt} ${prefix} ${db_source}=local
+ [Arguments] ${resp} ${sgt} ${prefix} ${db_source}=any
[Documentation] Tests if data contains specified binding
- ${out} Find Binding ${resp} ${sgt} ${prefix} ${db_source} add
+ ${out} Run Keyword If '${ODL_STREAM}' == 'boron' Find Binding ${resp} ${sgt} ${prefix}
+ ... ELSE Find Binding Legacy ${resp} ${sgt} ${prefix} ${db_source}
+ ... add
Should Be True ${out} Doesn't have ${sgt} ${prefix}
- ${out} Find Binding ${resp} ${sgt} ${prefix} ${db_source} delete
- Should Not Be True ${out} Should't have ${sgt} ${prefix}
Should Not Contain Binding
- [Arguments] ${resp} ${sgt} ${prefix} ${db_source}=local
+ [Arguments] ${resp} ${sgt} ${prefix} ${db_source}=any
[Documentation] Tests if data doesn't contains specified binding
- ${out} Find Binding ${resp} ${sgt} ${prefix} ${db_source} add
+ ${out} Run Keyword If '${ODL_STREAM}' == 'boron' Find Binding ${resp} ${sgt} ${prefix}
+ ... ELSE Find Binding Legacy ${resp} ${sgt} ${prefix} ${db_source}
+ ... add
Should Not Be True ${out} Should't have ${sgt} ${prefix}
-Should Contain Binding With Peer Sequence
- [Arguments] ${resp} ${sgt} ${prefix} ${source} ${seq}=0 ${db_source}=local
- [Documentation] Tests if data contains specified binding with peer sequence
- ${out} Find Binding With Peer Sequence ${resp} ${sgt} ${prefix} ${db_source} add
- ... ${source} ${seq}
- Should Be True ${out} Doesn't have ${sgt} ${prefix} ${source} ${seq} ${db_source}
-
-Should Not Contain Binding With Peer Sequence
- [Arguments] ${resp} ${sgt} ${prefix} ${source} ${seq}=0 ${db_source}=local
- [Documentation] Tests if data doesn't contains specified binding with peer sequence
- ${out} Find Binding With Peer Sequence ${resp} ${sgt} ${prefix} ${db_source} add
- ... ${source} ${seq}
- Should Not Be True ${out} Should't have ${sgt} ${prefix} ${source} ${seq} ${db_source}
-
Should Contain Connection
[Arguments] ${resp} ${ip} ${port} ${mode} ${version} ${state}=none
[Documentation] Test if data contains specified connection
\ ... ${PASSWORD}
\ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
\ ... ${PASSWORD}
- \ Wait Until Keyword Succeeds 15 4 Verify Connection ${version} both
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
\ ... 127.0.0.${node}
\ Add Binding ${node}0 10.10.10.${node}0/32 127.0.0.${node}
\ Add Binding ${node}0 10.10.${node}0.0/24 127.0.0.${node}
[Documentation] Create session to Controller
Verify Feature Is Installed odl-sxp-all
Create Session session url=http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
- Wait Until Keyword Succeeds 15 3 Get Bindings Master Database
+ Wait Until Keyword Succeeds 15 1 Get Bindings
Clean SXP Environment
[Documentation] Destroy created sessions
*** Test Cases ***
Test Add Binding
[Documentation] Test if bindings are added to Master DB
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Add Binding 5230 1.1.1.1/32
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Contain Binding ${resp} 5230 1.1.1.1/32
Add Binding 30 2001:0:0:0:0:0:0:0/128
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Contain Binding ${resp} 30 2001:0:0:0:0:0:0:0/128
Test Add Connection
Test Delete Binding
[Documentation] Test if bindings are deleted from Master DB
Add Binding 52301 12.1.1.1/32
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Contain Binding ${resp} 52301 12.1.1.1/32
Delete Binding 2631 12.1.1.1/32
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Contain Binding ${resp} 52301 12.1.1.1/32
Delete Binding 52301 12.1.1.1/32
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Not Contain Binding ${resp} 52301 12.1.1.1/32
Test Delete Connection
Test Update Binding
[Documentation] Test if bindings can be updated to different values
Add Binding 3230 1.1.1.10/32
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Contain Binding ${resp} 3230 1.1.1.10/32
Update Binding 3230 1.1.1.10/32 623 10.10.10.10/32
- ${resp} Get Bindings Master Database
+ ${resp} Get Bindings
Should Not Contain Binding ${resp} 3230 1.1.1.10/32
Should Contain Binding ${resp} 623 10.10.10.10/32
\ ... ${PASSWORD}
\ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
\ ... ${PASSWORD}
- \ Wait Until Keyword Succeeds 15 4 Verify Connection ${cmp_version} listener
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${cmp_version} listener
\ ... 127.0.0.2 64999 127.0.0.1
- \ Wait Until Keyword Succeeds 15 4 Verify connection ${cmp_version} speaker
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${cmp_version} speaker
\ ... 127.0.0.1 64999 127.0.0.2
\ Log OK ${r_version}:listener ${version}:speaker
\ Add Connection ${version} listener 127.0.0.2 64999 127.0.0.3
\ ... ${PASSWORD}
\ Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.2
\ ... ${PASSWORD}
- \ Wait Until Keyword Succeeds 15 4 Verify Connection ${cmp_version} listener
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${cmp_version} listener
\ ... 127.0.0.2 64999 127.0.0.3
- \ Wait Until Keyword Succeeds 15 4 Verify connection ${cmp_version} speaker
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${cmp_version} speaker
\ ... 127.0.0.3 64999 127.0.0.2
\ Log OK ${version}:listener ${r_version}:speaker
\ Run Keyword If '${version}' == 'version4' and '${r_version}' == 'version4' Test Both ${version} ${r_version} ${PASSWORD}
${cmp_version} Lower Version ${r_version} ${version}
Add Connection ${r_version} both 127.0.0.3 64999 127.0.0.1 ${PASSWORD}
Add Connection ${version} both 127.0.0.1 64999 127.0.0.3 ${PASSWORD}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${cmp_version} both 127.0.0.3
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${cmp_version} both 127.0.0.3
... 64999 127.0.0.1
- Wait Until Keyword Succeeds 15 4 Verify Connection ${cmp_version} both 127.0.0.1
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${cmp_version} both 127.0.0.1
... 64999 127.0.0.3
Log OK ${r_version}:both ${version}:both
... permit ACL 10.10.10.0 0.0.0.255
... permit ACL 10.0.0.0 0.254.0.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.5
+ ${resp} Get Bindings 127.0.0.5
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
Should Not Contain Binding ${resp} 40 10.10.40.0/24 sxp
Should Contain Binding ${resp} 40 10.40.0.0/16 sxp
Should Not Contain Binding ${resp} 40 40.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.3
+ ${resp} Get Bindings 127.0.0.3
Should Contain Binding ${resp} 50 10.10.10.50/32 sxp
Should Contain Binding ${resp} 50 10.10.50.0/24 sxp
Should Contain Binding ${resp} 50 10.50.0.0/16 sxp
... Database should contains only Bindings regarding to these matches:
... permit ACL 10.0.0.0 0.255.255.255
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.5
+ ${resp} Get Bindings 127.0.0.5
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
Should Contain Binding ${resp} 40 10.10.40.0/24 sxp
Should Contain Binding ${resp} 40 10.40.0.0/16 sxp
Should Not Contain Binding ${resp} 40 40.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.3
+ ${resp} Get Bindings 127.0.0.3
Should Contain Binding ${resp} 50 10.10.10.50/32 sxp
Should Contain Binding ${resp} 50 10.10.50.0/24 sxp
Should Contain Binding ${resp} 50 10.50.0.0/16 sxp
... Database should contains only Bindings regarding to these matches:
... deny ACL 10.0.0.0 0.255.255.255
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.5
+ ${resp} Get Bindings 127.0.0.5
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
... permit SGT 30 ACL 10.10.10.0 0.0.0.255
... permit SGT 50 ACL 10.0.0.0 0.254.0.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.4
+ ${resp} Get Bindings 127.0.0.4
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
Should Not Contain Binding ${resp} 50 10.10.50.0/24 sxp
Should Contain Binding ${resp} 50 10.50.0.0/16 sxp
Should Not Contain Binding ${resp} 50 50.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.2
+ ${resp} Get Bindings 127.0.0.2
Should Contain Binding ${resp} 40 10.10.10.40/32 sxp
Should Contain Binding ${resp} 40 10.10.40.0/24 sxp
Should Contain Binding ${resp} 40 10.40.0.0/16 sxp
... Database should contains only Bindings regarding to these matches:
... permit ESGT 20,40 ACL 10.0.0.0 0.255.255.255
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.4
+ ${resp} Get Bindings 127.0.0.4
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
Should Not Contain Binding ${resp} 50 10.10.50.0/24 sxp
Should Not Contain Binding ${resp} 50 10.50.0.0/16 sxp
Should Not Contain Binding ${resp} 50 50.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.2
+ ${resp} Get Bindings 127.0.0.2
Should Contain Binding ${resp} 40 10.10.10.40/32 sxp
Should Contain Binding ${resp} 40 10.10.40.0/24 sxp
Should Contain Binding ${resp} 40 10.40.0.0/16 sxp
\ Add Binding ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
Add Connection ${version} both 127.0.0.1 64999 127.0.0.2 ${password}
Add Connection ${version} both 127.0.0.2 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} both 127.0.0.2
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.2
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3 ${password}
Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} listener 127.0.0.3
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
Add Connection ${version} both 127.0.0.1 64999 127.0.0.4 ${password}
Add Connection ${version} both 127.0.0.4 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} both 127.0.0.4
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.4
Add Connection ${version} listener 127.0.0.1 64999 127.0.0.5 ${password}
Add Connection ${version} speaker 127.0.0.5 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} speaker 127.0.0.5
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.5
Check One Group 4-5
[Documentation] Check if only bindings matching filter nodes 4 and 5
... permit ACL 10.0.0.0 0.255.255.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
: FOR ${node} IN RANGE 4 6
- \ ${resp} Get Bindings Master Database 127.0.0.${node}
+ \ ${resp} Get Bindings 127.0.0.${node}
\ Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
\ Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
\ Should Not Contain Binding ${resp} 10 10.10.0.0/16 sxp
\ Should Not Contain Binding ${resp} 30 10.10.30.0/24 sxp
\ Should Contain Binding ${resp} 30 10.30.0.0/16 sxp
\ Should Not Contain Binding ${resp} 30 30.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.2
+ ${resp} Get Bindings 127.0.0.2
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
... permit ACL 10.10.0.0 0.0.255.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
: FOR ${node} IN RANGE 4 6
- \ ${resp} Get Bindings Master Database 127.0.0.${node}
+ \ ${resp} Get Bindings 127.0.0.${node}
\ Should Not Contain Binding ${resp} 10 10.10.10.10/32 sxp
\ Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
\ Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
\ Should Contain Binding ${resp} 30 10.10.30.0/24 sxp
\ Should Not Contain Binding ${resp} 30 10.30.0.0/16 sxp
\ Should Not Contain Binding ${resp} 30 30.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.2
+ ${resp} Get Bindings 127.0.0.2
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
@{list} Create List 127.0.0.2 127.0.0.5
: FOR ${node} IN @{list}
- \ ${resp} Get Bindings Master Database ${node}
+ \ ${resp} Get Bindings ${node}
\ Should Not Contain Binding ${resp} 10 10.10.10.10/32 sxp
\ Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
\ Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
\ Should Contain Binding ${resp} 40 10.10.40.0/24 sxp
\ Should Not Contain Binding ${resp} 40 10.40.0.0/16 sxp
\ Should Not Contain Binding ${resp} 40 40.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.4
+ ${resp} Get Bindings 127.0.0.4
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
@{list} Create List 127.0.0.2 127.0.0.5
: FOR ${node} IN @{list}
- \ ${resp} Get Bindings Master Database ${node}
+ \ ${resp} Get Bindings ${node}
\ Should Not Contain Binding ${resp} 10 10.10.10.10/32 sxp
\ Should Not Contain Binding ${resp} 10 10.10.10.0/24 sxp
\ Should Not Contain Binding ${resp} 10 10.10.0.0/16 sxp
\ Should Contain Binding ${resp} 40 10.10.40.0/24 sxp
\ Should Not Contain Binding ${resp} 40 10.40.0.0/16 sxp
\ Should Not Contain Binding ${resp} 40 40.0.0.0/8 sxp
- ${resp} Get Bindings Master Database 127.0.0.4
+ ${resp} Get Bindings 127.0.0.4
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
\ ... ${password}
\ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
\ ... ${password}
- \ Wait Until Keyword Succeeds 15 4 Verify Connection ${version} both
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
\ ... 127.0.0.${node}
\ Add Binding ${node}0 10.10.10.${node}0/32 127.0.0.${node}
\ Add Binding ${node}0 10.10.${node}0.0/24 127.0.0.${node}
\ Add Binding ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
Add Connection ${version} both 127.0.0.5 64999 127.0.0.3 ${password}
Add Connection ${version} both 127.0.0.3 64999 127.0.0.5 ${password}
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.5
+ ... 64999 127.0.0.3
Add Binding 50 10.10.10.50/32 127.0.0.5
Add Binding 50 10.10.50.0/24 127.0.0.5
Add Binding 50 10.50.0.0/16 127.0.0.5
\ Add Binding ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
Add Connection ${version} listener 127.0.0.1 64999 127.0.0.2 ${password}
Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} speaker 127.0.0.2
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.2
Add Connection ${version} listener 127.0.0.1 64999 127.0.0.4 ${password}
Add Connection ${version} speaker 127.0.0.4 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} speaker 127.0.0.4
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.4
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3 ${password}
Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} listener 127.0.0.3
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
Add Connection ${version} listener 127.0.0.5 64999 127.0.0.3 ${password}
Add Connection ${version} speaker 127.0.0.3 64999 127.0.0.5 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} listener 127.0.0.5
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.5
... 64999 127.0.0.3
Setup Nodes Legacy Par Two
\ Add Binding ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2 ${password}
Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} listener 127.0.0.2
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.4 ${password}
Add Connection ${version} listener 127.0.0.4 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} listener 127.0.0.4
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.4
Add Connection ${version} listener 127.0.0.1 64999 127.0.0.3 ${password}
Add Connection ${version} speaker 127.0.0.3 64999 127.0.0.1 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} speaker 127.0.0.3
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.3
Add Connection ${version} speaker 127.0.0.5 64999 127.0.0.3 ${password}
Add Connection ${version} listener 127.0.0.3 64999 127.0.0.5 ${password}
- Wait Until Keyword Succeeds 15 4 Verify Connection ${version} speaker 127.0.0.5
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.5
... 64999 127.0.0.3
Check One Group 4-2
... permit ACL 10.10.10.0 0.0.0.255
... permit ACL 10.0.0.0 0.254.0.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.5
+ ${resp} Get Bindings 127.0.0.5
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
... permit SGT 30 ACL 10.10.10.0 0.0.0.255
... permit SGT 50 ACL 10.0.0.0 0.254.0.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- ${resp} Get Bindings Master Database 127.0.0.4
+ ${resp} Get Bindings 127.0.0.4
Should Contain Binding ${resp} 10 10.10.10.10/32 sxp
Should Contain Binding ${resp} 10 10.10.10.0/24 sxp
Should Contain Binding ${resp} 10 10.10.0.0/16 sxp
Documentation Test suite to verify Behaviour in different topologies
Suite Setup Setup SXP Environment
Suite Teardown Clean SXP Environment
-Test Setup Clean Nodes
+Test Teardown Clean Nodes
Library RequestsLibrary
Library SSHLibrary
Library ../../../libraries/Sxp.py
Export Test
[Documentation] Test behaviour after shutting down connections in Version4
Setup Topology Triangel version4
- ${resp} Get Bindings Master Database
- Should Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.3 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.3 0 sxp
+ Wait Until Keyword Succeeds 4 1 Check Export Part One
Delete Connections 127.0.0.1 64999 127.0.0.3
- Sleep 2s
- ${resp} Get Bindings Master Database
- Should Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.2 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.3 1 sxp
+ Delete Connections 127.0.0.3 64999 127.0.0.1
+ Wait Until Keyword Succeeds 4 1 Check Export Part Two
Delete Connections 127.0.0.1 64999 127.0.0.2
- Sleep 2s
- ${resp} Get Bindings Master Database
- Should Not Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.2 0 sxp
- Should Not Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.3 1 sxp
+ Delete Connections 127.0.0.2 64999 127.0.0.1
+ Wait Until Keyword Succeeds 4 1 Check Export Part Three
Export Test Legacy
[Documentation] Test behaviour after shutting down connections in Legacy versions
@{list} = Create List version1
: FOR ${version} IN @{list}
\ Setup Topology Triangel ${version}
- \ ${resp} Get Bindings Master Database
- \ Should Contain Binding ${resp} 542 5.5.5.5/32 sxp
- \ Should Contain Binding ${resp} 99 15.15.15.15/32 sxp
+ \ Wait Until Keyword Succeeds 4 1 Check Export Part One
\ Delete Connections 127.0.0.1 64999 127.0.0.3
- \ Sleep 2s
- \ ${resp} Get Bindings Master Database
- \ Should Contain Binding ${resp} 542 5.5.5.5/32 sxp
- \ Should Contain Binding ${resp} 99 15.15.15.15/32 sxp
+ \ Delete Connections 127.0.0.3 64999 127.0.0.1
+ \ Wait Until Keyword Succeeds 4 1 Check Export Part Two
\ Delete Connections 127.0.0.1 64999 127.0.0.2
- \ Sleep 2s
- \ ${resp} Get Bindings Master Database
- \ Should Not Contain Binding ${resp} 542 5.5.5.5/32 sxp
- \ Should Not Contain Binding ${resp} 99 15.15.15.15/32 sxp
- \ Log ${version} OK
+ \ Delete Connections 127.0.0.2 64999 127.0.0.1
+ \ Wait Until Keyword Succeeds 4 1 Check Export Part Three
\ Clean Nodes
Forwarding Test V2=>V1
[Documentation] Version 2 => 1 functionality
Setup Topology Linear version2 version1
- ${resp} Get Bindings Master Database
- Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
- Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
- Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
- Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
- Log Init OK
- ${resp} Get Bindings Master Database 127.0.0.3
- Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
- Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
- Should Not Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
- Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
- Log Forward OK
+ Wait Until Keyword Succeeds 4 1 Check Forwarding V2=>V1
Forwarding Test V3=>V2
[Documentation] Version 3 => 2 functionality
Setup Topology Linear version3 version2
- ${resp} Get Bindings Master Database
- Should Contain Binding ${resp} 6 56.56.56.0/24 sxp
- Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
- Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
- Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
- Log Init OK
- ${resp} Get Bindings Master Database 127.0.0.3
- Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
- Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
- Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
- Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
- Log Forward OK
+ Wait Until Keyword Succeeds 4 1 Check Forwarding V3=>V2
Forwarding Test V4=>V3
[Documentation] Version 4 => 3 functionality
Setup Topology Linear version4 version3
- ${resp} Get Bindings Master Database
- Should Contain Binding With Peer Sequence ${resp} 6 56.56.56.0/24 127.0.0.2 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 66 9.9.9.9/32 127.0.0.2 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 127.0.0.2 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 127.0.0.2 0 sxp
- Log Init OK
- ${resp} Get Bindings Master Database 127.0.0.3
- Should Contain Binding ${resp} 6 56.56.56.0/24 sxp
- Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
- Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
- Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
- Log Forward OK
+ Wait Until Keyword Succeeds 4 1 Check Forwarding V4=>V3
Most Recent Rule Test
[Documentation] Most Recent Rule
Setup Topology Fork version4
Add Binding 542 5.5.5.5/32 127.0.0.2
Sleep 2s
- Add Binding 542 5.5.5.5/32 127.0.0.3
- Add Binding 99 15.15.15.15/32 127.0.0.3
+ Add Binding 543 5.5.5.5/32 127.0.0.3
+ Add Binding 100 15.15.15.15/32 127.0.0.3
Sleep 2s
Add Binding 99 15.15.15.15/32 127.0.0.2
Sleep 1s
- ${resp} Get Bindings Master Database
- Should Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.3 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.2 0 sxp
- ${resp} Get Bindings Master Database 127.0.0.4
- Should Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.3 1 sxp
- Should Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.2 1 sxp
+ ${resp} Get Bindings
+ Should Contain Binding ${resp} 543 5.5.5.5/32
+ Should Contain Binding ${resp} 99 15.15.15.15/32
+ ${resp} Get Bindings 127.0.0.4
+ Should Contain Binding ${resp} 543 5.5.5.5/32
+ Should Contain Binding ${resp} 99 15.15.15.15/32
Shorthest Path Test
[Documentation] Shorthes Path over Most Recent
Add Connection version4 listener 127.0.0.5 64999 127.0.0.3
Add Connection version4 speaker 127.0.0.3 64999 127.0.0.5
+ Wait Until Keyword Succeeds 15 1 Verify Connection version4 listener 127.0.0.5
+ ... 64999 127.0.0.3
Setup Topology Fork version4
Add Binding 542 5.5.5.5/32 127.0.0.2
- Sleep 2s
- Add Binding 542 5.5.5.5/32 127.0.0.5
+ Add Binding 545 5.5.5.5/32 127.0.0.5
Add Binding 99 15.15.15.15/32 127.0.0.2
Add Binding 9954 105.15.125.15/32 127.0.0.5
- Sleep 2s
- Add Binding 99 15.15.15.15/32 127.0.0.5
- ${resp} Get Bindings Master Database
- Should Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.2 0 sxp
- Should Contain Binding With Peer Sequence ${resp} 9954 105.15.125.15/32 127.0.0.5 1 sxp
- Should Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.2 0 sxp
- ${resp} Get Bindings Master Database 127.0.0.4
- Should Contain Binding With Peer Sequence ${resp} 542 5.5.5.5/32 127.0.0.2 1 sxp
- Should Contain Binding With Peer Sequence ${resp} 9954 105.15.125.15/32 127.0.0.5 2 sxp
- Should Contain Binding With Peer Sequence ${resp} 99 15.15.15.15/32 127.0.0.2 1 sxp
+ Add Binding 95 15.15.15.15/32 127.0.0.5
+ Wait Until Keyword Succeeds 4 1 Check Shorthest Path
*** Keywords ***
Setup Topology Triangel
[Arguments] ${version}
[Documentation] Setup 3 nodes connected to each other
Add Binding 542 5.5.5.5/32 127.0.0.2
- Add Binding 542 5.5.5.5/32 127.0.0.3
+ Add Binding 543 5.5.5.5/32 127.0.0.3
Add Binding 99 15.15.15.15/32 127.0.0.3
Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
- Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
- Sleep 1s
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
- Add Connection ${version} listener 127.0.0.3 64999 127.0.0.2
- Sleep 2s
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
+ Sleep 1s
+ Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
+ Add Connection ${version} listener 127.0.0.3 64999 127.0.0.2
Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.3
- Sleep 3s
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.2
+ ... 64999 127.0.0.3
Setup Topology Linear
[Arguments] ${version} ${r_version}
Add Binding 666 2001:db8:0:0:0:0:1428:57ab/128 127.0.0.2
Add Binding 555 2001:db8:85a3:8d3:0:0:0:0/64 127.0.0.2
Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
- Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.1
- Sleep 1s
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
+ Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.1
Add Connection ${r_version} listener 127.0.0.1 64999 127.0.0.3
- Sleep 2s
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${r_version} speaker 127.0.0.3
Setup Topology Fork
[Arguments] ${version}
[Documentation] Setup 4 nodes in to T topology
- Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
+ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
- Add Connection ${version} speaker 127.0.0.4 64999 127.0.0.1
- Sleep 2s
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
- Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
+ Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
+ Add Connection ${version} speaker 127.0.0.4 64999 127.0.0.1
Add Connection ${version} listener 127.0.0.1 64999 127.0.0.4
- Sleep 3s
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.4
+
+Check Export Part One
+ [Documentation] Checks if Bindings 542 5.5.5.5/32 is replaced by 543 5.5.5.5/32
+ ${resp} Get Bindings
+ log ${resp}
+ Should Contain Binding ${resp} 543 5.5.5.5/32
+ Should Not Contain Binding ${resp} 542 5.5.5.5/32
+ Should Contain Binding ${resp} 99 15.15.15.15/32
+
+Check Export Part Two
+ [Documentation] Checks if Bindings 542 5.5.5.5/32 was updated after peer shutdown
+ ${resp} Get Bindings
+ log ${resp}
+ Should Not Contain Binding ${resp} 543 5.5.5.5/32
+ Should Contain Binding ${resp} 542 5.5.5.5/32
+ Should Contain Binding ${resp} 99 15.15.15.15/32
+
+Check Export Part Three
+ [Documentation] Checks if database is empty after peers shutdown
+ ${resp} Get Bindings
+ log ${resp}
+ Should Not Contain Binding ${resp} 542 5.5.5.5/32
+ Should Not Contain Binding ${resp} 99 15.15.15.15/32
+
+Check Forwarding V2=>V1
+ [Documentation] Check if appropriate bindings are exported per version
+ ${resp} Get Bindings
+ Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
+ Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
+ Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
+ Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
+ Log Init OK
+ ${resp} Get Bindings 127.0.0.3
+ Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
+ Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
+ Should Not Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
+ Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
+ Log Forward OK
+
+Check Forwarding V3=>V2
+ [Documentation] Check if appropriate bindings are exported per version
+ ${resp} Get Bindings
+ Should Contain Binding ${resp} 6 56.56.56.0/24 sxp
+ Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
+ Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
+ Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
+ Log Init OK
+ ${resp} Get Bindings 127.0.0.3
+ Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
+ Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
+ Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
+ Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
+ Log Forward OK
+
+Check Forwarding V4=>V3
+ [Documentation] Check if appropriate bindings are exported per version
+ ${resp} Get Bindings
+ Should Contain Binding ${resp} 6 56.56.56.0/24
+ Should Contain Binding ${resp} 66 9.9.9.9/32
+ Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
+ Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
+ Log Init OK
+ ${resp} Get Bindings 127.0.0.3
+ Should Contain Binding ${resp} 6 56.56.56.0/24 sxp
+ Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
+ Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
+ Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
+ Log Forward OK
+
+Check Shorthest Path
+ [Documentation] Checks if Shorthest path rule is applied onto bindings
+ ${resp} Get Bindings
+ Should Contain Binding ${resp} 542 5.5.5.5/32
+ Should Contain Binding ${resp} 9954 105.15.125.15/32
+ Should Contain Binding ${resp} 99 15.15.15.15/32
+ ${resp} Get Bindings 127.0.0.4
+ Should Contain Binding ${resp} 542 5.5.5.5/32
+ Should Contain Binding ${resp} 9954 105.15.125.15/32
+ Should Contain Binding ${resp} 99 15.15.15.15/32
Clean Nodes
Clean Connections 127.0.0.1
Clean Connections 127.0.0.3
Clean Connections 127.0.0.4
Clean Connections 127.0.0.5
- Sleep 5s
Clean Bindings 127.0.0.1
Clean Bindings 127.0.0.2
Clean Bindings 127.0.0.3
Clean Bindings 127.0.0.4
Clean Bindings 127.0.0.5
- Sleep 5s
[Documentation] Stress test that contains of connecting 20 Nodes and exporting their bindings
Setup Mega Topology
Sleep 5s
- ${resp} Get Bindings Master Database 127.0.0.1
+ ${resp} Get Bindings 127.0.0.1
: FOR ${num} IN RANGE 2 22
\ ${ip} Get Ip From Number ${num}
\ Should Contain Binding ${resp} ${num} ${ip}/32 sxp
[Documentation] Stress test that contains of connecting 30 Nodes and exporting their bindings
Setup Complex Mega Topology
Sleep 5s
- ${resp} Get Bindings Master Database 127.0.0.1
+ ${resp} Get Bindings 127.0.0.1
: FOR ${num} IN RANGE 22 32
\ ${ip} Get Ip From Number ${num}
\ Should Contain Binding ${resp} ${num} ${ip}/32 sxp
Add Connection version4 listener 127.0.0.2 64999 127.0.0.1
Add Connection version4 speaker 127.0.0.1 64999 127.0.0.2
Sleep 5s
- ${resp} Get Bindings Master Database 127.0.0.1
+ ${resp} Get Bindings 127.0.0.1
: FOR ${num} IN RANGE 2 102
\ ${ip} Get Ip From Number ${num}
\ Should Contain Binding ${resp} ${num} ${ip}/32 sxp
\ Add Binding ${num} ${ip}/32 ${ip}
\ Add Connection ${version} listener ${ip} 64999 127.0.0.1
\ Add Connection ${version} speaker 127.0.0.1 64999 ${ip}
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
+ \ ... ${ip}
Setup Complex Mega Topology
[Arguments] ${version}=version4
\ Add Binding ${num} ${ip}/32 ${ip}
\ Add Connection ${version} listener ${ip} 64999 ${second_ip}
\ Add Connection ${version} speaker ${second_ip} 64999 ${ip}
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
+ \ ... ${ip} 64999 ${second_ip}
\ ${second_num} Set Variable ${second_num + 1}
\ ${second_ip} Get Ip From Number ${second_num}
\ Add Connection ${version} listener ${ip} 64999 ${second_ip}
\ Add Connection ${version} speaker ${second_ip} 64999 ${ip}
+ \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
+ \ ... ${ip} 64999 ${second_ip}
Clean Nodes
: FOR ${num} IN RANGE 1 32