6 Post Elements To URI As JSON
7 [Arguments] ${uri} ${data}
8 ${resp} RequestsLibrary.Post Request session ${uri} data=${data} headers=${headers}
9 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
11 Get JSON Elements From URI
13 ${resp} RequestsLibrary.Get Request session ${uri}
14 ${value} To Json ${resp.content}
17 Check Classifier Flows
18 ${flowList}= DockerSfc.Get Flows In Docker Containers
20 Should Contain Match ${flowList} *actions=pop_nsh*
21 Should Contain Match ${flowList} *actions=push_nsh*
23 Check Service Function Types Added
24 [Arguments] ${elements}
25 [Documentation] Check that the service function types are updated with the service function names
26 Check For Elements At URI ${SERVICE_FUNCTION_TYPES_URI} ${elements}
28 Check Service Function Types Removed
29 [Arguments] ${elements}
30 [Documentation] Check that the service function names are removed from the service function types
31 Check For Elements Not At URI ${SERVICE_FUNCTION_TYPES_URI} ${elements}
33 Switch Ips In Json Files
34 [Arguments] ${json_dir} ${container_names}
35 ${normalized_dir}= OperatingSystem.Normalize Path ${json_dir}/*.json
36 : FOR ${cont_name} IN @{container_names}
37 \ ${cont_ip}= Get Docker IP ${cont_name}
38 \ OperatingSystem.Run sudo sed -i 's/${cont_name}/${cont_ip}/g' ${normalized_dir}