- [Arguments] ${version}=version4 ${PASSWORD}=none
- : FOR ${node} IN RANGE 2 6
- \ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
- \ ... ${PASSWORD}
- \ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
- \ ... ${PASSWORD}
- \ 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 10.${node}0.0.0/16 127.0.0.${node}
- \ Add Binding ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
- Add Binding 10 10.10.10.10/32 127.0.0.1
- Add Binding 10 10.10.10.0/24 127.0.0.1
- Add Binding 10 10.10.0.0/16 127.0.0.1
- Add Binding 10 10.0.0.0/8 127.0.0.1
+ [Arguments] ${version}=version4 ${password}=none
+ FOR ${node} IN RANGE 2 6
+ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
+ ... ${password}
+ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
+ ... ${password}
+ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
+ ... 127.0.0.${node}
+ Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
+ Add Bindings 10 10.10.10.10/32 127.0.0.1
+ Add Bindings 10 10.10.10.0/24 127.0.0.1
+ Add Bindings 10 10.10.0.0/16 127.0.0.1
+ Add Bindings 10 10.0.0.0/8 127.0.0.1
+
+Verify Snapshot Was Pushed
+ [Documentation] Will succeed if the ${snapshot_string} is found in the karaf logs
+ [Arguments] ${snapshot_string}=22-sxp-controller-one-node.xml
+ ${output} = Utils.Run Command On Controller
+ ... ${ODL_SYSTEM_IP}
+ ... cat ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log* | grep -c 'Successfully pushed configuration snapshot.*${snapshot_string}'
+ BuiltIn.Should Not Be Equal As Strings ${output} 0
+
+Add Domain
+ [Documentation] Based on ODL version decide if domain's bindings will be added with or without origin type (introduced in Fluorine)
+ [Arguments] ${domain_name} ${sgt}=None ${prefixes}=None ${origin}=LOCAL ${node}=127.0.0.1 ${session}=session
+ Add Domain Fluorine
+ ... ${domain_name}
+ ... ${sgt}
+ ... ${prefixes}
+ ... ${origin}
+ ... ${node}
+ ... ${session}
+
+Add Domain Fluorine
+ [Documentation] Add Domain with bindings (with origin) via RPC
+ [Arguments] ${domain_name} ${sgt} ${prefixes} ${origin} ${node} ${session}
+ ${data} = Sxp.Add Domain Xml Fluorine ${node} ${domain_name} ${sgt} ${prefixes} ${origin}
+ Post To Controller ${session} add-domain ${data}
+
+Delete Domain
+ [Documentation] Delete Domain via RPC
+ [Arguments] ${domain_name} ${node}=127.0.0.1 ${session}=session
+ ${data} = Sxp.Delete Domain Xml ${node} ${domain_name}
+ Post To Controller ${session} delete-domain ${data}
+
+Add Bindings Range
+ [Documentation] Add Bindings to Node specified by range
+ [Arguments] ${sgt} ${start} ${size} ${node}=127.0.0.1
+ ${prefixes} = Sxp.Prefix Range ${start} ${size}
+ Add Bindings ${sgt} ${prefixes} ${node}
+
+Delete Bindings Range
+ [Documentation] Delete Bindings to Node specified by range
+ [Arguments] ${sgt} ${start} ${size} ${node}=127.0.0.1
+ ${prefixes} = Sxp.Prefix Range ${start} ${size}
+ Delete Bindings ${sgt} ${prefixes} ${node}
+
+Check Binding Range
+ [Documentation] Check if Node contains Bindings specified by range
+ [Arguments] ${sgt} ${start} ${end} ${node}=127.0.0.1
+ ${resp} = Get Bindings ${node}
+ FOR ${num} IN RANGE ${start} ${end}
+ ${ip} = Sxp.Get Ip From Number ${num}
+ Should Contain Binding ${resp} ${sgt} ${ip}/32
+ END
+
+Check Binding Range Negative
+ [Documentation] Check if Node does not contains Bindings specified by range
+ [Arguments] ${sgt} ${start} ${end} ${node}=127.0.0.1
+ ${resp} = Get Bindings ${node}
+ FOR ${num} IN RANGE ${start} ${end}
+ ${ip} = Sxp.Get Ip From Number ${num}
+ Should Not Contain Binding ${resp} ${sgt} ${ip}/32
+ END