Library Collections
Library RequestsLibrary
Library ./Sxp.py
-Resource CompareStream.robot
Resource KarafKeywords.robot
Resource TemplatedRequests.robot
Resource Utils.robot
Add Bindings
[Documentation] Based on ODL version decide if bindings will be added with or without origin type (introduced in Fluorine)
[Arguments] ${sgt} ${prefixes} ${node}=127.0.0.1 ${session}=session ${domain}=global ${origin}=LOCAL
- CompareStream.Run_Keyword_If_At_Least_Fluorine
- ... Add Bindings Fluorine
+ Add Bindings Fluorine
... ${sgt}
... ${prefixes}
... ${node}
... ${session}
... ${domain}
... ${origin}
- CompareStream.Run_Keyword_If_At_Most_Oxygen
- ... Add Bindings Oxygen
- ... ${sgt}
- ... ${prefixes}
- ... ${node}
- ... ${session}
- ... ${domain}
Add Bindings Fluorine
[Documentation] Add/Update one or more bindings with origin type via RPC to Master DB of the node
${data} = Sxp.Add Bindings Xml Fluorine ${node} ${domain} ${sgt} ${prefixes} ${origin}
Post To Controller ${session} add-bindings ${data}
-Add Bindings Oxygen
- [Documentation] Add/Update one or more bindings without origin type via RPC to Master DB of the node
- [Arguments] ${sgt} ${prefixes} ${node} ${session} ${domain}
- ${data} = Sxp.Add Bindings Xml Oxygen ${node} ${domain} ${sgt} ${prefixes}
- Post To Controller ${session} add-bindings ${data}
-
Get Bindings
[Documentation] Gets all binding via RPC from Master DB of node
[Arguments] ${node}=127.0.0.1 ${session}=session ${domain}=global ${scope}=all
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
- CompareStream.Run_Keyword_If_At_Least_Fluorine
- ... Add Domain Fluorine
+ Add Domain Fluorine
... ${domain_name}
... ${sgt}
... ${prefixes}
... ${origin}
... ${node}
... ${session}
- CompareStream.Run_Keyword_If_At_Most_Oxygen
- ... Add Domain Oxygen
- ... ${domain_name}
- ... ${sgt}
- ... ${prefixes}
- ... ${node}
- ... ${session}
Add Domain Fluorine
[Documentation] Add Domain with bindings (with origin) via RPC
${data} = Sxp.Add Domain Xml Fluorine ${node} ${domain_name} ${sgt} ${prefixes} ${origin}
Post To Controller ${session} add-domain ${data}
-Add Domain Oxygen
- [Documentation] Add Domain with bindings (without origin) via RPC
- [Arguments] ${domain_name} ${sgt} ${prefixes} ${node} ${session}
- ${data} = Sxp.Add Domain Xml Oxygen ${node} ${domain_name} ${sgt} ${prefixes}
- Post To Controller ${session} add-domain ${data}
-
Delete Domain
[Documentation] Delete Domain via RPC
[Arguments] ${domain_name} ${node}=127.0.0.1 ${session}=session
Check Node Started
[Documentation] Verify that SxpNode has data writen to Operational datastore and is running
[Arguments] ${node} ${port}=64999 ${system}=${node} ${session}=session ${ip}=${node}
- ${resp} = RequestsLibrary.Get Request
+ ${resp} = RequestsLibrary.GET On Session
... ${session}
... /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
- BuiltIn.Should Be Equal As Strings ${resp.status_code} 200
+ ... expected_status=200
${rc} = Get Node Running Status ${node} ${port} ${system} ${session} ${ip}
BuiltIn.Should Be Equal As Strings ${rc} 0
Check Node Stopped
[Documentation] Verify that SxpNode has data removed from Operational datastore and is not running
[Arguments] ${node} ${port}=64999 ${system}=${node} ${session}=session ${ip}=${node}
- ${resp} = RequestsLibrary.Get Request
+ ${resp} = RequestsLibrary.GET On Session
... ${session}
... /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
- BuiltIn.Should Be Equal As Strings ${resp.status_code} 404
+ ... expected_status=404
${rc} = Get Node Running Status ${node} ${port} ${system} ${session} ${ip}
BuiltIn.Should Be Equal As Strings ${rc} 1
Get Routing Configuration From Controller
[Documentation] Get Routing configuration from config DS
[Arguments] ${session}
- ${resp} = RequestsLibrary.Get Request
+ ${resp} = RequestsLibrary.GET On Session
... ${session}
... /restconf/config/sxp-cluster-route:sxp-cluster-route/
... headers=${ACCEPT_XML}
Clean Routing Configuration To Controller
[Documentation] Delete Routing configuration from Config DS
[Arguments] ${session}
- ${resp} = RequestsLibrary.Get Request
+ ${resp} = RequestsLibrary.GET On Session
... ${session}
... /restconf/config/sxp-cluster-route:sxp-cluster-route/
... headers=${ACCEPT_XML}