[Arguments] ${network_uuid}
[Documentation] Returns tenant ID by reading it from existing network.
${resp} = TemplatedRequests.Get_From_Uri uri=${CONFIG_API}/neutron:neutron/networks/network/${network_uuid}/ accept=${ACCEPT_EMPTY} session=session
- ${tenant_id} = Utils.Extract Value From Content ${resp} /network/0/tenant-id strip
+ ${temp_vars} = BuiltIn.Set Variable ['network'][0]['tenant-id']
+ ${tenant_id} = Utils.Extract Value From Content ${resp} ${temp_vars}
[Return] ${tenant_id}
Create Network
Run Command On Mininet ${system} sudo ovs-vsctl del-manager
Extract Value From Content
- [Arguments] ${content} ${index} ${strip}=nostrip
+ [Arguments] ${content} ${index}
[Documentation] Will take the given response content and return the value at the given index as a string
- ${value}= Get Json Value ${content} ${index}
- ${value}= Convert To String ${value}
- ${value}= Run Keyword If '${strip}' == 'strip' Strip Quotes ${value}
+ ${JSON} = Evaluate json.loads('''${content}''') json
+ ${value} = Set Variable ${JSON${index}}
[Return] ${value}
Get Process ID Based On Regex On Remote System
Utils.Check For Elements At URI ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/ ${elements}
${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/0/
BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${fwd_hop1} = Utils.Extract Value From Content ${resp.content} /rendered-service-path-hop/0/service-function-forwarder
+ ${temp_vars} = BuiltIn.Set Variable ['rendered-service-path-hop'][0]['service-function-forwarder']
+ ${fwd_hop1} = Utils.Extract Value From Content ${resp.content} ${temp_vars}
${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/1/
BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${fwd_hop2} = Utils.Extract Value From Content ${resp.content} /rendered-service-path-hop/0/service-function-forwarder
+ ${fwd_hop2} = Utils.Extract Value From Content ${resp.content} ${temp_vars}
${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_RSP_URI}/${rsp1_name}/rendered-service-path-hop/2/
BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${fwd_hop3} = Utils.Extract Value From Content ${resp.content} /rendered-service-path-hop/0/service-function-forwarder
+ ${fwd_hop3} = Utils.Extract Value From Content ${resp.content} ${temp_vars}
BuiltIn.Should Be Equal ${fwd_hop1} ${fwd_hop2}
BuiltIn.Should Be Equal ${fwd_hop2} ${fwd_hop3}
${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/0/
BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${fwd_hop1} = Utils.Extract Value From Content ${resp.content} /rendered-service-path-hop/0/service-function-forwarder
+ ${fwd_hop1} = Utils.Extract Value From Content ${resp.content} ${temp_vars}
${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/1/
BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${fwd_hop2} = Utils.Extract Value From Content ${resp.content} /rendered-service-path-hop/0/service-function-forwarder
+ ${fwd_hop2} = Utils.Extract Value From Content ${resp.content} ${temp_vars}
${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_RSP_URI}/${rsp2_name}/rendered-service-path-hop/2/
BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${fwd_hop3} = Utils.Extract Value From Content ${resp.content} /rendered-service-path-hop/0/service-function-forwarder
+ ${fwd_hop3} = Utils.Extract Value From Content ${resp.content} ${temp_vars}
BuiltIn.Should Be Equal ${fwd_hop1} ${fwd_hop2}
BuiltIn.Should Be Equal ${fwd_hop2} ${fwd_hop3}