[Documentation] Makes a POST REST call to the AUTH_TOKEN_API with the given auth_data and returns the response
Create Session ODL_SESSION http://${controller_ip}:8181
${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
- ${resp}= RequestsLibrary.POST ODL_SESSION ${AUTH_TOKEN_API} data=${auth_data} headers=${headers}
+ ${resp}= RequestsLibrary.POST Request ODL_SESSION ${AUTH_TOKEN_API} data=${auth_data} headers=${headers}
Delete All Sessions
[Return] ${resp}
[Arguments] ${token}
[Documentation] Requests the given token be revoked via POST to ${REVOKE_TOKEN_API}
${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
- ${resp}= RequestsLibrary.POST ODL_SESSION ${REVOKE_TOKEN_API} data=${token} headers=${headers}
+ ${resp}= RequestsLibrary.POST Request ODL_SESSION ${REVOKE_TOKEN_API} data=${token} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 204
Validate Token Format
[Documentation] Will return user information. If no user id is passed, it will retrieve all users in DB
Create Session httpbin http://${ODL_SYSTEM_IP}:${RESTPORT}
${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
- ${resp}= RequestsLibrary.GET httpbin ${idmurl}/users/${user_id} headers=${headers}
+ ${resp}= RequestsLibrary.GET Request httpbin ${idmurl}/users/${user_id} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
[Return] ${resp}
[Documentation] Will return user information. If no user id is passed, it will retrieve all users in DB
Create Session httpbin http://${ODL_SYSTEM_IP}:${RESTPORT}
${headers}= Create Dictionary Content-Type=application/json
- ${resp}= RequestsLibrary.POST httpbin ${idmurl}/users headers=${headers} data=${user_data}
+ ${resp}= RequestsLibrary.POST Request httpbin ${idmurl}/users headers=${headers} data=${user_data}
Should Be Equal As Strings ${resp.status_code} 201
Log ${resp.content}
[Return] ${resp}
[Documentation] Put XML data to given controller-config URI, check reponse text is empty and status_code is one of allowed ones.
BuiltIn.Log ${uri_part}
BuiltIn.Log ${xml_data}
- ${response}= RequestsLibrary.Put cvr_session ${uri_part} data=${xml_data}
+ ${response}= RequestsLibrary.Put Request cvr_session ${uri_part} data=${xml_data}
BuiltIn.Log ${response.text}
BuiltIn.Log ${response.status_code}
BuiltIn.Should_Be_Empty ${response.text}
[Arguments] ${uri_part}
[Documentation] Get XML data from given controller-config URI, check status_code is one of allowed ones, return response text.
BuiltIn.Log ${uri_part}
- ${response}= RequestsLibrary.Get cvr_session ${uri_part} headers=${ACCEPT_XML}
+ ${response}= RequestsLibrary.Get Request cvr_session ${uri_part} headers=${ACCEPT_XML}
BuiltIn.Log ${response.text}
BuiltIn.Log ${response.status_code}
BuiltIn.Should_Contain ${allowed_status_codes} ${response.status_code}
[Arguments] ${uri_part}
[Documentation] Get XML data from given controller-config URI, check status_code is one of allowed ones, return response text.
BuiltIn.Log ${uri_part}
- ${response}= RequestsLibrary.Get cvr_session ${uri_part} headers=${ACCEPT_JSON}
+ ${response}= RequestsLibrary.Get Request cvr_session ${uri_part} headers=${ACCEPT_JSON}
BuiltIn.Log ${response.text}
BuiltIn.Log ${response.status_code}
BuiltIn.Should_Contain ${allowed_status_codes} ${response.status_code}
[Arguments] ${uri_part}
[Documentation] Delete resource at controller-config URI, check reponse text is empty and status_code is 204.
BuiltIn.Log ${uri_part}
- ${response}= RequestsLibrary.Delete cvr_session ${uri_part}
+ ${response}= RequestsLibrary.Delete Request cvr_session ${uri_part}
BuiltIn.Log ${response.text}
BuiltIn.Should_Be_Empty ${response.text}
BuiltIn.Should_Contain ${allowed_status_codes} ${response.status_code}
*** Keywords ***
Check DIDM Registered With Device
[Documentation] Check for DIDM registered with the device
- ${resp}= RequestsLibrary.Get session ${OPERATIONAL_NODES_API}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Should Contain ${resp.content} didm
\ ${payload}= Assemble Payload ${INDEX} ${prefix} ${field bases} ${postfix}
\ Log ${payload}
\ Create_Session session http://${controller_ip}:${RESTCONFPORT}${CONFIG_API} headers=${HEADERS} auth=${AUTH}
- \ ${resp} RequestsLibrary.Post session ${node} ${payload}
+ \ ${resp} RequestsLibrary.Post Request session ${node} ${payload}
\ Log ${resp}
\ Should Be Equal As Strings ${resp} <Response [204]>
[Arguments] ${controller_ip} ${node}
[Documentation] GETs records from a shard on a controller's data store.
Create_Session session http://${controller_ip}:${RESTCONFPORT}${CONFIG_API} headers=${HEADERS} auth=${AUTH}
- ${resp}= RequestsLibrary.Get session ${node}
+ ${resp}= RequestsLibrary.Get Request session ${node}
[Return] ${resp.json()}
Update Records
\ ${payload}= Assemble Payload ${INDEX} ${prefix} ${field bases} ${postfix}
\ Log ${payload}
\ Create_Session session http://${controller_ip}:${RESTCONFPORT}${CONFIG_API} headers=${HEADERS} auth=${AUTH}
- \ ${resp}= RequestsLibrary.Put session ${node}/${INDEX} ${payload}
+ \ ${resp}= RequestsLibrary.Put Request session ${node}/${INDEX} ${payload}
\ Log ${resp}
\ Should Be Equal As Strings ${resp} <Response [200]>
${last} Convert to Integer ${last}
: FOR ${INDEX} IN RANGE ${first} ${last+1}
\ Create_Session session http://${controller_ip}:${RESTCONFPORT}${CONFIG_API} headers=${HEADERS} auth=${AUTH}
- \ ${resp}= RequestsLibrary.Delete session ${node}/${INDEX}
+ \ ${resp}= RequestsLibrary.Delete Request session ${node}/${INDEX}
\ Should Be Equal As Strings ${resp} <Response [200]>
Delete All Records
[Arguments] ${controller_ip} ${node}
[Documentation] DELETEs all records from a shard on a controller's data store.
Create_Session session http://${controller_ip}:${RESTCONFPORT}${CONFIG_API} headers=${HEADERS} auth=${AUTH}
- ${resp}= RequestsLibrary.Delete session ${node}
+ ${resp}= RequestsLibrary.Delete Request session ${node}
Should Be Equal As Strings ${resp} <Response [200]>
Assemble Payload
Add Flow To Controller And Verify
[Arguments] ${flow_body} ${node_id} ${table_id} ${flow_id}
[Documentation] Push flow through REST-API and verify in data-store
- ${resp} RequestsLibrary.Put session ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id} headers=${HEADERS_XML} data=${flow_body}
+ ${resp} RequestsLibrary.Put Request session ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id} headers=${HEADERS_XML} data=${flow_body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id} headers=${ACCEPT_XML}
+ ${resp} RequestsLibrary.Get Request session ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id} headers=${ACCEPT_XML}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
compare xml ${flow_body} ${resp.content}
Remove Flow From Controller And Verify
[Arguments] ${flow_body} ${node_id} ${table_id} ${flow_id}
[Documentation] Remove flow
- ${resp} RequestsLibrary.Delete session ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}
+ ${resp} RequestsLibrary.Delete Request session ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${REST_CON}/node/${node_id}/table/${table_id}
+ ${resp} RequestsLibrary.Get Request session ${REST_CON}/node/${node_id}/table/${table_id}
Log ${resp.content}
Should Not Contain ${resp.content} ${flow_id}
write dpctl dump-flows -O OpenFlow13
${switchoutput} Read Until >
${headers}= Create Dictionary Content-Type=application/yang.data+xml
- ${resp} RequestsLibrary.Post session restconf/operations/sal-flow:remove-flow data=${flow.xml} headers=${headers}
+ ${resp} RequestsLibrary.Post Request session restconf/operations/sal-flow:remove-flow data=${flow.xml} headers=${headers}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- ${resp}= RequestsLibrary.Get session ${OPERATIONAL_NODES_API}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
Log ${resp.content}
Should Not Contain ${resp.content} "output-node-connector": "CONTROLLER",
${strings_to_check_for}= Create List CONTROLLER
[Documentation] Checks the config store for given flow. Returns True if present, otherwise returns False
... This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
${headers}= Create Dictionary Accept=application/xml
- ${resp}= RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers}
+ ${resp}= RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers}
Log ${resp}
Log ${resp.content}
Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY}
[Documentation] Checks the operational store for given flow. Returns True if present, otherwise returns False
... This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
${headers}= Create Dictionary Accept=application/xml
- ${resp}= RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id} headers=${headers}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id} headers=${headers}
Log ${resp}
Log ${resp.content}
Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY}
Set Element Attribute ${nodeelm} xmlns:inv urn:opendaylight:inventory
Log Element ${req}
${strxml}= Element To String ${req}
- ${resp}= RequestsLibrary.Post session /restconf/operations/sal-flow:add-flow data=${strxml}
+ ${resp}= RequestsLibrary.Post Request session /restconf/operations/sal-flow:add-flow data=${strxml}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
[Arguments] ${node_id} ${table_id} ${flow_body}
[Documentation] Configures a flow specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using POST method
Log ${flow_body}
- ${resp}= RequestsLibrary.Post session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id} data=${flow_body}
+ ${resp}= RequestsLibrary.Post Request session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id} data=${flow_body}
Log ${resp.content}
${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 204 msg=${msg}
Set Element Attribute ${nodeelm} xmlns:inv urn:opendaylight:inventory
Log Element ${xml}
${strxml}= Element To String ${xml}
- ${resp}= RequestsLibrary.Post session /restconf/operations/sal-flow:update-flow data=${strxml}
+ ${resp}= RequestsLibrary.Post Request session /restconf/operations/sal-flow:update-flow data=${strxml}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
[Arguments] ${node_id} ${table_id} ${flow_id} ${flow_body}
[Documentation] Updates a flow configuration by given flow details (${node_id}, ${table_id}, ${flow_body}) using PUT method
Log ${flow_body}
- ${resp}= RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} data=${flow_body}
+ ${resp}= RequestsLibrary.Put Request session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} data=${flow_body}
Log ${resp.content}
${msg}= Set Variable Updating flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
Set Element Attribute ${nodeelm} xmlns:inv urn:opendaylight:inventory
Log Element ${req}
${strxml}= Element To String ${req}
- ${resp}= RequestsLibrary.Post session /restconf/operations/sal-flow:remove-flow data=${strxml}
+ ${resp}= RequestsLibrary.Post Request session /restconf/operations/sal-flow:remove-flow data=${strxml}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Delete Flow Via Restconf
[Arguments] ${node_id} ${table_id} ${flow_id}
[Documentation] Deletes a flow from configuration datastore specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using DELETE method
- ${resp}= RequestsLibrary.Delete session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id}
+ ${resp}= RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id}
Log ${resp.content}
${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
*** Keywords ***
Unregister Endpoints
[Documentation] Unregister Endpoints Endpoints from ODL
- ${result} = RequestsLibrary.Get session ${ENDPOINTS_OPER_PATH}
+ ${result} = RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}
${json_result} = json.loads ${result.text}
Pass Execution If ${json_result['endpoints']}=={} No Endpoints available
${L2_ENDPOINTS} = Set Variable ${json_result['endpoints']['endpoint']}
Unregister L2Endpoints ${L2_ENDPOINTS}
Log ${L3_ENDPOINTS}
Unregister L3Endpoints ${L3_ENDPOINTS}
- ${result} = RequestsLibrary.Get session ${ENDPOINTS_OPER_PATH}
+ ${result} = RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}
${json_result} = json.loads ${result.text}
Should Be Empty ${json_result['endpoints']}
# As seen in previous two Keywords, Post does not need long specific URI.
# But during Lithium development, Post ceased to do merge, so those Keywords do not work anymore.
# This Keyword can still be used with specific URI to create a new container and fail if a container was already present.
- ${response}= RequestsLibrary.Post ${NetconfViaRestconf__active_config_session} ${uri_part} data=${xml_data}
+ ${response}= RequestsLibrary.Post Request ${NetconfViaRestconf__active_config_session} ${uri_part} data=${xml_data}
BuiltIn.Log ${response.text}
BuiltIn.Should_Be_Empty ${response.text}
BuiltIn.Should_Be_Equal_As_Strings ${response.status_code} 204
[Documentation] Put XML data to given controller-config URI, check reponse text is empty and status_code is one of allowed ones.
BuiltIn.Log ${uri_part}
BuiltIn.Log ${xml_data}
- ${response}= RequestsLibrary.Put ${NetconfViaRestconf__active_config_session} ${uri_part} data=${xml_data}
+ ${response}= RequestsLibrary.Put Request ${NetconfViaRestconf__active_config_session} ${uri_part} data=${xml_data}
BuiltIn.Log ${response.text}
BuiltIn.Log ${response.status_code}
BuiltIn.Should_Be_Empty ${response.text}
[Documentation] Put JSON data to given controller-config URI, check reponse text is empty and status_code is one of allowed ones.
BuiltIn.Log ${uri_part}
BuiltIn.Log ${json_data}
- ${response}= RequestsLibrary.Put ${NetconfViaRestconf__active_config_session} ${uri_part} data=${json_data} headers=${HEADERS_YANG_JSON}
+ ${response}= RequestsLibrary.Put Request ${NetconfViaRestconf__active_config_session} ${uri_part} data=${json_data} headers=${HEADERS_YANG_JSON}
BuiltIn.Log ${response.text}
BuiltIn.Log ${response.status_code}
BuiltIn.Should_Be_Empty ${response.text}
[Arguments] ${uri_part}
[Documentation] Delete resource at controller-config URI, check reponse text is empty and status_code is 204.
BuiltIn.Log ${uri_part}
- ${response}= RequestsLibrary.Delete ${NetconfViaRestconf__active_config_session} ${uri_part}
+ ${response}= RequestsLibrary.Delete Request ${NetconfViaRestconf__active_config_session} ${uri_part}
BuiltIn.Log ${response.text}
BuiltIn.Should_Be_Empty ${response.text}
BuiltIn.Should_Contain ${allowed_status_codes} ${response.status_code}
Fetch Intent List
[Documentation] Check if VTN Renderer feature is installed.
- ${resp}= RequestsLibrary.Get session ${INTENTS}
+ ${resp}= RequestsLibrary.Get Request session ${INTENTS}
Should Be Equal As Strings ${resp.status_code} 200
Add Intent Using RestConf
[Arguments] ${intent_id} ${intent_data}
[Documentation] Create a intent with specified parameters.
- ${resp}= RequestsLibrary.put session ${REST_CONTEXT_INTENT}/${intent_id} data=${intent_data}
+ ${resp}= RequestsLibrary.put Request session ${REST_CONTEXT_INTENT}/${intent_id} data=${intent_data}
Should Be Equal As Strings ${resp.status_code} 200
Verify Intent Using RestConf
[Arguments] ${intent_id}
[Documentation] Verify If intent is created.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT_INTENT}/${intent_id}
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT_INTENT}/${intent_id}
Should Be Equal As Strings ${resp.status_code} 200
Update Intent Using RestConf
[Arguments] ${intent_id} ${intent_data}
[Documentation] Update a intent with specified parameters.
- ${resp}= RequestsLibrary.put session ${REST_CONTEXT_INTENT}/${intent_id} data=${intent_data}
+ ${resp}= RequestsLibrary.put Request session ${REST_CONTEXT_INTENT}/${intent_id} data=${intent_data}
Should Be Equal As Strings ${resp.status_code} 200
Delete Intent Using RestConf
[Arguments] ${intent_id}
[Documentation] Delete a intent with specified parameters.
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT_INTENT}/${intent_id}
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT_INTENT}/${intent_id}
Should Be Equal As Strings ${resp.status_code} 200
Add Intent From Karaf Console
Operate_Xml_Lsp_Return_Json
[Arguments] ${uri_part} ${xml_data}
[Documentation] Post XML data to given pcep-operations URI, check status_code is 200 and return response text (JSON).
- ${response}= RequestsLibrary.Post pcep_session ${uri_part} data=${xml_data}
+ ${response}= RequestsLibrary.Post Request pcep_session ${uri_part} data=${xml_data}
Should_Be_Equal_As_Strings ${response.status_code} 200
[Return] ${response.text}
Check Number Of Hosts
[Arguments] ${hosts}
[Documentation] Check number of hosts in inventory
- ${resp}= RequestsLibrary.Get session ${OPERATIONAL_TOPO_API}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log Check number of hosts in inventory
Log To Console Check number of hosts in inventory
Should Be Equal As Strings ${resp.status_code} 200
Check Number Of Links
[Arguments] ${links}
[Documentation] Check number of links in inventory is ${links}
- ${resp}= RequestsLibrary.Get session ${OPERATIONAL_TOPO_API}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log Check number of links in inventory is ${links}
Log To Console Check number of links in inventory is ${links}
Should Be Equal As Strings ${resp.status_code} 200
Check No Hosts
[Documentation] Check if all hosts are deleted from inventory
- ${resp}= RequestsLibrary.Get session ${OPERATIONAL_TOPO_API}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log To Console Checking no hosts are present in operational database
Log Checking no hosts are present in operational database
Should Be Equal As Strings ${resp.status_code} 200
${mac}= Convert To Integer ${mac}
: FOR ${switch} IN RANGE 1 ${switches+1}
\ ${dpid_decimal}= Evaluate ${mac}+${switch}
- \ ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/node/openflow:${dpid_decimal}
+ \ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/openflow:${dpid_decimal}
\ Should Be Equal As Strings ${resp.status_code} 200
\ Log To Console Checking Switch ${switch}
\ Should Contain ${resp.content} flow-capable-node-connector-statistics
Check Linear Topology
[Arguments] ${switches}
[Documentation] Check Linear topology given ${switches}
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log To Console Checking Topology
Should Be Equal As Strings ${resp.status_code} 200
: FOR ${switch} IN RANGE 1 ${switches+1}
Check No Switches
[Arguments] ${switches}
[Documentation] Check no switch is in inventory
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
Log To Console Checking No Switches
Should Be Equal As Strings ${resp.status_code} 200
: FOR ${switch} IN RANGE 1 ${switches+1}
Check No Topology
[Arguments] ${switches}
[Documentation] Check no switch is in topology
- ${resp} RequestsLibrary.Get session ${OPERATIONAL_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log To Console Checking No Topology
Should Be Equal As Strings ${resp.status_code} 200
: FOR ${switch} IN RANGE 1 ${switches+1}
Verify Switch In Operational Data Store
[Arguments] ${switch}
[Documentation] Verifies the existence of the switch.datapath_id in the operational datastore.
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Log ${resp.content}
Should Match Regexp ${resp.content} openflow:${switch.datapath_id}
Verify Switch Not In Operational Data Store
[Arguments] ${switch}
[Documentation] Verifies that the given switch.datapath_id is not in the operational datastore.
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Log ${resp.content}
Should Not Match Regexp ${resp.content} openflow:${switch.datapath_id}
[Arguments] ${uri}
${resp} RequestsLibrary.Delete Request session ${uri}
Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${uri}
+ ${resp} RequestsLibrary.Get Request session ${uri}
Should Be Equal As Strings ${resp.status_code} 404
Add Elements To URI From File
Post Log Check
[Arguments] ${uri} ${body} ${status_code}=200
[Documentation] Post body to ${uri}, log response content, and check status
- ${resp}= RequestsLibrary.Post session ${uri} ${body}
+ ${resp}= RequestsLibrary.Post Request session ${uri} ${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} ${status_code}
[Return] ${resp}
Get Coordinator Version
[Documentation] Get API version for testing
- ${resp} RequestsLibrary.Get session ${VTNWEBAPI}/api_version
+ ${resp} RequestsLibrary.Get Request session ${VTNWEBAPI}/api_version
Should Be Equal As Strings ${resp.status_code} 200
Add a Controller
${controllerinfo} Create Dictionary controller_id=${ctrlname} type=odc ipaddr=${ctrlip} version=1.0
${controllercreate} Create Dictionary controller=${controllerinfo}
${controllercreate_json}= json.dumps ${controllercreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Remove Controller
[Arguments] ${ctrlname}
[Documentation] Delete a Controller
- ${resp} RequestsLibrary.Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
+ ${resp} RequestsLibrary.Delete Request session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
Should Be Equal As Strings ${resp.status_code} 204
Update Controller
${controllerinfo} Create Dictionary description=${desc} ipaddr=${ctrlip} version=1.0
${controllerupdate} Create Dictionary controller=${controllerinfo}
${controllerupdate_json}= json.dumps ${controllerupdate}
- ${resp} RequestsLibrary.Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json data=${controllerupdate_json}
+ ${resp} RequestsLibrary.Put Request session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json data=${controllerupdate_json}
Should Be Equal As Strings ${resp.status_code} 204
Audit Controller
${auditinfo} Create Dictionary force=false real-network_audit=false
${auditupdate} Create Dictionary audit=${auditinfo}
${auditupdate_json}= json.dumps ${auditupdate}
- ${resp} RequestsLibrary.Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/audit.json data=${auditupdate_json}
+ ${resp} RequestsLibrary.Put Request session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/audit.json data=${auditupdate_json}
Should Be Equal As Strings ${resp.status_code} 204
Check Controller Status
[Arguments] ${ctrlname} ${stat}
[Documentation] Get controller status
- ${resp} RequestsLibrary.Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
+ ${resp} RequestsLibrary.Get Request session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
${contents} To JSON ${resp.content}
${controllerblock} Get From Dictionary ${contents} controller
${status} Get From Dictionary ${controllerblock} operstatus
${vtninfo} Create Dictionary vtn_name=${vtnname} description=${vtndescription}
${vtncreate} Create Dictionary vtn=${vtninfo}
${vtncreate_json}= json.dumps ${vtncreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Delete a VTN
[Arguments] ${vtnname}
[Documentation] Delete a VTN Created
- ${resp} RequestsLibrary.Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
+ ${resp} RequestsLibrary.Delete Request session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
Should Be Equal As Strings ${resp.status_code} 204
Create VBR in VTN
${vbrinfo} Create Dictionary vbr_name=${vbrname} controller_id=${ctrlname} domain_id=(DEFAULT)
${vbrcreate} Create Dictionary vbridge=${vbrinfo}
${vbrcreate_json}= json.dumps ${vbrcreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate_json}
Run Keyword If '${vbrname}' == 'Vbr_audit' Should Be Equal As Strings ${resp.status_code} 202
... ELSE Should Be Equal As Strings ${resp.status_code} 201
${vbrifinfo} Create Dictionary if_name=${vbrifname} description=${ifdescription}
${vbrifcreate} Create Dictionary interface=${vbrifinfo}
${vbrifcreate_json}= json.dumps ${vbrifcreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate_json}
Should Be Equal As Strings ${resp.status_code} ${retcode}
Define Portmap for VBRIF
${logical_port_info} Create Dictionary logical_port_id=${logical_port_id}
${portmapdefine} Create Dictionary portmap=${logical_port_info}
${portmapdefine_json}= json.dumps ${portmapdefine}
- ${resp} RequestsLibrary.Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine_json}
+ ${resp} RequestsLibrary.Put Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine_json}
Should Be Equal As Strings ${resp.status_code} 204
Add a FLOWLIST
${flowlistinfo} Create Dictionary fl_name=${flowlistname} ip_version=${ipversion}
${flowlistcreate} Create Dictionary flowlist=${flowlistinfo}
${flowlistcreate_json}= json.dumps ${flowlistcreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${FLOWLISTS_CREATE} data=${flowlistcreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${FLOWLISTS_CREATE} data=${flowlistcreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWLISTENTRY
... ipsrcaddrprefix=32 ipproto=1
${flowlistentrycreate} Create Dictionary flowlistentry=${flowlistentryinfo}
${flowlistentrycreate_json}= json.dumps ${flowlistentrycreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE} data=${flowlistentrycreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE} data=${flowlistentrycreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWLISTENTRY_ANY in FLOWLIST
${flowlistentryinfo} Create Dictionary seqnum=1
${flowlistentrycreate} Create Dictionary flowlistentry=${flowlistentryinfo}
${flowlistentrycreate_json}= json.dumps ${flowlistentrycreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE} data=${flowlistentrycreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE} data=${flowlistentrycreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Create VBRIF in FLOWFILTER
${flowfilters_info} Create Dictionary ff_type=${ff_type}
${flowfiltersdefine} Create Dictionary flowfilter=${flowfilters_info}
${flowfiltersdefine_json}= json.dumps ${flowfiltersdefine}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS_CREATE} data=${flowfiltersdefine_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS_CREATE} data=${flowfiltersdefine_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWFILTERENTRY DROP In VBRIFFLOWFILTER
${flowfilterentryinfo} Create Dictionary seqnum=233 fl_name=Flowlist1 action_type=${actiontype} priority=3 dscp=55
${flowfilterentrycreate} Create Dictionary flowfilterentry=${flowfilterentryinfo}
${flowfilterentrycreate_json}= json.dumps ${flowfilterentrycreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE} data=${flowfilterentrycreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE} data=${flowfilterentrycreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWFILTERENTRY PASS In VBRIFFLOWFILTER
${flowfilterentryinfo} Create Dictionary fl_name=Flowlist1 action_type=${actiontype} priority=3 dscp=55
${flowfilterentrycreate} Create Dictionary flowfilterentry=${flowfilterentryinfo}
${flowfilterentrycreate_json}= json.dumps ${flowfilterentrycreate}
- ${resp} RequestsLibrary.Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERS_UPDATE}/${seqnum} data=${flowfilterentrycreate_json}
+ ${resp} RequestsLibrary.Put Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERS_UPDATE}/${seqnum} data=${flowfilterentrycreate_json}
Should Be Equal As Strings ${resp.status_code} 204
Create FLOWFILTER in VBR
${flowfilters_info} Create Dictionary ff_type=${ff_type}
${flowfiltersdefine} Create Dictionary flowfilter=${flowfilters_info}
${flowfiltersdefine_json}= json.dumps ${flowfiltersdefine}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS_CREATE} data=${flowfiltersdefine_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS_CREATE} data=${flowfiltersdefine_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWFILTERENTRY PASS in VBRFLOWFILTER
${flowfilterentryinfo_1} Create Dictionary vnode_name=${vbrname} fl_name=Flowlist1 direction=in
${flowfilterentrycreate} Create Dictionary flowfilterentry=${flowfilterentryinfo}
${flowfilterentrycreate_json}= json.dumps ${flowfilterentrycreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE} data=${flowfilterentrycreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE} data=${flowfilterentrycreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWFILTER in VTN
${flowfilters_info} Create Dictionary ff_type=${ff_type}
${flowfiltersdefine} Create Dictionary flowfilter=${flowfilters_info}
${flowfiltersdefine_json}= json.dumps ${flowfiltersdefine}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS_CREATE} data=${flowfiltersdefine_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS_CREATE} data=${flowfiltersdefine_json}
Should Be Equal As Strings ${resp.status_code} 201
Create FLOWFILTERENTRY PASS in VTNFLOWFILTER
${flowfilterentryinfo} Create Dictionary seqnum=233 fl_name=Flowlist1 action_type=${actiontype} priority=3 dscp=55
${flowfilterentrycreate} Create Dictionary flowfilterentry=${flowfilterentryinfo}
${flowfilterentrycreate_json}= json.dumps ${flowfilterentrycreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE} data=${flowfilterentrycreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE} data=${flowfilterentrycreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Create VLANMAP in VBRIDGE
${vlaninfo} Create Dictionary vlan_id=${vlanid}
${vlancreate} Create Dictionary vlanmap=${vlaninfo}
${vlancreate_json}= json.dumps ${vlancreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VLANMAP_CREATE } data=${vlancreate_json}
+ ${resp} RequestsLibrary.Post Request session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VLANMAP_CREATE } data=${vlancreate_json}
Should Be Equal As Strings ${resp.status_code} 201
Start vlan_topo
Delete a FLOWLIST
[Arguments] ${flowlistname}
[Documentation] Delete a Flowlist
- ${resp} RequestsLibrary.Delete session ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}.json
+ ${resp} RequestsLibrary.Delete Request session ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}.json
Should Be Equal As Strings ${resp.status_code} 204
Test Ping
Verify Switch
[Arguments] ${ctrlname} ${switch_id}
[Documentation] Get switch
- ${resp} RequestsLibrary.Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
+ ${resp} RequestsLibrary.Get Request session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
${contents} To JSON ${resp.content}
${switchblock} Get From Dictionary ${contents} switch
${status} Get From Dictionary ${switchblock} switch_id
Verify SwitchPort
[Arguments] ${ctrlname} ${switch_id}
[Documentation] Get switch
- ${resp} RequestsLibrary.Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
+ ${resp} RequestsLibrary.Get Request session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
Should Be Equal As Strings ${resp.status_code} 200
Fetch vtn list
[Documentation] Check if VTN Manager is up.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT_VTNS}
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT_VTNS}
Should Be Equal As Strings ${resp.status_code} 200
Fetch vtn switch inventory
[Arguments] ${sw_name}
[Documentation] Check if Switch is detected.
- ${resp}= RequestsLibrary.Get session ${VTN_INVENTORY}/vtn-inventory:vtn-node/${sw_name}
+ ${resp}= RequestsLibrary.Get Request session ${VTN_INVENTORY}/vtn-inventory:vtn-node/${sw_name}
Should Be Equal As Strings ${resp.status_code} 200
Add a vtn
[Arguments] ${vtn_name} ${vtn_data}
[Documentation] Create a vtn with specified parameters.
- ${resp}= RequestsLibrary.Post session ${REST_CONTEXT_VTNS}/${vtn_name} data=${vtn_data}
+ ${resp}= RequestsLibrary.Post Request session ${REST_CONTEXT_VTNS}/${vtn_name} data=${vtn_data}
Should Be Equal As Strings ${resp.status_code} 201
Delete a vtn
[Arguments] ${vtn_name}
[Documentation] Create a vtn with specified parameters.
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT_VTNS}/${vtn_name}
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT_VTNS}/${vtn_name}
Should Be Equal As Strings ${resp.status_code} 200
Add a vBridge
[Arguments] ${vtn_name} ${vBridge_name} ${vBridge_data}
[Documentation] Create a vBridge in a VTN
- ${resp}= RequestsLibrary.Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name} data=${vBridge_data}
+ ${resp}= RequestsLibrary.Post Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name} data=${vBridge_data}
Should Be Equal As Strings ${resp.status_code} 201
Add a interface
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${interface_data}
[Documentation] Create a interface into a vBridge of a VTN
- ${resp}= RequestsLibrary.Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name} data=${interface_data}
+ ${resp}= RequestsLibrary.Post Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name} data=${interface_data}
Should Be Equal As Strings ${resp.status_code} 201
Add a portmap
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${portmap_data}
[Documentation] Create a portmap for a interface of a vbridge
${json_data}= json.dumps ${portmap_data}
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${json_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${json_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 200
Verify Data Flows
[Arguments] ${vtn_name} ${vBridge_name}
[Documentation] Verify the reason and physical data flows for the specified vtn and vbridge
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
Run Keyword If '${vBridge_name}' == 'vBridge1' DataFlowsForBridge ${resp} @{BRIDGE1_DATAFLOW}
... ELSE IF '${vBridge_name}' == 'vBridge2' DataFlowsForBridge ${resp} @{BRIDGE2_DATAFLOW}
... ELSE IF '${vBridge_name}' == 'vBridge1_vlan' DataFlowsForBridge ${resp} @{VLANMAP_BRIDGE1_DATAFLOW}
[Arguments] ${pathmap_data}
[Documentation] Create a pathmap for a vtn
${json_data}= json.dumps ${pathmap_data}
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT}/pathmaps/${policy_id} data=${pathmap_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT}/pathmaps/${policy_id} data=${pathmap_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Get a pathmap
[Documentation] Get a pathmap for a vtn.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT}/pathmaps
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT}/pathmaps
: FOR ${pathElement} IN @{PATHMAP_ATTR}
\ should Contain ${resp.content} ${pathElement}
[Arguments] ${pathpolicy_data}
[Documentation] Create a pathpolicy for a vtn
${json_data}= json.dumps ${pathpolicy_data}
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT}/pathpolicies/${policy_id} data=${pathpolicy_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT}/pathpolicies/${policy_id} data=${pathpolicy_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Get a pathpolicy
[Documentation] Get a pathpolicy for a vtn.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT}/pathpolicies/${policy_id}
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT}/pathpolicies/${policy_id}
: FOR ${pathpolicyElement} IN @{PATHPOLICY_ATTR}
\ should Contain ${resp.content} ${pathpolicyElement}
Delete a pathmap
[Documentation] Delete a pathmap for a vtn
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT}/pathmaps/1
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT}/pathmaps/1
Should Be Equal As Strings ${resp.status_code} 200
Get a pathmap after delete
[Documentation] Get a pathmap for a vtn.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT}/pathmaps
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT}/pathmaps
: FOR ${pathElement} IN @{PATHMAP_ATTR}
\ should Not Contain ${resp.content} ${pathElement}
Delete a pathpolicy
[Documentation] Delete a pathpolicy for a vtn
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT}/pathpolicies/1
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT}/pathpolicies/1
Should Be Equal As Strings ${resp.status_code} 200
Get a pathpolicy after delete
[Documentation] Get a pathpolicy for a vtn after delete.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT}/pathpolicies/${policy_id}
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT}/pathpolicies/${policy_id}
: FOR ${pathpolicyElement} IN @{PATHPOLICY_ATTR}
\ should Not Contain ${resp.content} ${pathpolicyElement}
[Arguments] ${vtn_name} ${vBridge_name} ${macmap_data}
[Documentation] Create a macmap for a vbridge
${json_data}= json.dumps ${macmap_data}
- ${resp}= RequestsLibrary.Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/macmap/allow data=${macmap_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Post Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/macmap/allow data=${macmap_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Get DynamicMacAddress
[Arguments] ${tenant_name} ${Bridge_name} ${bridge_macmap_data}
[Documentation] Create a vbridge macmap for a bridge
${json_data}= json.dumps ${bridge_macmap_data}
- ${resp}= RequestsLibrary.Post session ${REST_CONTEXT_VTNS}/${tenant_name}/vbridges/${Bridge_name}/macmap/allow data=${json_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Post Request session ${REST_CONTEXT_VTNS}/${tenant_name}/vbridges/${Bridge_name}/macmap/allow data=${json_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Mininet Ping Should Succeed
Delete a interface
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name}
[Documentation] Delete a interface with specified parameters.
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}
Should Be Equal As Strings ${resp.status_code} 200
Start vlan_topo
Add a vlanmap
[Arguments] ${vtn_name} ${vBridge_name} ${vlanmap_data}
[Documentation] Create a vlanmap
- ${resp}= RequestsLibrary.Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/vlanmaps/ data=${vlanmap_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Post Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/vlanmaps/ data=${vlanmap_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Get flow
[Arguments] ${vtn_name}
[Documentation] Get data flow.
- ${resp}= RequestsLibrary.Get session ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
+ ${resp}= RequestsLibrary.Get Request session ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
Should Be Equal As Strings ${resp.status_code} 200
Remove a portmap
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${portmap_data}
[Documentation] Remove a portmap for a interface of a vbridge
${json_data}= json.dumps ${portmap_data}
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${json_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${json_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 200
Verify FlowMacAddress
[Arguments] ${cond_name} ${flowcond_data}
[Documentation] Create a flowcondition for a interface of a vbridge
${json_data}= json.dumps ${flowcond_data}
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT}/flowconditions/${cond_name} data=${json_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT}/flowconditions/${cond_name} data=${json_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Delete a flowcondition
[Arguments] ${cond_name}
[Documentation] Delete a flowcondition for a interface of a vbridge
- ${resp}= RequestsLibrary.Delete session ${REST_CONTEXT}/flowconditions/${cond_name}
+ ${resp}= RequestsLibrary.Delete Request session ${REST_CONTEXT}/flowconditions/${cond_name}
Should Be Equal As Strings ${resp.status_code} 200
Add a flowfilter
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${flowfilter_data} ${ff_index}
[Documentation] Create a flowfilter for a vtn
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Add a flowfilter_vtn
[Arguments] ${vtn_name} ${flowfilter_data} ${ff_index}
[Documentation] Create a flowfilter for a vtn
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT_VTNS}/${vtn_name}/flowfilters/${ff_index} data=${flowfilter_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT_VTNS}/${vtn_name}/flowfilters/${ff_index} data=${flowfilter_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Add a flowfilter_vbr
[Arguments] ${vtn_name} ${vBridge_name} ${flowfilter_data} ${ff_index}
[Documentation] Create a flowfilter for a vbr
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 201
Update a flowfilter
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${flowfilter_data} ${ff_index}
[Documentation] Create a flowfilter for a vtn
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 200
Add a flowfilter for drop
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${flowfilter_data} ${ff_index}
[Documentation] Create a flowfilter for a vtn
- ${resp}= RequestsLibrary.Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
+ ${resp}= RequestsLibrary.Put Request session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index} data=${flowfilter_data} headers=${HEADERS}
Should Be Equal As Strings ${resp.status_code} 200
Verify Flow Entry for Inet Flowfilter