The 'Get Request' RequestsLibrary keyword has been deprecated.
'Get Request' has been replaced by 'GET On Session'.
JIRA: INTTEST-141
Change-Id: I2128046b5a97126ad33927b099f605fc92715e81
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
*** Keywords ***
Check DIDM Registered With Device
[Documentation] Check for DIDM registered with the device
- ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API}
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= RequestsLibrary.GET On Session session ${RFC8040_OPERATIONAL_NODES_API} expected_status=200
Log ${resp.text}
Should Contain ${resp.text} didm
RETURN ${resp.text}
... http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}
... headers=${HEADERS}
... auth=${AUTH}
- ${resp}= RequestsLibrary.Get Request session ${node}
+ ${resp}= RequestsLibrary.GET On Session session ${node}
RETURN ${resp.json()}
Update Records
Config and Operational Topology Should Be Empty
[Documentation] This will check that only the expected output is there for both operational and config
... topology data stores. Empty probably means that only ovsdb:1 is there.
- ${config_resp} = RequestsLibrary.GET On Session session url=${RFC8040_CONFIG_TOPO_API}
+ ${config_resp} = RequestsLibrary.GET On Session session url=${RFC8040_CONFIG_TOPO_API}
${operational_resp} = RequestsLibrary.GET On Session session url=${RFC8040_OPERATIONAL_TOPO_API}
BuiltIn.Should Contain ${config_resp.text} {"topology-id":"ovsdb:1"}
BuiltIn.Should Contain ${operational_resp.text} {"topology-id":"ovsdb:1"}
Get Binding Origins
[Documentation] Gets all binding origins via RPC from configuration
[Arguments] ${session}=session
- ${resp} = RequestsLibrary.Get Request ${session} /restconf/config/sxp-config:binding-origins
- BuiltIn.Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} = RequestsLibrary.GET On Session ${session} /restconf/config/sxp-config:binding-origins
+ ... expected_status=200
RETURN ${resp}
Add Binding Origin
Check Cluster Node Started
[Documentation] Verify that SxpNode has data written to Operational datastore and Node is running on one of cluster nodes
[Arguments] ${node} ${port}=64999 ${ip}=${node}
- ${resp} = RequestsLibrary.Get Request
+ ${resp} = RequestsLibrary.GET On Session
... ${CONTROLLER_SESSION}
- ... /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
- BuiltIn.Should Be Equal As Strings ${resp.status_code} 200
+ ... /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/ expected_status=200
${started} = BuiltIn.Set Variable ${False}
FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
${rc} = Utils.Run Command On Remote System
Check Cluster Node Stopped
[Documentation] Verify that SxpNode has data removed from Operational datastore and Node is stopped
[Arguments] ${node} ${port}=64999 ${ip}=${node}
- ${resp} = RequestsLibrary.Get Request
+ ${resp} = RequestsLibrary.GET On Session
... ${CONTROLLER_SESSION}
... /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
- BuiltIn.Should Be Equal As Strings ${resp.status_code} 404
+ ... expected_status=404
${stopped} = BuiltIn.Set Variable ${False}
FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
${rc} = Utils.Run Command On Remote System
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}
Basic Request Get
[Documentation] Send a simple HTTP GET request to a given URL
[Arguments] ${overlay_topology_url}
- ${resp} Get Request session ${OPERATIONAL_API}/${overlay_topology_url}
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Get On Session session ${OPERATIONAL_API}/${overlay_topology_url} expected_status=200
RETURN ${resp}
Send Basic Delete Request
Fetch vtn list
[Documentation] Check if VTN Manager is up.
- ${resp}= RequestsLibrary.Get Request session restconf/operational/vtn:vtns
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= RequestsLibrary.GET On Session session restconf/operational/vtn:vtns expected_status=200
Fetch vtn switch inventory
[Documentation] Check if Switch is detected.
[Arguments] ${sw_name}
- ${resp}= RequestsLibrary.Get Request
+ ${resp}= RequestsLibrary.GET On Session
... session
- ... restconf/operational/vtn-inventory:vtn-nodes/vtn-node/${sw_name}
- Should Be Equal As Strings ${resp.status_code} 200
+ ... restconf/operational/vtn-inventory:vtn-nodes/vtn-node/${sw_name} expected_status=200
Collect Debug Info
[Documentation] Check if Switch is detected.
Get a pathmap
[Documentation] Get a pathmap for a vtn.
- ${resp}= RequestsLibrary.Get Request session restconf/operational/vtn-path-map:global-path-maps
+ ${resp}= RequestsLibrary.GET On Session session restconf/operational/vtn-path-map:global-path-maps
FOR ${pathElement} IN @{PATHMAP_ATTR}
should Contain ${resp.text} ${pathElement}
END
Get a pathpolicy
[Documentation] Get a pathpolicy for a vtn.
[Arguments] ${pathpolicy_id}
- ${resp}= RequestsLibrary.Get Request
+ ${resp}= RequestsLibrary.GET On Session
... session
... restconf/operational/vtn-path-policy:vtn-path-policies/vtn-path-policy/${pathpolicy_id}
FOR ${pathpolicyElement} IN @{PATHPOLICY_ATTR}
Get flow
[Documentation] Get data flow.
[Arguments] ${vtn_name}
- ${resp}= RequestsLibrary.Get Request
+ ${resp}= RequestsLibrary.GET On Session
... session
... restconf/operational/vtn-flow-impl:vtn-flows/vtn-flow-table/${vtn_name}
- Should Be Equal As Strings ${resp.status_code} 200
+ ... expected_status=200
Remove a portmap
[Documentation] Remove a portmap for a interface of a vbridge
Get flowconditions
[Documentation] Retrieve the list of flowconditions created
- ${resp}= RequestsLibrary.Get Request session restconf/operational/vtn-flow-condition:vtn-flow-conditions
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= RequestsLibrary.Get On Session
+ ... session
+ ... restconf/operational/vtn-flow-condition:vtn-flow-conditions
+ ... expected_status=200
Get flowcondition
[Documentation] Retrieve the flowcondition by name and to check the removed flowcondition we added "retrieve" argument to differentiate the status code,
... since after removing flowcondition name the status will be different compare to status code when the flowcondition name is present.
[Arguments] ${flowcond_name} ${retrieve}
- ${resp}= RequestsLibrary.Get Request
+ ${resp}= RequestsLibrary.GET On Session
... session
... restconf/operational/vtn-flow-condition:vtn-flow-conditions/vtn-flow-condition/${flowcond_name}
+ ... expected_status=anything
IF '${retrieve}' == 'retrieve'
Should Be Equal As Strings ${resp.status_code} 200
ELSE