rev: 'master'
hooks:
- id: robotframework-tidy-wrapper
- additional_dependencies: ['robotframework==3.1.1'] # Pin due to tidy warning in 3.1.2
+ additional_dependencies: ['robotframework==3.2a1'] # Pin due to tidy warning in 3.1.2
- repo: https://github.com/jorisroovers/gitlint
rev: v0.11.0
[Documentation] Verify routes on quagga
${output} = Execute Show Command On quagga ${dcgw_ip} show ip bgp vrf ${rd}
Log ${output}
- : FOR ${ip} IN @{ip_list}
- \ Should Contain ${output} ${ip}
+ FOR ${ip} IN @{ip_list}
+ Should Contain ${output} ${ip}
+ END
Delete BGP Config On Quagga
[Arguments] ${dcgw_ip} ${bgp_id} ${user}=bgpd ${password}=sdncbgpc
BgpOperations.Create Quagga Telnet Session ${dcgw_ip} bgpd sdncbgpc
BgpOperations.Execute Command On Quagga Telnet Session configure terminal
BgpOperations.Execute Command On Quagga Telnet Session router bgp ${as_id}
- : FOR ${vpn} IN @{vpns}
- \ BgpOperations.Execute Command On Quagga Telnet Session no vrf ${vpn}
+ FOR ${vpn} IN @{vpns}
+ BgpOperations.Execute Command On Quagga Telnet Session no vrf ${vpn}
+ END
BgpOperations.Execute Command On Quagga Telnet Session end
Verify L3VPN On DCGW
[Arguments] ${dcgw_count} ${flag}=True ${start}=${START_VALUE}
[Documentation] Check all BGP VPNv4 neighbor on ODL
${output} = KarafKeywords.Issue Command On Karaf Console ${DISPLAY_VPN4_ALL}
- : FOR ${index} IN RANGE ${start} ${dcgw_count}
- \ BuiltIn.Run Keyword If ${flag}==True BuiltIn.Should Contain ${output} ${DCGW_IP_LIST[${index}]}
- \ ... ELSE BuiltIn.Should Not Contain ${output} ${DCGW_IP_LIST[${index}]}
+ FOR ${index} IN RANGE ${start} ${dcgw_count}
+ BuiltIn.Run Keyword If ${flag}==True BuiltIn.Should Contain ${output} ${DCGW_IP_LIST[${index}]}
+ ... ELSE BuiltIn.Should Not Contain ${output} ${DCGW_IP_LIST[${index}]}
+ END
Second Layer Loop
[Arguments] ${node-id} ${tp-id-list} ${bp-list} ${length}
[Documentation] The keyword is used for the second layer of loop TC5_Configure Te Node.
- : FOR ${j} IN RANGE ${length}
- \ ${tp-id} Get From List ${tp-id-list} ${j}
- \ ${bp} Get From List ${bp-list} ${j}
- \ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} DOMAINID=${DOMAIN_ID_LIST[0]} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
- \ ... TPID=${tp-id} BP=${bp}
- \ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node ${mapping} session
- \ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
+ FOR ${j} IN RANGE ${length}
+ ${tp-id} Get From List ${tp-id-list} ${j}
+ ${bp} Get From List ${bp-list} ${j}
+ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} DOMAINID=${DOMAIN_ID_LIST[0]} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
+ ... TPID=${tp-id} BP=${bp}
+ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node ${mapping} session
+ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
+ END
[Arguments] ${json_body_get} ${timeout} ${flow_count} ${controller_index_list}=${EMPTY}
[Documentation] Get Bulk Flow and Verify Flow Count in ${controller_index_list} matches ${flow_count}.
${index_list} = ClusterManagement.List Indices Or All given_list=${controller_index_list}
- : FOR ${index} IN @{index_list}
- \ Get Bulk Flow ${json_body_get} ${index}
- : FOR ${index} IN @{index_list}
- \ Wait Until Read Finishes ${index} ${timeout}
- : FOR ${index} IN @{index_list}
- \ Verify Flow Count ${flow_count} ${index}
+ FOR ${index} IN @{index_list}
+ Get Bulk Flow ${json_body_get} ${index}
+ END
+ FOR ${index} IN @{index_list}
+ Wait Until Read Finishes ${index} ${timeout}
+ END
+ FOR ${index} IN @{index_list}
+ Verify Flow Count ${flow_count} ${index}
+ END
Set DPN And Flow Count In Json Add
[Arguments] ${json_config} ${dpn_count} ${flows_count}
[Documentation] Simple loop for issuing add-person RPCs to session, one by one.
... People need to be added via RPC, otherwise buy-car routed RPC will not find registered path.
... See javadocs in RpcProviderRegistry.java
- : FOR ${i} IN RANGE ${iter_start} ${iter_start}+${iterations}
- \ TemplatedRequests.Post_As_Json_Templated folder=${VAR_DIR}/add-person mapping={"i": "${i}"} session=${session}
+ FOR ${i} IN RANGE ${iter_start} ${iter_start}+${iterations}
+ TemplatedRequests.Post_As_Json_Templated folder=${VAR_DIR}/add-person mapping={"i": "${i}"} session=${session}
+ END
Buy_Several_Cars
[Arguments] ${session} ${iterations} ${iter_start}=1 ${registration_delay}=20s
[Documentation] Simple loop for issuing buy-car RPCs to session, one by one.
... This needs to be a separate Keyword mostly just because nested FOR loops are not allowed.
... Actual fact of buying one car is done by inner Keyword.
- : FOR ${iter} IN RANGE ${iter_start} ${iter_start}+${iterations}
- \ Buy_Single_Car session=${session} iteration=${iter} registration_delay=${registration_delay}
+ FOR ${iter} IN RANGE ${iter_start} ${iter_start}+${iterations}
+ Buy_Single_Car session=${session} iteration=${iter} registration_delay=${registration_delay}
+ END
Buy_Single_Car
[Arguments] ${session} ${iteration}=1 ${registration_delay}=20s
${leader_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${leader}
BuiltIn.Set_Suite_Variable \${${shard_name}_leader_session} ${leader_session}
${sessions} = BuiltIn.Create_List
- : FOR ${follower_index} IN @{follower_list}
- \ ${follower_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${follower_index}
- \ Collections.Append_To_List ${sessions} ${follower_session}
+ FOR ${follower_index} IN @{follower_list}
+ ${follower_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${follower_index}
+ Collections.Append_To_List ${sessions} ${follower_session}
+ END
BuiltIn.Set_Suite_Variable \${${shard_name}_follower_sessions} ${sessions}
${first_follower_session} = Collections.Get_From_List ${sessions} 0
BuiltIn.Set_Suite_Variable \${${shard_name}_first_follower_session} ${first_follower_session}
${leader_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${leader}
BuiltIn.Set_Suite_Variable \${new_leader_session} ${leader_session}
${sessions} = BuiltIn.Create_List
- : FOR ${follower_index} IN @{follower_list}
- \ ${follower_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${follower_index}
- \ Collections.Append_To_List ${sessions} ${follower_session}
+ FOR ${follower_index} IN @{follower_list}
+ ${follower_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${follower_index}
+ Collections.Append_To_List ${sessions} ${follower_session}
+ END
BuiltIn.Set_Suite_Variable \${new_follower_sessions} ${sessions}
${first_follower_session} = Collections.Get_From_List ${sessions} 0
BuiltIn.Set_Suite_Variable \${new_first_follower_session} ${first_follower_session}
Create JVM Plots
[Arguments] ${controllers_number}=${NUM_ODL_SYSTEM} ${elastic-port}=${ELASTICPORT}
[Documentation] Draw Resource usage plot using plot_points method.
- : FOR ${index} IN RANGE 1 ${controllers_number}+1
- \ ${controller-ip}= Builtin.Set Variable ${ODL_SYSTEM_${index}_IP}
- \ Log ${controller-ip}
- \ ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
- \ Log ${session}
- \ ElasticsearchAppender.Plot Points ${session} JVM Threads threadcount_${index}.png 'Threading' 'ThreadCount'
- \ ElasticsearchAppender.Plot Points ${session} JVM Heap Memory heapmemory_${index}.png 'Memory' 'HeapMemoryUsage'
- \ ... 'used'
- \ ElasticsearchAppender.Plot Points ${session} JVM Loaded Classes class_count_${index}.png 'ClassLoading' 'TotalLoadedClassCount'
- \ ElasticsearchAppender.Plot Points ${session} JVM CPU Usage cpu_usage_${index}.png 'OperatingSystem' 'ProcessCpuLoad'
+ FOR ${index} IN RANGE 1 ${controllers_number}+1
+ ${controller-ip}= Builtin.Set Variable ${ODL_SYSTEM_${index}_IP}
+ Log ${controller-ip}
+ ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
+ Log ${session}
+ ElasticsearchAppender.Plot Points ${session} JVM Threads threadcount_${index}.png 'Threading' 'ThreadCount'
+ ElasticsearchAppender.Plot Points ${session} JVM Heap Memory heapmemory_${index}.png 'Memory' 'HeapMemoryUsage'
+ ... 'used'
+ ElasticsearchAppender.Plot Points ${session} JVM Loaded Classes class_count_${index}.png 'ClassLoading' 'TotalLoadedClassCount'
+ ElasticsearchAppender.Plot Points ${session} JVM CPU Usage cpu_usage_${index}.png 'OperatingSystem' 'ProcessCpuLoad'
+ END
[Arguments] ${member_index_list}=${EMPTY}
[Documentation] Fail if no-sync is detected on a member from list (or any).
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
- \ ${status} = Get_Sync_Status_Of_Member member_index=${index}
- \ BuiltIn.Continue_For_Loop_If 'True' == '${status}'
- \ BuiltIn.Fail Index ${index} has incorrect status: ${status}
+ FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ ${status} = Get_Sync_Status_Of_Member member_index=${index}
+ BuiltIn.Continue_For_Loop_If 'True' == '${status}'
+ BuiltIn.Fail Index ${index} has incorrect status: ${status}
+ END
Get_Sync_Status_Of_Member
[Arguments] ${member_index}
[Arguments] ${shard_name_list} ${shard_type}=operational ${member_index_list}=${EMPTY} ${verify_restconf}=True
[Documentation] For each shard name, call Get_Leader_And_Followers_For_Shard.
... Not much logic there, but single Keyword is useful when using BuiltIn.Wait_Until_Keyword_Succeeds.
- : FOR ${shard_name} IN @{shard_name_list}
- \ Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} validate=True member_index_list=${member_index_list} verify_restconf=${verify_restconf}
+ FOR ${shard_name} IN @{shard_name_list}
+ Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} validate=True member_index_list=${member_index_list} verify_restconf=${verify_restconf}
+ END
Get_Leader_And_Followers_For_Shard
[Arguments] ${shard_name}=default ${shard_type}=operational ${validate}=True ${member_index_list}=${EMPTY} ${verify_restconf}=True ${http_timeout}=${EMPTY}
${ds_type} = BuiltIn.Set_Variable_If '${shard_type}' != 'config' operational config
${leader_list} = BuiltIn.Create_List
${follower_list} = BuiltIn.Create_List
- : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
- \ ${raft_state} = Get_Raft_State_Of_Shard_At_Member shard_name=${shard_name} shard_type=${ds_type} member_index=${index} verify_restconf=${verify_restconf}
- \ ... http_timeout=${http_timeout}
- \ BuiltIn.Run_Keyword_If 'Follower' == '${raft_state}' Collections.Append_To_List ${follower_list} ${index}
- \ ... ELSE IF 'Leader' == '${raft_state}' Collections.Append_To_List ${leader_list} ${index}
- \ ... ELSE IF ${validate} BuiltIn.Fail Unrecognized Raft state: ${raft_state}
+ FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ ${raft_state} = Get_Raft_State_Of_Shard_At_Member shard_name=${shard_name} shard_type=${ds_type} member_index=${index} verify_restconf=${verify_restconf}
+ ... http_timeout=${http_timeout}
+ BuiltIn.Run_Keyword_If 'Follower' == '${raft_state}' Collections.Append_To_List ${follower_list} ${index}
+ ... ELSE IF 'Leader' == '${raft_state}' Collections.Append_To_List ${leader_list} ${index}
+ ... ELSE IF ${validate} BuiltIn.Fail Unrecognized Raft state: ${raft_state}
+ END
[Return] ${leader_list} ${follower_list}
Get_Raft_State_Of_Shard_At_Member
${owner} = String.Replace_String ${entity_owner} member- ${EMPTY}
${owner} = BuiltIn.Convert_To_Integer ${owner}
${entity_candidates_list} = Collections.Get_From_Dictionary @{entity_list}[${entity_index}] candidate
- : FOR ${entity_candidate} IN @{entity_candidates_list}
- \ ${candidate} = String.Replace_String &{entity_candidate}[name] member- ${EMPTY}
- \ ${candidate} = BuiltIn.Convert_To_Integer ${candidate}
- \ Collections.Append_To_List ${candidate_list} ${candidate}
+ FOR ${entity_candidate} IN @{entity_candidates_list}
+ ${candidate} = String.Replace_String &{entity_candidate}[name] member- ${EMPTY}
+ ${candidate} = BuiltIn.Convert_To_Integer ${candidate}
+ Collections.Append_To_List ${candidate_list} ${candidate}
+ END
Collections.Sort_List ${candidate_list}
[Return] ${owner} ${candidate_list}
${owner} = String.Replace_String ${entity_owner} member- ${EMPTY}
${owner} = BuiltIn.Convert_To_Integer ${owner}
${entity_candidates_list} = Collections.Get_From_Dictionary @{entity_list}[${entity_index}] candidate
- : FOR ${entity_candidate} IN @{entity_candidates_list}
- \ ${candidate} = String.Replace_String &{entity_candidate}[name] member- ${EMPTY}
- \ ${candidate} = BuiltIn.Convert_To_Integer ${candidate}
- \ Collections.Append_To_List ${candidate_list} ${candidate}
+ FOR ${entity_candidate} IN @{entity_candidates_list}
+ ${candidate} = String.Replace_String &{entity_candidate}[name] member- ${EMPTY}
+ ${candidate} = BuiltIn.Convert_To_Integer ${candidate}
+ Collections.Append_To_List ${candidate_list} ${candidate}
+ END
Collections.Sort_List ${candidate_list}
BuiltIn.Comment TODO: Separate check lines into Verify_Owner_And_Candidates_For_Type_And_Id
BuiltIn.Run_Keyword_If """${require_candidate_list}""" BuiltIn.Should_Be_Equal ${require_candidate_list} ${candidate_list} Candidate list does not match: ${candidate_list} is not ${require_candidate_list}
BuiltIn.Return_From_Keyword_If not ${confirm} ${updated_index_list}
# TODO: Convert to WUKS with configurable timeout if it turns out 1 second is not enough.
BuiltIn.Sleep 1s Kill -9 closes open files, which may take longer than ssh overhead, but not long enough to warrant WUKS.
- : FOR ${index} IN @{kill_index_list}
- \ Verify_Karaf_Is_Not_Running_On_Member member_index=${index}
+ FOR ${index} IN @{kill_index_list}
+ Verify_Karaf_Is_Not_Running_On_Member member_index=${index}
+ END
Run_Bash_Command_On_List_Or_All command=netstat -pnatu | grep 2550
[Return] ${updated_index_list}
${updated_index_list} = BuiltIn.Create_List @{index_list}
Collections.Remove_Values_From_List ${updated_index_list} @{stop_index_list}
BuiltIn.Return_From_Keyword_If not ${confirm} ${updated_index_list}
- : FOR ${index} IN @{stop_index_list}
- \ BuiltIn.Wait Until Keyword Succeeds ${timeout} 2s Verify_Karaf_Is_Not_Running_On_Member member_index=${index}
+ FOR ${index} IN @{stop_index_list}
+ BuiltIn.Wait Until Keyword Succeeds ${timeout} 2s Verify_Karaf_Is_Not_Running_On_Member member_index=${index}
+ END
Run_Bash_Command_On_List_Or_All command=netstat -pnatu | grep 2550
[Return] ${updated_index_list}
Verify_Restconf_Is_Available
[Arguments] ${member_index_list}
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ ${session} = Resolve_Http_Session_For_Member member_index=${index}
- \ TemplatedRequests.Get_As_Json_Templated session=${session} folder=${RESTCONF_MODULES_DIR} verify=False
+ FOR ${index} IN @{index_list}
+ ${session} = Resolve_Http_Session_For_Member member_index=${index}
+ TemplatedRequests.Get_As_Json_Templated session=${session} folder=${RESTCONF_MODULES_DIR} verify=False
+ END
Freeze_Single_Member
[Arguments] ${member}
... See https://bugs.opendaylight.org/show_bug.cgi?id=8138
${index_list} = List_Indices_Or_All given_list=${member_index_list}
${command} = Set Variable rm -rf "${karaf_home}/journal" "${karaf_home}/snapshots" "${karaf_home}/data"
- : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
- \ Run_Bash_Command_On_Member command=${command} member_index=${index}
+ FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ Run_Bash_Command_On_Member command=${command} member_index=${index}
+ END
Verify_Karaf_Is_Not_Running_On_Member
[Arguments] ${member_index}
${index_list} = List_Indices_Or_All given_list=${member_index_list}
${source} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${isolate_member_index}
${dport} = BuiltIn.Set_Variable_If '${port}' != '${EMPTY}' --dport ${port} ${EMPTY}
- : FOR ${index} IN @{index_list}
- \ ${destination} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
- \ ${command} = BuiltIn.Set_Variable sudo /sbin/iptables -I OUTPUT -p ${protocol} ${dport} --source ${source} --destination ${destination} -j DROP
- \ BuiltIn.Run_Keyword_If "${index}" != "${isolate_member_index}" Run_Bash_Command_On_Member command=${command} member_index=${isolate_member_index}
+ FOR ${index} IN @{index_list}
+ ${destination} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
+ ${command} = BuiltIn.Set_Variable sudo /sbin/iptables -I OUTPUT -p ${protocol} ${dport} --source ${source} --destination ${destination} -j DROP
+ BuiltIn.Run_Keyword_If "${index}" != "${isolate_member_index}" Run_Bash_Command_On_Member command=${command} member_index=${isolate_member_index}
+ END
${command} = BuiltIn.Set_Variable sudo /sbin/iptables -L -n
${output} = Run_Bash_Command_On_Member command=${command} member_index=${isolate_member_index}
BuiltIn.Log ${output}
${index_list} = List_Indices_Or_All given_list=${member_index_list}
${source} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${rejoin_member_index}
${dport} = BuiltIn.Set_Variable_If '${port}' != '${EMPTY}' --dport ${port} ${EMPTY}
- : FOR ${index} IN @{index_list}
- \ ${destination} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
- \ ${command} = BuiltIn.Set_Variable sudo /sbin/iptables -D OUTPUT -p ${protocol} ${dport} --source ${source} --destination ${destination} -j DROP
- \ BuiltIn.Run_Keyword_If "${index}" != "${rejoin_member_index}" Run_Bash_Command_On_Member command=${command} member_index=${rejoin_member_index}
+ FOR ${index} IN @{index_list}
+ ${destination} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
+ ${command} = BuiltIn.Set_Variable sudo /sbin/iptables -D OUTPUT -p ${protocol} ${dport} --source ${source} --destination ${destination} -j DROP
+ BuiltIn.Run_Keyword_If "${index}" != "${rejoin_member_index}" Run_Bash_Command_On_Member command=${command} member_index=${rejoin_member_index}
+ END
${command} = BuiltIn.Set_Variable sudo /sbin/iptables -L -n
${output} = Run_Bash_Command_On_Member command=${command} member_index=${rejoin_member_index}
BuiltIn.Log ${output}
[Arguments] ${command} ${member_index_list}=${EMPTY} ${return_success_only}=False ${log_on_success}=True ${log_on_failure}=True ${stderr_must_be_empty}=True
[Documentation] Cycle through indices (or all), run bash command on each, using temporary SSH session and restoring the previously active one.
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ Check_Bash_Command_On_Member command=${command} member_index=${index} return_success_only=${return_success_only} log_on_success=${log_on_success} log_on_failure=${log_on_failure}
- \ ... stderr_must_be_empty=${stderr_must_be_empty}
+ FOR ${index} IN @{index_list}
+ Check_Bash_Command_On_Member command=${command} member_index=${index} return_success_only=${return_success_only} log_on_success=${log_on_success} log_on_failure=${log_on_failure}
+ ... stderr_must_be_empty=${stderr_must_be_empty}
+ END
Check_Bash_Command_On_Member
[Arguments] ${command} ${member_index} ${return_success_only}=False ${log_on_success}=True ${log_on_failure}=True ${stderr_must_be_empty}=True
[Documentation] Cycle through indices (or all), run command on each.
# TODO: Migrate callers to Check_Bash_Command_*
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ Run_Bash_Command_On_Member command=${command} member_index=${index}
+ FOR ${index} IN @{index_list}
+ Run_Bash_Command_On_Member command=${command} member_index=${index}
+ END
Run_Bash_Command_On_Member
[Arguments] ${command} ${member_index}
[Arguments] ${command} ${member_index_list}=${EMPTY} ${timeout}=10s
[Documentation] Cycle through indices (or all), run karaf command on each.
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ ${member_ip} = Collections.Get_From_Dictionary dictionary=${ClusterManagement__index_to_ip_mapping} key=${index}
- \ KarafKeywords.Safe_Issue_Command_On_Karaf_Console ${command} ${member_ip} timeout=${timeout}
+ FOR ${index} IN @{index_list}
+ ${member_ip} = Collections.Get_From_Dictionary dictionary=${ClusterManagement__index_to_ip_mapping} key=${index}
+ KarafKeywords.Safe_Issue_Command_On_Karaf_Console ${command} ${member_ip} timeout=${timeout}
+ END
Run_Karaf_Command_On_Member
[Arguments] ${command} ${member_index} ${timeout}=10s
[Documentation] Attempt installation on each member from list (or all). Then look for failures.
${index_list} = List_Indices_Or_All given_list=${member_index_list}
${status_list} = BuiltIn.Create_List
- : FOR ${index} IN @{index_list}
- \ ${status} ${text} = BuiltIn.Run_Keyword_And_Ignore_Error Install_Feature_On_Member feature_name=${feature_name} member_index=${index}
- \ ... timeout=${timeout}
- \ BuiltIn.Log ${text}
- \ Collections.Append_To_List ${status_list} ${status}
- : FOR ${status} IN @{status_list}
- \ BuiltIn.Run_Keyword_If "${status}" != "PASS" BuiltIn.Fail ${feature_name} installation failed, see log.
+ FOR ${index} IN @{index_list}
+ ${status} ${text} = BuiltIn.Run_Keyword_And_Ignore_Error Install_Feature_On_Member feature_name=${feature_name} member_index=${index}
+ ... timeout=${timeout}
+ BuiltIn.Log ${text}
+ Collections.Append_To_List ${status_list} ${status}
+ END
+ FOR ${status} IN @{status_list}
+ BuiltIn.Run_Keyword_If "${status}" != "PASS" BuiltIn.Fail ${feature_name} installation failed, see log.
+ END
Install_Feature_On_Member
[Arguments] ${feature_name} ${member_index} ${timeout}=60s
# TODO: For_Index_From_List_Or_All_Run_Keyword applied to With_Ssh_To_Member_Run_Keyword?
# TODO: Imagine another keyword, using ScalarClosures and adding member index as first argument for each call. Worth it?
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${member_index} IN @{index_list}
- \ ${member_ip} = Resolve_IP_Address_For_Member ${member_index}
- \ SSHKeywords.Run_Unsafely_Keyword_Over_Temporary_Odl_Session ${member_ip} ${keyword_name} @{args} &{kwargs}
+ FOR ${member_index} IN @{index_list}
+ ${member_ip} = Resolve_IP_Address_For_Member ${member_index}
+ SSHKeywords.Run_Unsafely_Keyword_Over_Temporary_Odl_Session ${member_ip} ${keyword_name} @{args} &{kwargs}
+ END
Safe_With_Ssh_To_List_Or_All_Run_Keyword
[Arguments] ${member_index_list} ${keyword_name} @{args} &{kwargs}
ClusterManagement__Clean_Directories
[Arguments] ${relative_path_list} ${karaf_home}
[Documentation] For each relative path, remove files with respect to ${karaf_home}. Return None.
- : FOR ${relative_path} IN @{relative_path_list}
- \ SSHLibrary.Execute_Command rm -rf ${karaf_home}${/}${relative_path}
+ FOR ${relative_path} IN @{relative_path_list}
+ SSHLibrary.Execute_Command rm -rf ${karaf_home}${/}${relative_path}
+ END
Put_As_Json_And_Check_Member_List_Or_All
[Arguments] ${uri} ${data} ${member_index} ${member_index_list}=${EMPTY}
[Documentation] Send a GET with the supplied uri to all or some members defined in ${member_index_list}.
... Then check received data is = ${expected data}.
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ ${data} = Get_From_Member uri=${uri} member_index=${index}
- \ TemplatedRequests.Normalize_Jsons_And_Compare ${expected_data} ${data}
+ FOR ${index} IN @{index_list}
+ ${data} = Get_From_Member uri=${uri} member_index=${index}
+ TemplatedRequests.Normalize_Jsons_And_Compare ${expected_data} ${data}
+ END
Check_Item_Occurrence_Member_List_Or_All
[Arguments] ${uri} ${dictionary} ${member_index_list}=${EMPTY}
[Documentation] Send a GET with the supplied uri to all or some members defined in ${member_index_list}.
... Then check received for occurrences of items expressed in a dictionary ${dictionary}.
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ ${data} = Get_From_Member uri=${uri} member_index=${index}
- \ Utils.Check Item Occurrence ${data} ${dictionary}
+ FOR ${index} IN @{index_list}
+ ${data} = Get_From_Member uri=${uri} member_index=${index}
+ Utils.Check Item Occurrence ${data} ${dictionary}
+ END
Check_No_Content_Member_List_Or_All
[Arguments] ${uri} ${member_index_list}=${EMPTY}
[Documentation] Send a GET with the supplied uri to all or some members defined in ${member_index_list}.
... Then check there is no content.
${index_list} = List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ ${session} = Resolve_Http_Session_For_Member member_index=${index}
- \ Utils.No_Content_From_URI ${session} ${uri}
+ FOR ${index} IN @{index_list}
+ ${session} = Resolve_Http_Session_For_Member member_index=${index}
+ Utils.No_Content_From_URI ${session} ${uri}
+ END
Get_From_Member
[Arguments] ${uri} ${member_index} ${access}=${ACCEPT_EMPTY}
[Arguments] ${member_index_list}
[Documentation] Return a list of IP address of given indexes.
${member_ip_list} = BuiltIn.Create_List
- : FOR ${index} IN @{member_index_list}
- \ ${ip_address} = Collections.Get From Dictionary dictionary=${ClusterManagement__index_to_ip_mapping} key=${index}
- \ Collections.Append_To_List ${member_ip_list} ${ip_address}
+ FOR ${index} IN @{member_index_list}
+ ${ip_address} = Collections.Get From Dictionary dictionary=${ClusterManagement__index_to_ip_mapping} key=${index}
+ Collections.Append_To_List ${member_ip_list} ${ip_address}
+ END
[Return] ${member_ip_list}
Resolve_Http_Session_For_Member
@{member_index_list} = BuiltIn.Create_List
@{session_list} = BuiltIn.Create_List
&{index_to_ip_mapping} = BuiltIn.Create_Dictionary
- : FOR ${index} IN RANGE 1 ${int_of_members+1}
- \ ClusterManagement__Include_Member_Index ${index} ${member_index_list} ${session_list} ${index_to_ip_mapping} http_timeout=${http_timeout}
- \ ... http_retries=${http_retries}
+ FOR ${index} IN RANGE 1 ${int_of_members+1}
+ ClusterManagement__Include_Member_Index ${index} ${member_index_list} ${session_list} ${index_to_ip_mapping} http_timeout=${http_timeout}
+ ... http_retries=${http_retries}
+ END
BuiltIn.Set_Suite_Variable \${ClusterManagement__member_index_list} ${member_index_list}
BuiltIn.Set_Suite_Variable \${ClusterManagement__index_to_ip_mapping} ${index_to_ip_mapping}
BuiltIn.Set_Suite_Variable \${ClusterManagement__session_list} ${session_list}
${service_status_output} = BuiltIn.Run Keyword If ${NUM_ODL_SYSTEM} > 1 KarafKeywords.Issue_Command_On_Karaf_Console showSvcStatus -n ${odl_ip} ${odl_ip} ${KARAF_SHELL_PORT}
... ELSE KarafKeywords.Issue_Command_On_Karaf_Console showSvcStatus ${odl_ip} ${KARAF_SHELL_PORT}
BuiltIn.Should Contain ${service_status_output} ${system_ready_state}
- : FOR ${service} IN @{service_list}
- \ BuiltIn.Should Match Regexp ${service_status_output} ${service} +: ${service_state}
+ FOR ${service} IN @{service_list}
+ BuiltIn.Should Match Regexp ${service_status_output} ${service} +: ${service_state}
+ END
Check Status Of Services Is OPERATIONAL
[Arguments] @{service_list}
[Documentation] This keyword will verify whether all the services are operational in all the ODL nodes
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ ClusterManagement.Check Service Status ${ODL_SYSTEM_${i+1}_IP} ACTIVE OPERATIONAL @{service_list}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ClusterManagement.Check Service Status ${ODL_SYSTEM_${i+1}_IP} ACTIVE OPERATIONAL @{service_list}
+ END
${resp} RequestsLibrary.Get Request ${session} ${OPERATIONAL_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ Should Contain ${resp.content} "node-id":"openflow:${switch}"
- \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:1"
- \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:2"
- \ Should Contain ${resp.content} "source-tp":"openflow:${switch}:2"
- \ Should Contain ${resp.content} "dest-tp":"openflow:${switch}:2"
- \ ${edge} Evaluate ${switch}==1 or ${switch}==${switches}
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "tp-id":"openflow:${switch}:3"
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "source-tp":"openflow:${switch}:3"
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "dest-tp":"openflow:${switch}:3
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ Should Contain ${resp.content} "node-id":"openflow:${switch}"
+ Should Contain ${resp.content} "tp-id":"openflow:${switch}:1"
+ Should Contain ${resp.content} "tp-id":"openflow:${switch}:2"
+ Should Contain ${resp.content} "source-tp":"openflow:${switch}:2"
+ Should Contain ${resp.content} "dest-tp":"openflow:${switch}:2"
+ ${edge} Evaluate ${switch}==1 or ${switch}==${switches}
+ Run Keyword Unless ${edge} Should Contain ${resp.content} "tp-id":"openflow:${switch}:3"
+ Run Keyword Unless ${edge} Should Contain ${resp.content} "source-tp":"openflow:${switch}:3"
+ Run Keyword Unless ${edge} Should Contain ${resp.content} "dest-tp":"openflow:${switch}:3
+ END
Check No Switches On Member
[Arguments] ${switches} ${member_index}=1
${resp} RequestsLibrary.Get Request ${session} ${OPERATIONAL_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ Should Not Contain ${resp.content} openflow:${switch}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ Should Not Contain ${resp.content} openflow:${switch}
+ END
Check Number Of Flows On Member
[Arguments] ${flows} ${member_index}=1
Set Connection ids and Bridge
[Documentation] Sets the connection ids for all the nodes and get the bridge from configuration file .
- : FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
- \ SSHLibrary.Switch Connection ${conn_id}
- \ SSHKeywords.Flexible_SSH_Login ${DEFAULT_USER} ${DEFAULT_PASSWORD}
+ FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
+ SSHLibrary.Switch Connection ${conn_id}
+ SSHKeywords.Flexible_SSH_Login ${DEFAULT_USER} ${DEFAULT_PASSWORD}
+ END
${file} = OperatingSystem.Get File ${CONFIG_FILE_TEMPLATE}
${ovs bridge output} ${bridge} = BuiltIn.Should Match Regexp ${file} "ovsBridge": "(\\w.*)"
BuiltIn.Set Suite Variable ${bridge}
${template} = String.Replace String ${template} minion_ip ${TOOLS_SYSTEM_ALL_IPS[0]}
@{minions} Create List coe-minion
${hosts} Set Variable coe-master:
- : FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
- \ Append To List ${minions} coe-minion${i}
- \ ${hosts} = Catenate ${hosts} coe-minion${i}:
+ FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
+ Append To List ${minions} coe-minion${i}
+ ${hosts} = Catenate ${hosts} coe-minion${i}:
+ END
${hosts} = Replace String Using Regexp ${hosts} :$ ${EMPTY}
${hosts} = Remove Space on String ${hosts}
${minion hosts} = Replace String Using Regexp ${hosts} ^[\\w-]+: ${EMPTY}
- : FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
- \ ${j} = Evaluate ${i}+1
- \ ${template} = String.Replace String ${template} ${minions[${i}-1]} ${minions[${i}]}
- \ ${template} = String.Replace String ${template} ${TOOLS_SYSTEM_ALL_IPS[${i}-1]} ${TOOLS_SYSTEM_ALL_IPS[${i}]}
- \ ${template} = String.Replace String ${template} 192.168.50.1${i} 192.168.50.1${j}
- \ ${template} = String.Replace String ${template} 10.11.${i}.0/24 10.11.${j}.0/24
- \ ${template} = String.Replace String ${template} 10.11.${i}.1 10.11.${j}.1
- \ Append To File ${HOST_INVENTORY} ${template}
+ FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
+ ${j} = Evaluate ${i}+1
+ ${template} = String.Replace String ${template} ${minions[${i}-1]} ${minions[${i}]}
+ ${template} = String.Replace String ${template} ${TOOLS_SYSTEM_ALL_IPS[${i}-1]} ${TOOLS_SYSTEM_ALL_IPS[${i}]}
+ ${template} = String.Replace String ${template} 192.168.50.1${i} 192.168.50.1${j}
+ ${template} = String.Replace String ${template} 10.11.${i}.0/24 10.11.${j}.0/24
+ ${template} = String.Replace String ${template} 10.11.${i}.1 10.11.${j}.1
+ Append To File ${HOST_INVENTORY} ${template}
+ END
${host file} = OperatingSystem.Get File ${HOST_INVENTORY}
${host file} = String.Replace String ${host file} master_ip ${TOOLS_SYSTEM_ALL_IPS[0]}
${host file} = String.Replace String ${host file} odl_ip ${ODL_SYSTEM_IP}
Verify Config Files
[Documentation] Checks if the configuration files are present in all nodes
- : FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Utils.Verify File Exists On Remote System ${nodes} ${CONFIG_FILE}
- : FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Utils.Verify File Exists On Remote System ${nodes} ${CNI_BINARY_FILE}
+ FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Utils.Verify File Exists On Remote System ${nodes} ${CONFIG_FILE}
+ END
+ FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Utils.Verify File Exists On Remote System ${nodes} ${CNI_BINARY_FILE}
+ END
Verify Watcher Is Running
[Documentation] Checks if watcher is running in the background
${i} = BuiltIn.Set Variable 1
${get nodes} = Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl get nodes
@{get nodes} = String.Split To Lines ${get nodes} 2
- : FOR ${status} IN @{get nodes}
- \ ${minion} = BuiltIn.Should Match Regexp ${status} ^\\w+-.*-\\d+
- \ Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl label nodes ${minion} disktype=ss${i}
- \ ${i} = BuiltIn.Evaluate ${i}+1
+ FOR ${status} IN @{get nodes}
+ ${minion} = BuiltIn.Should Match Regexp ${status} ^\\w+-.*-\\d+
+ Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl label nodes ${minion} disktype=ss${i}
+ ${i} = BuiltIn.Evaluate ${i}+1
+ END
Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl get nodes --show-labels
Derive Coe Data Models
[Documentation] Data models is created by integrating netvirt and coe data models which is given as input to get the model dumps
- : FOR ${models} IN @{netvirt_data_models}
- \ Collections.Append To List ${coe_data_models} ${models}
+ FOR ${models} IN @{netvirt_data_models}
+ Collections.Append To List ${coe_data_models} ${models}
+ END
Check Pod Status Is Running
[Documentation] Checks the status of pods.This keyword is repeated until the status of all pods is Running
${pods} = Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl get pods -o wide ${DEFAULT_USER} ${DEFAULT_PASSWORD} ${DEFAULT_LINUX_PROMPT_STRICT}
@{cluster} = String.Split To Lines ${pods} 1
- : FOR ${pod} IN @{cluster}
- \ BuiltIn.Should Match Regexp ${pod} ${POD_RUNNING_STATUS}
+ FOR ${pod} IN @{cluster}
+ BuiltIn.Should Match Regexp ${pod} ${POD_RUNNING_STATUS}
+ END
Tear Down
[Documentation] Test teardown to get dumpflows,ovsconfig,model dump,node status,pod status and to dump config files \ and delete pods.
- : FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
- \ OVSDB.Get DumpFlows And Ovsconfig ${conn_id} ${bridge}
+ FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
+ OVSDB.Get DumpFlows And Ovsconfig ${conn_id} ${bridge}
+ END
BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${coe_data_models}
Coe.DumpConfig File
Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl get nodes ${DEFAULT_USER} ${DEFAULT_PASSWORD} ${DEFAULT_LINUX_PROMPT_STRICT}
[Documentation] Waits till the keyword delete status succeeds implying that all pods created have been deleted
${get pods} = Utils.Run Command On Remote System ${K8s_MASTER_IP} kubectl get pods -o wide
@{get pods} = String.Split To Lines ${get pods} 1
- : FOR ${status} IN @{get pods}
- \ ${pod_name} = BuiltIn.Should Match Regexp ${status} ^\\w+-\\w+
- \ Utils.Run Command On Remote System ${K8s_MASTER_IP} kubectl delete pods ${pod_name}
+ FOR ${status} IN @{get pods}
+ ${pod_name} = BuiltIn.Should Match Regexp ${status} ^\\w+-\\w+
+ Utils.Run Command On Remote System ${K8s_MASTER_IP} kubectl delete pods ${pod_name}
+ END
BuiltIn.Wait Until Keyword Succeeds 60s 3s Coe.Check If Pods Are Terminated
Coe.Check For Stale veth Ports
Dump Config File
[Documentation] Logs the configuration files present in all nodes
- : FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Utils.Run Command On Remote System And Log ${nodes} cat ${CONFIG_FILE}
+ FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Utils.Run Command On Remote System And Log ${nodes} cat ${CONFIG_FILE}
+ END
Stop Suite
[Documentation] Suite teardown keyword
Kube reset
[Documentation] Reset K8s to clear up all stale entries
- : FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${kube} = Utils.Run Command On Remote System And Log ${nodes} sudo kubeadm reset
- \ BuiltIn.Should Contain ${kube} Stopping the kubelet service.
+ FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${kube} = Utils.Run Command On Remote System And Log ${nodes} sudo kubeadm reset
+ BuiltIn.Should Contain ${kube} Stopping the kubelet service.
+ END
Create Pods
[Arguments] ${label} ${yaml} ${name}
${get pods} = Write Commands Until Expected Prompt kubectl get pods -o wide ${DEFAULT_LINUX_PROMPT_STRICT}
@{pod ips} = String.Get Regexp Matches ${get pods} \\d+\\.\\d+\\.\\d+\\.\\d+
@{pod names} = String.Get Regexp Matches ${get pods} ss\\w+-\\w+
- : FOR ${pod_name} IN @{pod names}
- \ ${logs} = Log Statements ${pod ips} ${pod names} ${pod_name}
- \ Ping Pods ${pod_name} ${pod ips} ${logs}
+ FOR ${pod_name} IN @{pod names}
+ ${logs} = Log Statements ${pod ips} ${pod names} ${pod_name}
+ Ping Pods ${pod_name} ${pod ips} ${logs}
+ END
Log Statements
[Arguments] ${pod ips} ${pod names} ${pod_name}
@{log statement} = Create List
${i} = Set Variable 0
- : FOR ${pod_ip} IN @{pod ips}
- \ ${ping statement} Set Variable Ping from ${pod_name} to ${pod names[${i}]} (${pod ip})
- \ Append To List ${log statement} ${ping statement}
- \ ${i} = Evaluate ${i}+1
+ FOR ${pod_ip} IN @{pod ips}
+ ${ping statement} Set Variable Ping from ${pod_name} to ${pod names[${i}]} (${pod ip})
+ Append To List ${log statement} ${ping statement}
+ ${i} = Evaluate ${i}+1
+ END
[Return] @{log statement}
Ping Pods
[Arguments] ${pod_name} ${pod ips} ${logs}
${i} = Set Variable 0
- : FOR ${ping info} IN @{logs}
- \ ${ping} = Write Commands Until Expected Prompt kubectl exec -it ${pod_name} -- ping -c 3 ${pod ips[${i}]} ${DEFAULT_LINUX_PROMPT_STRICT}
- \ BuiltIn.log ${ping}
- \ BuiltIn.Should Contain ${ping} 64 bytes
- \ ${i} Evaluate ${i}+1
+ FOR ${ping info} IN @{logs}
+ ${ping} = Write Commands Until Expected Prompt kubectl exec -it ${pod_name} -- ping -c 3 ${pod ips[${i}]} ${DEFAULT_LINUX_PROMPT_STRICT}
+ BuiltIn.log ${ping}
+ BuiltIn.Should Contain ${ping} 64 bytes
+ ${i} Evaluate ${i}+1
+ END
Coe Suite Teardown
[Documentation] COE project requires stop suite to be executed only for the last test suite.This keyword find the current suite,compares it with the stored last suite value and executes Coe.Stop suite only if the cuurent suite is equal to the last suite.
BuiltIn.Log SUITES: ${SUITES}
@{suite_names} Get Regexp Matches ${SUITES} coe\\/(\\w+).robot 1
@{suite_names_updated} Create List
- : FOR ${suite} IN @{suite_names}
- \ ${suite} Replace String ${suite} _ ${SPACE}
- \ Append To List ${suite_names_updated} ${suite}
+ FOR ${suite} IN @{suite_names}
+ ${suite} Replace String ${suite} _ ${SPACE}
+ Append To List ${suite_names_updated} ${suite}
+ END
${num_suites} = BuiltIn.Get Length ${suite_names_updated}
${suite line} ${current_suite} = BuiltIn.Run Keyword If ${num_suites} > ${1} Should Match Regexp ${SUITE_NAME} .txt.(\\w.*)
... ELSE BuiltIn.Set Variable @{suite_names_updated}[0] @{suite_names_updated}[0]
Check For Stale veth Ports
[Documentation] Check on switches(except master) where pods were created and deleted to ensure there are no stale veth ports left behind.
- : FOR ${minion_index} IN RANGE 2 ${NUM_TOOLS_SYSTEM}+1
- \ ${switch output} = Utils.Run Command On Remote System And Log ${TOOLS_SYSTEM_${minion_index}_IP} sudo ovs-vsctl show
- \ BuiltIn.Should Not Contain ${switch output} veth
+ FOR ${minion_index} IN RANGE 2 ${NUM_TOOLS_SYSTEM}+1
+ ${switch output} = Utils.Run Command On Remote System And Log ${TOOLS_SYSTEM_${minion_index}_IP} sudo ovs-vsctl show
+ BuiltIn.Should Not Contain ${switch output} veth
+ END
... are not supported.
${args} BuiltIn.Create_List
${kwargs} BuiltIn.Create_Dictionary
- : FOR ${arg} IN @{arguments}
- \ ${arg} BuiltIn.Convert_To_String ${arg}
- \ ${removed} String.Remove_String ${arg} \n ${Space} \t
- \ ... \r
- \ ${splitted} BuiltIn.Run_Keyword_If "${removed[0]}" == "<" BuiltIn.Create List ${arg}
- \ ... ELSE String.Split_String ${arg} separator== max_split=1
- \ ${len} BuiltIn.Get_Length ${splitted}
- \ Run Keyword If ${len}==1 Collections.Append_To_List ${args} @{splitted}[0]
- \ ... ELSE Collections.Set_To_Dictionary ${kwargs} @{splitted}
+ FOR ${arg} IN @{arguments}
+ ${arg} BuiltIn.Convert_To_String ${arg}
+ ${removed} String.Remove_String ${arg} \n ${Space} \t
+ ... \r
+ ${splitted} BuiltIn.Run_Keyword_If "${removed[0]}" == "<" BuiltIn.Create List ${arg}
+ ... ELSE String.Split_String ${arg} separator== max_split=1
+ ${len} BuiltIn.Get_Length ${splitted}
+ Run Keyword If ${len}==1 Collections.Append_To_List ${args} @{splitted}[0]
+ ... ELSE Collections.Set_To_Dictionary ${kwargs} @{splitted}
+ END
BuiltIn.Return_From_Keyword ${args} ${kwargs}
Run_Keyword_If_At_Least
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${dev_ip}' == '${line}' Get From Dictionary ${node_data} ${dev_ip}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${dev_ip}' == '${line}' Get From Dictionary ${node_data} ${dev_ip}
+ END
[Return] ${dev_ip}
Find Device Type
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${device_type}' == '${line}' Get From Dictionary ${node_data} ${device_type}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${device_type}' == '${line}' Get From Dictionary ${node_data} ${device_type}
+ END
[Return] ${device_type}
Find Device Hardware
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${device_hw}' == '${line}' Get From Dictionary ${node_data} ${device_hw}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${device_hw}' == '${line}' Get From Dictionary ${node_data} ${device_hw}
+ END
[Return] ${device_hw}
Find Device Software
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${device_sw}' == '${line}' Get From Dictionary ${node_data} ${device_sw}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${device_sw}' == '${line}' Get From Dictionary ${node_data} ${device_sw}
+ END
[Return] ${device_sw}
Find Device Manufacturer
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${manufacture}' == '${line}' Get From Dictionary ${node_data} ${manufacture}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${manufacture}' == '${line}' Get From Dictionary ${node_data} ${manufacture}
+ END
[Return] ${manufacture}
Find Serial Number
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${serial_number}' == '${line}' Get From Dictionary ${node_data} ${serial_number}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${serial_number}' == '${line}' Get From Dictionary ${node_data} ${serial_number}
+ END
[Return] ${serial_number}
Find Device Description
${device_keys}= Get Dictionary Keys ${node_data}
Log ${device_keys}
${length}= Get Length ${device_keys}
- : FOR ${index} IN RANGE 0 ${length}
- \ ${line}= Get From List ${device_keys} ${index}
- \ Run Keyword And Return If '${description}' == '${line}' Get From Dictionary ${node_data} ${description}
+ FOR ${index} IN RANGE 0 ${length}
+ ${line}= Get From List ${device_keys} ${index}
+ Run Keyword And Return If '${description}' == '${line}' Get From Dictionary ${node_data} ${description}
+ END
[Return] ${description}
Verify Status Information
[Arguments] ${endpoint} ${host_index} ${itr}=50
[Documentation] Verify if a netconf endpoint status is connected by running in a loop
- : FOR ${i} IN RANGE ${itr}
- \ ${sts} ${op} Fetch Status Information From Netconf Endpoint ${endpoint} ${host_index}
- \ Builtin.Log ${i}
- \ Builtin.Exit For Loop If "${sts}" == "${NTCF_OPR_STATUS}"
+ FOR ${i} IN RANGE ${itr}
+ ${sts} ${op} Fetch Status Information From Netconf Endpoint ${endpoint} ${host_index}
+ Builtin.Log ${i}
+ Builtin.Exit For Loop If "${sts}" == "${NTCF_OPR_STATUS}"
+ END
[Return] ${sts} ${op}
Verify Netconf Mount
[Arguments] ${member_index_list}=${EMPTY}
[Documentation] This keyword cleansup export files of a cluster
${index_list} = List Indices Or All given_list=${member_index_list}
- : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
- \ DaeximKeywords.Cleanup The Export Files ${index}
+ FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ DaeximKeywords.Cleanup The Export Files ${index}
+ END
# is resolved, we can remove the timeout=1 and max_retries=0, but likely have to modify the request itself to
# pass a timeout to restconf
Create Session model_dump_session http://${controller_ip}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} timeout=1 max_retries=0
- : FOR ${model} IN @{data_models}
- \ ${resp}= RequestsLibrary.Get Request model_dump_session restconf/${model}
- \ ${pretty_output}= To Json ${resp.content} pretty_print=True
- \ Log ${pretty_output}
+ FOR ${model} IN @{data_models}
+ ${resp}= RequestsLibrary.Get Request model_dump_session restconf/${model}
+ ${pretty_output}= To Json ${resp.content} pretty_print=True
+ Log ${pretty_output}
+ END
Verify No Ingress Dispatcher Non-Default Flow Entries
[Arguments] ${ovs_ip}
Verify Flows Are Cleaned Up On All OpenStack Nodes
[Documentation] Verify flows are cleaned up from all OpenStack nodes
- : FOR ${ip} IN @{OS_ALL_IPS}
- \ Run Keyword And Continue On Failure Verify No Ingress Dispatcher Non-Default Flow Entries ${ip}
+ FOR ${ip} IN @{OS_ALL_IPS}
+ Run Keyword And Continue On Failure Verify No Ingress Dispatcher Non-Default Flow Entries ${ip}
+ END
... onto which will be appended the index number. Prefix and postfix are used to complete
... the JSON payload. The keyword passes if return code is correct.
${last} Convert to Integer ${last}
- : FOR ${INDEX} IN RANGE ${first} ${last+1}
- \ ${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 Request session ${node} ${payload}
- \ Log ${resp}
- \ Should Be Equal As Strings ${resp} <Response [204]>
+ FOR ${INDEX} IN RANGE ${first} ${last+1}
+ ${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 Request session ${node} ${payload}
+ Log ${resp}
+ Should Be Equal As Strings ${resp} <Response [204]>
+ END
Read Records
[Arguments] ${controller_ip} ${node}
... onto which will be appended the index number. Prefix and postfix are used to complete
... the JSON payload. The keyword passes if return code is correct.
${last} Convert to Integer ${last}
- : FOR ${INDEX} IN RANGE ${first} ${last+1}
- \ ${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 Request session ${node}/${INDEX} ${payload}
- \ Log ${resp}
- \ Should Be Equal As Strings ${resp} <Response [200]>
+ FOR ${INDEX} IN RANGE ${first} ${last+1}
+ ${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 Request session ${node}/${INDEX} ${payload}
+ Log ${resp}
+ Should Be Equal As Strings ${resp} <Response [200]>
+ END
Delete Records
[Arguments] ${controller_ip} ${node} ${first} ${last}
[Documentation] DELETEs specified range of records from a shard on a contrsoller's data store.
${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 Request session ${node}/${INDEX}
- \ Should Be Equal As Strings ${resp} <Response [200]>
+ FOR ${INDEX} IN RANGE ${first} ${last+1}
+ Create_Session session http://${controller_ip}:${RESTCONFPORT}${CONFIG_API} headers=${HEADERS} auth=${AUTH}
+ ${resp}= RequestsLibrary.Delete Request session ${node}/${INDEX}
+ Should Be Equal As Strings ${resp} <Response [200]>
+ END
Delete All Records
[Arguments] ${controller_ip} ${node}
${length}= Get Length ${field bases}
${keys}= Get Dictionary Keys ${field bases}
${payload}= Set Variable ${prefix}
- : FOR ${key string} IN @{keys}
- \ ${value string}= Get From Dictionary ${field bases} ${key string}
- \ ${payload}= Catenate ${payload} "${key string}": "${value string}${id}",
+ FOR ${key string} IN @{keys}
+ ${value string}= Get From Dictionary ${field bases} ${key string}
+ ${payload}= Catenate ${payload} "${key string}": "${value string}${id}",
+ END
${payload}= Get Substring ${payload} ${EMPTY} -1
${payload}= Catenate ${payload} ${postfix}
[Return] ${payload}
[Arguments] ${cfg_file} ${session} ${exabgp_ip} ${connection_retries}=${3}
[Documentation] Starts the ExaBgp and verifies its connection. The verification is done by checking the presence
... of the peer in the bgp rib.
- : FOR ${idx} IN RANGE ${connection_retries}
- \ Start_ExaBgp ${cfg_file}
- \ ${status} ${value}= BuiltIn.Run_Keyword_And_Ignore_Error BuiltIn.Wait_Until_Keyword_Succeeds 3x 3s
- \ ... Verify_ExaBgps_Connection ${session} ${exabgp_ip} connected=${True}
- \ BuiltIn.Run_Keyword_Unless "${status}" == "PASS" Stop_ExaBgp
- \ BuiltIn.Return_From_Keyword_If "${status}" == "PASS"
+ FOR ${idx} IN RANGE ${connection_retries}
+ Start_ExaBgp ${cfg_file}
+ ${status} ${value}= BuiltIn.Run_Keyword_And_Ignore_Error BuiltIn.Wait_Until_Keyword_Succeeds 3x 3s
+ ... Verify_ExaBgps_Connection ${session} ${exabgp_ip} connected=${True}
+ BuiltIn.Run_Keyword_Unless "${status}" == "PASS" Stop_ExaBgp
+ BuiltIn.Return_From_Keyword_If "${status}" == "PASS"
+ END
BuiltIn.Fail Unable to connect ExaBgp to ODL
Verify_ExaBgps_Connection
[Documentation] Uploads exabgp config files.
SSHLibrary.Put_File ${bgp_var_folder}/${cfg_file} .
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP1/${ODL_SYSTEM_1_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP2/${ODL_SYSTEM_2_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP3/${ODL_SYSTEM_3_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP1/${ODL_SYSTEM_1_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP2/${ODL_SYSTEM_2_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP3/${ODL_SYSTEM_3_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
[Documentation] Check no switch is in inventory
${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
Log ${resp.content}
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ Should Not Contain ${resp.content} "openflow:${switch}"
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ Should Not Contain ${resp.content} "openflow:${switch}"
+ END
Check No Switches In Topology
[Arguments] ${switches}
${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ Should Not Contain ${resp.content} openflow:${switch}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ Should Not Contain ${resp.content} openflow:${switch}
+ END
Check Switches In Inventory
[Arguments] ${switches}
[Documentation] Check all switches and stats in operational inventory
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/openflow:${switch}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} flow-capable-node-connector-statistics
- \ Should Contain ${resp.content} flow-table-statistics
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/openflow:${switch}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} flow-capable-node-connector-statistics
+ Should Contain ${resp.content} flow-table-statistics
+ END
Check Switches In Topology
[Arguments] ${switches}
${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ Should Contain ${resp.content} "node-id":"openflow:${switch}"
- \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:1"
- \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:2"
- \ Should Contain ${resp.content} "source-tp":"openflow:${switch}:2"
- \ Should Contain ${resp.content} "dest-tp":"openflow:${switch}:2"
- \ ${edge} Evaluate ${switch}==1 or ${switch}==${switches}
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "tp-id":"openflow:${switch}:3"
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "source-tp":"openflow:${switch}:3"
- \ Run Keyword Unless ${edge} Should Contain ${resp.content} "dest-tp":"openflow:${switch}:3"
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ Should Contain ${resp.content} "node-id":"openflow:${switch}"
+ Should Contain ${resp.content} "tp-id":"openflow:${switch}:1"
+ Should Contain ${resp.content} "tp-id":"openflow:${switch}:2"
+ Should Contain ${resp.content} "source-tp":"openflow:${switch}:2"
+ Should Contain ${resp.content} "dest-tp":"openflow:${switch}:2"
+ ${edge} Evaluate ${switch}==1 or ${switch}==${switches}
+ Run Keyword Unless ${edge} Should Contain ${resp.content} "tp-id":"openflow:${switch}:3"
+ Run Keyword Unless ${edge} Should Contain ${resp.content} "source-tp":"openflow:${switch}:3"
+ Run Keyword Unless ${edge} Should Contain ${resp.content} "dest-tp":"openflow:${switch}:3"
+ END
Check Flows Operational Datastore
[Arguments] ${flow_count} ${controller_ip}=${ODL_SYSTEM_IP}
[Documentation] Add table miss flows to switches.
${switches}= Convert To Integer ${switches}
${data}= OperatingSystem.Get File ${CURDIR}/../variables/openflowplugin/table_miss_flow.json
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ TemplatedRequests.Put As Json To Uri ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/default ${data} session
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ TemplatedRequests.Put As Json To Uri ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/default ${data} session
+ END
Check Table Miss Flows
[Arguments] ${switches}
[Documentation] Check table miss flows in switches.
${switches}= Convert To Integer ${switches}
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ TemplatedRequests.Get As Json From Uri ${OPERATIONAL_NODES_API}/node/openflow:${switch}/table/0/flow/default session
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ TemplatedRequests.Get As Json From Uri ${OPERATIONAL_NODES_API}/node/openflow:${switch}/table/0/flow/default session
+ END
Create Inventory Flow
[Documentation] Calls FlowLib.Make_Inventory_Flow function and initializes and sanitizes
Sleep 1
Write dpctl dump-flows -O OpenFlow13
${switchoutput} Read Until >
- : FOR ${flowElement} IN @{flow_elements}
- \ Should Contain ${switchoutput} ${flowElement}
+ FOR ${flowElement} IN @{flow_elements}
+ Should Contain ${switchoutput} ${flowElement}
+ END
Remove Group From Controller And Verify
[Arguments] ${node_id} ${group_id}
Sleep 1
Write dpctl dump-flows -O OpenFlow13
${switchoutput} Read Until >
- : FOR ${flowElement} IN @{flow_elements}
- \ Should Not Contain ${switchoutput} ${flowElement}
+ FOR ${flowElement} IN @{flow_elements}
+ Should Not Contain ${switchoutput} ${flowElement}
+ END
Remove Default Flows
[Arguments] ${node_id}
Should Be Equal As Strings ${ep_tenant} ${tenant}
Check Group References ${epg} @{ep_endpoint_groups}
LOG ${ep_l3-addresses}
- : FOR ${l3} IN @{ep_l3-addresses}
- \ LOG ${l3-context}
- \ LOG ${ip_address}
- \ LOG ${l3['l3-context']}
- \ LOG ${l3['ip-address']}
- \ Continue For Loop If "${l3['l3-context']}" == "${l3-context}" and "${l3['ip-address']}" == "${ip_address}"
- \ Fail
+ FOR ${l3} IN @{ep_l3-addresses}
+ LOG ${l3-context}
+ LOG ${ip_address}
+ LOG ${l3['l3-context']}
+ LOG ${l3['ip-address']}
+ Continue For Loop If "${l3['l3-context']}" == "${l3-context}" and "${l3['ip-address']}" == "${ip_address}"
+ Fail
+ END
Check Endpoint-L3
[Arguments] ${endpoint-l3} ${mac_address} ${epg} ${l2-context} ${network-containment} ${tenant}
... among given endpoint groups
Should Not Be Empty ${epg_to_look_for}
Should Not Be Empty ${endpoint_groups}
- : FOR ${epg} IN @{endpoint_groups}
- \ Continue For Loop If "${epg}" == "${epg_to_look_for}"
- \ Continue For Loop If "${epg}" == "${NETWORK_CLIENT_GROUP}"
- \ Fail
+ FOR ${epg} IN @{endpoint_groups}
+ Continue For Loop If "${epg}" == "${epg_to_look_for}"
+ Continue For Loop If "${epg}" == "${NETWORK_CLIENT_GROUP}"
+ Fail
+ END
Check Endpoint Group Name and Selector
[Arguments] ${epg_id} ${epg_name} ${tenant_id} ${contract_id} ${named-selector}
${endpoint_group_json} To Json ${endpoint_group}
${named_selectors} Set Variable ${endpoint_group_json['endpoint-group'][0]['${named-selector}']}
${selector_found} Set Variable FALSE
- : FOR ${selector} IN @{named_selectors}
- \ Return From Keyword If "${selector['contract'][0]}" == "${contract_id}"
+ FOR ${selector} IN @{named_selectors}
+ Return From Keyword If "${selector['contract'][0]}" == "${contract_id}"
+ END
Fail
@{lines} Split To Lines ${output}
${match_result} Set Variable
${action_result} Set Variable
- : FOR ${line} IN @{lines}
- \ ${match} Get Matches Part ${line}
- \ ${action} Get Actions Part ${line}
- \ ${match_result} Check Match ${match} @{flow_match_criteria}
- \ ${action_result} Check Match ${action} @{flow_action_criteria}
- \ Run Keyword If "${match_result}" == "TRUE" and "${action_result}" == "TRUE" Return From Keyword ${line}
+ FOR ${line} IN @{lines}
+ ${match} Get Matches Part ${line}
+ ${action} Get Actions Part ${line}
+ ${match_result} Check Match ${match} @{flow_match_criteria}
+ ${action_result} Check Match ${action} @{flow_action_criteria}
+ Run Keyword If "${match_result}" == "TRUE" and "${action_result}" == "TRUE" Return From Keyword ${line}
+ END
Log ${flow_match_criteria}
Log ${flow_action_criteria}
Fail Flow not found!
[Arguments] ${string} @{match_criteria}
[Documentation] Applies 'grep' on the string argument for each criterion.
${conditions} Set Variable
- : FOR ${criterio} IN @{match_criteria}
- \ ${grep_criterio} Catenate | grep ${criterio}
- \ ${conditions} Catenate ${conditions} ${grep_criterio}
- \ ${debug_output} OperatingSystem.Run echo "${string}" ${conditions}
- \ Log ${debug_output}
- \ Run Keyword If "${debug_output}" == "${EMPTY}" Log ${criterio}
+ FOR ${criterio} IN @{match_criteria}
+ ${grep_criterio} Catenate | grep ${criterio}
+ ${conditions} Catenate ${conditions} ${grep_criterio}
+ ${debug_output} OperatingSystem.Run echo "${string}" ${conditions}
+ Log ${debug_output}
+ Run Keyword If "${debug_output}" == "${EMPTY}" Log ${criterio}
+ END
${output} OperatingSystem.Run echo "${string}" ${conditions}
Log ${output}
Run Keyword If "${output}" == "${EMPTY}" Return From Keyword FALSE
Unregister L2Endpoints
[Arguments] ${l2_eps}
[Documentation] Unregister Endpoints L2Endpoints from ODL
- : FOR ${endpoint} IN @{l2_eps}
- \ ${l2_data} = Create L2 Endpoint JSON Data ${endpoint}
- \ Post Elements To URI ${ENDPOINT_UNREG_PATH} ${l2_data} ${HEADERS_YANG_JSON}
+ FOR ${endpoint} IN @{l2_eps}
+ ${l2_data} = Create L2 Endpoint JSON Data ${endpoint}
+ Post Elements To URI ${ENDPOINT_UNREG_PATH} ${l2_data} ${HEADERS_YANG_JSON}
+ END
Unregister L3Endpoints
[Arguments] ${l3_eps}
[Documentation] Unregister Endpoints L3Endpoints from ODL
- : FOR ${endpoint} IN @{l3_eps}
- \ ${l3_data} = Create L3 Endpoint JSON Data ${endpoint}
- \ Post Elements To URI ${ENDPOINT_UNREG_PATH} ${l3_data} ${HEADERS_YANG_JSON}
+ FOR ${endpoint} IN @{l3_eps}
+ ${l3_data} = Create L3 Endpoint JSON Data ${endpoint}
+ Post Elements To URI ${ENDPOINT_UNREG_PATH} ${l3_data} ${HEADERS_YANG_JSON}
+ END
Create L2 Endpoint JSON Data
[Arguments] ${endpoint}
Teardown_Ssh_Tooling
[Arguments] ${session_list}=@{EMPTY}
[Documentation] Deactivate virtualenv and close ssh session on tools system
- : FOR ${ssh_session} IN @{session_list}
- \ BuiltIn.Log ${ssh_session}
- \ SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
- \ SSHKeywords.Virtual_Env_Deactivate_On_Current_Session
- \ SSHKeywords.Virtual_Env_Delete
- # fallback to single session
+ FOR ${ssh_session} IN @{session_list}
+ BuiltIn.Log ${ssh_session}
+ SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
+ SSHKeywords.Virtual_Env_Deactivate_On_Current_Session
+ SSHKeywords.Virtual_Env_Delete
+ # fallback to single session
+ END
${session_list_size} get length ${session_list}
BuiltIn.Log ${session_list_size}
BuiltIn.Run_Keyword_If ${session_list_size} == 0 SSHKeywords.Virtual_Env_Deactivate_On_Current_Session
Stop Suite
[Documentation] stops all connections and deletes all the bridges available on OVS
- : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
- \ SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
- \ SSHLibrary.Execute Command sudo ovs-vsctl del-br ${Bridge}
- \ SSHLibrary.Execute Command sudo ovs-vsctl del-manager
- \ SSHLibrary.Write exit
- \ SSHLibrary.Close Connection
+ FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
+ SSHLibrary.Execute Command sudo ovs-vsctl del-br ${Bridge}
+ SSHLibrary.Execute Command sudo ovs-vsctl del-manager
+ SSHLibrary.Write exit
+ SSHLibrary.Close Connection
+ END
Check Port Status Is ESTABLISHED
[Arguments] ${port} @{tools_ips}
[Documentation] This keyword will check whether ports are established or not on OVS
- : FOR ${tools_ip} IN @{tools_ips}
- \ ${check_establishment} = Utils.Run Command On Remote System And Log ${tools_ip} netstat -anp | grep ${port}
- \ BuiltIn.Should Contain ${check_establishment} ESTABLISHED
+ FOR ${tools_ip} IN @{tools_ips}
+ ${check_establishment} = Utils.Run Command On Remote System And Log ${tools_ip} netstat -anp | grep ${port}
+ BuiltIn.Should Contain ${check_establishment} ESTABLISHED
+ END
[Return] ${check_establishment}
Create Vteps
... ELSE BuiltIn.Set Variable ${body}
${body} = BuiltIn.Run Keyword If ${odl_stream_check } String.Replace String ${body} "gateway-ip": "0.0.0.0" "gateway-ip": "${gateway_ip}"
... ELSE BuiltIn.Set Variable ${body}
- : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
- \ ${body} String.Replace String ${body} "dpn-id": 10${tool_system_index} "dpn-id": ${DPN_ID_LIST[${tool_system_index}]}
- \ ${body} String.Replace String ${body} "ip-address": "${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}" "ip-address": "@{tools_ips}[${tool_system_index}]"
+ FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ ${body} String.Replace String ${body} "dpn-id": 10${tool_system_index} "dpn-id": ${DPN_ID_LIST[${tool_system_index}]}
+ ${body} String.Replace String ${body} "ip-address": "${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}" "ip-address": "@{tools_ips}[${tool_system_index}]"
+ END
BuiltIn.Log ${body}
[Return] ${body} # returns complete json that has been updated
Build Dpn List
[Documentation] This keyword builds the list of DPN ids after configuring OVS bridges on each of the TOOLS_SYSTEM_IPs.
@{DPN_ID_LIST} = BuiltIn.Create List
- : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${output} Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl show -O Openflow13 ${Bridge} | head -1 | awk -F "dpid:" '{ print $2 }'
- \ ${dpn_id} Utils.Run Command On Remote System And Log ${tools_ip} echo \$\(\(16\#${output}\)\)
- \ Collections.Append To List ${DPN_ID_LIST} ${dpn_id}
+ FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${output} Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl show -O Openflow13 ${Bridge} | head -1 | awk -F "dpid:" '{ print $2 }'
+ ${dpn_id} Utils.Run Command On Remote System And Log ${tools_ip} echo \$\(\(16\#${output}\)\)
+ Collections.Append To List ${DPN_ID_LIST} ${dpn_id}
+ END
BuiltIn.Set Suite Variable @{DPN_ID_LIST}
BFD Suite Teardown
Genius Test Teardown
[Arguments] ${data_models} ${test_name}=${SUITE_NAME}.${TEST_NAME} ${fail}=${FAIL_ON_EXCEPTIONS}
- : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
- \ OVSDB.Get DumpFlows And Ovsconfig @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] ${Bridge}
+ FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ OVSDB.Get DumpFlows And Ovsconfig @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] ${Bridge}
+ END
BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${data_models}
KarafKeywords.Fail If Exceptions Found During Test ${test_name} fail=${fail}
ODLTools.Get All test_name=${test_name}
[Documentation] start suite for itm scalability
ClusterManagement.ClusterManagement_Setup
ClusterManagement.Stop_Members_From_List_Or_All
- : FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
- \ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
+ FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
+ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
+ END
ClusterManagement.Start_Members_From_List_Or_All
Genius.Genius Suite Setup
ITM Direct Tunnels Stop Suite
[Documentation] Stop suite for ITM Direct Tunnels.
- : FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
- \ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+ FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
+ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+ END
Genius.Genius Suite Teardown
Ovs Interface Verification
[Documentation] Checks whether the created Interface is seen on OVS or not.
- : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Genius.Ovs Verification For Each Dpn ${tools_ip} ${TOOLS_SYSTEM_ALL_IPS}
+ FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Genius.Ovs Verification For Each Dpn ${tools_ip} ${TOOLS_SYSTEM_ALL_IPS}
+ END
Get ITM
[Arguments] ${itm_created[0]} ${switch_data}=${SWITCH_DATA}
Check Tunnel Delete On OVS
[Arguments] ${tunnel_list}
[Documentation] Verifies the Tunnel is deleted from OVS.
- : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${output} = Utils.Run Command On Remote System ${tools_ip} sudo ovs-vsctl show
- \ Genius.Verify Deleted Tunnels on OVS ${tunnel_list} ${output}
+ FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${output} = Utils.Run Command On Remote System ${tools_ip} sudo ovs-vsctl show
+ Genius.Verify Deleted Tunnels on OVS ${tunnel_list} ${output}
+ END
Check Table0 Entry In a Dpn
[Arguments] ${tools_ip} ${bridgename} ${port_numbers}
[Documentation] Checks the Table 0 entry in the OVS when flows are dumped.
${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${bridgename}
${num_ports} = BuiltIn.Get Length ${port_numbers}
- : FOR ${port_index} IN RANGE ${num_ports}
- \ BuiltIn.Should Contain ${check} in_port=@{port_numbers}[${port_index}]
+ FOR ${port_index} IN RANGE ${num_ports}
+ BuiltIn.Should Contain ${check} in_port=@{port_numbers}[${port_index}]
+ END
Verify Tunnel Status As Up
[Arguments] ${no_of_switches}=${NUM_TOOLS_SYSTEM}
[Documentation] Verifies if all tunnels in the input, has the expected status(UP/DOWN/UNKNOWN)
${tep_result} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
${number_of_tunnels} = BuiltIn.Get Length ${tunnel_names}
- : FOR ${each_tunnel} IN RANGE ${number_of_tunnels}
- \ ${tunnel} = Collections.Get From List ${tunnel_names} ${each_tunnel}
- \ ${tep_output} = String.Get Lines Containing String ${tep_result} ${tunnel}
- \ BuiltIn.Should Contain ${tep_output} ${tunnel_status}
+ FOR ${each_tunnel} IN RANGE ${number_of_tunnels}
+ ${tunnel} = Collections.Get From List ${tunnel_names} ${each_tunnel}
+ ${tep_output} = String.Get Lines Containing String ${tep_result} ${tunnel}
+ BuiltIn.Should Contain ${tep_output} ${tunnel_status}
+ END
Get Tunnels On OVS
[Arguments] ${connection_id}
@{tunnel_names} = BuiltIn.Create List
${tunnels} = String.Get Lines Matching Regexp ${ovs_result} Interface "tun.*" True
@{tunnels_list} = String.Split To Lines ${tunnels}
- : FOR ${tun} IN @{tunnels_list}
- \ ${tun_list} Get Regexp Matches ${tun} tun.*\\w
- \ Collections.Append To List ${tunnel_names} @{tun_list}
+ FOR ${tun} IN @{tunnels_list}
+ ${tun_list} Get Regexp Matches ${tun} tun.*\\w
+ Collections.Append To List ${tunnel_names} @{tun_list}
+ END
${items_in_list} = BuiltIn.Get Length ${tunnel_names}
[Return] @{tunnel_names}
Set Switch Configuration
[Documentation] This keyword will set manager,controller,tap port,bridge on each OVS
- : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
- \ SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
- \ SSHLibrary.Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- \ SSHLibrary.Execute Command sudo ovs-vsctl add-br ${Bridge}
- \ SSHLibrary.Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
- \ SSHLibrary.Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
- \ SSHLibrary.Execute Command sudo ifconfig ${Bridge} up
- \ SSHLibrary.Execute Command sudo ovs-vsctl add-port ${Bridge} tap${tool_system_index}ed70586-6c -- set Interface tap${tool_system_index}ed70586-6c type=tap
- \ SSHLibrary.Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT}
- \ SSHLibrary.Execute Command sudo ovs-vsctl show
+ FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
+ SSHLibrary.Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ SSHLibrary.Execute Command sudo ovs-vsctl add-br ${Bridge}
+ SSHLibrary.Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
+ SSHLibrary.Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
+ SSHLibrary.Execute Command sudo ifconfig ${Bridge} up
+ SSHLibrary.Execute Command sudo ovs-vsctl add-port ${Bridge} tap${tool_system_index}ed70586-6c -- set Interface tap${tool_system_index}ed70586-6c type=tap
+ SSHLibrary.Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT}
+ SSHLibrary.Execute Command sudo ovs-vsctl show
+ END
Ovs Verification For Each Dpn
[Arguments] ${tools_system_ip} ${tools_ips}
Collections.Remove Values From List ${updated_tools_ip_list} ${tools_system_ip}
BuiltIn.Log Many @{updated_tools_ip_list}
${num_tool_ips} BuiltIn.Get Length ${updated_tools_ip_list}
- : FOR ${num} IN RANGE ${num_tool_ips}
- \ ${tools_ip} = Collections.Get From List ${updated_tools_ip_list} ${num}
- \ BuiltIn.Should Contain ${ovs_output} ${tools_ip}
+ FOR ${num} IN RANGE ${num_tool_ips}
+ ${tools_ip} = Collections.Get From List ${updated_tools_ip_list} ${num}
+ BuiltIn.Should Contain ${ovs_output} ${tools_ip}
+ END
Get Tunnels List
[Documentation] The keyword fetches the list of operational tunnels from ODL
Verify Table0 Entry After fetching Port Number
[Documentation] This keyword will get the port number and checks the table0 entry for each dpn
- : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -O OpenFlow13 show ${Bridge}
- \ ${port_numbers} = String.Get Regexp Matches ${check} (\\d+).tun.* 1
- \ Genius.Check Table0 Entry In a Dpn ${tools_ip} ${Bridge} ${port_numbers}
+ FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -O OpenFlow13 show ${Bridge}
+ ${port_numbers} = String.Get Regexp Matches ${check} (\\d+).tun.* 1
+ Genius.Check Table0 Entry In a Dpn ${tools_ip} ${Bridge} ${port_numbers}
+ END
Verify Deleted Tunnels On OVS
[Arguments] ${tunnel_list} ${resp_data}
[Documentation] This will verify whether tunnel is deleted.
BuiltIn.Log ${resp_data}
- : FOR ${tunnel} IN @{tunnel_list}
- \ BuiltIn.Should Not Contain ${resp_data} ${tunnel}
+ FOR ${tunnel} IN @{tunnel_list}
+ BuiltIn.Should Not Contain ${resp_data} ${tunnel}
+ END
Verify Response Code Of Dpn End Point Config API
[Arguments] ${dpn_list}=${DPN_ID_LIST}
[Documentation] This keyword will verify response code from itm-state: dpn endpoints config api for each dpn
- : FOR ${dpn} IN @{dpn_list}
- \ BuiltIn.Wait Until Keyword Succeeds 40 5 Utils.Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+ FOR ${dpn} IN @{dpn_list}
+ BuiltIn.Wait Until Keyword Succeeds 40 5 Utils.Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+ END
Get Tunnel Between DPNs
[Arguments] ${tunnel_type} ${config_api_type} ${src_dpn_id} @{dst_dpn_ids}
[Documentation] This keyword will Get All the Tunnels available on DPN's
- : FOR ${dst_dpn_id} IN @{dst_dpn_ids}
- \ ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 30 10 Genius.Get Tunnel ${src_dpn_id}
- \ ... ${dst_dpn_id} ${tunnel_type} ${config_api_type}
+ FOR ${dst_dpn_id} IN @{dst_dpn_ids}
+ ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 30 10 Genius.Get Tunnel ${src_dpn_id}
+ ... ${dst_dpn_id} ${tunnel_type} ${config_api_type}
+ END
Update Dpn id List And Get Tunnels
[Arguments] ${tunnel_type} ${config_api_type}=${EMPTY} ${dpn_ids}=${DPN_ID_LIST}
[Documentation] Update the exisisting dpn id list to form different combination of dpn ids such that tunnel formation between all dpns is verified.
- : FOR ${dpn_id} IN @{dpn_ids}
- \ @{dpn_ids_updated} = BuiltIn.Create List @{dpn_ids}
- \ Collections.Remove Values From List ${dpn_ids_updated} ${dpn_id}
- \ BuiltIn.Log Many ${dpn_ids_updated}
- \ Genius.Get Tunnel Between DPNs ${tunnel_type} ${config_api_type} ${dpn_id} @{dpn_ids_updated}
+ FOR ${dpn_id} IN @{dpn_ids}
+ @{dpn_ids_updated} = BuiltIn.Create List @{dpn_ids}
+ Collections.Remove Values From List ${dpn_ids_updated} ${dpn_id}
+ BuiltIn.Log Many ${dpn_ids_updated}
+ Genius.Get Tunnel Between DPNs ${tunnel_type} ${config_api_type} ${dpn_id} @{dpn_ids_updated}
+ END
ClusterManagement.ClusterManagement_Setup http_timeout=${http_timeout}
ClusterManagement.Run_Bash_Command_On_List_Or_All iptables -I INPUT -p tcp --dport ${KARAF_SHELL_PORT} -j ACCEPT; iptables-save
BuiltIn.Comment First connections to Karaf console may fail, so WUKS is used. TODO: Track as a Bug.
- : FOR ${index} IN @{ClusterManagement__member_index_list}
- \ BuiltIn.Run_Keyword_And_Ignore_Error BuiltIn.Wait_Until_Keyword_Succeeds 3s 1s Open_Controller_Karaf_Console_On_Background member_index=${index}
+ FOR ${index} IN @{ClusterManagement__member_index_list}
+ BuiltIn.Run_Keyword_And_Ignore_Error BuiltIn.Wait_Until_Keyword_Succeeds 3s 1s Open_Controller_Karaf_Console_On_Background member_index=${index}
+ END
Verify_Feature_Is_Installed
[Arguments] ${feature_name} ${controller}=${ODL_SYSTEM_IP} ${karaf_port}=${KARAF_SHELL_PORT}
[Documentation] Will execute the command using Issue Command On Karaf Console then check for the given elements
... in the command output message
${output} Issue_Command_On_Karaf_Console ${cmd} ${controller} ${karaf_port} ${timeout}
- : FOR ${i} IN @{elements}
- \ BuiltIn.Should_Contain ${output} ${i}
+ FOR ${i} IN @{elements}
+ BuiltIn.Should_Contain ${output} ${i}
+ END
Verify_Bundle_Is_Installed
[Arguments] ${bundle_name} ${controller}=${ODL_SYSTEM_IP} ${karaf_port}=${KARAF_SHELL_PORT}
[Arguments] ${filter_string} @{message_list}
[Documentation] Will succeed if the @{messages} are found in \ the output of "log:display"
${output} = Issue_Command_On_Karaf_Console log:display | grep ${filter_string}
- : FOR ${message} IN @{message_list}
- \ BuiltIn.Should_Contain ${output} ${message}
+ FOR ${message} IN @{message_list}
+ BuiltIn.Should_Contain ${output} ${message}
+ END
[Return] ${output}
Check_Karaf_Log_Message_Count
[Documentation] Configure a different timeout for each Karaf console.
${index_list} = ClusterManagement.List_Indices_Or_All given_list=${member_index_list}
${current_connection_object} = SSHLibrary.Get_Connection
- : FOR ${member_index} IN @{index_list} # usually: 1, 2, 3
- \ ${karaf_connection_index} = Collections.Get_From_Dictionary ${connection_index_dict} ${member_index}
- \ SSHLibrary.Switch_Connection ${karaf_connection_index}
- \ SSHLibrary.Set_Client_Configuration timeout=${timeout}
+ FOR ${member_index} IN @{index_list} # usually: 1, 2, 3
+ ${karaf_connection_index} = Collections.Get_From_Dictionary ${connection_index_dict} ${member_index}
+ SSHLibrary.Switch_Connection ${karaf_connection_index}
+ SSHLibrary.Set_Client_Configuration timeout=${timeout}
+ END
[Teardown] SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${current_connection_object.index}
Execute_Controller_Karaf_Command_On_Background
[Documentation] Make sure this resource is initialized. Send a message into the controller's karaf log file on every node listed (or all).
... By default, failure while processing a node is silently ignored, unless ${tolerate_failure} is False.
${index_list} = ClusterManagement.List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
- \ ${status} ${output} = BuiltIn.Run_Keyword_And_Ignore_Error Execute_Controller_Karaf_Command_With_Retry_On_Background log:log "ROBOT MESSAGE: ${message}" member_index=${index}
- \ BuiltIn.Run_Keyword_Unless ${tolerate_failure} or "${status}" == "PASS" BuiltIn.Fail ${output}
+ FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ ${status} ${output} = BuiltIn.Run_Keyword_And_Ignore_Error Execute_Controller_Karaf_Command_With_Retry_On_Background log:log "ROBOT MESSAGE: ${message}" member_index=${index}
+ BuiltIn.Run_Keyword_Unless ${tolerate_failure} or "${status}" == "PASS" BuiltIn.Fail ${output}
+ END
Log_Test_Suite_Start_To_Controller_Karaf
[Arguments] ${member_index_list}=${EMPTY}
[Documentation] Assuming OCKCOB was used, set logging level on bgpcep and protocol loggers without affecting current SSH session.
# FIXME: Move to appropriate Resource
${index_list} = ClusterManagement.List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
- \ Execute_Controller_Karaf_Command_On_Background log:set ${bgpcep_level} org.opendaylight.bgpcep member_index=${index}
- \ Execute_Controller_Karaf_Command_On_Background log:set ${protocol_level} org.opendaylight.protocol member_index=${index}
+ FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ Execute_Controller_Karaf_Command_On_Background log:set ${bgpcep_level} org.opendaylight.bgpcep member_index=${index}
+ Execute_Controller_Karaf_Command_On_Background log:set ${protocol_level} org.opendaylight.protocol member_index=${index}
+ END
Get Karaf Log Lines From Test Start
[Arguments] ${ip} ${test_name} ${cmd} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
[Arguments] ${test_name} ${log_file}=${KARAF_LOG} ${fail}=False
[Documentation] Create a failure if an Exception is found in the karaf.log that has not been whitelisted.
... Will work for single controller jobs as well as 3node cluster jobs
- : FOR ${i} IN RANGE 1 ${NUM_ODL_SYSTEM} + 1
- \ ${cmd} = Set Variable sed '1,/ROBOT MESSAGE: Starting test ${test_name}/d' ${log_file}
- \ ${output} = Get Karaf Log Lines From Test Start ${ODL_SYSTEM_${i}_IP} ${test_name} ${cmd}
- \ ${exlist} ${matchlist} = Verify Exceptions ${output}
- \ Write Exceptions Map To File ${SUITE_NAME}.${TEST_NAME} /tmp/odl${i}_exceptions.txt
- \ ${listlength} = BuiltIn.Get Length ${exlist}
- \ BuiltIn.Run Keyword If "${fail}"=="True" and ${listlength} != 0 Log And Fail Exceptions ${exlist} ${listlength}
- \ ... ELSE Collections.Log List ${matchlist}
+ FOR ${i} IN RANGE 1 ${NUM_ODL_SYSTEM} + 1
+ ${cmd} = Set Variable sed '1,/ROBOT MESSAGE: Starting test ${test_name}/d' ${log_file}
+ ${output} = Get Karaf Log Lines From Test Start ${ODL_SYSTEM_${i}_IP} ${test_name} ${cmd}
+ ${exlist} ${matchlist} = Verify Exceptions ${output}
+ Write Exceptions Map To File ${SUITE_NAME}.${TEST_NAME} /tmp/odl${i}_exceptions.txt
+ ${listlength} = BuiltIn.Get Length ${exlist}
+ BuiltIn.Run Keyword If "${fail}"=="True" and ${listlength} != 0 Log And Fail Exceptions ${exlist} ${listlength}
+ ... ELSE Collections.Log List ${matchlist}
+ END
Log And Fail Exceptions
[Arguments] ${exlist} ${listlength}
... ${log_file}=${KARAF_LOG}
[Documentation] A wrapper keyword for "Get Karaf Log Type From Test Start" so that we can parse for multiple types
... of log messages. For example, we can grab all messages of type WARN and ERROR
- : FOR ${type} IN @{types}
- \ Get Karaf Log Type From Test Start ${ip} ${test_name} ${type} ${user} ${password}
- \ ... ${prompt} ${log_file}
+ FOR ${type} IN @{types}
+ Get Karaf Log Type From Test Start ${ip} ${test_name} ${type} ${user} ${password}
+ ... ${prompt} ${log_file}
+ END
Get Karaf Log Events From Test Start
[Arguments] ${test_name} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
[Documentation] Wrapper for the wrapper "Get Karaf Log Types From Test Start" so that we can easily loop over
... any number of controllers to analyze karaf.log for ERROR, WARN and Exception log messages
${log_types} = Create List ERROR WARN Exception
- : FOR ${i} IN RANGE 1 ${NUM_ODL_SYSTEM} + 1
- \ Get Karaf Log Types From Test Start ${ODL_SYSTEM_${i}_IP} ${test_name} ${log_types}
+ FOR ${i} IN RANGE 1 ${NUM_ODL_SYSTEM} + 1
+ Get Karaf Log Types From Test Start ${ODL_SYSTEM_${i}_IP} ${test_name} ${log_types}
+ END
Fail If Exceptions Found During Test Deprecated
[Arguments] ${test_name} ${exceptions_white_list}=${EMPTY}
[Documentation] Create a failure if an Exception is found in the karaf.log. Will work for single controller jobs
... as well as 3node cluster jobs
- : FOR ${i} IN RANGE 1 ${NUM_ODL_SYSTEM} + 1
- \ Verify Exception Logging In Controller ${ODL_SYSTEM_${i}_IP} ${test_name} ${exceptions_white_list}
+ FOR ${i} IN RANGE 1 ${NUM_ODL_SYSTEM} + 1
+ Verify Exception Logging In Controller ${ODL_SYSTEM_${i}_IP} ${test_name} ${exceptions_white_list}
+ END
Verify Exception Logging In Controller
[Arguments] ${controller_ip} ${test_name} ${exceptions_white_list}
@{log_lines}= Split String ${exceptions} ${\n}
${num_log_entries} Get Length ${log_lines}
Return From Keyword If ${num_log_entries} == ${0} No Exceptions found.
- : FOR ${log_message} IN @{log_lines}
- \ Check Against White List ${log_message} ${exceptions_white_list}
+ FOR ${log_message} IN @{log_lines}
+ Check Against White List ${log_message} ${exceptions_white_list}
+ END
Check Against White List
[Arguments] ${exception_line} ${exceptions_white_list}
... empty line as that is what is returned when a grep on karaf.log has no match, so we can safely return
... in that case as well.
Return From Keyword If "${exception_line}" == ""
- : FOR ${exception} IN @{exceptions_white_list}
- \ Return From Keyword If "${exception}" in "${exception_line}" Exceptions found, but whitelisted: ${\n}${exception_line}${\n}
+ FOR ${exception} IN @{exceptions_white_list}
+ Return From Keyword If "${exception}" in "${exception_line}" Exceptions found, but whitelisted: ${\n}${exception_line}${\n}
+ END
Fail Exceptions Found: ${\n}${exception_line}${\n}
Wait_For_Karaf_Log
[Arguments] ${conn_id} ${command} @{string_list}
[Documentation] Keyword to run the ${command} in ${conn_id} and verify if the output contains the list @{string_list}.
${output}= Exec Command ${conn_id} ${command}
- : FOR ${item} IN @{string_list}
- \ Should Contain ${output} ${item}
+ FOR ${item} IN @{string_list}
+ Should Contain ${output} ${item}
+ END
Verify Ping In Namespace Extra Timeout
[Arguments] ${ns_name} ${ns_port_mac} ${vm_ip} ${conn_id}=${hwvtep_conn_id} ${hwvtep_ip}=${HWVTEP_IP}
[Arguments] ${conn_id} ${table_name} @{list}
[Documentation] Keyword to run vtep-ctl list for the table ${table_name} and verify the list @{list} contents exists in output.
${output}= Exec Command ${conn_id} ${VTEP LIST} ${table_name}
- : FOR ${item} IN @{list}
- \ Should Contain ${output} ${item}
+ FOR ${item} IN @{list}
+ Should Contain ${output} ${item}
+ END
Get Vtep List
[Arguments] ${table_name} ${conn_id}=${hwvtep_conn_id}
Should Contain ${flow_output} table=50
${sMac_output} = Get Lines Containing String ${flow_output} table=50
Log ${sMac_output}
- : FOR ${sMacAddr} IN @{srcMacAddrs}
- \ ${resp}= Should Contain ${sMac_output} dl_src=${sMacAddr}
+ FOR ${sMacAddr} IN @{srcMacAddrs}
+ ${resp}= Should Contain ${sMac_output} dl_src=${sMacAddr}
+ END
Should Contain ${flow_output} table=51
${dMac_output} = Get Lines Containing String ${flow_output} table=51
Log ${dMac_output}
- : FOR ${dMacAddr} IN @{destMacAddrs}
- \ ${resp}= Should Contain ${dMac_output} dl_dst=${dMacAddr}
+ FOR ${dMacAddr} IN @{destMacAddrs}
+ ${resp}= Should Contain ${dMac_output} dl_dst=${dMacAddr}
+ END
Should Contain ${flow_output} table=52
${sMac_output} = Get Lines Containing String ${flow_output} table=52
Log ${sMac_output}
Setup Live Migration In Compute Nodes
[Documentation] Set instances to be created in the shared directory.
- : FOR ${conn_id} IN @{OS_CMP_CONN_IDS}
- \ OpenStackOperations.Modify OpenStack Configuration File ${conn_id} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_SHARED_PATH}
- \ OpenStackOperations.Restart DevStack Service ${conn_id} ${NOVA_COMPUTE_SERVICE}
+ FOR ${conn_id} IN @{OS_CMP_CONN_IDS}
+ OpenStackOperations.Modify OpenStack Configuration File ${conn_id} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_SHARED_PATH}
+ OpenStackOperations.Restart DevStack Service ${conn_id} ${NOVA_COMPUTE_SERVICE}
+ END
UnSet Live Migration In Compute Nodes
[Documentation] Clear settings done for Live Migration
- : FOR ${conn_id} IN @{OS_CMP_CONN_IDS}
- \ OpenStackOperations.Modify OpenStack Configuration File ${conn_id} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_DEFAULT_PATH}
- \ OpenStackOperations.Restart DevStack Service ${conn_id} ${NOVA_COMPUTE_SERVICE}
+ FOR ${conn_id} IN @{OS_CMP_CONN_IDS}
+ OpenStackOperations.Modify OpenStack Configuration File ${conn_id} ${NOVA_CPU_CONF} DEFAULT instances_path ${CMP_INSTANCES_DEFAULT_PATH}
+ OpenStackOperations.Restart DevStack Service ${conn_id} ${NOVA_COMPUTE_SERVICE}
+ END
[Documentation] Create prefix based shard. ${replicas} is a list of cluster node indexes, taken e.g. from ClusterManagement.List_Indices_Or_All.
${session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${member_index}
${replicas_str} BuiltIn.Set_Variable ${EMPTY}
- : FOR ${replica} IN @{replicas}
- \ ${replicas_str} BuiltIn.Set_Variable ${replicas_str}<replicas>member-${replica}</replicas>
+ FOR ${replica} IN @{replicas}
+ ${replicas_str} BuiltIn.Set_Variable ${replicas_str}<replicas>member-${replica}</replicas>
+ END
&{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} REPLICAS=${replicas_str}
${text} = TemplatedRequests.Post_As_Xml_Templated ${CREATE_PREFIX_SHARD_DIR} mapping=${mapping} session=${session}
SSHLibrary.Read Until mininet>
Log Create controller configuration
${controller_opt}= Set Variable
- : FOR ${index} IN @{index_list}
- \ ${controller_opt}= Catenate ${controller_opt} ${SPACE}${protocol}:${ODL_SYSTEM_${index}_IP}:${ofport}
- \ Log ${controller_opt}
+ FOR ${index} IN @{index_list}
+ ${controller_opt}= Catenate ${controller_opt} ${SPACE}${protocol}:${ODL_SYSTEM_${index}_IP}:${ofport}
+ Log ${controller_opt}
+ END
Log Open extra SSH connection to configure the OVS bridges
SSHKeywords.Open_Connection_To_Tools_System ip_address=${mininet} timeout=${timeout}
${num_bridges} SSHLibrary.Execute Command sudo ovs-vsctl show | grep Bridge | wc -l
${num_bridges}= Convert To Integer ${num_bridges}
${bridges}= Create List
- : FOR ${i} IN RANGE 1 ${num_bridges+1}
- \ ${bridge}= SSHLibrary.Execute Command sudo ovs-vsctl show | grep Bridge | cut -c 12- | sort | head -${i} | tail -1
- \ SSHLibrary.Execute Command sudo ovs-vsctl del-controller ${bridge} && sudo ovs-vsctl set bridge ${bridge} protocols=OpenFlow${ofversion}
- \ Collections.Append To List ${bridges} ${bridge}
+ FOR ${i} IN RANGE 1 ${num_bridges+1}
+ ${bridge}= SSHLibrary.Execute Command sudo ovs-vsctl show | grep Bridge | cut -c 12- | sort | head -${i} | tail -1
+ SSHLibrary.Execute Command sudo ovs-vsctl del-controller ${bridge} && sudo ovs-vsctl set bridge ${bridge} protocols=OpenFlow${ofversion}
+ Collections.Append To List ${bridges} ${bridge}
+ END
Log Configure OVS controllers ${controller_opt} in all bridges
- : FOR ${bridge} IN @{bridges}
- \ SSHLibrary.Execute Command sudo ovs-vsctl set-controller ${bridge} ${controller_opt}
+ FOR ${bridge} IN @{bridges}
+ SSHLibrary.Execute Command sudo ovs-vsctl set-controller ${bridge} ${controller_opt}
+ END
Log Check OVS configuratiom
${output}= SSHLibrary.Execute Command sudo ovs-vsctl show
Log ${output}
[Arguments] ${mininet_conn_list} ${cmd}=help
[Documentation] Sends Command ${cmd} to Mininet sessions in ${mininet_conn_list} and returns list of read buffer responses.
${output_list}= Create List
- : FOR ${mininet_conn} IN @{mininet_conn_list}
- \ ${output}= Utils.Send Mininet Command ${mininet_conn} ${cmd}
- \ Collections.Append To List ${output_list} ${output}
+ FOR ${mininet_conn} IN @{mininet_conn_list}
+ ${output}= Utils.Send Mininet Command ${mininet_conn} ${cmd}
+ Collections.Append To List ${output_list} ${output}
+ END
[Return] ${output_list}
Stop Mininet And Exit
Stop Mininet And Exit Multiple Sessions
[Arguments] ${mininet_conn_list}
[Documentation] Stops Mininet and exits sessions in ${mininet_conn_list}.
- : FOR ${mininet_conn} IN @{mininet_conn_list}
- \ MininetKeywords.Stop Mininet And Exit ${mininet_conn}
+ FOR ${mininet_conn} IN @{mininet_conn_list}
+ MininetKeywords.Stop Mininet And Exit ${mininet_conn}
+ END
Disconnect Cluster Mininet
[Arguments] ${action}=break ${member_index_list}=${EMPTY}
[Documentation] Break and restore controller to mininet connection via iptables.
${index_list} = ClusterManagement.List_Indices_Or_All given_list=${member_index_list}
- : FOR ${index} IN @{index_list}
- \ ${rule} = BuiltIn.Set Variable OUTPUT -p all --source ${ODL_SYSTEM_${index}_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP
- \ ${command} = BuiltIn.Set Variable If '${action}'=='restore' sudo /sbin/iptables -D ${rule} sudo /sbin/iptables -I ${rule}
- \ Log To Console ${ODL_SYSTEM_${index}_IP}
- \ Utils.Run Command On Controller ${ODL_SYSTEM_${index}_IP} cmd=${command}
- \ ${command} = BuiltIn.Set Variable sudo /sbin/iptables -L -n
- \ ${output} = Utils.Run Command On Controller cmd=${command}
- \ BuiltIn.Log ${output}
+ FOR ${index} IN @{index_list}
+ ${rule} = BuiltIn.Set Variable OUTPUT -p all --source ${ODL_SYSTEM_${index}_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP
+ ${command} = BuiltIn.Set Variable If '${action}'=='restore' sudo /sbin/iptables -D ${rule} sudo /sbin/iptables -I ${rule}
+ Log To Console ${ODL_SYSTEM_${index}_IP}
+ Utils.Run Command On Controller ${ODL_SYSTEM_${index}_IP} cmd=${command}
+ ${command} = BuiltIn.Set Variable sudo /sbin/iptables -L -n
+ ${output} = Utils.Run Command On Controller cmd=${command}
+ BuiltIn.Log ${output}
+ END
Verify Aggregate Flow From Mininet Session
[Arguments] ${mininet_conn}=${EMPTY} ${flow_count}=0 ${time_out}=0s
[Documentation] Do one round of ping from one host to all other hosts in mininet.
... Note that a single ping failure will exit the loop and return a non zero value.
${source}= Get From List ${host_list} ${0}
- : FOR ${h} IN @{host_list}
- \ ${status}= Ping Two Hosts ${source} ${h} 1
- \ Exit For Loop If ${status}!=${0}
+ FOR ${h} IN @{host_list}
+ ${status}= Ping Two Hosts ${source} ${h} 1
+ Exit For Loop If ${status}!=${0}
+ END
[Return] ${status}
Ping Two Hosts
SSHLibrary.Write nodes
${out}= SSHLibrary.Read Until mininet>
@{words}= String.Split String ${out} ${SPACE}
- : FOR ${item} IN @{words}
- \ ${h}= String.Get Lines Matching Regexp ${item} h[0-9]*
- \ Run Keyword If '${h}' != '${EMPTY}' Collections.Append To List ${host_list} ${h}
+ FOR ${item} IN @{words}
+ ${h}= String.Get Lines Matching Regexp ${item} h[0-9]*
+ Run Keyword If '${h}' != '${EMPTY}' Collections.Append To List ${host_list} ${h}
+ END
[Return] ${host_list}
Install Certificates In Mininet
BuiltIn.Log ${latest}
@{elements}= XML.Get_Elements ${root} .//version
${versions}= BuiltIn.Create_List
- : FOR ${element} IN @{elements}
- \ Collections.Append_To_List ${versions} ${element.text}
+ FOR ${element} IN @{elements}
+ Collections.Append_To_List ${versions} ${element.text}
+ END
Collections.Sort_List ${versions}
BuiltIn.Log_Many @{versions}
[Return] ${latest} @{versions}
${latest} @{versions}= Get_ODL_Versions_From_Nexus
BuiltIn.Return_From_Keyword_If '${stream}'=='latest' ${latest}
${latest_version}= BuiltIn.Set_Variable xxx
- : FOR ${version} IN @{versions}
- \ ${latest_version}= BuiltIn.Set_Variable_If '${stream}'.title() in '${version}' ${version} ${latest_version}
+ FOR ${version} IN @{versions}
+ ${latest_version}= BuiltIn.Set_Variable_If '${stream}'.title() in '${version}' ${version} ${latest_version}
+ END
BuiltIn.Run_Keyword_If '${latest_version}'=='xxx' BuiltIn.Fail Could not find latest release for stream ${stream}
BuiltIn.Log ${latest_version}
[Return] ${latest_version}
... So in this case, latest release version is return.
${latest} @{versions}= Get_ODL_Versions_From_Nexus
${latest_version}= BuiltIn.Set_Variable xxx
- : FOR ${version} IN @{versions}
- \ BuiltIn.Exit_For_Loop_If '${stream}'.title() in '${version}'
- \ ${latest_version}= BuiltIn.Set_Variable ${version}
+ FOR ${version} IN @{versions}
+ BuiltIn.Exit_For_Loop_If '${stream}'.title() in '${version}'
+ ${latest_version}= BuiltIn.Set_Variable ${version}
+ END
BuiltIn.Run_Keyword_If '${latest_version}'=='xxx' BuiltIn.Fail Could not find latest previous release for stream ${stream}
BuiltIn.Log ${latest_version}
[Return] ${latest_version}
Get Cluster Info
[Arguments] ${port}=${RESTCONFPORT}
[Documentation] Get ODL Cluster related information like transaction counts, commit rates, etc.
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ ${cmd} = BuiltIn.Set Variable odltools netvirt show cluster-info -i ${ODL_SYSTEM_${i+1}_IP} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD}
- \ ${output} = OperatingSystem.Run ${cmd}
- \ BuiltIn.Log output: ${output}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ${cmd} = BuiltIn.Set Variable odltools netvirt show cluster-info -i ${ODL_SYSTEM_${i+1}_IP} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD}
+ ${output} = OperatingSystem.Run ${cmd}
+ BuiltIn.Log output: ${output}
+ END
Analyze Tunnels
[Arguments] ${node_ip}=${ODL_SYSTEM_IP} ${port}=${RESTCONFPORT} ${test_name}=${SUITE_NAME}.${TEST_NAME}
BuiltIn.Log ${node_list}
# Since bridges are also listed as nodes, but will not have the extra "ovsdb:connection-info data,
# we need to use "Run Keyword And Ignore Error" below.
- : FOR ${node} IN @{node_list}
- \ ${node_id} = Collections.Get From Dictionary ${node} node-id
- \ ${node_uuid} = String.Replace String ${node_id} ovsdb://uuid/ ${EMPTY}
- \ ${status} ${connection_info} = BuiltIn.Run Keyword And Ignore Error Collections.Get From Dictionary ${node} ovsdb:connection-info
- \ ${status} ${remote_ip} = BuiltIn.Run Keyword And Ignore Error Collections.Get From Dictionary ${connection_info} remote-ip
- \ ${uuid} = Set Variable If '${remote_ip}' == '${ovs_system_ip}' ${node_uuid} ${uuid}
+ FOR ${node} IN @{node_list}
+ ${node_id} = Collections.Get From Dictionary ${node} node-id
+ ${node_uuid} = String.Replace String ${node_id} ovsdb://uuid/ ${EMPTY}
+ ${status} ${connection_info} = BuiltIn.Run Keyword And Ignore Error Collections.Get From Dictionary ${node} ovsdb:connection-info
+ ${status} ${remote_ip} = BuiltIn.Run Keyword And Ignore Error Collections.Get From Dictionary ${connection_info} remote-ip
+ ${uuid} = Set Variable If '${remote_ip}' == '${ovs_system_ip}' ${node_uuid} ${uuid}
+ END
[Return] ${uuid}
Collect OVSDB Debugs
${index_list} = ClusterManagement.List Indices Or All given_list=${controller_index_list}
Utils.Clean Mininet System ${tools_system}
${ovs_opt} = BuiltIn.Set Variable
- : FOR ${index} IN @{index_list}
- \ ${ovs_opt} = BuiltIn.Catenate ${ovs_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ovs_mgr_port}
- \ BuiltIn.Log ${ovs_opt}
+ FOR ${index} IN @{index_list}
+ ${ovs_opt} = BuiltIn.Catenate ${ovs_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ovs_mgr_port}
+ BuiltIn.Log ${ovs_opt}
+ END
Utils.Run Command On Mininet ${tools_system} sudo ovs-vsctl set-manager ${ovs_opt}
${output} = BuiltIn.Wait Until Keyword Succeeds 5s 1s Verify OVS Reports Connected ${tools_system}
BuiltIn.Log ${output}
SSHLibrary.Switch Connection ${conn_id}
@{modules} = BuiltIn.Create List bridge:file:dbg connmgr:file:dbg inband:file:dbg ofp_actions:file:dbg ofp_errors:file:dbg
... ofp_msgs:file:dbg ovsdb_error:file:dbg rconn:file:dbg tunnel:file:dbg vconn:file:dbg
- : FOR ${module} IN @{modules}
- \ Utils.Write Commands Until Expected Prompt sudo ovs-appctl --target ovs-vswitchd vlog/set ${module} ${DEFAULT_LINUX_PROMPT_STRICT}
+ FOR ${module} IN @{modules}
+ Utils.Write Commands Until Expected Prompt sudo ovs-appctl --target ovs-vswitchd vlog/set ${module} ${DEFAULT_LINUX_PROMPT_STRICT}
+ END
Utils.Write Commands Until Expected Prompt sudo ovs-appctl --target ovs-vswitchd vlog/list ${DEFAULT_LINUX_PROMPT_STRICT}
Reset OVS Logging
[Arguments] ${uris}=@{EMPTY}
[Documentation] Cleans up test environment, close existing sessions.
OVSDB.Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
- : FOR ${uri} IN @{uris}
- \ RequestsLibrary.Delete Request session ${uri}
+ FOR ${uri} IN @{uris}
+ RequestsLibrary.Delete Request session ${uri}
+ END
${resp} = RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
OVSDB.Log Config And Operational Topology
RequestsLibrary.Delete All Sessions
[Arguments] ${ovs_ip} ${br} ${type}
[Documentation] List all ports of ${br} and delete ${type} ports
${ports_present} = Get Ports From Bridge By Type ${ovs_ip} ${br} ${type}
- : FOR ${port} IN @{ports_present}
- \ ${del-ports} = Utils.Run Command On Remote System ${ovs_ip} sudo ovs-vsctl del-port ${br} ${port}
- \ BuiltIn.Log ${del-ports}
+ FOR ${port} IN @{ports_present}
+ ${del-ports} = Utils.Run Command On Remote System ${ovs_ip} sudo ovs-vsctl del-port ${br} ${port}
+ BuiltIn.Log ${del-ports}
+ END
${ports_present_after_delete} = Get Ports From Bridge By Type ${ovs_ip} ${br} ${type}
BuiltIn.Log ${ports_present_after_delete}
[Documentation] To Verify flows are present for the corresponding table Number
${flow_output} = Utils.Run Command On Remote System ${compute_ip} sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}|grep table=${table_num} ${additional_args}
Log ${flow_output}
- : FOR ${matching_str} IN @{matching_paras}
- \ BuiltIn.Run Keyword If ${flag}==True BuiltIn.Should Contain ${flow_output} ${matching_str}
- \ ... ELSE BuiltIn.Should Not Contain ${flow_output} ${matching_str}
+ FOR ${matching_str} IN @{matching_paras}
+ BuiltIn.Run Keyword If ${flag}==True BuiltIn.Should Contain ${flow_output} ${matching_str}
+ ... ELSE BuiltIn.Should Not Contain ${flow_output} ${matching_str}
+ END
Verify Vni Segmentation Id and Tunnel Id
[Arguments] ${port1} ${port2} ${net1} ${net2} ${vm1_ip} ${vm2_ip}
${mininet_conn_id}= SSHLibrary.Open Connection ${mininet} prompt=${TOOLS_SYSTEM_PROMPT} timeout=${DEFAULT_TIMEOUT}
Set Suite Variable ${mininet_conn_id}
SSHKeywords.Flexible Mininet Login
- : FOR ${NODE_NUM} IN RANGE 1 ${number}
- \ SSHLibrary.Write java -cp /tmp/agent/simple-agent/src/main/java/ org.opendaylight.ocpplugin.OcpAgent ${controller} 1033 ${vendorID} ${NODE_NUM} &
- \ SSHLibrary.Read Until getParamResp
+ FOR ${NODE_NUM} IN RANGE 1 ${number}
+ SSHLibrary.Write java -cp /tmp/agent/simple-agent/src/main/java/ org.opendaylight.ocpplugin.OcpAgent ${controller} 1033 ${vendorID} ${NODE_NUM} &
+ SSHLibrary.Read Until getParamResp
+ END
[Return] ${mininet_conn_id}
Stop Emulator And Exit
[Arguments] @{name_of_networks}
[Documentation] Create required number of networks and return a list of the resulting network ids
${net_list_ids} = BuiltIn.Create List @{EMPTY}
- : FOR ${net} IN @{name_of_networks}
- \ ${output} = OpenStackOperations.Create Network ${net}
- \ ${net_id} = Get Regexp Matches ${output} ${REGEX_UUID}
- \ Collections.Append To List ${net_list_ids} ${net_id}
+ FOR ${net} IN @{name_of_networks}
+ ${output} = OpenStackOperations.Create Network ${net}
+ ${net_id} = Get Regexp Matches ${output} ${REGEX_UUID}
+ Collections.Append To List ${net_list_ids} ${net_id}
+ END
[Return] @{net_list_ids}
Update Network
[Documentation] Create required number of subnets for previously created networks and return subnet id
${number_of_networks} = BuiltIn.Get Length ${network_names}
@{subnet_id_list} = BuiltIn.Create List @{EMPTY}
- : FOR ${index} IN RANGE ${number_of_networks}
- \ OpenStackOperations.Create SubNet ${network_names[${index}]} ${subnet_names[${index}]} ${subnet_cidr[${index}]}
+ FOR ${index} IN RANGE ${number_of_networks}
+ OpenStackOperations.Create SubNet ${network_names[${index}]} ${subnet_names[${index}]} ${subnet_cidr[${index}]}
+ END
${sub_list} = OpenStackOperations.List Subnets
- : FOR ${index} IN RANGE ${number_of_networks}
- \ BuiltIn.Should Contain ${sub_list} ${subnet_names[${index}]}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${subnet_names[${index}]}
- \ Collections.Append To List ${subnet_id_list} ${subnet_id}
+ FOR ${index} IN RANGE ${number_of_networks}
+ BuiltIn.Should Contain ${sub_list} ${subnet_names[${index}]}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${subnet_names[${index}]}
+ Collections.Append To List ${subnet_id_list} ${subnet_id}
+ END
[Return] @{subnet_id_list}
Update SubNet
[Arguments] ${external_net} @{vm_list}
[Documentation] Create and associate floating IPs to VMs with nova request
${ip_list} = BuiltIn.Create List @{EMPTY}
- : FOR ${vm} IN @{vm_list}
- \ ${output} = OpenStack CLI openstack floating ip create ${external_net}
- \ @{ip} = String.Get Regexp Matches ${output} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
- \ ${ip_length} = BuiltIn.Get Length ${ip}
- \ BuiltIn.Run Keyword If ${ip_length}>0 Collections.Append To List ${ip_list} @{ip}[0]
- \ ... ELSE Collections.Append To List ${ip_list} None
- \ ${vm_ip} = OpenStack CLI openstack server show ${vm} | grep "addresses" | awk '{print $4}' | cut -d"=" -f 2
- \ ${port_id} = OpenStack CLI openstack port list | grep "ip_address='${vm_ip}'" | awk '{print $2}' | cut -d"=" -f 2
- \ ${output} = BuiltIn.Run Keyword If '${OPENSTACK_BRANCH}' == 'stable/rocky' OpenStack CLI openstack floating ip set --port ${port_id} @{ip}[0]
- \ ... ELSE OpenStack CLI openstack server add floating ip ${vm} @{ip}[0]
+ FOR ${vm} IN @{vm_list}
+ ${output} = OpenStack CLI openstack floating ip create ${external_net}
+ @{ip} = String.Get Regexp Matches ${output} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
+ ${ip_length} = BuiltIn.Get Length ${ip}
+ BuiltIn.Run Keyword If ${ip_length}>0 Collections.Append To List ${ip_list} @{ip}[0]
+ ... ELSE Collections.Append To List ${ip_list} None
+ ${vm_ip} = OpenStack CLI openstack server show ${vm} | grep "addresses" | awk '{print $4}' | cut -d"=" -f 2
+ ${port_id} = OpenStack CLI openstack port list | grep "ip_address='${vm_ip}'" | awk '{print $2}' | cut -d"=" -f 2
+ ${output} = BuiltIn.Run Keyword If '${OPENSTACK_BRANCH}' == 'stable/rocky' OpenStack CLI openstack floating ip set --port ${port_id} @{ip}[0]
+ ... ELSE OpenStack CLI openstack server add floating ip ${vm} @{ip}[0]
+ END
[Return] ${ip_list}
Remove Floating Ip From Vm
.. ${max}=1
${image} BuiltIn.Set Variable If "${image}"=="${EMPTY}" ${CIRROS_${OPENSTACK_BRANCH}} ${image}
${net_id} = OpenStackOperations.Get Net Id ${net_name}
- : FOR ${vm} IN @{vm_instance_names}
- \ ${output} = OpenStack CLI openstack server create --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${vm} --security-group ${sg} --min ${min} --max ${max}
+ FOR ${vm} IN @{vm_instance_names}
+ ${output} = OpenStack CLI openstack server create --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${vm} --security-group ${sg} --min ${min} --max ${max}
+ END
Create Vm Instance On Compute Node
[Arguments] ${net_name} ${vm_name} ${node_hostname} ${image}=${EMPTY} ${flavor}=m1.nano ${sg}=default
... TODO: there is a potential issue for a caller that passes in VMs belonging to different networks that
... may have different dhcp server addresses. Not sure what TODO about that, but noting it here for reference.
@{vm_ips} BuiltIn.Create List @{EMPTY}
- : FOR ${vm} IN @{vms}
- \ OpenStackOperations.Poll VM Is ACTIVE ${vm}
- \ ${status} ${ips_and_console_log} BuiltIn.Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 180s 15s
- \ ... OpenStackOperations.Get VM IP true ${vm}
- \ # If there is trouble with Get VM IP, the status will be FAIL and the return value will be a string of what went
- \ # wrong. We need to handle both the PASS and FAIL cases. In the FAIL case we know we wont have access to the
- \ # console log, as it would not be returned; so we need to grab it again to log it. We also can append 'None' to
- \ # the vm ip list if status is FAIL.
- \ BuiltIn.Run Keyword If "${status}" == "PASS" BuiltIn.Log ${ips_and_console_log[2]}
- \ BuiltIn.Run Keyword If "${status}" == "PASS" Collections.Append To List ${vm_ips} ${ips_and_console_log[0]}
- \ BuiltIn.Run Keyword If "${status}" == "FAIL" Collections.Append To List ${vm_ips} None
- \ ${vm_console_output} = BuiltIn.Run Keyword If "${status}" == "FAIL" OpenStack CLI openstack console log show ${vm}
- \ BuiltIn.Run Keyword If "${status}" == "FAIL" BuiltIn.Log ${vm_console_output}
+ FOR ${vm} IN @{vms}
+ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ ${status} ${ips_and_console_log} BuiltIn.Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 180s 15s
+ ... OpenStackOperations.Get VM IP true ${vm}
+ # If there is trouble with Get VM IP, the status will be FAIL and the return value will be a string of what went
+ # wrong. We need to handle both the PASS and FAIL cases. In the FAIL case we know we wont have access to the
+ # console log, as it would not be returned; so we need to grab it again to log it. We also can append 'None' to
+ # the vm ip list if status is FAIL.
+ BuiltIn.Run Keyword If "${status}" == "PASS" BuiltIn.Log ${ips_and_console_log[2]}
+ BuiltIn.Run Keyword If "${status}" == "PASS" Collections.Append To List ${vm_ips} ${ips_and_console_log[0]}
+ BuiltIn.Run Keyword If "${status}" == "FAIL" Collections.Append To List ${vm_ips} None
+ ${vm_console_output} = BuiltIn.Run Keyword If "${status}" == "FAIL" OpenStack CLI openstack console log show ${vm}
+ BuiltIn.Run Keyword If "${status}" == "FAIL" BuiltIn.Log ${vm_console_output}
+ END
OpenStackOperations.Copy DHCP Files From Control Node
[Return] @{vm_ips} ${ips_and_console_log[1]}
... Returns an empty list if no IPv6 addresses found or if SSH connection fails.
... Otherwise, returns a list of IPv6 addresses.
${ipv6_list} = BuiltIn.Create List @{EMPTY}
- : FOR ${vm} IN @{vm_list}
- \ ${output} = OpenStack CLI openstack server show ${vm} -f shell
- \ ${pattern} = String.Replace String ${subnet} ::/64 (:[a-f0-9]{,4}){,4}
- \ @{vm_ipv6} = String.Get Regexp Matches ${output} ${pattern}
- \ ${vm_ip_length} = BuiltIn.Get Length ${vm_ipv6}[0]
- \ ${ipv6_data_from_vm} = BuiltIn.Run Keyword If ${vm_ip_length}>0 OpenStackOperations.Execute Command on VM Instance ${network} ${vm_ipv6[0]}
- \ ... ip -6 a
- \ @{ipv6} = String.Get Regexp Matches ${ipv6_data_from_vm} ${pattern}
- \ ${ipv6_addr_list_length} BuiltIn.Get Length @{ipv6}
- \ BuiltIn.Run Keyword If ${ipv6_addr_list_length}>0 Collections.Append To List ${ipv6_list} ${ipv6[0]}
- \ ... ELSE Collections.Append To List ${ipv6_list} None
+ FOR ${vm} IN @{vm_list}
+ ${output} = OpenStack CLI openstack server show ${vm} -f shell
+ ${pattern} = String.Replace String ${subnet} ::/64 (:[a-f0-9]{,4}){,4}
+ @{vm_ipv6} = String.Get Regexp Matches ${output} ${pattern}
+ ${vm_ip_length} = BuiltIn.Get Length ${vm_ipv6}[0]
+ ${ipv6_data_from_vm} = BuiltIn.Run Keyword If ${vm_ip_length}>0 OpenStackOperations.Execute Command on VM Instance ${network} ${vm_ipv6[0]}
+ ... ip -6 a
+ @{ipv6} = String.Get Regexp Matches ${ipv6_data_from_vm} ${pattern}
+ ${ipv6_addr_list_length} BuiltIn.Get Length @{ipv6}
+ BuiltIn.Run Keyword If ${ipv6_addr_list_length}>0 Collections.Append To List ${ipv6_list} ${ipv6[0]}
+ ... ELSE Collections.Append To List ${ipv6_list} None
+ END
[Return] ${ipv6_list}
View Vm Console
[Arguments] ${vm_instance_names}
[Documentation] View Console log of the created vm instances using nova show.
- : FOR ${vm} IN @{vm_instance_names}
- \ ${output} = OpenStack CLI openstack server show ${vm}
- \ ${output} = OpenStack CLI openstack console log show ${vm}
+ FOR ${vm} IN @{vm_instance_names}
+ ${output} = OpenStack CLI openstack server show ${vm}
+ ${output} = OpenStack CLI openstack console log show ${vm}
+ END
Ping Vm From DHCP Namespace
[Arguments] ${net_name} ${vm_ip}
BuiltIn.Run Keyword If ${rcode} Utils.Write Commands Until Expected Prompt route -A inet6 ${OS_SYSTEM_PROMPT}
BuiltIn.Run Keyword If ${rcode} Utils.Write Commands Until Expected Prompt arp -an ${OS_SYSTEM_PROMPT}
BuiltIn.Run Keyword If ${rcode} Utils.Write Commands Until Expected Prompt ip -f inet6 neigh show ${OS_SYSTEM_PROMPT}
- : FOR ${dest_ip} IN @{dest_ips}
- \ ${string_empty} = BuiltIn.Run Keyword And Return Status Should Be Empty ${dest_ip}
- \ BuiltIn.Run Keyword If ${string_empty} Continue For Loop
- \ BuiltIn.Run Keyword If ${rcode} and "${ping_should_succeed}" == "True" OpenStackOperations.Check Ping ${dest_ip} ttl=${ttl} ping_tries=${ping_tries}
- \ ... ELSE OpenStackOperations.Check No Ping ${dest_ip} ttl=${ttl}
+ FOR ${dest_ip} IN @{dest_ips}
+ ${string_empty} = BuiltIn.Run Keyword And Return Status Should Be Empty ${dest_ip}
+ BuiltIn.Run Keyword If ${string_empty} Continue For Loop
+ BuiltIn.Run Keyword If ${rcode} and "${ping_should_succeed}" == "True" OpenStackOperations.Check Ping ${dest_ip} ttl=${ttl} ping_tries=${ping_tries}
+ ... ELSE OpenStackOperations.Check No Ping ${dest_ip} ttl=${ttl}
+ END
${ethertype} = String.Get Regexp Matches ${src_ip} ${IP_REGEX}
BuiltIn.Run Keyword If ${rcode} and "${check_metadata}" and ${ethertype} == "True" OpenStackOperations.Check Metadata Access
[Teardown] Exit From Vm Console ${console}
[Arguments] ${list_of_external_dst_ips} ${console}=cirros
[Documentation] Check reachability with other network's instances.
${rcode} = BuiltIn.Run Keyword And Return Status OpenStackOperations.Check If Console Is VmInstance ${console}
- : FOR ${dest_ip} IN @{list_of_external_dst_ips}
- \ OpenStackOperations.Check Ping ${dest_ip}
+ FOR ${dest_ip} IN @{list_of_external_dst_ips}
+ OpenStackOperations.Check Ping ${dest_ip}
+ END
Create Router
[Arguments] ${router_name}
Utils.Write Commands Until Expected Prompt arp -an ${DEFAULT_LINUX_PROMPT_STRICT}
${nslist} = Utils.Write Commands Until Expected Prompt ip netns list | awk '{print $1}' ${DEFAULT_LINUX_PROMPT_STRICT}
@{lines} Split To Lines ${nslist} end=-1
- : FOR ${line} IN @{lines}
- \ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o link ${DEFAULT_LINUX_PROMPT_STRICT}
- \ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o addr ${DEFAULT_LINUX_PROMPT_STRICT}
- \ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip route ${DEFAULT_LINUX_PROMPT_STRICT}
+ FOR ${line} IN @{lines}
+ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o link ${DEFAULT_LINUX_PROMPT_STRICT}
+ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o addr ${DEFAULT_LINUX_PROMPT_STRICT}
+ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip route ${DEFAULT_LINUX_PROMPT_STRICT}
+ END
Utils.Write Commands Until Expected Prompt sudo ovs-vsctl show ${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Write Commands Until Expected Prompt sudo ovs-vsctl list Open_vSwitch ${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Write Commands Until Expected Prompt sudo ovs-ofctl show ${INTEGRATION_BRIDGE} -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT}
Get OvsDebugInfo
[Documentation] Get the OvsConfig and Flow entries from all Openstack nodes
- : FOR ${conn_id} IN @{OS_ALL_CONN_IDS}
- \ OpenStackOperations.Get DumpFlows And Ovsconfig ${conn_id}
+ FOR ${conn_id} IN @{OS_ALL_CONN_IDS}
+ OpenStackOperations.Get DumpFlows And Ovsconfig ${conn_id}
+ END
Get Test Teardown Debugs
[Arguments] ${test_name}=${SUITE_NAME}.${TEST_NAME} ${fail}=${FAIL_ON_EXCEPTIONS}
OpenStackOperations.Get OvsDebugInfo
BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${HA_PROXY_IP} ${netvirt_data_models}
KarafKeywords.Fail If Exceptions Found During Test ${test_name} fail=${fail}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ BuiltIn.Run Keyword And Ignore Error Issue_Command_On_Karaf_Console trace:transactions ${ODL_SYSTEM_${i+1}_IP}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ BuiltIn.Run Keyword And Ignore Error Issue_Command_On_Karaf_Console trace:transactions ${ODL_SYSTEM_${i+1}_IP}
+ END
Get Suite Debugs
Get Test Teardown Debugs test_name=${SUITE_NAME} fail=False
[Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node
OpenStackOperations.Get ControlNode Connection
${output} = DevstackUtils.Write Commands Until Prompt And Log sudo ip netns list
- : FOR ${index} IN @{vm_indices}
- \ ${rc} ${output} = OperatingSystem.Run And Return Rc And Output nova show ${index}
- \ BuiltIn.Log ${output}
+ FOR ${index} IN @{vm_indices}
+ ${rc} ${output} = OperatingSystem.Run And Return Rc And Output nova show ${index}
+ BuiltIn.Log ${output}
+ END
OpenStackOperations.List Nova VMs
OpenStackOperations.List Routers
OpenStackOperations.List Networks
[Documentation] Delete all security rules from a specified security group
${sg_rules_output} = OpenStack CLI openstack security group rule list ${sg_name} -cID -fvalue
@{sg_rules} = String.Split String ${sg_rules_output} \n
- : FOR ${rule} IN @{sg_rules}
- \ ${output} = OpenStack CLI openstack security group rule delete ${rule}
+ FOR ${rule} IN @{sg_rules}
+ ${output} = OpenStack CLI openstack security group rule delete ${rule}
+ END
Create Allow All SecurityGroup
[Arguments] ${sg_name} ${ether_type}=IPv4 ${dual}=False
[Arguments] ${ports}
[Documentation] Retrieve the port MacAddr for the given list of port name and return the MAC address list.
${macs} BuiltIn.Create List
- : FOR ${port} IN @{ports}
- \ ${mac} = OpenStackOperations.Get Port Mac ${port}
- \ Collections.Append To List ${macs} ${mac}
+ FOR ${port} IN @{ports}
+ ${mac} = OpenStackOperations.Get Port Mac ${port}
+ Collections.Append To List ${macs} ${mac}
+ END
[Return] ${macs}
Get Port Ip
[Arguments] ${networks} ${subnets}
[Documentation] Check propagated routes
OpenStackOperations.Get ControlNode Connection
- : FOR ${INDEX} IN RANGE 0 1
- \ ${net_id} = OpenStackOperations.Get Net Id @{networks}[${INDEX}]
- \ ${is_ipv6} = String.Get Regexp Matches @{subnets}[${INDEX}] ${IP6_REGEX}
- \ ${length} = BuiltIn.Get Length ${is_ipv6}
- \ ${cmd} = BuiltIn.Set Variable If ${length} == 0 ip route ip -6 route
- \ ${output} = Utils.Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ${cmd} ${DEFAULT_LINUX_PROMPT_STRICT}
- \ BuiltIn.Should Contain ${output} @{subnets}[${INDEX}]
+ FOR ${INDEX} IN RANGE 0 1
+ ${net_id} = OpenStackOperations.Get Net Id @{networks}[${INDEX}]
+ ${is_ipv6} = String.Get Regexp Matches @{subnets}[${INDEX}] ${IP6_REGEX}
+ ${length} = BuiltIn.Get Length ${is_ipv6}
+ ${cmd} = BuiltIn.Set Variable If ${length} == 0 ip route ip -6 route
+ ${output} = Utils.Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ${cmd} ${DEFAULT_LINUX_PROMPT_STRICT}
+ BuiltIn.Should Contain ${output} @{subnets}[${INDEX}]
+ END
Neutron Cleanup
[Arguments] ${vms}=@{EMPTY} ${networks}=@{EMPTY} ${subnets}=@{EMPTY} ${ports}=@{EMPTY} ${sgs}=@{EMPTY}
- : FOR ${vm} IN @{vms}
- \ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm}
- : FOR ${port} IN @{ports}
- \ BuiltIn.Run Keyword And Ignore Error Delete Port ${port}
- : FOR ${subnet} IN @{subnets}
- \ BuiltIn.Run Keyword And Ignore Error Delete SubNet ${subnet}
- : FOR ${network} IN @{networks}
- \ BuiltIn.Run Keyword And Ignore Error Delete Network ${network}
- : FOR ${sg} IN @{sgs}
- \ BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${sg}
+ FOR ${vm} IN @{vms}
+ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm}
+ END
+ FOR ${port} IN @{ports}
+ BuiltIn.Run Keyword And Ignore Error Delete Port ${port}
+ END
+ FOR ${subnet} IN @{subnets}
+ BuiltIn.Run Keyword And Ignore Error Delete SubNet ${subnet}
+ END
+ FOR ${network} IN @{networks}
+ BuiltIn.Run Keyword And Ignore Error Delete Network ${network}
+ END
+ FOR ${sg} IN @{sgs}
+ BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${sg}
+ END
OpenStack List All
[Documentation] Get a list of different OpenStack resources that might be in use.
@{modules} = BuiltIn.Create List server port network subnet security group
... security group rule floating ip router
- : FOR ${module} IN @{modules}
- \ ${output} = OpenStack CLI openstack ${module} list
+ FOR ${module} IN @{modules}
+ ${output} = OpenStack CLI openstack ${module} list
+ END
OpenStack CLI Get List
[Arguments] ${cmd}
[Documentation] Cleanup all Openstack resources with best effort. The keyword will query for all resources
... in use and then attempt to delete them. Errors are ignored to allow the cleanup to continue.
@{fips} = OpenStack CLI Get List openstack floating ip list -f json
- : FOR ${fip} IN @{fips}
- \ BuiltIn.Run Keyword And Ignore Error Delete Floating IP ${fip['ID']}
+ FOR ${fip} IN @{fips}
+ BuiltIn.Run Keyword And Ignore Error Delete Floating IP ${fip['ID']}
+ END
@{vms} = OpenStack CLI Get List openstack server list -f json
- : FOR ${vm} IN @{vms}
- \ OpenStack CLI openstack server show ${vm['ID']}
- \ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm['ID']}
+ FOR ${vm} IN @{vms}
+ OpenStack CLI openstack server show ${vm['ID']}
+ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm['ID']}
+ END
@{routers} = OpenStack CLI Get List openstack router list -f json
- : FOR ${router} IN @{routers}
- \ BuiltIn.Run Keyword And Ignore Error Cleanup Router ${router['ID']}
+ FOR ${router} IN @{routers}
+ BuiltIn.Run Keyword And Ignore Error Cleanup Router ${router['ID']}
+ END
@{ports} = OpenStack CLI Get List openstack port list -f json
- : FOR ${port} IN @{ports}
- \ BuiltIn.Run Keyword And Ignore Error Delete Port ${port['ID']}
+ FOR ${port} IN @{ports}
+ BuiltIn.Run Keyword And Ignore Error Delete Port ${port['ID']}
+ END
@{networks} = OpenStack CLI Get List openstack network list -f json
- : FOR ${network} IN @{networks}
- \ BuiltIn.Run Keyword And Ignore Error Delete Subnet ${network['Subnets']}
- \ BuiltIn.Run Keyword And Ignore Error Delete Network ${network['ID']}
+ FOR ${network} IN @{networks}
+ BuiltIn.Run Keyword And Ignore Error Delete Subnet ${network['Subnets']}
+ BuiltIn.Run Keyword And Ignore Error Delete Network ${network['ID']}
+ END
@{security_groups} = OpenStack CLI Get List openstack security group list -f json
- : FOR ${security_group} IN @{security_groups}
- \ BuiltIn.Run Keyword If "${security_group['Name']}" != "default" BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${security_group['ID']}
+ FOR ${security_group} IN @{security_groups}
+ BuiltIn.Run Keyword If "${security_group['Name']}" != "default" BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${security_group['ID']}
+ END
OpenStack List All
Cleanup Router
[Arguments] ${id}
[Documentation] Delete a router, but first remove any interfaces or gateways so that the delete will be successful.
@{ports} = OpenStack CLI Get List openstack port list --router ${id} -f json --long
- : FOR ${port} IN @{ports}
- \ ${subnet_id} = OpenStackOperations.Get Match ${port['Fixed IP Addresses']} ${REGEX_UUID} 0
- \ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_gateway" BuiltIn.Run Keyword And Ignore Error Remove Gateway ${id}
- \ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_interface" BuiltIn.Run Keyword And Ignore Error Remove Interface ${id} ${subnet_id}
+ FOR ${port} IN @{ports}
+ ${subnet_id} = OpenStackOperations.Get Match ${port['Fixed IP Addresses']} ${REGEX_UUID} 0
+ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_gateway" BuiltIn.Run Keyword And Ignore Error Remove Gateway ${id}
+ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_interface" BuiltIn.Run Keyword And Ignore Error Remove Interface ${id} ${subnet_id}
+ END
BuiltIn.Run Keyword And Ignore Error Delete Router ${id}
OpenStack Suite Setup
OpenStack Cleanup All
OpenStackOperations.Stop Packet Capture On Nodes ${tcpdump_port_6653_conn_ids}
SSHLibrary.Close All Connections
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ KarafKeywords.Issue Command On Karaf Console threads --list | wc -l ${ODL_SYSTEM_${i+1}_IP}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ KarafKeywords.Issue Command On Karaf Console threads --list | wc -l ${ODL_SYSTEM_${i+1}_IP}
+ END
Validate Deployment
[Documentation] Validate the deployment. Examples to validate are verifying default table
... flows are installed and that the tunnel mesh has been built correctly.
Write To Validate File ----------------------------------------\n${SUITE_NAME}\n
- : FOR ${keyword} IN @{VALIDATION_KEYWORDS}
- \ ${status} = Builtin.Run Keyword And Return Status ${keyword}
- \ BuiltIn.Run Keyword If "${status}" == "FAIL" or "${status}" == "False" BuiltIn.Run Keywords Write To Validate File Failed: ${keyword}
- \ ... AND BuiltIn.Fail
- \ ... ELSE Write To Validate File Passed: ${keyword}
+ FOR ${keyword} IN @{VALIDATION_KEYWORDS}
+ ${status} = Builtin.Run Keyword And Return Status ${keyword}
+ BuiltIn.Run Keyword If "${status}" == "FAIL" or "${status}" == "False" BuiltIn.Run Keywords Write To Validate File Failed: ${keyword}
+ ... AND BuiltIn.Fail
+ ... ELSE Write To Validate File Passed: ${keyword}
+ END
Write To Validate File
[Arguments] ${msg}
Is Feature Installed
[Arguments] ${features}=none
- : FOR ${feature} IN @{features}
- \ ${status} ${output} BuiltIn.Run Keyword And Ignore Error BuiltIn.Should Contain ${CONTROLLERFEATURES} ${feature}
- \ Return From Keyword If "${status}" == "PASS" True
+ FOR ${feature} IN @{features}
+ ${status} ${output} BuiltIn.Run Keyword And Ignore Error BuiltIn.Should Contain ${CONTROLLERFEATURES} ${feature}
+ Return From Keyword If "${status}" == "PASS" True
+ END
[Return] False
Add OVS Logging On All OpenStack Nodes
[Documentation] Add higher levels of OVS logging to all the OpenStack nodes
- : FOR ${conn_id} IN @{OS_ALL_CONN_IDS}
- \ OVSDB.Add OVS Logging ${conn_id}
+ FOR ${conn_id} IN @{OS_ALL_CONN_IDS}
+ OVSDB.Add OVS Logging ${conn_id}
+ END
Reset OVS Logging On All OpenStack Nodes
[Documentation] Reset the OVS logging to all the OpenStack nodes
- : FOR ${conn_id} IN @{OS_ALL_CONN_IDS}
- \ OVSDB.Reset OVS Logging ${conn_id}
+ FOR ${conn_id} IN @{OS_ALL_CONN_IDS}
+ OVSDB.Reset OVS Logging ${conn_id}
+ END
Start Packet Capture On Nodes
[Arguments] ${tag} ${filter} @{ips}
${resp} = RequestsLibrary.Get Request session ${CONFIG_NODES_API}
Utils.Log Content ${resp.content}
${failed_node_list} = BuiltIn.Create List
- : FOR ${node_ip} IN @{node_ips}
- \ ${failed_table_list} = Verify Expected Default Tables ${node_ip}
- \ ${failed_table_list_size} = BuiltIn.Get Length ${failed_table_list}
- \ BuiltIn.Run Keyword If ${failed_table_list_size} > 0 Collections.Append To List ${failed_node_list} ${node_ip}
+ FOR ${node_ip} IN @{node_ips}
+ ${failed_table_list} = Verify Expected Default Tables ${node_ip}
+ ${failed_table_list_size} = BuiltIn.Get Length ${failed_table_list}
+ BuiltIn.Run Keyword If ${failed_table_list_size} > 0 Collections.Append To List ${failed_node_list} ${node_ip}
+ END
Builtin.Should Be Empty ${failed_node_list}
Verify Expected Default Tables
${flow_dump} = Utils.Run Command On Remote System ${ovs_ip} sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenFlow13
BuiltIn.Log ${flow_dump}
${failed_table_list} = BuiltIn.Create List
- : FOR ${table} IN @{DEFAULT_FLOW_TABLES}
- \ ${rc} = Builtin.Run Keyword And Return Status Builtin.Should Not Match Regexp ${flow_dump} .*table=${table}.*priority=0
- \ BuiltIn.Run Keyword If ${rc} Collections.Append To List ${failed_table_list} ${table}
+ FOR ${table} IN @{DEFAULT_FLOW_TABLES}
+ ${rc} = Builtin.Run Keyword And Return Status Builtin.Should Not Match Regexp ${flow_dump} .*table=${table}.*priority=0
+ BuiltIn.Run Keyword If ${rc} Collections.Append To List ${failed_table_list} ${table}
+ END
[Return] ${failed_table_list}
Get Project Id
${output}= SSHLibrary.Read_Until ${lprompt}
Log ${output}
${cmd}= BuiltIn.Set Variable ${lcmd_prefix} ovs-vsctl set-controller ${bridge}
- : FOR ${cntl} IN @{controllers}
- \ ${cmd}= BuiltIn.Set Variable If ${disconnected}==${False} ${cmd} tcp:${cntl}:6653 ${cmd} tcp:${cntl}:6654
+ FOR ${cntl} IN @{controllers}
+ ${cmd}= BuiltIn.Set Variable If ${disconnected}==${False} ${cmd} tcp:${cntl}:6653 ${cmd} tcp:${cntl}:6654
+ END
BuiltIn.Log ${cmd}
SSHLibrary.Write ${cmd}
${output}= SSHLibrary.Read_Until ${lprompt}
${bridge}= Collections.Get From Dictionary ${ovs_switch_data} ${switch}
${cntls_dict}= Collections.Get From Dictionary ${bridge} controller
${cntls_items}= Collections.Get Dictionary Items ${cntls_dict}
- : FOR ${key} ${value} IN @{cntls_items}
- \ Log ${key} : ${value}
- \ ${role}= Collections.Get From Dictionary ${value} role
- \ Run Keyword If "${role}"=="master" BuiltIn.Should Be Equal ${master} ${None}
- \ ${master}= BuiltIn.Set Variable If "${role}"=="master" ${key} ${master}
+ FOR ${key} ${value} IN @{cntls_items}
+ Log ${key} : ${value}
+ ${role}= Collections.Get From Dictionary ${value} role
+ Run Keyword If "${role}"=="master" BuiltIn.Should Be Equal ${master} ${None}
+ ${master}= BuiltIn.Set Variable If "${role}"=="master" ${key} ${master}
+ END
BuiltIn.Should Not Be Equal ${master} ${None}
Return From Keyword ${master}
${bridge}= Collections.Get From Dictionary ${ovs_switch_data} ${switch}
${cntls_dict}= Collections.Get From Dictionary ${bridge} controller
${cntls_items}= Collections.Get Dictionary Items ${cntls_dict}
- : FOR ${key} ${value} IN @{cntls_items}
- \ Log ${key} : ${value}
- \ ${role}= Collections.Get From Dictionary ${value} role
- \ Run Keyword If "${role}"=="slave" Collections.Append To List ${slaves} ${key}
+ FOR ${key} ${value} IN @{cntls_items}
+ Log ${key} : ${value}
+ ${role}= Collections.Get From Dictionary ${value} role
+ Run Keyword If "${role}"=="slave" Collections.Append To List ${slaves} ${key}
+ END
Return From Keyword ${slaves}
Setup Clustered Controller For Switches
[Documentation] The idea of this keyword is to setup clustered controller and to be more or less sure that the role is filled correctly. The problem is when
... more controllers are being set up at once, the role shown in Controller ovsdb table is not the same as we can see from wireshark traces.
... Now we set disconnected controllers and we will connect them expecting that the first connected controller will be master.
- : FOR ${switch_name} IN @{switches}
- \ Set Bridge Controllers ${switch_name} ${controller_ips} disconnected=${True}
- # now we need to enable one node which will be master
+ FOR ${switch_name} IN @{switches}
+ Set Bridge Controllers ${switch_name} ${controller_ips} disconnected=${True}
+ # now we need to enable one node which will be master
+ END
OvsManager.Get Ovsdb Data
- : FOR ${switch_name} IN @{switches}
- \ ${own}= Collections.Get From List ${controller_ips} 0
- \ Reconnect Switch To Controller And Verify Connected ${switch_name} ${own} verify_connected=${False}
- # now we need to wait till master controllers are connected
+ FOR ${switch_name} IN @{switches}
+ ${own}= Collections.Get From List ${controller_ips} 0
+ Reconnect Switch To Controller And Verify Connected ${switch_name} ${own} verify_connected=${False}
+ # now we need to wait till master controllers are connected
+ END
BuiltIn.Wait Until Keyword Succeeds 5x 2s OvsManager__Verify_Masters_Connected ${switches} update_data=${True}
# now we can enable slaves
OvsManager__Enable_Slaves ${switches} verify_connected=${verify_connected}
[Arguments] ${switches} ${update_data}=${False}
[Documentation] Private keyword, the existence of master means it is verified
Run Keyword If ${update_data}==${True} Get Ovsdb Data
- : FOR ${switch_name} IN @{switches}
- \ Get Master Node ${switch_name}
+ FOR ${switch_name} IN @{switches}
+ Get Master Node ${switch_name}
+ END
OvsManager__Enable_Slaves
[Arguments] ${switches} ${update_data}=${False} ${verify_connected}=${False}
[Documentation] This is a private keyword to enable diconnected controllers
Run Keyword If ${update_data}==${True} Get Ovsdb Data
- : FOR ${switch_name} IN @{switches}
- \ OvsManager__Enable_Slaves_For_Switch ${switch_name} verify_connected=${verify_connected}
+ FOR ${switch_name} IN @{switches}
+ OvsManager__Enable_Slaves_For_Switch ${switch_name} verify_connected=${verify_connected}
+ END
OvsManager__Enable_Slaves_For_Switch
[Arguments] ${switch} ${update_data}=${False} ${verify_connected}=${False}
${bridge}= Collections.Get From Dictionary ${ovs_switch_data} ${switch}
${cntls_dict}= Collections.Get From Dictionary ${bridge} controller
${cntls_items}= Collections.Get Dictionary Items ${cntls_dict}
- : FOR ${cntl_id} ${cntl_value} IN @{cntls_items}
- \ Log ${cntl_id} : ${cntl_value}
- \ ${role}= Collections.Get From Dictionary ${cntl_value} role
- \ ${connected}= Collections.Get From Dictionary ${cntl_value} is_connected
- \ Run Keyword If ${connected}==${False} Reconnect Switch To Controller And Verify Connected ${switch} ${cntl_id} verify_connected=${verify_connected}
+ FOR ${cntl_id} ${cntl_value} IN @{cntls_items}
+ Log ${cntl_id} : ${cntl_value}
+ ${role}= Collections.Get From Dictionary ${cntl_value} role
+ ${connected}= Collections.Get From Dictionary ${cntl_value} is_connected
+ Run Keyword If ${connected}==${False} Reconnect Switch To Controller And Verify Connected ${switch} ${cntl_id} verify_connected=${verify_connected}
+ END
Get Dump Flows Count
[Arguments] ${conn_id} ${acl_sr_table_id} ${port_mac}=""
Verify Ovs Version Greater Than Or Equal To
[Arguments] ${ovs_version} @{nodes}
[Documentation] Get ovs version and verify greater than required version
- : FOR ${ip} IN @{nodes}
- \ ${output} = Utils.Run Command On Remote System ${ip} ${SHOW_OVS_VERSION}
- \ ${version} = String.Get Regexp Matches ${output} \[0-9].\[0-9]
- \ ${result} = BuiltIn.Convert To Number ${version[0]}
- \ BuiltIn.Should Be True ${result} >= ${ovs_version}
+ FOR ${ip} IN @{nodes}
+ ${output} = Utils.Run Command On Remote System ${ip} ${SHOW_OVS_VERSION}
+ ${version} = String.Get Regexp Matches ${output} \[0-9].\[0-9]
+ ${result} = BuiltIn.Convert To Number ${version[0]}
+ BuiltIn.Should Be True ${result} >= ${ovs_version}
+ END
Get OVS Local Ip
[Arguments] ${ip}
[Arguments] ${docker_name_list} ${command} ${return_contains}=${EMPTY} ${result_code}=0
[Documentation] Execute a command in a list of dockers and return all the outputs in a list
@{list_output}= Create List
- : FOR ${docker_id} IN @{docker_name_list}
- \ ${exec_output}= Docker Exec ${docker_id} ${command} ${return_contains} ${result_code}
- \ Append To List ${list_output} ${exec_output}
+ FOR ${docker_id} IN @{docker_name_list}
+ ${exec_output}= Docker Exec ${docker_id} ${command} ${return_contains} ${result_code}
+ Append To List ${list_output} ${exec_output}
+ END
[Return] ${list_output}
Get Flows In Docker Containers
# The "sfp-rendered-service-path" will only have 1 or 2 entries, depending on chain symmetry config.
# The RSP name will be "<SfpName>-Path-<PathId>" and the optional symmetric name will be <SfpName>-Path-<PathId>-Reverse"
${value} = BuiltIn.Set Variable None
- : FOR ${i} IN RANGE ${list_length}
- \ ${rsp_name_dict} = Collections.Get From List ${sfp_state_list} ${i}
- \ ${name} = Collections.Get_From_Dictionary ${rsp_name_dict} name
- \ @{matches} = String.Get Regexp Matches ${name} .*Reverse$
- \ ${matches_length} = BuiltIn.Get Length ${matches}
- \ ${value} = BuiltIn.Set Variable If "${get_reverse}" == "False" and 0 == ${matches_length} ${name} "${get_reverse}" == "True" and 0 < ${matches_length} ${name}
- \ ... "${value}" != "None" ${value}
+ FOR ${i} IN RANGE ${list_length}
+ ${rsp_name_dict} = Collections.Get From List ${sfp_state_list} ${i}
+ ${name} = Collections.Get_From_Dictionary ${rsp_name_dict} name
+ @{matches} = String.Get Regexp Matches ${name} .*Reverse$
+ ${matches_length} = BuiltIn.Get Length ${matches}
+ ${value} = BuiltIn.Set Variable If "${get_reverse}" == "False" and 0 == ${matches_length} ${name} "${get_reverse}" == "True" and 0 < ${matches_length} ${name}
+ ... "${value}" != "None" ${value}
+ END
[Return] ${value}
Create Sfp And Wait For Rsp Creation
${sfp_json_list} = Collections.Get_From_Dictionary ${sfps} service-function-path
${list_length} = BuiltIn.Get Length ${sfp_json_list}
# Each SFP state entry returned from ODL will have either 2 or 3 name elements, 2 for non-symmetric 3 for symmetric RSP
- : FOR ${i} IN RANGE ${list_length}
- \ ${sfp_entry_dict} = Collections.Get From List ${sfp_json_list} ${i}
- \ ${sfp_name} = Collections.Get_From_Dictionary ${sfp_entry_dict} name
- \ ${status} ${symmetric} = BuiltIn.Run Keyword And Ignore Error Collections.Get_From_Dictionary ${sfp_entry_dict} symmetric
- \ ${symmetric} = BuiltIn.Set Variable If "${status}" == "FAIL" False ${symmetric}
- \ ${num_names} = BuiltIn.Set Variable If "${symmetric}" == "False" 2 3
- \ BuiltIn.Wait Until Keyword Succeeds 60s 2s Utils.Check For Specific Number Of Elements At URI ${SERVICE_FUNCTION_PATH_STATE_URI}/${sfp_name} name
- \ ... ${num_names}
+ FOR ${i} IN RANGE ${list_length}
+ ${sfp_entry_dict} = Collections.Get From List ${sfp_json_list} ${i}
+ ${sfp_name} = Collections.Get_From_Dictionary ${sfp_entry_dict} name
+ ${status} ${symmetric} = BuiltIn.Run Keyword And Ignore Error Collections.Get_From_Dictionary ${sfp_entry_dict} symmetric
+ ${symmetric} = BuiltIn.Set Variable If "${status}" == "FAIL" False ${symmetric}
+ ${num_names} = BuiltIn.Set Variable If "${symmetric}" == "False" 2 3
+ BuiltIn.Wait Until Keyword Succeeds 60s 2s Utils.Check For Specific Number Of Elements At URI ${SERVICE_FUNCTION_PATH_STATE_URI}/${sfp_name} name
+ ... ${num_names}
+ END
Delete Sfp And Wait For Rsps Deletion
[Arguments] ${sfp_name}
Switch Ips In Json Files
[Arguments] ${json_dir} ${container_names}
${normalized_dir}= OperatingSystem.Normalize Path ${json_dir}/*.json
- : FOR ${cont_name} IN @{container_names}
- \ ${cont_ip} = Get Docker IP ${cont_name}
- \ OperatingSystem.Run sudo sed -i 's/${cont_name}/${cont_ip}/g' ${normalized_dir}
+ FOR ${cont_name} IN @{container_names}
+ ${cont_ip} = Get Docker IP ${cont_name}
+ OperatingSystem.Run sudo sed -i 's/${cont_name}/${cont_ip}/g' ${normalized_dir}
+ END
*** Keywords ***
Setup Nodes
[Arguments] ${version}=version4 ${password}=none
- : FOR ${node} IN RANGE 1 5
- \ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 1 5
+ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} both 127.0.0.1 64999 127.0.0.2 ${password}
SxpLib.Add Connection ${version} both 127.0.0.2 64999 127.0.0.1 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.2
... deny ACL 10.10.0.0 0.0.255.0
... permit ACL 10.0.0.0 0.255.255.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- : FOR ${node} IN RANGE 4 6
- \ ${resp} = SxpLib.Get Bindings 127.0.0.${node}
- \ BuiltIn.Log ${resp}
- \ SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
- \ SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.10.0.0/16
- \ SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
- \ SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
- \ SxpLib.Should Not Contain Binding ${resp} 20 10.10.20.0/24
- \ SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
- \ SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
- \ SxpLib.Should Not Contain Binding ${resp} 30 10.10.30.0/24
- \ SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ FOR ${node} IN RANGE 4 6
+ ${resp} = SxpLib.Get Bindings 127.0.0.${node}
+ BuiltIn.Log ${resp}
+ SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
+ SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
+ SxpLib.Should Not Contain Binding ${resp} 10 10.10.0.0/16
+ SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
+ SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
+ SxpLib.Should Not Contain Binding ${resp} 20 10.10.20.0/24
+ SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
+ SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
+ SxpLib.Should Not Contain Binding ${resp} 30 10.10.30.0/24
+ SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ END
${resp} = SxpLib.Get Bindings 127.0.0.2
BuiltIn.Log ${resp}
SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
... permit ACL 10.20.0.0 0.0.255.255
... permit ACL 10.10.0.0 0.0.255.0
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
- : FOR ${node} IN RANGE 4 6
- \ ${resp} = SxpLib.Get Bindings 127.0.0.${node}
- \ BuiltIn.Log ${resp}
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
- \ SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
- \ SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
- \ SxpLib.Should Not Contain Binding ${resp} 20 10.10.10.20/32
- \ SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
- \ SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
- \ SxpLib.Should Not Contain Binding ${resp} 30 10.10.10.30/32
- \ SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ FOR ${node} IN RANGE 4 6
+ ${resp} = SxpLib.Get Bindings 127.0.0.${node}
+ BuiltIn.Log ${resp}
+ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
+ SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
+ SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
+ SxpLib.Should Not Contain Binding ${resp} 20 10.10.10.20/32
+ SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
+ SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
+ SxpLib.Should Not Contain Binding ${resp} 30 10.10.10.30/32
+ SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
+ SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ END
${resp} = SxpLib.Get Bindings 127.0.0.2
BuiltIn.Log ${resp}
SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
... permit SGT 30 ACL 10.10.10.0 0.0.0.255
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
@{list} Create List 127.0.0.2 127.0.0.5
- : FOR ${node} IN @{list}
- \ ${resp} = SxpLib.Get Bindings ${node}
- \ BuiltIn.Log ${resp}
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
- \ SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
- \ SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
- \ SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
- \ SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
- \ SxpLib.Should Not Contain Binding ${resp} 40 10.10.10.40/32
- \ SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ FOR ${node} IN @{list}
+ ${resp} = SxpLib.Get Bindings ${node}
+ BuiltIn.Log ${resp}
+ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
+ SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
+ SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
+ SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
+ SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
+ SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ SxpLib.Should Not Contain Binding ${resp} 40 10.10.10.40/32
+ SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
+ SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ END
${resp} = SxpLib.Get Bindings 127.0.0.4
BuiltIn.Log ${resp}
SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
... permit SGT 20,40 ACL 10.10.0.0 0.0.255.255
... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
@{list} = Create List 127.0.0.2 127.0.0.5
- : FOR ${node} IN @{list}
- \ ${resp} = SxpLib.Get Bindings ${node}
- \ BuiltIn.Log ${resp}
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.10.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
- \ SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
- \ SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
- \ SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
- \ SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
- \ SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ FOR ${node} IN @{list}
+ ${resp} = SxpLib.Get Bindings ${node}
+ BuiltIn.Log ${resp}
+ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
+ SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.0/24
+ SxpLib.Should Not Contain Binding ${resp} 10 10.10.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
+ SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
+ SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
+ SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
+ SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
+ SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ END
${resp} = SxpLib.Get Bindings 127.0.0.4
BuiltIn.Log ${resp}
SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
Setup_Logging_For_Debug_Purposes_On_List_Or_All
[Arguments] ${log_level} ${loggers_list} ${member_index_list}=${EMPTY}
[Documentation] Set the log level for given loggers on node nodes of the cluster
- : FOR ${logger} IN @{loggers_list}
- \ ClusterManagement.Run_Karaf_Command_On_List_Or_All log:set ${log_level} ${logger} member_index_list=${member_index_list}
+ FOR ${logger} IN @{loggers_list}
+ ClusterManagement.Run_Karaf_Command_On_List_Or_All log:set ${log_level} ${logger} member_index_list=${member_index_list}
+ END
Set_Known_Bug_Id
[Arguments] ${id}
[Documentation] Return shard details stored in dictionary.
... ${shard_list} should be initialized as @{list} shard_name1:shard_type1 shard_name2:shard..
&{shards_details} BuiltIn.Create_Dictionary
- : FOR ${shard_details} IN @{shard_list}
- \ ${shard_name} ${shard_type} String.Split_String ${shard_details} separator=:
- \ ${leader} ${followers} ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${member_index_list}
- \ ... verify_restconf=${verify_restconf} http_timeout=${http_timeout}
- \ Collections.Sort_List ${followers}
- \ Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_leader=${leader}
- \ Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_followers=${followers}
+ FOR ${shard_details} IN @{shard_list}
+ ${shard_name} ${shard_type} String.Split_String ${shard_details} separator=:
+ ${leader} ${followers} ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${member_index_list}
+ ... verify_restconf=${verify_restconf} http_timeout=${http_timeout}
+ Collections.Sort_List ${followers}
+ Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_leader=${leader}
+ Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_followers=${followers}
+ END
BuiltIn.Return_From_Keyword ${shards_details}
Shards_Stability_Verify
Should Contain All Sub Strings
[Arguments] ${attr} @{checked}
[Documentation] Passes if ${attr} includes all substrings from @{checked}, fails otherwise
- : FOR ${item} IN @{checked}
- \ Should Contain ${attr} ${item}
+ FOR ${item} IN @{checked}
+ Should Contain ${attr} ${item}
+ END
Should Not Contain Any Sub Strings
[Arguments] ${attr} @{checked}
[Documentation] Fails if ${attr} includes at least one substring from @{checked}, passes otherwise
- : FOR ${item} IN @{checked}
- \ Should Not Contain ${attr} ${item}
+ FOR ${item} IN @{checked}
+ Should Not Contain ${attr} ${item}
+ END
[Arguments] ${switch} ${cmd_list}
[Documentation] Each string in the @{cmd_list} argument is executed on the switch.connection_index.
Configure Connection Index And Prompt Wrapper ${switch}
- : FOR ${cmd} IN @{cmd_list}
- \ Log ${cmd}
- \ Read Wrapper ${switch}
- \ Execute Command Wrapper ${switch} ${cmd}
+ FOR ${cmd} IN @{cmd_list}
+ Log ${cmd}
+ Read Wrapper ${switch}
+ Execute Command Wrapper ${switch} ${cmd}
+ END
Configure OpenFlow
[Arguments] ${switch}
Log ${tmp}
${output}= Execute Command Wrapper ${switch} ${cmd}
Log ${output}
- : FOR ${str} IN @{validations}
- \ Run Keyword If "${should_exist}" == "true" Should Match Regexp ${output} ${str}
- \ Run Keyword If "${should_exist}" == "false" Should Not Match Regexp ${output} ${str}
+ FOR ${str} IN @{validations}
+ Run Keyword If "${should_exist}" == "true" Should Match Regexp ${output} ${str}
+ Run Keyword If "${should_exist}" == "false" Should Not Match Regexp ${output} ${str}
+ END
Enable OpenFlow
[Arguments] ${switch}
${connection_index}= Open Connection Wrapper ${switch}
Call Method ${switch} set_connection_index ${connection_index}
Configure Connection Index And Prompt Wrapper ${switch}
- : FOR ${cmd} IN @{switch.connection_configs}
- \ Write Bare Wrapper ${switch} ${cmd}
- \ Sleep 1
- \ Read Wrapper ${switch}
+ FOR ${cmd} IN @{switch.connection_configs}
+ Write Bare Wrapper ${switch} ${cmd}
+ Sleep 1
+ Read Wrapper ${switch}
+ END
Cleanup Switch
[Arguments] ${switch}
... and a reconnect to the switch is made.
Connect To Switch ${switch}
Configure Connection Index And Prompt Wrapper ${switch}
- : FOR ${cmd} IN @{switch.initialization_cmds}
- \ Write Bare Wrapper ${switch} ${cmd}
- \ Sleep 1
- \ Run Keyword And Ignore Error Read Wrapper ${switch}
+ FOR ${cmd} IN @{switch.initialization_cmds}
+ Write Bare Wrapper ${switch} ${cmd}
+ Sleep 1
+ Run Keyword And Ignore Error Read Wrapper ${switch}
+ END
Run Keyword If "${switch.initialization_type}" == "reboot" Wait For Switch Reboot ${switch}
Run Keyword If "${switch.initialization_type}" == "reboot" Connect To Switch ${switch}
[Arguments] @{origins}
[Documentation] Test if data contain specified binding origins
${resp} = SxpBindingOriginsLib.Get Binding Origins
- : FOR ${origin} IN @{origins}
- \ ${out} = Sxp.Find Binding Origin ${resp.json()} ${origin}
- \ BuiltIn.Should Be True ${out} Missing origin: ${origin} in ${resp}
+ FOR ${origin} IN @{origins}
+ ${out} = Sxp.Find Binding Origin ${resp.json()} ${origin}
+ BuiltIn.Should Be True ${out} Missing origin: ${origin} in ${resp}
+ END
Should Not Contain Binding Origins
[Arguments] @{origins}
[Documentation] Test if data DONT contain specified binding origins
${resp} = SxpBindingOriginsLib.Get Binding Origins
- : FOR ${origin} IN @{origins}
- \ ${out} = Sxp.Find Binding Origin ${resp.json()} ${origin}
- \ BuiltIn.Should Be Equal As Strings False ${out} Not expected origin: ${origin} in ${resp}
+ FOR ${origin} IN @{origins}
+ ${out} = Sxp.Find Binding Origin ${resp.json()} ${origin}
+ BuiltIn.Should Be Equal As Strings False ${out} Not expected origin: ${origin} in ${resp}
+ END
Should Contain Binding Origin With Priority
[Arguments] ${origin} ${priority}
[Documentation] Setup and connect SXP cluster topology
SxpLib.Add Node ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
BuiltIn.Wait Until Keyword Succeeds 240x 1s SxpLib.Check Node Started ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Add Connection version4 ${peer_mode} ${ODL_SYSTEM_${i+1}_IP} 64999 node=${DEVICE_NODE_ID}
- \ ... session=${DEVICE_SESSION}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ SxpLib.Add Connection version4 ${peer_mode} ${ODL_SYSTEM_${i+1}_IP} 64999 node=${DEVICE_NODE_ID}
+ ... session=${DEVICE_SESSION}
+ END
${cluster_mode} = Sxp.Get Opposing Mode ${peer_mode}
SxpLib.Add Node ${INADDR_ANY} session=${CONTROLLER_SESSION}
BuiltIn.Wait Until Keyword Succeeds 240x 1s Check Cluster Node Started ${INADDR_ANY} ip=${EMPTY}
${resp} = RequestsLibrary.Get Request ${CONTROLLER_SESSION} /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
BuiltIn.Should Be Equal As Strings ${resp.status_code} 200
${started} = BuiltIn.Set Variable ${False}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ ${rc} = Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} netstat -tln | grep -q ${ip}:${port} && echo 0 || echo 1 ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
- \ ... prompt=${ODL_SYSTEM_PROMPT}
- \ ${started} = BuiltIn.Set Variable If '${rc}' == '0' ${True} ${started}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ${rc} = Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} netstat -tln | grep -q ${ip}:${port} && echo 0 || echo 1 ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ ... prompt=${ODL_SYSTEM_PROMPT}
+ ${started} = BuiltIn.Set Variable If '${rc}' == '0' ${True} ${started}
+ END
BuiltIn.Should Be True ${started}
Check Cluster Node Stopped
${resp} = RequestsLibrary.Get Request ${CONTROLLER_SESSION} /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
BuiltIn.Should Be Equal As Strings ${resp.status_code} 404
${stopped} = BuiltIn.Set Variable ${False}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ ${rc} = Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} netstat -tln | grep -q ${ip}:${port} && echo 0 || echo 1 ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
- \ ... prompt=${ODL_SYSTEM_PROMPT}
- \ ${stopped} = BuiltIn.Set Variable If '${rc}' == '1' ${True} ${stopped}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ${rc} = Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} netstat -tln | grep -q ${ip}:${port} && echo 0 || echo 1 ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ ... prompt=${ODL_SYSTEM_PROMPT}
+ ${stopped} = BuiltIn.Set Variable If '${rc}' == '1' ${True} ${stopped}
+ END
BuiltIn.Should Be True ${stopped}
Check Device is Connected
[Documentation] Checks if SXP device is connected to the cluster. It means it has connection in state "on" with one of the cluster members.
${resp} = SxpLib.Get Connections node=${node} session=${session}
${is_connected} = BuiltIn.Set Variable ${False}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ ${is_connected} = Sxp.Find Connection ${resp} ${version} any ${ODL_SYSTEM_${i+1}_IP}
- \ ... ${port} on
- \ BuiltIn.Exit For Loop If ${is_connected}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ${is_connected} = Sxp.Find Connection ${resp} ${version} any ${ODL_SYSTEM_${i+1}_IP}
+ ... ${port} on
+ BuiltIn.Exit For Loop If ${is_connected}
+ END
BuiltIn.Should Be True ${is_connected}
Check Cluster is Connected
Map Followers To Mac Addresses
[Documentation] Creates Map containing ODL_SYSTEM_IP to corresponding MAC-ADDRESS
${mac_addresses} = BuiltIn.Create dictionary
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ ${mac_address} Find Mac Address Of Ip Address ${ODL_SYSTEM_${i+1}_IP}
- \ Collections.Set To Dictionary ${mac_addresses} ${ODL_SYSTEM_${i+1}_IP} ${mac_address}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ${mac_address} Find Mac Address Of Ip Address ${ODL_SYSTEM_${i+1}_IP}
+ Collections.Set To Dictionary ${mac_addresses} ${ODL_SYSTEM_${i+1}_IP} ${mac_address}
+ END
BuiltIn.Log ${mac_addresses}
[Return] ${mac_addresses}
Create Virtual Interface
[Documentation] Create virtual interface on all of the cluster nodes
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo modprobe dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
- \ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sudo ip link show ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo modprobe dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sudo ip link show ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ END
Delete Virtual Interface
[Documentation] Create virtual interface on all of the cluster nodes
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo ip link delete ${VIRTUAL_INTERFACE} type dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
- \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo rmmod dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
- \ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sudo ip link show ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo ip link delete ${VIRTUAL_INTERFACE} type dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo rmmod dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sudo ip link show ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ END
[Documentation] Delete all connections via RPC from node
${resp} = Get Connections ${node} ${session} ${domain}
@{connections} = Sxp.Parse Connections ${resp}
- : FOR ${connection} IN @{connections}
- \ Delete Connections ${connection['peer-address']} ${connection['tcp-port']} ${node} ${session} ${domain}
+ FOR ${connection} IN @{connections}
+ Delete Connections ${connection['peer-address']} ${connection['tcp-port']} ${node} ${session} ${domain}
+ END
Verify Connection
[Arguments] ${version} ${mode} ${ip} ${port}=64999 ${node}=127.0.0.1 ${state}=on
[Documentation] Delete all bindings via RPC from Master DB of node
${resp} = Get Bindings ${node} ${session} ${domain} ${scope}
@{bindings} = Sxp.Parse Bindings ${resp}
- : FOR ${binding} IN @{bindings}
- \ @{prefixes_list} = collections.Get From Dictionary ${binding} ip-prefix
- \ ${prefixes} = BuiltIn.Catenate SEPARATOR=, @{prefixes_list}
- \ Delete Bindings ${binding['sgt']} ${prefixes} ${node} ${domain} ${session}
+ FOR ${binding} IN @{bindings}
+ @{prefixes_list} = collections.Get From Dictionary ${binding} ip-prefix
+ ${prefixes} = BuiltIn.Catenate SEPARATOR=, @{prefixes_list}
+ Delete Bindings ${binding['sgt']} ${prefixes} ${node} ${domain} ${session}
+ END
Delete Bindings
[Arguments] ${sgt} ${prefixes} ${node}=127.0.0.1 ${domain}=global ${session}=session
[Documentation] Delete all PeerGroups via RPC from node
${resp} = Get Peer Groups ${node} ${session}
@{prefixes} = Sxp.Parse Peer Groups ${resp}
- : FOR ${group} IN @{prefixes}
- \ Delete Peer Group ${group['name']} ${node} ${session}
+ FOR ${group} IN @{prefixes}
+ Delete Peer Group ${group['name']} ${node} ${session}
+ END
Add Filter
[Arguments] ${name} ${type} ${entries} ${node}=127.0.0.1 ${session}=session ${policy}=auto-update
Setup Topology Complex
[Arguments] ${version}=version4 ${password}=none
- : FOR ${node} IN RANGE 2 6
- \ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
- \ ... ${password}
- \ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
- \ ... ${password}
- \ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
- \ ... 127.0.0.${node}
- \ Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
- \ Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
- \ Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 2 6
+ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
+ ... ${password}
+ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
+ ... ${password}
+ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
+ ... 127.0.0.${node}
+ Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
Add Bindings 10 10.10.10.10/32 127.0.0.1
Add Bindings 10 10.10.10.0/24 127.0.0.1
Add Bindings 10 10.10.0.0/16 127.0.0.1
[Arguments] ${sgt} ${start} ${end} ${node}=127.0.0.1
[Documentation] Check if Node contains Bindings specified by range
${resp} = Get Bindings ${node}
- : FOR ${num} IN RANGE ${start} ${end}
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ Should Contain Binding ${resp} ${sgt} ${ip}/32
+ FOR ${num} IN RANGE ${start} ${end}
+ ${ip} = Sxp.Get Ip From Number ${num}
+ Should Contain Binding ${resp} ${sgt} ${ip}/32
+ END
Check Binding Range Negative
[Arguments] ${sgt} ${start} ${end} ${node}=127.0.0.1
[Documentation] Check if Node does not contains Bindings specified by range
${resp} = Get Bindings ${node}
- : FOR ${num} IN RANGE ${start} ${end}
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ Should Not Contain Binding ${resp} ${sgt} ${ip}/32
+ FOR ${num} IN RANGE ${start} ${end}
+ ${ip} = Sxp.Get Ip From Number ${num}
+ Should Not Contain Binding ${resp} ${sgt} ${ip}/32
+ END
Setup SXP Environment
[Arguments] ${node_range}=1
[Documentation] Create session to Controller, ${node_range} parameter specifies number of localhost nodes to be created on ${ODL_SYSTEM_IP}.
RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} timeout=${DEFAULT_TIMEOUT_HTTP} max_retries=0
- : FOR ${num} IN RANGE 1 ${node_range}+1
- \ ${node} = Sxp.Get Ip From Number ${num}
- \ Add Node ${node} retry_open_timer=${num}
- \ BuiltIn.Wait Until Keyword Succeeds 20 1 Check Node Started ${node} system=${ODL_SYSTEM_IP}
+ FOR ${num} IN RANGE 1 ${node_range}+1
+ ${node} = Sxp.Get Ip From Number ${num}
+ Add Node ${node} retry_open_timer=${num}
+ BuiltIn.Wait Until Keyword Succeeds 20 1 Check Node Started ${node} system=${ODL_SYSTEM_IP}
+ END
Check Node Started
[Arguments] ${node} ${port}=64999 ${system}=${node} ${session}=session ${ip}=${node}
Clean SXP Environment
[Arguments] ${node_range}=1
[Documentation] Destroy created sessions
- : FOR ${num} IN RANGE 1 ${node_range}+1
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ Delete Node ${ip}
- \ BuiltIn.Wait Until Keyword Succeeds 12x 10s Check Node Stopped ${ip} system=${ODL_SYSTEM_IP}
+ FOR ${num} IN RANGE 1 ${node_range}+1
+ ${ip} = Sxp.Get Ip From Number ${num}
+ Delete Node ${ip}
+ BuiltIn.Wait Until Keyword Succeeds 12x 10s Check Node Stopped ${ip} system=${ODL_SYSTEM_IP}
+ END
RequestsLibrary.Delete All Sessions
Get Routing Configuration From Controller
[Documentation] Start packet captures on the given list of node ips.
... The captures will be named with the tag and ip.
@{conn_ids} = BuiltIn.Create List @{EMPTY}
- : FOR ${ip} IN @{ips}
- \ ${fname} = BuiltIn.Catenate SEPARATOR=__ ${tag} ${ip}
- \ ${conn_id} = Tcpdump.Start Packet Capture on Node ${ip} file_Name=${fname} filter=${filter}
- \ Collections.Append To List ${conn_ids} ${conn_id}
+ FOR ${ip} IN @{ips}
+ ${fname} = BuiltIn.Catenate SEPARATOR=__ ${tag} ${ip}
+ ${conn_id} = Tcpdump.Start Packet Capture on Node ${ip} file_Name=${fname} filter=${filter}
+ Collections.Append To List ${conn_ids} ${conn_id}
+ END
[Return] @{conn_ids}
Stop Packet Capture on Nodes
[Arguments] ${conn_ids}=@{EMPTY}
[Documentation] Stop the packet captures on the given list of node connection ids
- : FOR ${conn_id} IN @{conn_ids}
- \ Stop Packet Capture on Node ${conn_id}
+ FOR ${conn_id} IN @{conn_ids}
+ Stop Packet Capture on Node ${conn_id}
+ END
... line will be created in the required ${BLACKLIST_FILE} location. This file is pushed to the OS_CONTROL_NODE
... which is assumed to be the tempest executor.
OperatingSystem.Create File ${BLACKLIST_FILE}
- : FOR ${exclusion} IN @{${OPENSTACK_BRANCH}_EXCLUSION_REGEXES}
- \ OperatingSystem.Append To File ${BLACKLIST_FILE} ${exclusion}\n
+ FOR ${exclusion} IN @{${OPENSTACK_BRANCH}_EXCLUSION_REGEXES}
+ OperatingSystem.Append To File ${BLACKLIST_FILE} ${exclusion}\n
+ END
OperatingSystem.Log File ${BLACKLIST_FILE}
SSHKeywords.Copy File To Remote System ${OS_CNTL_IP} ${BLACKLIST_FILE} ${BLACKLIST_FILE}
${item_template} = Resolve_Text_From_Template_File folder=${folder} file_name=${base_name}.item.${extension} mapping=${mapping}
${items} = BuiltIn.Create_List
${separator} = BuiltIn.Set_Variable_If '${extension}' != 'json' ${endline} ,${endline}
- : FOR ${iteration} IN RANGE ${iter_start} ${iterations}+${iter_start}
- \ BuiltIn.Run_Keyword_If ${iteration} > ${iter_start} Collections.Append_To_List ${items} ${separator}
- \ ${item} = BuiltIn.Evaluate string.Template('''${item_template}''').substitute({"i":"${iteration}"}) modules=string
- \ Collections.Append_To_List ${items} ${item}
- # TODO: The following makes ugly result for iterations=0. Should we fix that?
+ FOR ${iteration} IN RANGE ${iter_start} ${iterations}+${iter_start}
+ BuiltIn.Run_Keyword_If ${iteration} > ${iter_start} Collections.Append_To_List ${items} ${separator}
+ ${item} = BuiltIn.Evaluate string.Template('''${item_template}''').substitute({"i":"${iteration}"}) modules=string
+ Collections.Append_To_List ${items} ${item}
+ # TODO: The following makes ugly result for iterations=0. Should we fix that?
+ END
${final_text} = BuiltIn.Catenate SEPARATOR= ${prolog} ${endline} @{items} ${endline}
... ${epilog}
[Return] ${final_text}
*** Keywords ***
Get Tools System Nodes Data
- : FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM} + 1
- \ ${ip} = BuiltIn.Set Variable ${TOOLS_SYSTEM_${i}_IP}
- \ Collections.Append To List ${TOOLS_SYSTEM_ALL_IPS} ${ip}
- \ ${conn_id} = SSHLibrary.Open Connection ${ip} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
- \ Collections.Append To List ${TOOLS_SYSTEM_ALL_CONN_IDS} ${conn_id}
+ FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM} + 1
+ ${ip} = BuiltIn.Set Variable ${TOOLS_SYSTEM_${i}_IP}
+ Collections.Append To List ${TOOLS_SYSTEM_ALL_IPS} ${ip}
+ ${conn_id} = SSHLibrary.Open Connection ${ip} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
+ Collections.Append To List ${TOOLS_SYSTEM_ALL_CONN_IDS} ${conn_id}
+ END
Run Command On All Tools Systems
[Arguments] ${cmd}
[Documentation] Run command on all tools systems
- : FOR ${ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Utils.Run Command On Remote System ${ip} ${cmd}
+ FOR ${ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Utils.Run Command On Remote System ${ip} ${cmd}
+ END
[Documentation] Insert underlay topologies used by following tests
Log Inserting underlay topologies
# Network underlay topologies
- : FOR ${index} IN RANGE 1 7
- \ ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:${index} data=${NETWORK_UNDERLAY_TOPOLOGY_${index}}
- \ Log ${resp.content}
- \ Should Match "${resp.status_code}" "20?"
- # Openflow underlay nodes
+ FOR ${index} IN RANGE 1 7
+ ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:${index} data=${NETWORK_UNDERLAY_TOPOLOGY_${index}}
+ Log ${resp.content}
+ Should Match "${resp.status_code}" "20?"
+ # Openflow underlay nodes
+ END
${resp} Put Request session ${CONFIG_API}/opendaylight-inventory:nodes data=${OPENFLOW_UNDERLAY_NODES}
Log ${resp.content}
Should Match "${resp.status_code}" "20?"
# Openflow underlay topologies
- : FOR ${index} IN RANGE 1 7
- \ ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:${index} data=${OPENFLOW_UNDERLAY_TOPOLOGY_${index}}
- \ Log ${resp.content}
- \ Should Match "${resp.status_code}" "20?"
+ FOR ${index} IN RANGE 1 7
+ ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:${index} data=${OPENFLOW_UNDERLAY_TOPOLOGY_${index}}
+ Log ${resp.content}
+ Should Match "${resp.status_code}" "20?"
+ END
Issue Command On Karaf Console log:clear
Log ${resp.content}
Should Contain X Times ${aggregated_node} <supporting-node> ${supp_node_count}
Should Contain X Times ${aggregated_node} <termination-point> ${tp_count}
Should Contain X Times ${aggregated_node} <tp-ref> ${tp_count}
- : FOR ${supp_node_id} IN @{supp_node_ids}
- \ Element Text Should Be ${aggregated_node} ${supp_node_id} xpath=.//supporting-node[node-ref='${supp_node_id}']/node-ref
+ FOR ${supp_node_id} IN @{supp_node_ids}
+ Element Text Should Be ${aggregated_node} ${supp_node_id} xpath=.//supporting-node[node-ref='${supp_node_id}']/node-ref
+ END
${overlay_node_id} Get Element Text ${aggregated_node} xpath=./node-id
[Return] ${overlay_node_id}
${tp} Extract Termination Point from Topology ${model} ${topology} ${topology_id} ${node_id} ${tp_id}
${supp_tp_count} Get Length ${supp_tp_ids}
Should Contain X Times ${tp} <tp-ref> ${supp_tp_count}
- : FOR ${supp_tp_id} IN @{supp_tp_ids}
- \ Should Contain X Times ${tp} ${supp_tp_id}</tp-ref> 1
+ FOR ${supp_tp_id} IN @{supp_tp_ids}
+ Should Contain X Times ${tp} ${supp_tp_id}</tp-ref> 1
+ END
Check Filtered Nodes in Topology
[Arguments] ${topology} ${tp_count} @{node_ids}
[Documentation] Checks nodes in filtered topology
- : FOR ${node_id} IN @{node_ids}
- \ Element Text Should Be ${topology} ${node_id} xpath=.//node/supporting-node[node-ref='${node_id}']/node-ref
+ FOR ${node_id} IN @{node_ids}
+ Element Text Should Be ${topology} ${node_id} xpath=.//node/supporting-node[node-ref='${node_id}']/node-ref
+ END
Check Filtered Termination Points in Node
[Arguments] ${topology} ${supp_node_id} @{supp_tp_ids}
Should Contain X Times ${node} <supporting-node> 1
Should Contain X Times ${node} <termination-point> ${supp_tp_count}
Should Contain X Times ${node} <tp-ref> ${supp_tp_count}
- : FOR ${supp_tp_id} IN @{supp_tp_ids}
- \ Should Contain X Times ${node} ${supp_tp_id} 1
+ FOR ${supp_tp_id} IN @{supp_tp_ids}
+ Should Contain X Times ${node} ${supp_tp_id} 1
+ END
Check Filtered Links In Topology
[Arguments] ${topology} @{supp_link_ids}
[Documentation] Checks links in filtered topology
- : FOR ${supp_link_id} IN @{supp_link_ids}
- \ Should Contain X Times ${topology} ${supp_link_id}</link-ref> 1
+ FOR ${supp_link_id} IN @{supp_link_ids}
+ Should Contain X Times ${topology} ${supp_link_id}</link-ref> 1
+ END
Check Overlay Link Source And Destination
[Arguments] ${model} ${topology} ${topo_id} ${link_id} ${expected_source} ${expected_destination}
[Arguments] ${tsdr_line} ${metrics}
[Documentation] Create the Hbase table row from tsdr:list
@{words}= Split String ${tsdr_line} |
- : FOR ${li} IN @{words}
- \ ${key}= Fetch From Left ${li} =
- \ ${value}= Fetch From Right ${li} =
- \ ${each_value}= Prepare HBase Filter ${key} ${value} _
- \ ${final}= Concatenate the String ${final} ${each_value}
+ FOR ${li} IN @{words}
+ ${key}= Fetch From Left ${li} =
+ ${value}= Fetch From Right ${li} =
+ ${each_value}= Prepare HBase Filter ${key} ${value} _
+ ${final}= Concatenate the String ${final} ${each_value}
+ END
${query}= Concatenate the String ${metrics} ${final}
${query}= Remove Space on String ${query}
[Return] ${query}
Iterating over metricpath
[Documentation] Used to traverse over metricpath file and traverse over metricpath file and get the keys
@{mp_lines}= Read File and Return Split Lines ${CASSANDRA_DB_PATH}${metric_path}
- : FOR ${line} IN @{mp_lines}
- \ @{split_line}= Split String ${line} ${SPACE}
- \ ${keya}= Get From List ${split_line} 1
- \ ${keyb}= Get From List ${split_line} 2
- \ Iterating over metricval ${keya} ${keyb}
+ FOR ${line} IN @{mp_lines}
+ @{split_line}= Split String ${line} ${SPACE}
+ ${keya}= Get From List ${split_line} 1
+ ${keyb}= Get From List ${split_line} 2
+ Iterating over metricval ${keya} ${keyb}
+ END
Iterating over metricval
[Arguments] ${keya} ${keyb}
Evaluate Datasets Value
[Arguments] ${tsdr_lines} ${query_output} ${nbi_output} ${TYPE}
[Documentation] Compare the outputs returned from all Data Stores
- : FOR ${q_item} ${t_item} ${n_item} IN ZIP ${query_output} ${tsdr_lines}
+ FOR ${q_item} ${t_item} ${n_item} IN ZIP ${query_output} ${tsdr_lines}
... ${nbi_output}
- \ ${query_row}= Extract Row Values from TSDR Query ${q_item} ${t_item} ${n_item} ${TYPE}
- : FOR ${found_line} IN @{matching_list}
- \ @{split_line}= Split String ${found_line} |
- \ ${hex_name}= Get From List ${split_line} 2
- \ ${if_desc}= Decode Bytes To String ${hex_name} HEX
- \ Append To List ${ifdesc_list} ${if_desc}
+ ${query_row}= Extract Row Values from TSDR Query ${q_item} ${t_item} ${n_item} ${TYPE}
+ END
+ FOR ${found_line} IN @{matching_list}
+ @{split_line}= Split String ${found_line} |
+ ${hex_name}= Get From List ${split_line} 2
+ ${if_desc}= Decode Bytes To String ${hex_name} HEX
+ Append To List ${ifdesc_list} ${if_desc}
+ END
[Return] @{ifdesc_list}
Write SNMP config
@{ifEntry}= Get From Dictionary ${dict1_val} ifEntry
@{SNMP_ENTRY}= Create List
@{SNMP_VALUES}= Create List
- : FOR ${int} IN @{ifEntry}
- \ ${ifindex}= Get From Dictionary ${int} ifIndex
- \ ${ifOutDiscards}= Get From Dictionary ${int} ifOutDiscards
- \ ${ifInDiscards}= Get From Dictionary ${int} ifInDiscards
- \ ${ifType}= Get From Dictionary ${int} ifType
- \ ${ifInOctets}= Get From Dictionary ${int} ifInOctets
- \ ${ifSpeed}= Get From Dictionary ${int} ifSpeed
- \ ${ifOutQLen}= Get From Dictionary ${int} ifOutQLen
- \ ${ifOutErrors}= Get From Dictionary ${int} ifOutErrors
- \ ${ifPhysAddress}= Get From Dictionary ${int} ifPhysAddress
- \ ${ifInUcastPkts}= Get From Dictionary ${int} ifInUcastPkts
- \ ${ifOutNUcastPkts}= Get From Dictionary ${int} ifOutNUcastPkts
- \ ${ifInErrors}= Get From Dictionary ${int} ifInErrors
- \ ${ifOutOctets}= Get From Dictionary ${int} ifOutOctets
- \ ${ifAdminStatus1}= Get From Dictionary ${int} ifAdminStatus
- \ ${ifAdminStatus}= Get From Dictionary ${OPER_STATUS} ${ifAdminStatus1}
- \ ${ifInUnknownProtos}= Get From Dictionary ${int} ifInUnknownProtos
- \ ${ifOutUcastPkts}= Get From Dictionary ${int} ifOutUcastPkts
- \ ${ifInNUcastPkts}= Get From Dictionary ${int} ifInNUcastPkts
- \ ${ifMtu}= Get From Dictionary ${int} ifMtu
- \ ${ifOperStatus1}= Get From Dictionary ${int} ifOperStatus
- \ ${ifOperStatus}= Get From Dictionary ${OPER_STATUS} ${ifOperStatus1}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutDiscards | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutDiscards
- \ Append To List ${SNMP_VALUES} ${ifOutDiscards}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInDiscards | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInDiscards
- \ Append To List ${SNMP_VALUES} ${ifInDiscards}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInOctets | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInOctets
- \ Append To List ${SNMP_VALUES} ${ifInOctets}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutQLen | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutQLen
- \ Append To List ${SNMP_VALUES} ${ifOutQLen}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutErrors | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutErrors
- \ Append To List ${SNMP_VALUES} ${ifOutErrors}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUcastPkts
- \ Append To List ${SNMP_VALUES} ${ifInUcastPkts}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutNUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutNUcastPkts
- \ Append To List ${SNMP_VALUES} ${ifOutNUcastPkts}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInErrors | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInErrors
- \ Append To List ${SNMP_VALUES} ${ifInErrors}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutOctets | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutOctets
- \ Append To List ${SNMP_VALUES} ${ifOutOctets}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfAdminStatus | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfAdminStatus
- \ Append To List ${SNMP_VALUES} ${ifAdminStatus}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInUnknownProtos | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUnknownProtos
- \ Append To List ${SNMP_VALUES} ${ifInUnknownProtos}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutUcastPkts
- \ Append To List ${SNMP_VALUES} ${ifOutUcastPkts}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInNUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInNUcastPkts
- \ Append To List ${SNMP_VALUES} ${ifInNUcastPkts}
- \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOperStatus | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOperStatus
- \ Append To List ${SNMP_VALUES} ${ifOperStatus}
+ FOR ${int} IN @{ifEntry}
+ ${ifindex}= Get From Dictionary ${int} ifIndex
+ ${ifOutDiscards}= Get From Dictionary ${int} ifOutDiscards
+ ${ifInDiscards}= Get From Dictionary ${int} ifInDiscards
+ ${ifType}= Get From Dictionary ${int} ifType
+ ${ifInOctets}= Get From Dictionary ${int} ifInOctets
+ ${ifSpeed}= Get From Dictionary ${int} ifSpeed
+ ${ifOutQLen}= Get From Dictionary ${int} ifOutQLen
+ ${ifOutErrors}= Get From Dictionary ${int} ifOutErrors
+ ${ifPhysAddress}= Get From Dictionary ${int} ifPhysAddress
+ ${ifInUcastPkts}= Get From Dictionary ${int} ifInUcastPkts
+ ${ifOutNUcastPkts}= Get From Dictionary ${int} ifOutNUcastPkts
+ ${ifInErrors}= Get From Dictionary ${int} ifInErrors
+ ${ifOutOctets}= Get From Dictionary ${int} ifOutOctets
+ ${ifAdminStatus1}= Get From Dictionary ${int} ifAdminStatus
+ ${ifAdminStatus}= Get From Dictionary ${OPER_STATUS} ${ifAdminStatus1}
+ ${ifInUnknownProtos}= Get From Dictionary ${int} ifInUnknownProtos
+ ${ifOutUcastPkts}= Get From Dictionary ${int} ifOutUcastPkts
+ ${ifInNUcastPkts}= Get From Dictionary ${int} ifInNUcastPkts
+ ${ifMtu}= Get From Dictionary ${int} ifMtu
+ ${ifOperStatus1}= Get From Dictionary ${int} ifOperStatus
+ ${ifOperStatus}= Get From Dictionary ${OPER_STATUS} ${ifOperStatus1}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutDiscards | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutDiscards
+ Append To List ${SNMP_VALUES} ${ifOutDiscards}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInDiscards | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInDiscards
+ Append To List ${SNMP_VALUES} ${ifInDiscards}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInOctets | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInOctets
+ Append To List ${SNMP_VALUES} ${ifInOctets}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutQLen | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutQLen
+ Append To List ${SNMP_VALUES} ${ifOutQLen}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutErrors | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutErrors
+ Append To List ${SNMP_VALUES} ${ifOutErrors}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUcastPkts
+ Append To List ${SNMP_VALUES} ${ifInUcastPkts}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutNUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutNUcastPkts
+ Append To List ${SNMP_VALUES} ${ifOutNUcastPkts}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInErrors | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInErrors
+ Append To List ${SNMP_VALUES} ${ifInErrors}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutOctets | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutOctets
+ Append To List ${SNMP_VALUES} ${ifOutOctets}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfAdminStatus | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfAdminStatus
+ Append To List ${SNMP_VALUES} ${ifAdminStatus}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInUnknownProtos | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUnknownProtos
+ Append To List ${SNMP_VALUES} ${ifInUnknownProtos}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutUcastPkts
+ Append To List ${SNMP_VALUES} ${ifOutUcastPkts}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInNUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInNUcastPkts
+ Append To List ${SNMP_VALUES} ${ifInNUcastPkts}
+ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOperStatus | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOperStatus
+ Append To List ${SNMP_VALUES} ${ifOperStatus}
+ END
[Return] ${SNMP_ENTRY} ${SNMP_VALUES}
Retrieve Value From Elasticsearch
Write ${AgentTcp}
Read
${L1} Create List
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ Log ${port_index}
- \ ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
- \ Append To List ${L1} ${echo_conn_id}
- \ Flexible Mininet Login
- \ Write ${NAV_USC_TOOLS}
- \ Write java -jar EchoServer.jar -t true -p ${port_index}
- \ Read Until initialized
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ Log ${port_index}
+ ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
+ Append To List ${L1} ${echo_conn_id}
+ Flexible Mininet Login
+ Write ${NAV_USC_TOOLS}
+ Write java -jar EchoServer.jar -t true -p ${port_index}
+ Read Until initialized
+ END
Set Suite Variable ${L1}
Start Multiple_Sessions_UDP
Write ${AgentUdp}
Read
${L1} Create List
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ Log ${port_index}
- \ ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
- \ Append To List ${L1} ${echo_conn_id}
- \ Flexible Mininet Login
- \ Write ${NAV_USC_TOOLS}
- \ Write java -jar EchoServer.jar -t false -p ${port_index}
- \ Read Until initialized
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ Log ${port_index}
+ ${echo_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} timeout=30s
+ Append To List ${L1} ${echo_conn_id}
+ Flexible Mininet Login
+ Write ${NAV_USC_TOOLS}
+ Write java -jar EchoServer.jar -t false -p ${port_index}
+ Read Until initialized
+ END
Set Suite Variable ${L1}
Stop Agent_Echo
Write_Bare_Ctrl_C
Write exit
Close Connection
- : FOR ${echo_conn_id} IN @{L1}
- \ Switch Connection ${echo_conn_id}
- \ Read
- \ Write_Bare_Ctrl_C
- \ Write exit
- \ Close Connection
+ FOR ${echo_conn_id} IN @{L1}
+ Switch Connection ${echo_conn_id}
+ Read
+ Write_Bare_Ctrl_C
+ Write exit
+ Close Connection
+ END
BuiltIn.Run Keyword If "${pretty_print_json}" == "True" Log Content ${resp.content}
... ELSE BuiltIn.Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${i} IN @{elements}
- \ Should Contain ${resp.content} ${i}
+ FOR ${i} IN @{elements}
+ Should Contain ${resp.content} ${i}
+ END
Check For Elements Not At URI
[Arguments] ${uri} ${elements} ${session}=session ${pretty_print_json}=False ${check_for_null}=False
... ELSE BuiltIn.Log ${resp.content}
BuiltIn.Run Keyword If "${check_for_null}" == "True" Builtin.Return From Keyword If ${resp.status_code} == 404
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${i} IN @{elements}
- \ Should Not Contain ${resp.content} ${i}
+ FOR ${i} IN @{elements}
+ Should Not Contain ${resp.content} ${i}
+ END
Clean Mininet System
[Arguments] ${system}=${TOOLS_SYSTEM_IP}
[Documentation] Cleans up the OVS instance and remove any existing common known bridges.
${output}= Run Command On Mininet ${system} sudo ovs-vsctl list-br
Log ${output}
- : FOR ${i} IN ${output}
- \ Run Command On Mininet ${system} sudo ovs-vsctl --if-exists del-br ${i}
+ FOR ${i} IN ${output}
+ Run Command On Mininet ${system} sudo ovs-vsctl --if-exists del-br ${i}
+ END
Run Command On Mininet ${system} sudo ovs-vsctl del-manager
Extract Value From Content
[Documentation] Extract index for the dictionary in a list that contains a key-value pair. Returns -1 if key-value is not found.
${length}= Get Length ${dictionary_list}
${index}= Set Variable -1
- : FOR ${i} IN RANGE ${length}
- \ ${dictionary}= Get From List ${dictionary_list} ${i}
- \ Run Keyword If """&{dictionary}[${key}]""" == """${value}""" Set Test Variable ${index} ${i}
+ FOR ${i} IN RANGE ${length}
+ ${dictionary}= Get From List ${dictionary_list} ${i}
+ Run Keyword If """&{dictionary}[${key}]""" == """${value}""" Set Test Variable ${index} ${i}
+ END
[Return] ${index}
Check Item Occurrence
[Arguments] ${string} ${dictionary_item_occurrence}
[Documentation] Check string for occurrences of items expressed in a list of dictionaries {item=occurrences}. 0 occurences means item is not present.
- : FOR ${item} IN @{dictionary_item_occurrence}
- \ Should Contain X Times ${string} ${item} &{dictionary_item_occurrence}[${item}]
+ FOR ${item} IN @{dictionary_item_occurrence}
+ Should Contain X Times ${string} ${item} &{dictionary_item_occurrence}[${item}]
+ END
Post Log Check
[Arguments] ${uri} ${body} ${session}=session ${status_codes}=200
Basic Vpnservice Suite Cleanup
[Arguments] ${vpn_instance_ids}=@{EMPTY} ${vms}=@{EMPTY} ${networks}=@{EMPTY} ${subnets}=@{EMPTY} ${ports}=@{EMPTY} ${sgs}=@{EMPTY}
- : FOR ${vpn_instance_id} IN @{vpn_instance_ids}
- \ BuiltIn.Run Keyword And Ignore Error VPN Delete L3VPN vpnid=${vpn_instance_id}
+ FOR ${vpn_instance_id} IN @{vpn_instance_ids}
+ BuiltIn.Run Keyword And Ignore Error VPN Delete L3VPN vpnid=${vpn_instance_id}
+ END
OpenStackOperations.Neutron Cleanup ${vms} ${networks} ${subnets} ${ports} ${sgs}
VPN Create L3VPN
Verify L3VPN On ODL
[Arguments] @{vpns}
[Documentation] To verify L3VPN on ODL for given vpn ids
- : FOR ${vpn} IN @{vpns}
- \ ${resp} = VpnOperations.VPN Get L3VPN vpnid=${vpn}
- \ BuiltIn.Should Contain ${resp} ${vpn}
+ FOR ${vpn} IN @{vpns}
+ ${resp} = VpnOperations.VPN Get L3VPN vpnid=${vpn}
+ BuiltIn.Should Contain ${resp} ${vpn}
+ END
Associate L3VPN To Network
[Arguments] &{Kwargs}
Associate L3VPNs To Networks
[Arguments] ${vpnid_list} ${network_list}
[Documentation] Associates multiple networks to L3VPN and verify the same
- : FOR ${network} ${vpnid} IN ZIP ${network_list} ${vpnid_list}
- \ ${network_id} = OpenStackOperations.Get Net Id ${network}
- \ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=${vpnid}
- \ ${resp} = VpnOperations.VPN Get L3VPN vpnid=${vpnid}
- \ BuiltIn.Should Contain ${resp} ${network_id}
+ FOR ${network} ${vpnid} IN ZIP ${network_list} ${vpnid_list}
+ ${network_id} = OpenStackOperations.Get Net Id ${network}
+ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=${vpnid}
+ ${resp} = VpnOperations.VPN Get L3VPN vpnid=${vpnid}
+ BuiltIn.Should Contain ${resp} ${network_id}
+ END
Dissociate L3VPN From Networks
[Arguments] &{Kwargs}
Should Contain ${flow_output} table=${ODL_FLOWTABLE_L3VPN}
${l3vpn_table} = Get Lines Containing String ${flow_output} table=${ODL_FLOWTABLE_L3VPN},
Log ${l3vpn_table}
- : FOR ${i} IN @{vm_ips}
- \ ${resp}= Should Contain ${l3vpn_table} ${i}
+ FOR ${i} IN @{vm_ips}
+ ${resp}= Should Contain ${l3vpn_table} ${i}
+ END
Verify Flows Are Present For L3VPN On All Compute Nodes
[Arguments] ${vm_ips}
[Documentation] Verify Flows Are Present For L3VPN On All Compute Nodes
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify Flows Are Present For L3VPN ${ip} ${vm_ips}
+ FOR ${ip} IN @{OS_CMP_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify Flows Are Present For L3VPN ${ip} ${vm_ips}
+ END
Verify GWMAC Entry On ODL
[Arguments] ${GWMAC_ADDRS}
${resp} = RequestsLibrary.Get Request session ${VPN_PORT_DATA_URL}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${macAdd} IN @{GWMAC_ADDRS}
- \ Should Contain ${resp.content} ${macAdd}
+ FOR ${macAdd} IN @{GWMAC_ADDRS}
+ Should Contain ${resp.content} ${macAdd}
+ END
Verify GWMAC Flow Entry Removed From Flow Table
[Arguments] ${cnIp}
${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
Log ${gwmac_table}
#Verify GWMAC address present in table 19
- : FOR ${macAdd} IN @{GWMAC_ADDRS}
- \ Should Not Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
+ FOR ${macAdd} IN @{GWMAC_ADDRS}
+ Should Not Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
+ END
Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes
[Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify GWMAC Flow Entry Removed From Flow Table ${ip}
+ FOR ${ip} IN @{OS_CMP_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify GWMAC Flow Entry Removed From Flow Table ${ip}
+ END
Verify ARP REQUEST in groupTable
[Arguments] ${group_output} ${Group-ID}
Should Contain ${flow_output} table=${ARP_RESPONSE_TABLE}
${arpResponder_table} = Get Lines Containing String ${flow_output} table=${ARP_RESPONSE_TABLE}
Should Contain ${arpResponder_table} priority=0 actions=drop
- : FOR ${macAdd} ${ipAdd} IN ZIP ${GWMAC_ADDRS} ${GWIP_ADDRS}
- \ ${ARP_RESPONSE_IP_MAC_REGEX} = Set Variable arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
- \ Should Match Regexp ${arpResponder_table} ${ARP_RESPONSE_IP_MAC_REGEX}
+ FOR ${macAdd} ${ipAdd} IN ZIP ${GWMAC_ADDRS} ${GWIP_ADDRS}
+ ${ARP_RESPONSE_IP_MAC_REGEX} = Set Variable arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
+ Should Match Regexp ${arpResponder_table} ${ARP_RESPONSE_IP_MAC_REGEX}
+ END
Verify IPv6 GWMAC Flow Entry On Flow Table
[Arguments] ${flow_output}
Should Contain ${flow_output} table=${IPV6_TABLE}
${icmp_ipv6_flows} = Get Lines Containing String ${flow_output} icmp_type=135
- : FOR ${ip_addr} IN @{GWIP_ADDRS}
- \ ${rule} = Set Variable icmp_type=135,icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
- \ Should Match Regexp ${icmp_ipv6_flows} ${rule}
+ FOR ${ip_addr} IN @{GWIP_ADDRS}
+ ${rule} = Set Variable icmp_type=135,icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
+ Should Match Regexp ${icmp_ipv6_flows} ${rule}
+ END
Verify GWMAC Flow Entry On Flow Table
[Arguments] ${cnIp} ${ipv}=ipv4
Should Contain ${flow_output} table=${GWMAC_TABLE}
${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
#Verify GWMAC address present in table 19
- : FOR ${macAdd} IN @{GWMAC_ADDRS}
- \ Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
- #verify Miss entry
+ FOR ${macAdd} IN @{GWMAC_ADDRS}
+ Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
+ #verify Miss entry
+ END
Should Contain ${gwmac_table} actions=resubmit(,17)
#Verify ARP_CHECK_TABLE - 43
#arp request and response
Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
[Arguments] ${ipv}=ipv4
[Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${ip} ${ipv}
+ FOR ${ip} IN @{OS_CMP_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s VpnOperations.Verify GWMAC Flow Entry On Flow Table ${ip} ${ipv}
+ END
Delete Multiple L3VPNs
[Arguments] @{vpns}
[Documentation] Delete three L3VPNs created using Multiple L3VPN Test
- : FOR ${vpn} IN @{vpns}
- \ VPN Delete L3VPN vpnid=${vpn}
+ FOR ${vpn} IN @{vpns}
+ VPN Delete L3VPN vpnid=${vpn}
+ END
VNI Test Setup
BuiltIn.Return From Keyword If "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"
Resource ./Utils.robot
Resource ./MininetKeywords.robot
-*** variable ***
+*** Variable ***
${vlan_topo} --custom vlan_vtn_test.py --topo vlantopo
${vtn_coordinator_nexus_path} https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/vtn/distribution.vtn-coordinator
${vtn_dist} distribution.vtn-coordinator
DataFlowsForBridge
[Arguments] ${resp} @{BRIDGE_DATAFLOW}
[Documentation] Verify whether the required attributes exists.
- : FOR ${dataflowElement} IN @{BRIDGE_DATAFLOW}
- \ should Contain ${resp.content} ${dataflowElement}
+ FOR ${dataflowElement} IN @{BRIDGE_DATAFLOW}
+ should Contain ${resp.content} ${dataflowElement}
+ END
Add a pathmap
[Arguments] ${pathmap_data}
Get a pathmap
[Documentation] Get a pathmap for a vtn.
${resp}= RequestsLibrary.Get Request session restconf/operational/vtn-path-map:global-path-maps
- : FOR ${pathElement} IN @{PATHMAP_ATTR}
- \ should Contain ${resp.content} ${pathElement}
+ FOR ${pathElement} IN @{PATHMAP_ATTR}
+ should Contain ${resp.content} ${pathElement}
+ END
Add a pathpolicy
[Arguments] ${pathpolicy_data}
[Arguments] ${pathpolicy_id}
[Documentation] Get a pathpolicy for a vtn.
${resp}= RequestsLibrary.Get Request session restconf/operational/vtn-path-policy:vtn-path-policies/vtn-path-policy/${pathpolicy_id}
- : FOR ${pathpolicyElement} IN @{PATHPOLICY_ATTR}
- \ should Contain ${resp.content} ${pathpolicyElement}
+ FOR ${pathpolicyElement} IN @{PATHPOLICY_ATTR}
+ should Contain ${resp.content} ${pathpolicyElement}
+ END
Delete a pathmap
[Arguments] ${tenant_path}
[Documentation] check flow action elements by giving dumpflows in mininet
write ${dumpflows}
${result} Read Until mininet>
- : FOR ${flowElement} IN @{flowfilter_actions}
- \ should Contain ${result} ${flowElement}
+ FOR ${flowElement} IN @{flowfilter_actions}
+ should Contain ${result} ${flowElement}
+ END
Add a flowcondition
[Arguments] ${flowcond_name} ${flowconditiondata}
... FIXME: Cover this keyword in WaitUtilTest.robot
${timeout_in_seconds} ${period_in_seconds} ${date_deadline} = WaitUtils__Check_Sanity_And_Compute_Derived_Times timeout=${timeout} period=${period}
${iterations} = BuiltIn.Evaluate ${timeout_in_seconds} / ${period_in_seconds}
- : FOR ${i} IN RANGE ${iterations}
- \ ${data} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_As_Is ${getter}
- \ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_After_Replacing_First_Argument ${stateless_validator}
- \ ... ${data}
- \ BuiltIn.Return_From_Keyword_If "${status}" == "PASS" ${message}
- \ WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} message=Last validator message: ${message}
- \ BuiltIn.Sleep ${period_in_seconds} s
+ FOR ${i} IN RANGE ${iterations}
+ ${data} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_As_Is ${getter}
+ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_After_Replacing_First_Argument ${stateless_validator}
+ ... ${data}
+ BuiltIn.Return_From_Keyword_If "${status}" == "PASS" ${message}
+ WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} message=Last validator message: ${message}
+ BuiltIn.Sleep ${period_in_seconds} s
+ END
BuiltIn.Fail Logic error, we should have returned before.
Stateless_Assert_Closure_Has_To_Succeed_Consecutively_By_Deadline
${sleeps} = BuiltIn.Evaluate ${count} - 1
WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} sleeps_left=${sleeps} message=Last result: ${result}
# Entering the main loop.
- : FOR ${sleeps_left} IN RANGE ${count}-1 -1 -1 # If count is 3, for will go through 2, 1, and 0.
- \ # Run the assertor and collect the garbage.
- \ ${result} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_As_Is ${assertor}
- \ # We have not failed yet. Was this the final try?
- \ BuiltIn.Return_From_Keyword_If ${sleeps_left} <= 0 ${result}
- \ # Is there enough time left?
- \ WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} sleeps_left=${sleeps_left} message=Last result: ${result}
- \ # We will do next try, byt we have to sleep before.
- \ BuiltIn.Sleep ${period_in_seconds} s
+ FOR ${sleeps_left} IN RANGE ${count}-1 -1 -1 # If count is 3, for will go through 2, 1, and 0.
+ # Run the assertor and collect the garbage.
+ ${result} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_As_Is ${assertor}
+ # We have not failed yet. Was this the final try?
+ BuiltIn.Return_From_Keyword_If ${sleeps_left} <= 0 ${result}
+ # Is there enough time left?
+ WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} sleeps_left=${sleeps_left} message=Last result: ${result}
+ # We will do next try, byt we have to sleep before.
+ BuiltIn.Sleep ${period_in_seconds} s
+ END
BuiltIn.Fail Logic error, we should have returned before.
Stateless_Assert_Closure_Has_To_Succeed_Consecutively
${sleeps} = BuiltIn.Evaluate ${count} - 1
WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} sleeps_left=${sleeps} message=Last result: ${result}
# Entering the main loop.
- : FOR ${sleeps_left} IN RANGE ${count}-1 -1 -1
- \ ${state} ${result} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_After_Replacing_First_Argument ${assertor} ${state}
- \ # We have not failed yet. Was this the final try?
- \ BuiltIn.Return_From_Keyword_If ${sleeps_left} <= 0 ${result}
- \ # Is there enough time left?
- \ WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} sleeps_left=${sleeps_left} message=Last result: ${result}
- \ # We will do next try, byt we have to sleep before.
- \ BuiltIn.Sleep ${period_in_seconds} s
+ FOR ${sleeps_left} IN RANGE ${count}-1 -1 -1
+ ${state} ${result} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_After_Replacing_First_Argument ${assertor} ${state}
+ # We have not failed yet. Was this the final try?
+ BuiltIn.Return_From_Keyword_If ${sleeps_left} <= 0 ${result}
+ # Is there enough time left?
+ WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds} sleeps_left=${sleeps_left} message=Last result: ${result}
+ # We will do next try, byt we have to sleep before.
+ BuiltIn.Sleep ${period_in_seconds} s
+ END
BuiltIn.Fail Logic error, we should have returned before.
Stateful_Assert_Closure_Has_To_Succeed_Consecutively
... message=Last result: ${result}
BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} ${message}
# Entering the main loop.
- : FOR ${sleeps_left} IN RANGE ${count}-1 -1 -1
- \ # Getter may fail, but this Keyword should return state, so we need RKAIE.
- \ ${status} ${data} = BuiltIn.Run_Keyword_And_Ignore_Error ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_As_Is ${getter}
- \ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} Getter failed: ${data}
- \ # Is there enough time left?
- \ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
- \ ... sleeps_left=${sleeps_left} message=Last result: ${result}
- \ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} ${message}
- \ ${state} ${status} ${result} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_After_Replacing_First_Two_Arguments ${safe_validator}
- \ ... ${state} ${data}
- \ # Validator may have reported failure.
- \ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} Validator failed: ${result}
- \ # Was this the final try?
- \ BuiltIn.Return_From_Keyword_If ${sleeps_left} <= 0 ${state} ${status} ${result}
- \ # Is there enough time left?
- \ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
- \ ... sleeps_left=${sleeps_left} message=Last result: ${result}
- \ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} ${message}
- \ # We will do next try, byt we have to sleep before.
- \ BuiltIn.Sleep ${period_in_seconds} s
+ FOR ${sleeps_left} IN RANGE ${count}-1 -1 -1
+ # Getter may fail, but this Keyword should return state, so we need RKAIE.
+ ${status} ${data} = BuiltIn.Run_Keyword_And_Ignore_Error ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_As_Is ${getter}
+ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} Getter failed: ${data}
+ # Is there enough time left?
+ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
+ ... sleeps_left=${sleeps_left} message=Last result: ${result}
+ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} ${message}
+ ${state} ${status} ${result} = ScalarClosures.Run_Keyword_And_Collect_Garbage ScalarClosures.Run_Closure_After_Replacing_First_Two_Arguments ${safe_validator}
+ ... ${state} ${data}
+ # Validator may have reported failure.
+ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} Validator failed: ${result}
+ # Was this the final try?
+ BuiltIn.Return_From_Keyword_If ${sleeps_left} <= 0 ${state} ${status} ${result}
+ # Is there enough time left?
+ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error WaitUtils__Is_Deadline_Reachable date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
+ ... sleeps_left=${sleeps_left} message=Last result: ${result}
+ BuiltIn.Return_From_Keyword_If '''${status}''' != '''PASS''' ${state} ${status} ${message}
+ # We will do next try, byt we have to sleep before.
+ BuiltIn.Sleep ${period_in_seconds} s
+ END
BuiltIn.Fail Logic error, we should have returned before.
Propagate_Fail_If_Message_Starts_With_Prefix
${result} = BuiltIn.Set_Variable No result yet.
${state} = BuiltIn.Set_Variable ${initial_state}
# The loop for failures.
- : FOR ${try} IN RANGE 1 ${maximum_sleeps}+2 # If maximum_sleeps is 2, for will go through 1, 2, and 3.
- \ ${state} ${status} ${result} = Getter_And_Safe_Stateful_Validator_Have_To_Succeed_Consecutively_By_Deadline date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
- \ ... count=${count} getter=${getter} safe_validator=${safe_validator} initial_state=${state}
- \ # Have we passed?
- \ BuiltIn.Return_From_Keyword_If '''${status}''' == '''PASS''' ${result}
- \ # Are we out of time?
- \ Propagate_Fail_If_Message_Starts_With_Prefix ${result} Not possible to succeed within the deadline.
- \ # We will do next try, but we have to sleep before.
- \ BuiltIn.Sleep ${period_in_seconds} s
+ FOR ${try} IN RANGE 1 ${maximum_sleeps}+2 # If maximum_sleeps is 2, for will go through 1, 2, and 3.
+ ${state} ${status} ${result} = Getter_And_Safe_Stateful_Validator_Have_To_Succeed_Consecutively_By_Deadline date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
+ ... count=${count} getter=${getter} safe_validator=${safe_validator} initial_state=${state}
+ # Have we passed?
+ BuiltIn.Return_From_Keyword_If '''${status}''' == '''PASS''' ${result}
+ # Are we out of time?
+ Propagate_Fail_If_Message_Starts_With_Prefix ${result} Not possible to succeed within the deadline.
+ # We will do next try, but we have to sleep before.
+ BuiltIn.Sleep ${period_in_seconds} s
+ END
BuiltIn.Fail Logic error, we should have returned before.
Wait_For_Getter_Error_Or_Safe_Stateful_Validator_Consecutive_Success
${result} = BuiltIn.Set_Variable No result yet.
${state} = BuiltIn.Set_Variable ${initial_state}
# The loop for failures.
- : FOR ${try} IN RANGE 1 ${maximum_sleeps}+2 # If maximum_sleeps is 2, for will go through 1, 2, and 3.
- \ ${state} ${status} ${result} = Getter_And_Safe_Stateful_Validator_Have_To_Succeed_Consecutively_By_Deadline date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
- \ ... count=${count} getter=${getter} safe_validator=${safe_validator} initial_state=${state}
- \ # Have we passed?
- \ BuiltIn.Return_From_Keyword_If '''${status}''' == '''PASS''' ${result}
- \ # Are we out of time? Look at ${result}.
- \ Propagate_Fail_If_Message_Starts_With_Prefix ${result} Not possible to succeed within the deadline.
- \ # Now check for getter error, by analysing ${result}.
- \ Propagate_Fail_If_Message_Starts_With_Prefix ${result} Getter failed
- \ # We can do the next try, byt we have to sleep before.
- \ BuiltIn.Sleep ${period_in_seconds} s
+ FOR ${try} IN RANGE 1 ${maximum_sleeps}+2 # If maximum_sleeps is 2, for will go through 1, 2, and 3.
+ ${state} ${status} ${result} = Getter_And_Safe_Stateful_Validator_Have_To_Succeed_Consecutively_By_Deadline date_deadline=${date_deadline} period_in_seconds=${period_in_seconds}
+ ... count=${count} getter=${getter} safe_validator=${safe_validator} initial_state=${state}
+ # Have we passed?
+ BuiltIn.Return_From_Keyword_If '''${status}''' == '''PASS''' ${result}
+ # Are we out of time? Look at ${result}.
+ Propagate_Fail_If_Message_Starts_With_Prefix ${result} Not possible to succeed within the deadline.
+ # Now check for getter error, by analysing ${result}.
+ Propagate_Fail_If_Message_Starts_With_Prefix ${result} Getter failed
+ # We can do the next try, byt we have to sleep before.
+ BuiltIn.Sleep ${period_in_seconds} s
+ END
BuiltIn.Fail Logic error, we should have returned before.
Expand All Branches In Module Detail Content Active Tab
[Documentation] Expands all branches in module detail active operations or operational or config tab.
Selenium2Library.Wait Until Element Is Visible ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
- : FOR ${i} IN RANGE 1 1000
- \ ${count}= Selenium2Library.Get Matching Xpath Count ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
- \ BuiltIn.Exit For Loop If ${count}==0
- \ BuiltIn.Wait Until Keyword Succeeds 30 s 5 s GUIKeywords.Focus And Click Element ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
+ FOR ${i} IN RANGE 1 1000
+ ${count}= Selenium2Library.Get Matching Xpath Count ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
+ BuiltIn.Exit For Loop If ${count}==0
+ BuiltIn.Wait Until Keyword Succeeds 30 s 5 s GUIKeywords.Focus And Click Element ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
+ END
Selenium2Library.Wait Until Page Does Not Contain Element ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
Collapse All Branches In Module Detail Content Active Tab
[Documentation] Collapses all branches in module detail active operations or operational or config tab.
Selenium2Library.Wait Until Element Is Visible ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
- : FOR ${i} IN RANGE 1 1000
- \ ${count}= Selenium2Library.Get Matching Xpath Count ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
- \ BuiltIn.Exit For Loop If ${count}==0
- \ BuiltIn.Wait Until Keyword Succeeds 30 s 5 s GUIKeywords.Focus And Click Element ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
+ FOR ${i} IN RANGE 1 1000
+ ${count}= Selenium2Library.Get Matching Xpath Count ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
+ BuiltIn.Exit For Loop If ${count}==0
+ BuiltIn.Wait Until Keyword Succeeds 30 s 5 s GUIKeywords.Focus And Click Element ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
+ END
Selenium2Library.Wait Until Page Does Not Contain Element ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
Return Module Detail Labelled Branch Xpath
Register_Singleton_Constant_On_Nodes
[Arguments] ${index_list}
[Documentation] Register a candidate application on given nodes.
- : FOR ${index} IN @{index_list}
- \ Register_Singleton_And_Update_Expected_Candidates ${index} ${CS_CONSTANT_PREFIX}${index}
+ FOR ${index} IN @{index_list}
+ Register_Singleton_And_Update_Expected_Candidates ${index} ${CS_CONSTANT_PREFIX}${index}
+ END
Unregister_Singleton_Constant_On_Nodes
[Arguments] ${index_list}
[Documentation] Unregister the application from given nodes.
- : FOR ${index} IN @{index_list}
- \ Unregister_Singleton_And_Update_Expected_Candidates ${index}
+ FOR ${index} IN @{index_list}
+ Unregister_Singleton_And_Update_Expected_Candidates ${index}
+ END
Get_And_Save_Present_CsOwner_And_CsCandidates
[Arguments] ${node_to_ask}
Verify_Singleton_Constant_On_Nodes
[Arguments] ${index_list} ${cs_exp_constant}
[Documentation] Iterate over all cluster nodes and all should return expected constant.
- : FOR ${index} IN @{index_list}
- \ Verify_Singleton_Constant_On_Node ${index} ${cs_exp_constant}
+ FOR ${index} IN @{index_list}
+ Verify_Singleton_Constant_On_Node ${index} ${cs_exp_constant}
+ END
Verify_Singleton_Constant_During_Isolation
[Documentation] Iterate over all non-isolated cluster nodes. They should return the correct constant.
- : FOR ${index} IN @{cs_all_indices}
- \ BuiltIn.Run_Keyword_If "${index}" == "${cs_isolated_index}" BuiltIn.Log Node not triggered, behavior not well described, see bugs 8207, 8214.
- \ BuiltIn.Run_Keyword_Unless "${index}" == "${cs_isolated_index}" Verify_Singleton_Constant_On_Node ${index} ${CS_CONSTANT_PREFIX}${cs_owner}
+ FOR ${index} IN @{cs_all_indices}
+ BuiltIn.Run_Keyword_If "${index}" == "${cs_isolated_index}" BuiltIn.Log Node not triggered, behavior not well described, see bugs 8207, 8214.
+ BuiltIn.Run_Keyword_Unless "${index}" == "${cs_isolated_index}" Verify_Singleton_Constant_On_Node ${index} ${CS_CONSTANT_PREFIX}${cs_owner}
+ END
Isolate_Owner_And_Verify_Isolated
[Documentation] Isolate the owner cluster node. Wait until the new owner is elected and store new values of owner and candidates.
Register_Flapping_Singleton_On_Nodes
[Arguments] ${index_list}
[Documentation] Register a candidate application on each node which starts the test.
- : FOR ${index} IN @{index_list}
- \ MdsalLowlevel.Register_Flapping_Singleton ${index}
+ FOR ${index} IN @{index_list}
+ MdsalLowlevel.Register_Flapping_Singleton ${index}
+ END
Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results
[Arguments] ${index_list} ${rate_limit_to_pass} ${test_duration}
[Documentation] Unregister the testing service and check recevied statistics.
${movements_count} = BuiltIn.Set_Variable ${0}
- : FOR ${index} IN @{index_list}
- \ ${count} = MdsalLowlevel.Unregister_Flapping_Singleton ${index}
- \ BuiltIn.Run_Keyword_If ${count} < 0 BuiltIn.Fail No failure should have occured during the ${test_duration} timeout.
- \ ${movements_count} = BuiltIn.Evaluate ${movements_count}+${count}
+ FOR ${index} IN @{index_list}
+ ${count} = MdsalLowlevel.Unregister_Flapping_Singleton ${index}
+ BuiltIn.Run_Keyword_If ${count} < 0 BuiltIn.Fail No failure should have occured during the ${test_duration} timeout.
+ ${movements_count} = BuiltIn.Evaluate ${movements_count}+${count}
+ END
${seconds} = DateTime.Convert_Time ${test_duration}
${rate} = BuiltIn.Evaluate ${movements_count}/${seconds}
BuiltIn.Run_Keyword_If ${rate} < ${rate_limit_to_pass} BuiltIn.Fail Acceptance rate ${rate_limit_to_pass} not reached, actual rate is ${rate}.
[Documentation] The leader isolation test case end if the heal happens within transaction timeout. All write transaction
... producers shoudl finish without error.
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Module_Leader_Isolation_Heal_Default
[Arguments] ${isolated_node} ${time_to_finish}
MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${restart_producer_node_ip_as_list} ${restart_producer_node_idx_as_list} ${ID_PREFIX2} ${time_to_finish} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
... reset_globals=${False}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Prefix_Leader_Isolation_Heal_Default
[Arguments] ${isolated_node} ${time_to_finish}
${restart_producer_node_ip_as_list} BuiltIn.Create_List ${restart_producer_node_ip}
MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${restart_producer_node_ip_as_list} ${restart_producer_node_idx_as_list} ${ID_PREFIX2} ${time_to_finish} ${TRANSACTION_RATE_1K} reset_globals=${False}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Client_Isolation_Test_Templ
[Arguments] ${listener_node_role} ${trans_chain_flag} ${shard_name}=${SHARD_NAME} ${shard_type}=${SHARD_TYPE}
... ${shard_type} ${True} ${idx_from} verify_restconf=False
BuiltIn.Should_Be_Equal ${idx_to} ${new_leader}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
${copy_matches} = MdsalLowlevel.Unsubscribe_Dtcl ${idx_listen}
${subscribed} = BuiltIn.Set_Variable ${False}
BuiltIn.Should_Be_True ${copy_matches}
... ${shard_type} ${True} ${idx_from} verify_restconf=False
BuiltIn.Should_Be_Equal ${idx_to} ${new_leader}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
${copy_matches} = MdsalLowlevel.Unsubscribe_Ddtl ${idx_listen}
${subscribed} = BuiltIn.Set_Variable ${False}
BuiltIn.Should_Be_True ${copy_matches}
${all_indices} = ClusterManagement.List_All_Indices
${node_to_trigger} = Collections.Get_From_List ${all_indices} ${0}
MdsalLowlevel.Remove_Prefix_Shard ${node_to_trigger} ${prefix}
- : FOR ${idx} IN @{all_indices}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Verify_Shard_Replica_Not_Present ${idx} ${prefix}!!
- \ ... ${SHARD_TYPE}
+ FOR ${idx} IN @{all_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Verify_Shard_Replica_Not_Present ${idx} ${prefix}!!
+ ... ${SHARD_TYPE}
+ END
Verify_Shard_Replica_Not_Present
[Arguments] ${member_index} ${shard_name} ${shard_type}
BuiltIn.Log Overall requested rate: ${total_notification_rate}, test duration: ${test_duration_in_seconds} seconds.
WaitUtils.WU_Setup
${count} = BuiltIn.Set_variable ${0}
- : FOR ${suffix} IN RANGE ${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE} ${total_notification_rate}+1 ${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE}
- \ ${count} = BuiltIn.Evaluate ${count}+1
- \ MdsalLowlevel.Subscribe_Ynl ${DNB_TESTED_MEMBER_INDEX} ${DNB_PUBLISHER_LISTENER_PREFIX}${count}
+ FOR ${suffix} IN RANGE ${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE} ${total_notification_rate}+1 ${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE}
+ ${count} = BuiltIn.Evaluate ${count}+1
+ MdsalLowlevel.Subscribe_Ynl ${DNB_TESTED_MEMBER_INDEX} ${DNB_PUBLISHER_LISTENER_PREFIX}${count}
+ END
${count} = BuiltIn.Convert_To_Integer ${count}
- : FOR ${index} IN RANGE 1 ${count}+1
- \ MdsalLowlevel.Start_Publish_Notifications ${DNB_TESTED_MEMBER_INDEX} ${DNB_PUBLISHER_LISTENER_PREFIX}${index} ${test_duration_in_seconds} ${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE}
+ FOR ${index} IN RANGE 1 ${count}+1
+ MdsalLowlevel.Start_Publish_Notifications ${DNB_TESTED_MEMBER_INDEX} ${DNB_PUBLISHER_LISTENER_PREFIX}${index} ${test_duration_in_seconds} ${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE}
+ END
${getter} = ScalarClosures.Closure_From_Keyword_And_Arguments Get_Notifications_Active_Status ${DNB_TESTED_MEMBER_INDEX} ${count}
${validator} = ScalarClosures.Closure_From_Keyword_And_Arguments Check_Notifications_Active_Status data_holder
${validation_timeout} = BuiltIn.Evaluate ${test_duration_in_seconds}+${60}
${sum_local_number} BuiltIn.Set_Variable ${0}
${low_limit_pair_rate} = BuiltIn.Evaluate 0.9*${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE}
${high_limit_pair_rate} = BuiltIn.Evaluate 1.1*${DNB_PUBLISHER_SUBSCRIBER_PAIR_RATE}
- : FOR ${index} IN RANGE 1 ${count}+1
- \ ${all_not} ${id_not} ${err_not} ${local_number} = MdsalLowlevel.Unsubscribe_Ynl ${DNB_TESTED_MEMBER_INDEX}
- \ ... ${DNB_PUBLISHER_LISTENER_PREFIX}${index}
- \ BuiltIn.Should_Be_Equal_As_Numbers ${err_not} ${0}
- \ BuiltIn.Should_Not_Be_Equal_As_Numbers ${local_number} ${0}
- \ BuiltIn.Should_Be_Equal_As_Numbers ${id_not} ${local_number}
- \ ${rate} = BuiltIn.Evaluate ${local_number}/${test_duration_in_seconds}
- \ BuiltIn.Should_Be_True ${rate} > ${low_limit_pair_rate}
- \ BuiltIn.Should_Be_True ${rate} < ${high_limit_pair_rate}
- \ ${sum_local_number} = BuiltIn.Evaluate ${sum_local_number}+${local_number}
+ FOR ${index} IN RANGE 1 ${count}+1
+ ${all_not} ${id_not} ${err_not} ${local_number} = MdsalLowlevel.Unsubscribe_Ynl ${DNB_TESTED_MEMBER_INDEX}
+ ... ${DNB_PUBLISHER_LISTENER_PREFIX}${index}
+ BuiltIn.Should_Be_Equal_As_Numbers ${err_not} ${0}
+ BuiltIn.Should_Not_Be_Equal_As_Numbers ${local_number} ${0}
+ BuiltIn.Should_Be_Equal_As_Numbers ${id_not} ${local_number}
+ ${rate} = BuiltIn.Evaluate ${local_number}/${test_duration_in_seconds}
+ BuiltIn.Should_Be_True ${rate} > ${low_limit_pair_rate}
+ BuiltIn.Should_Be_True ${rate} < ${high_limit_pair_rate}
+ ${sum_local_number} = BuiltIn.Evaluate ${sum_local_number}+${local_number}
+ END
${final_rate} = BuiltIn.Evaluate ${sum_local_number}/${test_duration_in_seconds}
${low_limit_final_rate} = BuiltIn.Evaluate 0.9*${total_notification_rate}
${high_limit_final_rate} = BuiltIn.Evaluate 1.1*${total_notification_rate}
Get_Notifications_Active_Status
[Arguments] ${node_to_ask} ${nr_pairs}
${active_list} = BuiltIn.Create_List
- : FOR ${index} IN RANGE 1 ${nr_pairs}+1
- \ ${active} ${publ_count} ${last_error} MdsalLowlevel.Check_Publish_Notifications ${node_to_ask} ${DNB_PUBLISHER_LISTENER_PREFIX}${index}
- \ Collections.Append_To_List ${active_list} ${active}
- \ BuiltIn.Should_Be_Equal ${EMPTY} ${last_error}
+ FOR ${index} IN RANGE 1 ${nr_pairs}+1
+ ${active} ${publ_count} ${last_error} MdsalLowlevel.Check_Publish_Notifications ${node_to_ask} ${DNB_PUBLISHER_LISTENER_PREFIX}${index}
+ Collections.Append_To_List ${active_list} ${active}
+ BuiltIn.Should_Be_Equal ${EMPTY} ${last_error}
+ END
BuiltIn.Return_From_Keyword ${active_list}
Check_Notifications_Active_Status
[Arguments] ${active_list}
- : FOR ${active} IN @{active_list}
- \ BuiltIn.Should_Be_Equal ${False} ${active}
+ FOR ${active} IN @{active_list}
+ BuiltIn.Should_Be_Equal ${False} ${active}
+ END
Register_Rpc_On_Nodes
[Arguments] ${index_list}
[Documentation] Register global rpc on given nodes of the cluster.
- : FOR ${index} IN @{index_list}
- \ Register_Rpc_And_Update_Possible_Constants ${index}
+ FOR ${index} IN @{index_list}
+ Register_Rpc_And_Update_Possible_Constants ${index}
+ END
Unregister_Rpc_On_Nodes
[Arguments] ${index_list}
[Documentation] Unregister global rpc on given nodes of the cluster.
- : FOR ${index} IN @{index_list}
- \ Unregister_Rpc_And_Update_Possible_Constants ${index}
+ FOR ${index} IN @{index_list}
+ Unregister_Rpc_And_Update_Possible_Constants ${index}
+ END
Register_Action_On_Nodes
[Arguments] ${index_list}
[Documentation] Register global rpc on given nodes of the cluster.
- : FOR ${index} IN @{index_list}
- \ Register_Action_And_Update_Possible_Constants ${index}
+ FOR ${index} IN @{index_list}
+ Register_Action_And_Update_Possible_Constants ${index}
+ END
Unregister_Action_On_Nodes
[Arguments] ${index_list}
[Documentation] Unregister global rpc on given nodes of the cluster.
- : FOR ${index} IN @{index_list}
- \ Unregister_Action_And_Update_Possible_Constants ${index}
+ FOR ${index} IN @{index_list}
+ Unregister_Action_And_Update_Possible_Constants ${index}
+ END
Verify_Constant_On_Registered_Node
[Arguments] ${member_index}
Verify_Constant_On_Registered_Nodes
[Arguments] ${index_list}
[Documentation] Verify that the rpc response comes from the local node for every node in the list.
- : FOR ${index} IN @{index_list}
- \ Verify_Constant_On_Registered_Node ${index}
+ FOR ${index} IN @{index_list}
+ Verify_Constant_On_Registered_Node ${index}
+ END
Verify_Contexted_Constant_On_Registered_Nodes
[Arguments] ${index_list}
[Documentation] Verify that the rpc response comes from the local node for every node in the list.
- : FOR ${index} IN @{index_list}
- \ Verify_Contexted_Constant_On_Registered_Node ${index}
+ FOR ${index} IN @{index_list}
+ Verify_Contexted_Constant_On_Registered_Node ${index}
+ END
Verify_Constant_On_Unregistered_Nodes
[Arguments] ${index_list}
[Documentation] Verify that the rpc response comes from the remote node for every node in the list.
- : FOR ${index} IN @{index_list}
- \ Verify_Constant_On_Unregistered_Node ${index}
+ FOR ${index} IN @{index_list}
+ Verify_Constant_On_Unregistered_Node ${index}
+ END
Verify_Constant_On_Active_Nodes
[Arguments] ${tolerance}=${BUG_8430_TOLERANCE}
... As a workaround for Bug 8430, \${tolerance} can be set as duration (number of seconds) for WUKS.
# TODO: Rename most Verify_* keywords to Check_* and use the Verify prefix for the WUKS versions.
BuiltIn.Run_Keyword_And_Return_If ${tolerance} BuiltIn.Wait_Until_Keyword_Succeeds ${tolerance} 1s Verify_Constant_On_Active_Nodes tolerance=0
- : FOR ${index} IN @{active_indices}
- \ BuiltIn.Run_Keyword_If ${index} in ${registered_indices} Verify_Constant_On_Registered_Node ${index}
- \ ... ELSE Verify_Constant_On_Unregistered_Node ${index}
+ FOR ${index} IN @{active_indices}
+ BuiltIn.Run_Keyword_If ${index} in ${registered_indices} Verify_Constant_On_Registered_Node ${index}
+ ... ELSE Verify_Constant_On_Unregistered_Node ${index}
+ END
Verify_Contexted_Constant_On_Active_Nodes
[Arguments] ${tolerance}=${BUG_8430_TOLERANCE}
... As a workaround for Bug 8430, \${tolerance} can be set as duration (number of seconds) for WUKS.
# TODO: Rename most Verify_* keywords to Check_* and use the Verify prefix for the WUKS versions.
BuiltIn.Run_Keyword_And_Return_If ${tolerance} BuiltIn.Wait_Until_Keyword_Succeeds ${tolerance} 1s Verify_Contexted_Constant_On_Active_Nodes tolerance=0
- : FOR ${index} IN @{active_indices}
- \ BuiltIn.Run_Keyword_If ${index} in ${registered_indices} Verify_Contexted_Constant_On_Registered_Node ${index}
- \ ... ELSE Verify_Contexted_Constant_On_Unregistered_Node ${index}
+ FOR ${index} IN @{active_indices}
+ BuiltIn.Run_Keyword_If ${index} in ${registered_indices} Verify_Contexted_Constant_On_Registered_Node ${index}
+ ... ELSE Verify_Contexted_Constant_On_Unregistered_Node ${index}
+ END
Verify_Expected_Constant_On_Nodes
[Arguments] ${index_list} ${exp_constant}
[Documentation] Verify that the rpc response comes only from one node only for every node in the list.
- : FOR ${index} IN @{index_list}
- \ ${const_index} = Get_Constant_Index_From_Node ${index}
- \ BuiltIn.Should_Be_Equal_As_Strings ${exp_constant} ${CONSTANT_PREFIX}${const_index}
+ FOR ${index} IN @{index_list}
+ ${const_index} = Get_Constant_Index_From_Node ${index}
+ BuiltIn.Should_Be_Equal_As_Strings ${exp_constant} ${CONSTANT_PREFIX}${const_index}
+ END
Get_Constant_Index_From_Node
[Arguments] ${member_index}
Upload_Initial_Config_Files
[Documentation] Upload config files for non-replicated bgp_rib
- : FOR ${idx} IN @{ClusterManagement__member_index_list}
- \ ${idxl}= BuiltIn.Create_List ${idx}
- \ ClusterManagement.Safe_With_Ssh_To_List_Or_All_Run_Keyword member_index_list=${idxl} keyword_name=Set_Config_Files_With_Nonreplicated_Rib index_list=${idxl}
+ FOR ${idx} IN @{ClusterManagement__member_index_list}
+ ${idxl}= BuiltIn.Create_List ${idx}
+ ClusterManagement.Safe_With_Ssh_To_List_Or_All_Run_Keyword member_index_list=${idxl} keyword_name=Set_Config_Files_With_Nonreplicated_Rib index_list=${idxl}
+ END
Start_All_And_Sync
[Documentation] Start each memberand wait for sync.
SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
PrefixCounting.PC_Setup
${indices} = ClusterManagement.List_All_Indices
- : FOR ${member_index} IN @{indices}
- \ ${session} = ClusterManagement.Resolve_Http_Session_For_Member ${member_index}
- \ BuiltIn.Set_Suite_Variable ${operational_${member_index}} ${session}
+ FOR ${member_index} IN @{indices}
+ ${session} = ClusterManagement.Resolve_Http_Session_For_Member ${member_index}
+ BuiltIn.Set_Suite_Variable ${operational_${member_index}} ${session}
+ END
BuiltIn.Set_Suite_Variable ${pc_all_indices} ${indices}
SSHLibrary.Set_Default_Configuration prompt=${TOOLS_SYSTEM_PROMPT}
SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP}
[Documentation] Starts the peer and verifies its connection. The verification is done by checking the presence
... of the peer in the bgp rib.
# TODO: This keyword is not specific to prefix counting. Find a better place for it.
- : FOR ${idx} IN RANGE ${connection_retries}
- \ Start_Bgp_Peer peerip=${peerip}
- \ ${status} ${value}= BuiltIn.Run_Keyword_And_Ignore_Error BuiltIn.Wait_Until_Keyword_Succeeds 3x 3s
- \ ... Verify_Bgp_Peer_Connection ${config_session} ${TOOLS_SYSTEM_IP} connected=${True}
- \ BuiltIn.Run_Keyword_Unless "${status}" == "PASS" BGPSpeaker.Kill_BGP_Speaker
- \ BuiltIn.Return_From_Keyword_If "${status}" == "PASS"
+ FOR ${idx} IN RANGE ${connection_retries}
+ Start_Bgp_Peer peerip=${peerip}
+ ${status} ${value}= BuiltIn.Run_Keyword_And_Ignore_Error BuiltIn.Wait_Until_Keyword_Succeeds 3x 3s
+ ... Verify_Bgp_Peer_Connection ${config_session} ${TOOLS_SYSTEM_IP} connected=${True}
+ BuiltIn.Run_Keyword_Unless "${status}" == "PASS" BGPSpeaker.Kill_BGP_Speaker
+ BuiltIn.Return_From_Keyword_If "${status}" == "PASS"
+ END
BuiltIn.Fail Unable to connect bgp peer to ODL
Verify_Bgp_Peer_Connection
[Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${member_index} IN @{pc_all_indices}
- \ BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_${member_index}} topology=${EXAMPLE_IPV4_TOPOLOGY}
+ FOR ${member_index} IN @{pc_all_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_${member_index}} topology=${EXAMPLE_IPV4_TOPOLOGY}
+ END
Reconfigure_ODL_To_Accept_Connection
[Documentation] Configure BGP peer module with initiate-connection set to false.
Wait_For_Stable_Talking_Ipv4_Topology
[Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from all nodes.
- : FOR ${member_index} IN @{pc_all_indices}
- \ PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${operational_${member_index}}
- \ ... topology=${EXAMPLE_IPV4_TOPOLOGY} shards_list=${SHARD_MONITOR_LIST} shards_details=${init_shard_details}
+ FOR ${member_index} IN @{pc_all_indices}
+ PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${operational_${member_index}}
+ ... topology=${EXAMPLE_IPV4_TOPOLOGY} shards_list=${SHARD_MONITOR_LIST} shards_details=${init_shard_details}
+ END
Check_Talking_Ipv4_Topology_Count
[Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${member_index} IN @{pc_all_indices}
- \ PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${operational_${member_index}} topology=${EXAMPLE_IPV4_TOPOLOGY}
+ FOR ${member_index} IN @{pc_all_indices}
+ PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${operational_${member_index}} topology=${EXAMPLE_IPV4_TOPOLOGY}
+ END
Kill_Talking_BGP_Speaker
[Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
Wait_For_Stable_Ipv4_Topology_After_Listening
[Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1.
[Tags] critical
- : FOR ${member_index} IN @{pc_all_indices}
- \ PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${operational_${member_index}}
- \ ... topology=${EXAMPLE_IPV4_TOPOLOGY}
+ FOR ${member_index} IN @{pc_all_indices}
+ PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${operational_${member_index}}
+ ... topology=${EXAMPLE_IPV4_TOPOLOGY}
+ END
Check_For_Empty_Ipv4_Topology_After_Listening
[Documentation] Example-ipv4-topology should be empty now as seen from node 1.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${member_index} IN @{pc_all_indices}
- \ PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_${member_index}} topology=${EXAMPLE_IPV4_TOPOLOGY}
+ FOR ${member_index} IN @{pc_all_indices}
+ PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_${member_index}} topology=${EXAMPLE_IPV4_TOPOLOGY}
+ END
Delete_Bgp_Peer_Configuration
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Documentation] Uploads exabgp config files
SSHLibrary.Put_Directory ${BGP_VARIABLES_FOLDER} .
@{cfgfiles} = SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
Setup_Testcase
[Arguments] ${cfg_file}
SSHLibrary.Put_File ${BGP_L3VPN_DIR}/${L3VPN_EXA_CFG} .
SSHLibrary.Put_File ${EXARPCSCRIPT} .
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
Setup_Testcase
[Arguments] ${cfg_file}
SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${DEFAUTL_RPC_CFG} .
SSHLibrary.Put_File ${EXARPCSCRIPT} .
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/enable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/${addpath}/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/enable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/${addpath}/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
Configure_Path_Selection_And_App_Peer_And_Connect_Peer
[Arguments] ${odl_path_sel_mode} ${exa_add_path_value}
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} IP=${ODL_SYSTEM_IP}
... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION}
- : FOR ${pathid} IN @{PATH_ID_LIST}
- \ &{route_mapping} BuiltIn.Create_Dictionary NEXTHOP=${NEXT_HOP_PREF}${pathid} LOCALPREF=${pathid}00 PATHID=${pathid} APP_RIB=${app_rib}
- \ TemplatedRequests.Post_As_Xml_Templated ${MULT_VAR_FOLDER}/route mapping=${route_mapping} session=${CONFIG_SESSION}
+ FOR ${pathid} IN @{PATH_ID_LIST}
+ &{route_mapping} BuiltIn.Create_Dictionary NEXTHOP=${NEXT_HOP_PREF}${pathid} LOCALPREF=${pathid}00 PATHID=${pathid} APP_RIB=${app_rib}
+ TemplatedRequests.Post_As_Xml_Templated ${MULT_VAR_FOLDER}/route mapping=${route_mapping} session=${CONFIG_SESSION}
+ END
Deconfigure_App_Peer
[Documentation] Revert the BGP configuration to the original state: without application peer
SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${BGP_CFG_NAME} .
SSHLibrary.Put_File ${EXARPCSCRIPT} .
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/enable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/enable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
Configure_Routes_And_Start_ExaBgp
[Arguments] ${cfg_file}
[Documentation] Setup keyword for exa to odl test case
${app_rib} Set Variable ${ODL_SYSTEM_IP}
- : FOR ${prefix} IN 1.1.1.1/32 2.2.2.2/32
- \ &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} APP_RIB=${app_rib}
- \ TemplatedRequests.Post_As_Xml_Templated ${BGP_RR_VAR_FOLDER}/route mapping=${mapping} session=${CONFIG_SESSION}
+ FOR ${prefix} IN 1.1.1.1/32 2.2.2.2/32
+ &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} APP_RIB=${app_rib}
+ TemplatedRequests.Post_As_Xml_Templated ${BGP_RR_VAR_FOLDER}/route mapping=${mapping} session=${CONFIG_SESSION}
+ END
ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cfg_file} ${CONFIG_SESSION} ${TOOLS_SYSTEM_IP}
Comment From neon onwards there are extra BGP End-Of-RIB message per address family
${update_count} CompareStream.Set_Variable_If_At_Most_Fluorine 2 4
String.Get Line Count ${output}
BuiltIn.Log ${expstate}
${expected_line_count} String.Get Line Count ${expstate}
- : FOR ${expected_line_pos} IN RANGE 0 ${expected_line_count-1}
- \ ${expected_line_offset} BuiltIn.Evaluate ${MSG_STATE_OFFSET} + ${expected_line_pos}
- \ ${output_line} String.Get Line ${output} ${expected_line_offset}
- \ ${expected_line} String.Get Line ${expstate} ${expected_line_pos}
- \ BuiltIn.Should Match ${output_line} ${expected_line}
+ FOR ${expected_line_pos} IN RANGE 0 ${expected_line_count-1}
+ ${expected_line_offset} BuiltIn.Evaluate ${MSG_STATE_OFFSET} + ${expected_line_pos}
+ ${output_line} String.Get Line ${output} ${expected_line_offset}
+ ${expected_line} String.Get Line ${expstate} ${expected_line_pos}
+ BuiltIn.Should Match ${output_line} ${expected_line}
+ END
Reconfigure_ODL_To_Accept_Connection
[Documentation] Configures BGP peer module with initiate-connection set to false.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${i} ${type} IN ZIP ${ODL_IP_INDICES_ALL} ${BGP_PEER_TYPES}
- \ &{ODL_CONFIG}= BuiltIn.Create_Dictionary IP=${ODL_${i}_IP} TYPE=${type} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- \ ... INITIATE=false BGP_RIB=${RIB_NAME} PASSIVE_MODE=true
- \ TemplatedRequests.Put_As_Xml_Templated ${EBGP_DIR} mapping=${ODL_CONFIG} session=${CONFIG_SESSION}
+ FOR ${i} ${type} IN ZIP ${ODL_IP_INDICES_ALL} ${BGP_PEER_TYPES}
+ &{ODL_CONFIG}= BuiltIn.Create_Dictionary IP=${ODL_${i}_IP} TYPE=${type} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false BGP_RIB=${RIB_NAME} PASSIVE_MODE=true
+ TemplatedRequests.Put_As_Xml_Templated ${EBGP_DIR} mapping=${ODL_CONFIG} session=${CONFIG_SESSION}
+ END
Start_Bgp_Peers
[Documentation] Start Python speaker to connect to ODL. We give each speaker time until odl really starts to accept incoming
... bgp connection. The failure happens if the incoming connection comes too quickly after configuring the peer.
[Tags] local_run
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${i} ${as_number} IN ZIP ${ODL_IP_INDICES_ALL} ${BGP_PEER_AS_NUMBERS}
- \ BuiltIn.Log_Many IP: ${ODL_${i}_IP} as_number: ${as_number}
- \ Start_Bgp_Peer ${ODL_${i}_IP} ${as_number} 800${i} play.py.090.${i}
+ FOR ${i} ${as_number} IN ZIP ${ODL_IP_INDICES_ALL} ${BGP_PEER_AS_NUMBERS}
+ BuiltIn.Log_Many IP: ${ODL_${i}_IP} as_number: ${as_number}
+ Start_Bgp_Peer ${ODL_${i}_IP} ${as_number} 800${i} play.py.090.${i}
+ END
Play_To_Odl_ext_l3vpn_rt_arg
[Documentation] This TC sends route-target route containing route-target argument from node 1 to odl
Delete_Bgp_Peers_Configuration
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${i} ${type} IN ZIP ${ODL_IP_INDICES_ALL} ${BGP_PEER_TYPES}
- \ &{ODL_CONFIG} = BuiltIn.Create_Dictionary IP=${ODL_${i}_IP} TYPE=${type} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- \ ... INITIATE=false BGP_RIB=${RIB_NAME} PASSIVE_MODE=true
- \ TemplatedRequests.Delete_Templated ${EBGP_DIR} mapping=${ODL_CONFIG} session=${CONFIG_SESSION}
+ FOR ${i} ${type} IN ZIP ${ODL_IP_INDICES_ALL} ${BGP_PEER_TYPES}
+ &{ODL_CONFIG} = BuiltIn.Create_Dictionary IP=${ODL_${i}_IP} TYPE=${type} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false BGP_RIB=${RIB_NAME} PASSIVE_MODE=true
+ TemplatedRequests.Delete_Templated ${EBGP_DIR} mapping=${ODL_CONFIG} session=${CONFIG_SESSION}
+ END
*** Keywords ***
Start_Suite
Check_For_L3VPN_Odl_Avertisement
[Arguments] ${announce_hex}
[Documentation] Checks that each node received or did not receive update message containing given hex message.
- : FOR ${i} ${option} IN ZIP ${ODL_IP_INDICES_ALL} ${L3VPN_RT_CHECK}
- \ ${keyword_name}= BuiltIn.Set_Variable Get_Update_Message_And_Compare_With_Hex_BgpRpcClient${i}
- \ BuiltIn.Run_Keyword ${keyword_name} ${announce_hex} ${option}
+ FOR ${i} ${option} IN ZIP ${ODL_IP_INDICES_ALL} ${L3VPN_RT_CHECK}
+ ${keyword_name}= BuiltIn.Set_Variable Get_Update_Message_And_Compare_With_Hex_BgpRpcClient${i}
+ BuiltIn.Run_Keyword ${keyword_name} ${announce_hex} ${option}
+ END
Verify_Reported_Data
[Arguments] ${url} ${exprspfile}
[Documentation] Uploads exabgp config files
SSHLibrary.Put_File ${BGP_VAR_FOLDER}${/}exa-md5.cfg .
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/enable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/PASSWORD/${MD5_SAME_PASSWD}/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${TOOLS_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/enable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/PASSWORD/${MD5_SAME_PASSWD}/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
[Documentation] Uploads exabgp config files
SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP_CFG} .
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
Reconfigure_ODL_To_Accept_Connections
[Documentation] Configure BGP peer modules with initiate-connection set to false.
... Configures 6 different peers, two internal, two external and two route-reflectors.
- : FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES}
- \ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
- \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
- \ TemplatedRequests.Put_As_Xml_Templated ${POLICIES_VAR}${/}${peer_type} mapping=${mapping} session=${CONFIG_SESSION}
+ FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES}
+ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated ${POLICIES_VAR}${/}${peer_type} mapping=${mapping} session=${CONFIG_SESSION}
+ END
Start_Exabgps
[Documentation] Start 6 exabgps as processes in background, each with it's own configuration.
SSHKeywords.Virtual_Env_Activate_On_Current_Session log_output=${True}
- : FOR ${index} IN @{NUMBERS}
- \ ${start_cmd} BuiltIn.Set_Variable ${CMD} exabgp${index}.cfg > exa${index}.log &
- \ BuiltIn.Log ${start_cmd}
- \ ${output} SSHLibrary.Write ${start_cmd}
- \ BuiltIn.Log ${output}
+ FOR ${index} IN @{NUMBERS}
+ ${start_cmd} BuiltIn.Set_Variable ${CMD} exabgp${index}.cfg > exa${index}.log &
+ BuiltIn.Log ${start_cmd}
+ ${output} SSHLibrary.Write ${start_cmd}
+ BuiltIn.Log ${output}
+ END
Verify_Rib_Filled
[Documentation] Verifies that sent routes are present in particular ribs.
Stop_All_Peers
[Documentation] Send command to kill all exabgp processes running on controller
ExaBgpLib.Stop_All_ExaBgps
- : FOR ${index} IN @{NUMBERS}
- \ BGPcliKeywords.Store_File_To_Workspace exa${index}.log exa${index}.log
+ FOR ${index} IN @{NUMBERS}
+ BGPcliKeywords.Store_File_To_Workspace exa${index}.log exa${index}.log
+ END
Delete_Bgp_Peer_Configuration
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
- : FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES}
- \ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
- \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
- \ TemplatedRequests.Delete_Templated ${POLICIES_VAR}/${peer_type} mapping=${mapping} session=${CONFIG_SESSION}
+ FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES}
+ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated ${POLICIES_VAR}/${peer_type} mapping=${mapping} session=${CONFIG_SESSION}
+ END
Deconfigure_App_Peer
[Documentation] Revert the BGP configuration to the original state: without application peer
${output} TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/rib_state session=${CONFIG_SESSION}
BuiltIn.Log ${output}
${AS_PATH} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_AS_PATH} ${OLD_AS_PATH}
- : FOR ${index} IN @{NUMBERS}
- \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index} AS_PATH=${AS_PATH}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/effective_rib_in/peer_${index} mapping=${mapping}
- \ ... session=${CONFIG_SESSION} verify=True
+ FOR ${index} IN @{NUMBERS}
+ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index} AS_PATH=${AS_PATH}
+ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/effective_rib_in/peer_${index} mapping=${mapping}
+ ... session=${CONFIG_SESSION} verify=True
+ END
&{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} AS_PATH=${AS_PATH}
# application peer verification
BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/app_peer_rib mapping=${mapping} session=${CONFIG_SESSION}
Upload_Config_Files
[Documentation] Uploads exabgp config files and replaces variables within those
... config files with desired values.
- : FOR ${index} IN @{NUMBERS}
- \ SSHLibrary.Put_File ${POLICIES_VAR}/exabgp_configs/exabgp${index}.cfg .
+ FOR ${index} IN @{NUMBERS}
+ SSHLibrary.Put_File ${POLICIES_VAR}/exabgp_configs/exabgp${index}.cfg .
+ END
@{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
- : FOR ${cfgfile} IN @{cfgfiles}
- \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
- \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
- \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
- \ Log ${stdout}
+ FOR ${cfgfile} IN @{cfgfiles}
+ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
+ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ Log ${stdout}
+ END
[Documentation] Configure BGP peer modules with initiate-connection set to false.
... In Versions Fluorine and above, it sets peer-group as template, and than sets all neighbors using it.
CompareStream.Run_Keyword_If_At_Least_Fluorine Configure_Peer_Group
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
- \ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
- \ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
- \ &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_CHANGE_COUNT_MANY}
- \ ... PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
- \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE} PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
- \ CompareStream.Run_Keyword_If_At_Least_Fluorine TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
- \ CompareStream.Run_Keyword_If_Less_Than_Fluorine TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
- # FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
+ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
+ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
+ &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_CHANGE_COUNT_MANY}
+ ... PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE} PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
+ CompareStream.Run_Keyword_If_At_Least_Fluorine TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
+ CompareStream.Run_Keyword_If_Less_Than_Fluorine TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ # FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
+ END
Reconfigure_Data_Change_Counter
[Documentation] Configure data change counter to count transactions in example-ipv4-topology instead of example-linkstate-topology.
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
# TODO: Is it useful to extract peer naming logic to separate Keyword?
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
- \ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
- \ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
- \ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
- \ ... PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
- \ CompareStream.Run_Keyword_If_At_Least_Fluorine TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
- \ CompareStream.Run_Keyword_If_Less_Than_Fluorine TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
+ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
+ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
+ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
+ CompareStream.Run_Keyword_If_At_Least_Fluorine TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
+ CompareStream.Run_Keyword_If_Less_Than_Fluorine TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ END
CompareStream.Run_Keyword_If_At_Least_Fluorine Deconfigure_Peer_Group
*** Keywords ***
Reconfigure_ODL_To_Accept_Connections
[Documentation] Configure BGP peer modules with initiate-connection set to false.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
- \ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
- \ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
- \ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_PREFIX_COUNT_MANY_RRC}
- \ ... PEER_PORT=${BGP_TOOL_PORT} PEER_ROLE=rr-client INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true
- \ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} RR_CLIENT=true
- \ TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping}
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
+ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
+ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
+ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_PREFIX_COUNT_MANY_RRC}
+ ... PEER_PORT=${BGP_TOOL_PORT} PEER_ROLE=rr-client INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} RR_CLIENT=true
+ TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping}
+ END
Start_Talking_BGP_Manager
[Documentation] Start Python manager to connect speakers to ODL.
[Documentation] Check BGP peer logs for received updates.
[Tags] critical
${timeout} = BuiltIn.Set_Variable ${bgp_filling_timeout}
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
- \ ${bgp_peer_label} = BuiltIn.Set_Variable BGP-Dummy-${index}
- \ ${expected_prefixcount} = BuiltIn.Evaluate ${COUNT_PREFIX_COUNT_MANY_RRC} - ${COUNT_PREFIX_COUNT_MANY_RRC} / ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}
- \ ${expected_string} = BuiltIn.Set_Variable total_received_nlri_prefix_counter: ${expected_prefixcount}
- \ BuiltIn.Wait_Until_Keyword_Succeeds ${timeout} 1s Check_File_For_Occurence ${BGP_PEERS_LOG_FILE_NAME} ${bgp_peer_label}
- \ ... ${expected_string} 2
- \ ${timeout} = BuiltIn.Set_Variable 20s
- # FIXME: Calculation of ${expected_prefixcount} correct just when the ${COUNT_PREFIX_COUNT_MANY_RRC} is a multiplication of ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
+ ${bgp_peer_label} = BuiltIn.Set_Variable BGP-Dummy-${index}
+ ${expected_prefixcount} = BuiltIn.Evaluate ${COUNT_PREFIX_COUNT_MANY_RRC} - ${COUNT_PREFIX_COUNT_MANY_RRC} / ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}
+ ${expected_string} = BuiltIn.Set_Variable total_received_nlri_prefix_counter: ${expected_prefixcount}
+ BuiltIn.Wait_Until_Keyword_Succeeds ${timeout} 1s Check_File_For_Occurence ${BGP_PEERS_LOG_FILE_NAME} ${bgp_peer_label}
+ ... ${expected_string} 2
+ ${timeout} = BuiltIn.Set_Variable 20s
+ # FIXME: Calculation of ${expected_prefixcount} correct just when the ${COUNT_PREFIX_COUNT_MANY_RRC} is a multiplication of ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}
+ END
Kill_Talking_BGP_Speakers
[Documentation] Abort the Python speakers. Also, attempt to stop failing fast.
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
- \ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
- \ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
- \ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
- \ TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping}
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY_RRC}+1
+ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
+ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
+ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}ibgp_peers mapping=${mapping}
+ END
*** Keywords ***
Setup_Everything
Reconfigure_ODL_To_Accept_Connections
[Documentation] Configure BGP peer modules with initiate-connection set to false.
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY}+1
- \ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
- \ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
- \ &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_PREFIX_COUNT_MANY}
- \ ... PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
- \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
- \ TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
- # FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY}+1
+ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
+ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
+ &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_PREFIX_COUNT_MANY}
+ ... PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ # FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
+ END
Change_Karaf_Logging_Levels
[Documentation] We may want to set more verbose logging here after configuration is done.
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
# TODO: Is it useful to extract peer naming logic to separate Keyword?
- : FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY}+1
- \ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
- \ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
- \ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
- \ TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ FOR ${index} IN RANGE 1 ${MULTIPLICITY_PREFIX_COUNT_MANY}+1
+ ${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
+ ${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
+ &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ END
*** Keywords ***
Setup_Everything
TC4_Configure Node
[Documentation] Configure the bier params of nodes in the bier network topology.
- : FOR ${i} IN RANGE len(${NODE_ID_LIST})
- \ ${domain-bfr-id} Get From List ${BFR_ID_LIST} ${i}
- \ ${node-id} Get From List ${NODE_ID_LIST} ${i}
- \ ${mapping1} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} DOMAINID=${DOMAIN_ID_LIST[0]} DOMAINBFRID=${domain-bfr-id}
- \ ... SUBDOMAINBFRID=${domain-bfr-id} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
- \ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_node ${mapping1} session
- \ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
+ FOR ${i} IN RANGE len(${NODE_ID_LIST})
+ ${domain-bfr-id} Get From List ${BFR_ID_LIST} ${i}
+ ${node-id} Get From List ${NODE_ID_LIST} ${i}
+ ${mapping1} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} DOMAINID=${DOMAIN_ID_LIST[0]} DOMAINBFRID=${domain-bfr-id}
+ ... SUBDOMAINBFRID=${domain-bfr-id} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
+ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_node ${mapping1} session
+ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
+ END
${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_node {} session
Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_node config_node_response
TC5_Configure Te Label
[Documentation] Configure the BIER-TE label base and label range size for all nodes in the bier topology.
- : FOR ${i} IN RANGE len(${NODE_ID_LIST})
- \ ${node-id} Get From List ${NODE_ID_LIST} ${i}
- \ ${label-base} Get From List ${TE_LABEL_BASE_LIST} ${i}
- \ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} LABELBASE=${label-base} LABELRANGESIZE=${TE_LABEL_RANGE_SIZE}
- \ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_label ${mapping} session
- \ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
+ FOR ${i} IN RANGE len(${NODE_ID_LIST})
+ ${node-id} Get From List ${NODE_ID_LIST} ${i}
+ ${label-base} Get From List ${TE_LABEL_BASE_LIST} ${i}
+ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} LABELBASE=${label-base} LABELRANGESIZE=${TE_LABEL_RANGE_SIZE}
+ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_label ${mapping} session
+ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
+ END
TC5_Configure Te Node
[Documentation] Configure the BIER-TE params of nodes in the bier network topology.
- : FOR ${i} IN RANGE 4
- \ ${node-id} Get From List ${NODE_ID_LIST} ${i}
- \ ${tp-id-list} Get From Dictionary ${NODE_TO_TP_ID_LIST} ${node-id}
- \ ${bp-list} Get From Dictionary ${NODE_TO_BP_LIST} ${node-id}
- \ Second Layer Loop ${node-id} ${tp-id-list} ${bp-list} len(${bp-list})
+ FOR ${i} IN RANGE 4
+ ${node-id} Get From List ${NODE_ID_LIST} ${i}
+ ${tp-id-list} Get From Dictionary ${NODE_TO_TP_ID_LIST} ${node-id}
+ ${bp-list} Get From Dictionary ${NODE_TO_BP_LIST} ${node-id}
+ Second Layer Loop ${node-id} ${tp-id-list} ${bp-list} len(${bp-list})
+ END
TC5_Query Te Subdomain Link
[Documentation] Query the bier links in the te-domain 1 and te-subdomain 1.
TC6_Add Channel
[Documentation] Add three channels to the datastore defined by bier-network-channel.
- : FOR ${i} IN RANGE len(${CHANNEL_NAME_LIST})
- \ ${channel-name} Get From List ${CHANNEL_NAME_LIST} ${i}
- \ ${src-ip} Get From List ${SRC_IP_LIST} ${i}
- \ ${dst-group} Get From List ${DST_GROUP_LIST} ${i}
- \ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} CHANNELNAME=${channel-name} SRCIP=${src-ip} DSTGROUP=${dst-group}
- \ ... DOMAINID=${DOMAIN_ID_LIST[0]} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
- \ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/add_channel ${mapping} session
- \ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/bier_channel_configuration success_response
+ FOR ${i} IN RANGE len(${CHANNEL_NAME_LIST})
+ ${channel-name} Get From List ${CHANNEL_NAME_LIST} ${i}
+ ${src-ip} Get From List ${SRC_IP_LIST} ${i}
+ ${dst-group} Get From List ${DST_GROUP_LIST} ${i}
+ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} CHANNELNAME=${channel-name} SRCIP=${src-ip} DSTGROUP=${dst-group}
+ ... DOMAINID=${DOMAIN_ID_LIST[0]} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
+ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/add_channel ${mapping} session
+ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/bier_channel_configuration success_response
+ END
TC6_Get Channel
[Documentation] Query the channels put into the datastore.
@{wtp_discovered} Get From Dictionary ${ac_Root} discovered-wtps
${expected_ip_addr} get simulated wtpip ${ODL_SYSTEM_IP}
${wtp_ip_list} Create List ''
- : FOR ${wtp} IN @{wtp_discovered}
- \ ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
- \ Append to List ${wtp_ip_list} ${wtp_ip}
+ FOR ${wtp} IN @{wtp_discovered}
+ ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
+ Append to List ${wtp_ip_list} ${wtp_ip}
+ END
Log ${wtp_ip_list}
List Should Contain Value ${wtp_ip_list} ${expected_ip_addr}
${result} TO JSON ${resp.content}
@{wtp_discovered} Get From Dictionary ${result} discovered-wtps
${wtp_ip_list} Create List ''
- : FOR ${wtp} IN @{wtp_discovered}
- \ ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
- \ Append to List ${wtp_ip_list} ${wtp_ip}
+ FOR ${wtp} IN @{wtp_discovered}
+ ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
+ Append to List ${wtp_ip_list} ${wtp_ip}
+ END
Log ${wtp_ip_list}
List Should Contain Value ${wtp_ip_list} ${expected_ip_addr}
[Documentation] Add all needed cars to car Leader, verify on each member.
${car_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${car_items}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- \ ... verify=True iterations=${car_items}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
+ ... verify=True iterations=${car_items}
+ END
Add_People_To_First_Follower_And_Verify
[Documentation] Add all needed people to people first Follower, verify on each member.
${people_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
CarPeople.Add_Several_People session=${people_first_follower_session} iterations=${people_items}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session}
- \ ... verify=True iterations=${people_items}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session}
+ ... verify=True iterations=${people_items}
+ END
Buy_Cars_On_Leader_And_Verify
[Documentation] Buy some cars on the leader member.
${iter_start} = BuiltIn.Evaluate 0 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Buy_Cars_On_Follower_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Reboot_People_Leader
[Documentation] Previous people Leader is rebooted. We should never stop the people first follower, this is where people are registered.
${iter_start} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Buy_Cars_On_Follower_After_Reboot_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 4 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Delete_All_CarPeople
[Documentation] DELETE car-people container. No verification beyond http status.
[Documentation] Add all needed cars to car Leader, verify on each member.
${car_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${car_items}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- \ ... verify=True iterations=${car_items}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
+ ... verify=True iterations=${car_items}
+ END
Add_People_To_First_Follower_And_Verify
[Documentation] Add all needed people to people first Follower, verify on each member.
${people_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
CarPeople.Add_Several_People session=${people_first_follower_session} iterations=${people_items}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session}
- \ ... verify=True iterations=${people_items}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session}
+ ... verify=True iterations=${people_items}
+ END
Buy_Cars_On_Leader_And_Verify
[Documentation] Buy some cars on the leader member.
${iter_start} = BuiltIn.Evaluate 0 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Buy_Cars_On_Follower_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Isolate_and_Rejoin_People_Leader
[Documentation] Previous people Leader is isolated. We should never stop the people first follower, this is where people are registered.
${iter_start} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Buy_Cars_On_Follower_After_Rejoin_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS} + 1
CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 4 * ${CARPEOPLE_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- \ ... verify=True iterations=${total_iterations}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
+ ... verify=True iterations=${total_iterations}
+ END
Delete_All_CarPeople
[Documentation] DELETE car-people container. No verification beyond http status.
Add_Original_Cars_On_Old_Leader_And_Verify
[Documentation] Add initial cars on car Leader.
TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- \ ... verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
+ ... verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ END
Stop_Original_Car_Leader
[Documentation] Stop the car Leader to cause a new leader to get elected.
See_Original_Cars_On_New_Followers
[Documentation] The same check on other existing member(s).
- : FOR ${session} IN @{new_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ FOR ${session} IN @{new_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ END
Delete_Original_Cars_On_New_Leader
[Documentation] Delete cars on the new Leader.
See_Leader_Cars_On_New_Followers
[Documentation] The same check on other existing members.
- : FOR ${session} IN @{new_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ FOR ${session} IN @{new_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ END
Delete_Leader_Cars_On_New_First_Follower
[Documentation] Delete cars in new first Follower.
See_Follower_Cars_On_New_Followers
[Documentation] The same check on other existing members.
- : FOR ${session} IN @{new_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ FOR ${session} IN @{new_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ END
Start_Old_Car_Leader
[Documentation] Start the stopped member without deleting the persisted data.
${leader_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${leader}
BuiltIn.Set_Suite_Variable \${new_leader_session} ${leader_session}
${sessions} = BuiltIn.Create_List
- : FOR ${follower_index} IN @{follower_list}
- \ ${follower_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${follower_index}
- \ Collections.Append_To_List ${sessions} ${follower_session}
+ FOR ${follower_index} IN @{follower_list}
+ ${follower_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${follower_index}
+ Collections.Append_To_List ${sessions} ${follower_session}
+ END
BuiltIn.Set_Suite_Variable \${new_follower_sessions} ${sessions}
${first_follower_session} = Collections.Get_From_List ${sessions} 0
BuiltIn.Set_Suite_Variable \${new_first_follower_session} ${first_follower_session}
Add_Original_Cars_On_Old_Leader_And_Verify
[Documentation] Add initial cars on car Leader.
TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- \ ... verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
+ ... verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ END
Isolate_Original_Car_Leader
[Documentation] Isolate the car Leader to cause a new leader to get elected.
See_Original_Cars_On_New_Followers
[Documentation] The same check on other existing member(s).
- : FOR ${session} IN @{new_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ FOR ${session} IN @{new_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ END
Delete_Original_Cars_On_New_Leader
[Documentation] Delete cars on the new Leader.
See_Leader_Cars_On_New_Followers
[Documentation] The same check on other existing members.
- : FOR ${session} IN @{new_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ FOR ${session} IN @{new_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ END
Delete_Leader_Cars_On_New_First_Follower
[Documentation] Delete cars in new first Follower.
See_Follower_Cars_On_New_Followers
[Documentation] The same check on other existing members.
- : FOR ${session} IN @{new_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ FOR ${session} IN @{new_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ END
Rejoin_Old_Car_Leader
[Documentation] Rejoin the isolated member without deleting the persisted data.
[Documentation] Stop half plus one car Follower members and set reviving followers down (otherwsise tipping followers cannot join cluster).
... Mark most of stopped members as explicitly down, to allow the surviving leader make progress.
ClusterManagement.Stop_Members_From_List_Or_All member_index_list=${list_of_stopping} confirm=True
- : FOR ${index} IN @{list_of_reviving}
- \ ${data} OperatingSystem.Get File ${CLUSTER_DIR}/member_down.json
- \ ${member_ip} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
- \ ${data} String.Replace String ${data} {member_ip} ${member_ip}
- \ TemplatedRequests.Post_To_Uri uri=jolokia data=${data} content_type=${HEADERS} accept=${ACCEPT_EMPTY} session=${car_leader_session}
+ FOR ${index} IN @{list_of_reviving}
+ ${data} OperatingSystem.Get File ${CLUSTER_DIR}/member_down.json
+ ${member_ip} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
+ ${data} String.Replace String ${data} {member_ip} ${member_ip}
+ TemplatedRequests.Post_To_Uri uri=jolokia data=${data} content_type=${HEADERS} accept=${ACCEPT_EMPTY} session=${car_leader_session}
+ END
Attempt_To_Add_Cars_To_Leader
[Documentation] Adding cars should fail, as majority of Followers are down.
See_Cars_On_Existing_Members
[Documentation] On each up member: GET cars, should match the ones added on tipping Follower.
- : FOR ${session} IN @{list_of_majority}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${MAJORITY_START_I}
+ FOR ${session} IN @{list_of_majority}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${MAJORITY_START_I}
+ END
Start_Other_Followers
[Documentation] Start other followers without persisted data.
Add_Cars_On_Leader_And_Verify
[Documentation] Single big PUT to datastore to add cars to car Leader.
TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS}
- : FOR ${session} IN @{ClusterManagement__session_list}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- \ ... verify=True iterations=${CAR_ITEMS}
+ FOR ${session} IN @{ClusterManagement__session_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
+ ... verify=True iterations=${CAR_ITEMS}
+ END
Stop_All_Members
[Documentation] Stop all controllers.
See_Cars_On_Followers
[Documentation] The same check on other members.
- : FOR ${session} IN @{car_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS}
+ FOR ${session} IN @{car_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS}
+ END
Delete_Cars_On_Leader
[Documentation] Delete cars on the new Leader.
See_Added_Cars_On_Followers
[Documentation] The same check on other members.
- : FOR ${session} IN @{car_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ FOR ${session} IN @{car_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ END
Add_People_To_First_Follower
[Documentation] Add ${CARPEOPLE_ITEMS} people to people first Follower, loop of add-person.
See_Added_People_On_Followers
[Documentation] The same check on other members.
- : FOR ${session} IN @{people_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ FOR ${session} IN @{people_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ END
Buy_Cars_On_Leader
[Documentation] Buy some cars on car-people Leader, loop of buy-car, ending segment of IDs.
Buy_Cars_On_Followers
[Documentation] On each Follower buy corresponding ID segment of cars in buy-car loop.
${start_id} = BuiltIn.Set_Variable 1
- : FOR ${session} IN @{car-people_follower_sessions}
- \ CarPeople.Buy_Several_Cars session=${session} iterations=${items_per_follower} iter_start=${start_id}
- \ ${start_id} = BuiltIn.Evaluate ${start_id} + ${items_per_follower}
+ FOR ${session} IN @{car-people_follower_sessions}
+ CarPeople.Buy_Several_Cars session=${session} iterations=${items_per_follower} iter_start=${start_id}
+ ${start_id} = BuiltIn.Evaluate ${start_id} + ${items_per_follower}
+ END
See_Added_CarPeople_On_Leader
[Documentation] GET car-person mappings from Leader to see all entries.
See_Added_CarPeople_On_Followers
[Documentation] The same check on other members.
- : FOR ${session} IN @{car-people_follower_sessions}
- \ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ FOR ${session} IN @{car-people_follower_sessions}
+ TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ END
Delete_All_CarPeople_On_Leader
[Documentation] DELETE car-people container. No verification beyond http status.
${final_values}= BuiltIn.Set_variable ${Empty}
@{csv_files}= OperatingSystem.List_Files_In_Directory . *${final_file}
Collections.Sort_List ${csv_files}
- : FOR ${file} IN @{csv_files}
- \ BuiltIn.Log_To_Console ${file}
- \ ${csv_content}= OperatingSystem.GetFile ${file}
- \ ${column_names}= Get_Column_Names ${file} ${csv_content}
- \ ${column_values}= String.Get_Line ${csv_content} 1
- \ ${final_columns}= BuiltIn.Set_Variable_If "${final_columns}"=="${Empty}" ${column_names} ${final_columns},${column_names}
- \ ${final_values}= BuiltIn.Set_Variable_If "${final_values}"=="${Empty}" ${column_values} ${final_values},${column_values}
+ FOR ${file} IN @{csv_files}
+ BuiltIn.Log_To_Console ${file}
+ ${csv_content}= OperatingSystem.GetFile ${file}
+ ${column_names}= Get_Column_Names ${file} ${csv_content}
+ ${column_values}= String.Get_Line ${csv_content} 1
+ ${final_columns}= BuiltIn.Set_Variable_If "${final_columns}"=="${Empty}" ${column_names} ${final_columns},${column_names}
+ ${final_values}= BuiltIn.Set_Variable_If "${final_values}"=="${Empty}" ${column_values} ${final_values},${column_values}
+ END
${content}= BuiltIn.Catenate SEPARATOR=${\n} ${final_columns} ${final_values}
OperatingSystem.Create_File ${final_file} ${content}
# now we have followers and FOL_ will be prepended to the column names
@{columns} String.Split_String ${column_names} ,
${final_columns} BuiltIn.Set_Variable ${Empty}
- : FOR ${column} IN @{columns}
- \ ${final_columns} BuiltIn.Set_Variable_If "${final_columns}"=="${Empty}" FOL_${column} ${final_columns},FOL_${column}
+ FOR ${column} IN @{columns}
+ ${final_columns} BuiltIn.Set_Variable_If "${final_columns}"=="${Empty}" FOL_${column} ${final_columns},FOL_${column}
+ END
BuiltIn.Return_From_Keyword ${final_columns}
Get_Node_Idx_To_Unregister
[Documentation] Return the first non owner node from the stored candidate list.
- : FOR ${index} IN @{cs_candidates}
- \ BuiltIn.Return_From_Keyword_If "${index}" != "${cs_owner}" ${index}
+ FOR ${index} IN @{cs_candidates}
+ BuiltIn.Return_From_Keyword_If "${index}" != "${cs_owner}" ${index}
+ END
Restart
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Remote_Leader_Shutdown
Restart
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart1
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Producer_On_Shard_Leader_Node_SimpleTx
Restart2
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Producer_On_Shard_Non_Leader_Node_ChainedTx
Restart3
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Producer_On_Shard_Non_Leader_Node_SimpleTx
Restart1
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart2
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart3
[Documentation] Restart odl
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Get_Shard_Role
[Documentation] Get shard role.
${all_indices} = ClusterManagement.List_All_Indices
- : FOR ${index} IN @{all_indices}
- \ ${role} = ClusterAdmin.Get_Shard_Role ${index} ${SHARD_NAME} ${SHARD_TYPE}
+ FOR ${index} IN @{all_indices}
+ ${role} = ClusterAdmin.Get_Shard_Role ${index} ${SHARD_NAME} ${SHARD_TYPE}
+ END
Subscribe_Listener_To_Leader
[Documentation] Subscribe listener to leader.
${leader_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${leader_idx_as_list}
MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${leader_ip_as_list} ${leader_idx_as_list} ${MODULE_SHARD_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Write_Transactions_One_Node_Follower
[Documentation] Write transactions.
${follower_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${follower_idx_as_list}
MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${follower_ip_as_list} ${follower_idx_as_list} ${MODULE_SHARD_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Write_Transactions_All_Nodes
[Documentation] Write transactions.
${all_ip_list} = ClusterManagement.Resolve_IP_Address_For_Members ${all_indices}
MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${all_ip_list} ${all_indices} ${MODULE_SHARD_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Get_Prefix_Shard_Role
[Documentation] Get prefix shard role.
${all_indices} = ClusterManagement.List_All_Indices
- : FOR ${index} IN @{all_indices}
- \ ${role} = ClusterAdmin.Get_Prefix_Shard_Role ${index} ${PREF_BASED_SHARD} ${SHARD_TYPE}
+ FOR ${index} IN @{all_indices}
+ ${role} = ClusterAdmin.Get_Prefix_Shard_Role ${index} ${PREF_BASED_SHARD} ${SHARD_TYPE}
+ END
Subscribe_Listener_To_Leader
[Documentation] Subscribe listener to leader.
${leader_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${leader_idx_as_list}
MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${leader_ip_as_list} ${leader_idx_as_list} ${ID_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Produce_Transactions_One_Node_Follower
[Documentation] Produce transactions.
${follower_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${follower_idx_as_list}
MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${follower_ip_as_list} ${follower_idx_as_list} ${ID_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Produce_Transactions
[Documentation] Produce transactions.
${all_ip_list} = ClusterManagement.Resolve_IP_Address_For_Members ${all_indices}
MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${all_ip_list} ${all_indices} ${ID_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
- : FOR ${resp} IN @{resp_list}
- \ TemplatedRequests.Check_Status_Code @{resp}[2]
+ FOR ${resp} IN @{resp_list}
+ TemplatedRequests.Check_Status_Code @{resp}[2]
+ END
Restart1
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Remote_To_Remote_Movement
Restart2
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Remote_To_Local_Movement
Restart1
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart2
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart
[Documentation] Restart odl
- [Template]
DdbCommons.Restart_Test_Templ
Healing_After_Request_Timeout
Restart
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart_1
[Documentation] Restart odl.
- [Template]
DdbCommons.Restart_Test_Templ
Move_Leader_From_Listener_Remote_To_Other_Remote
Restart_2
[Documentation] Restart odl.
- [Template]
DdbCommons.Restart_Test_Templ
Move_Leader_From_Listener_Remote_To_Local
Restart_1
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Restart_2
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- [Template]
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
ClusterManagement.Start_Members_From_List_Or_All
BuiltIn.Wait_Until_Keyword_Succeeds 60s 10s ClusterManagement.Run_Bash_Command_On_List_Or_All netstat -punta
${index_list} = List_Indices_Or_All
- : FOR ${index} IN @{index_list}
- \ ${output} = ClusterManagement.Check_Bash_Command_On_Member command=sudo netstat -punta | grep 2550 | grep LISTEN member_index=${index}
- \ ${listening} = Get Match ${output} LISTEN
- \ BuiltIn.Run Keyword If '${listening}' == 'None' ClusterManagement.Check_Bash_Command_On_Member command=pid=$(grep org.apache.karaf.main.Main | grep -v grep | tr -s ' ' | cut -f2 -d' '); sudo /usr/lib/jvm/java-1.8.0/bin/jstack -l ${pid} member_index=${index}
+ FOR ${index} IN @{index_list}
+ ${output} = ClusterManagement.Check_Bash_Command_On_Member command=sudo netstat -punta | grep 2550 | grep LISTEN member_index=${index}
+ ${listening} = Get Match ${output} LISTEN
+ BuiltIn.Run Keyword If '${listening}' == 'None' ClusterManagement.Check_Bash_Command_On_Member command=pid=$(grep org.apache.karaf.main.Main | grep -v grep | tr -s ' ' | cut -f2 -d' '); sudo /usr/lib/jvm/java-1.8.0/bin/jstack -l ${pid} member_index=${index}
+ END
BuiltIn.Wait_Until_Keyword_Succeeds 60s 10s ShardStability.Shards_Stability_Get_Details ${DEFAULT_SHARD_LIST} verify_restconf=True
*** Keywords ***
Rpc_Before_Freeze_On_Successors
[Documentation] Run rpc on non owher cluster nodes.
- : FOR ${idx} IN @{brt_successors}
- \ Run_Rpc ${idx}
+ FOR ${idx} IN @{brt_successors}
+ Run_Rpc ${idx}
+ END
Freeze_Current_Owner_Member
[Documentation] Stop cluster node which is the owner.
Rpc_On_Remained_Cluster_Nodes
[Documentation] Run rpc on remained cluster nodes.
- : FOR ${idx} IN @{old_brt_successors}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Run_Rpc ${idx}
+ FOR ${idx} IN @{old_brt_successors}
+ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Run_Rpc ${idx}
+ END
Unfreeze_Frozen_Member
[Documentation] Restart frozen node
Rpc_After_Rejoin_On_All
[Documentation] Run rpc again on all nodes.
Run_Rpc ${brt_owner}
- : FOR ${idx} IN @{brt_successors}
- \ Run_Rpc ${idx}
+ FOR ${idx} IN @{brt_successors}
+ Run_Rpc ${idx}
+ END
*** Keywords ***
Setup_Suite
Rpc_Before_Isolation_On_Successors
[Documentation] Run rpc on non owher cluster nodes.
- : FOR ${idx} IN @{brt_successors}
- \ Run_Rpc ${idx}
+ FOR ${idx} IN @{brt_successors}
+ Run_Rpc ${idx}
+ END
Isolate_Current_Owner_Member
[Documentation] Isolating cluster node which is the owner.
Rpc_On_Non_Isolated_Cluster_Nodes
[Documentation] Run rpc on remained cluster nodes.
- : FOR ${idx} IN @{old_brt_successors}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Run_Rpc ${idx}
+ FOR ${idx} IN @{old_brt_successors}
+ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Run_Rpc ${idx}
+ END
Rejoin_Isolated_Member
[Documentation] Rejoin isolated node
Rpc_After_Rejoin_On_All
[Documentation] Run rpc again on all nodes.
Run_Rpc ${brt_owner}
- : FOR ${idx} IN @{brt_successors}
- \ Run_Rpc ${idx}
+ FOR ${idx} IN @{brt_successors}
+ Run_Rpc ${idx}
+ END
*** Keywords ***
Setup_Suite
Rpc_Before_Stop_On_Successors
[Documentation] Run rpc on non owher cluster nodes.
- : FOR ${idx} IN @{brt_successors}
- \ Run_Rpc ${idx}
+ FOR ${idx} IN @{brt_successors}
+ Run_Rpc ${idx}
+ END
Stop_Current_Owner_Member
[Documentation] Stop cluster node which is the owner.
Rpc_On_Remained_Cluster_Nodes
[Documentation] Run rpc on remained cluster nodes.
- : FOR ${idx} IN @{old_brt_successors}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Run_Rpc ${idx}
+ FOR ${idx} IN @{old_brt_successors}
+ BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Run_Rpc ${idx}
+ END
Restart_Stopped_Member
[Documentation] Restart stopped node
Rpc_After_Rejoin_On_All
[Documentation] Run rpc again on all nodes.
Run_Rpc ${brt_owner}
- : FOR ${idx} IN @{brt_successors}
- \ Run_Rpc ${idx}
+ FOR ${idx} IN @{brt_successors}
+ Run_Rpc ${idx}
+ END
*** Keywords ***
Setup_Suite
@{features} = XML.Get_Elements_Texts features.xml .feature[@name="${FEATURES_LIST_NAME}"]/feature
Collections.Log_List ${features}
KarafKeywords.Open_Controller_Karaf_Console_With_Timeout ${1} ${FEATURE_INSTALL_TIMEOUT}
- : FOR ${feature} IN @{features}
- \ KarafKeywords.Log_Message_To_Controller_Karaf Installing feature: ${feature}
- \ KarafKeywords.Install_a_Feature_Using_Active_Connection ${feature}
+ FOR ${feature} IN @{features}
+ KarafKeywords.Log_Message_To_Controller_Karaf Installing feature: ${feature}
+ KarafKeywords.Install_a_Feature_Using_Active_Connection ${feature}
+ END
Select Each Operation And Verify That Code Mirrors Has Been Displayed Correctly
${operation_ids}= YangmanKeywords.Return List Of Operation IDs
${operation_names}= YangmanKeywords.Return List Of Operation Names
- : FOR ${i} IN RANGE 0 len(${operation_ids})
- \ ${operation_id}= Collections.Get From List ${operation_ids} ${i}
- \ ${operation_name}= Collections.Get From List ${operation_names} ${i}
- \ YangmanKeywords.Expand Operation Select Menu And Select Operation ${operation_id} ${operation_name}
- \ Run Keyword If "${operation_name}"=="PUT" or "${operation_name}"=="POST" BuiltIn.Run Keywords YangmanKeywords.Verify Sent Data CM Is Displayed
- \ ... AND YangmanKeywords.Verify Received Data CM Is Displayed
- \ Run Keyword If "${operation_name}"=="GET" or "${operation_name}"=="DELETE" YangmanKeywords.Verify Received Data CM Is Displayed
+ FOR ${i} IN RANGE 0 len(${operation_ids})
+ ${operation_id}= Collections.Get From List ${operation_ids} ${i}
+ ${operation_name}= Collections.Get From List ${operation_names} ${i}
+ YangmanKeywords.Expand Operation Select Menu And Select Operation ${operation_id} ${operation_name}
+ Run Keyword If "${operation_name}"=="PUT" or "${operation_name}"=="POST" BuiltIn.Run Keywords YangmanKeywords.Verify Sent Data CM Is Displayed
+ ... AND YangmanKeywords.Verify Received Data CM Is Displayed
+ Run Keyword If "${operation_name}"=="GET" or "${operation_name}"=="DELETE" YangmanKeywords.Verify Received Data CM Is Displayed
+ END
Verify Displaying And Hiding Of CMs When Selecting Show Data Checkboxes
YangmanKeywords.Select Json View
Expand Each Loaded Module
[Arguments] ${number_of_modules_loaded}
- : FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
- \ ${module_list_item_collapsed_indexed}= YangmanKeywords.Return Module List Item Collapsed Indexed ${index}
- \ ${indexed_module_expander_icon}= YangmanKeywords.Return Indexed Module Expander Icon ${index}
- \ ${status}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${module_list_item_collapsed_indexed}
- \ BuiltIn.Run Keyword If "${status}"=="True" GUIKeywords.Focus And Click Element ${indexed_module_expander_icon}
- \ Selenium2Library.Wait Until Page Does Not Contain Element ${module_list_item_collapsed_indexed}
+ FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
+ ${module_list_item_collapsed_indexed}= YangmanKeywords.Return Module List Item Collapsed Indexed ${index}
+ ${indexed_module_expander_icon}= YangmanKeywords.Return Indexed Module Expander Icon ${index}
+ ${status}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${module_list_item_collapsed_indexed}
+ BuiltIn.Run Keyword If "${status}"=="True" GUIKeywords.Focus And Click Element ${indexed_module_expander_icon}
+ Selenium2Library.Wait Until Page Does Not Contain Element ${module_list_item_collapsed_indexed}
+ END
Collapse Each Expanded Module
[Arguments] ${number_of_modules_loaded}
- : FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
- \ ${module_list_item_expanded_indexed}= YangmanKeywords.Return Module List Item Expanded Indexed ${index}
- \ ${indexed_module_expander_icon}= YangmanKeywords.Return Indexed Module Expander Icon ${index}
- \ ${status}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${module_list_item_expanded_indexed}
- \ BuiltIn.Run Keyword If "${status}"=="True" Run Keyword GUIKeywords.Focus And Click Element ${indexed_module_expander_icon}
- \ Selenium2Library.Wait Until Page Does Not Contain Element ${module_list_item_expanded_indexed}
+ FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
+ ${module_list_item_expanded_indexed}= YangmanKeywords.Return Module List Item Expanded Indexed ${index}
+ ${indexed_module_expander_icon}= YangmanKeywords.Return Indexed Module Expander Icon ${index}
+ ${status}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${module_list_item_expanded_indexed}
+ BuiltIn.Run Keyword If "${status}"=="True" Run Keyword GUIKeywords.Focus And Click Element ${indexed_module_expander_icon}
+ Selenium2Library.Wait Until Page Does Not Contain Element ${module_list_item_expanded_indexed}
+ END
Verify Each Loaded Module Contains Operational Or Config Or Operations
[Arguments] ${number_of_modules_loaded}
- : FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
- \ ${indexed_module_operations}= YangmanKeywords.Return Indexed Module Operations Label ${index}
- \ ${indexed_module_operational}= YangmanKeywords.Return Indexed Module Operational Label ${index}
- \ ${indexed_module_config}= YangmanKeywords.Return Indexed Module Config Label ${index}
- \ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_operational}
- \ ${contains_operations}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_operations}
- \ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_config}
- \ @{states}= BuiltIn.Create List "${contains_operational}" "${contains_operations}" "${contains_config}"
- \ Collections.List Should Contain Value ${states} "True"
+ FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
+ ${indexed_module_operations}= YangmanKeywords.Return Indexed Module Operations Label ${index}
+ ${indexed_module_operational}= YangmanKeywords.Return Indexed Module Operational Label ${index}
+ ${indexed_module_config}= YangmanKeywords.Return Indexed Module Config Label ${index}
+ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_operational}
+ ${contains_operations}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_operations}
+ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_config}
+ @{states}= BuiltIn.Create List "${contains_operational}" "${contains_operations}" "${contains_config}"
+ Collections.List Should Contain Value ${states} "True"
+ END
Compare Module Name In Module List And Module Detail
[Arguments] ${number_of_modules_loaded}
- : FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
- \ ${indexed_module}= YangmanKeywords.Return Module List Indexed Module ${index}
- \ ${indexed_module_operations}= YangmanKeywords.Return Indexed Module Operations Label ${index}
- \ ${indexed_module_operational}= YangmanKeywords.Return Indexed Module Operational Label ${index}
- \ ${indexed_module_config}= YangmanKeywords.Return Indexed Module Config Label ${index}
- \ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operational}
- \ ${contains_operations}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operations}
- \ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_config}
- \ ${module_list_module_name}= Selenium2Library.Get Text ${indexed_module}//p
- \ BuiltIn.Run Keyword If "${contains_operations}"=="True" BuiltIn.Run Keywords GUIKeywords.Focus And Click Element ${indexed_module_operations}
- \ ... AND Selenium2Library.Wait Until Page Contains Element ${MODULE_DETAIL_MODULE_NAME_LABEL}
- \ ${module_detail_module_name}= BuiltIn.Run Keyword If "${contains_operations}"=="True" Selenium2Library.Get Text ${MODULE_DETAIL_MODULE_NAME_LABEL}
- \ BuiltIn.Run Keyword If "${contains_operations}"=="True" BuiltIn.Run Keywords BuiltIn.Should Contain ${module_detail_module_name} ${module_list_module_name}
- \ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
- \ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operations}
- \ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_operational}
- \ BuiltIn.Run Keyword If "${contains_operational}"=="True" BuiltIn.Run Keywords GUIKeywords.Focus And Click Element ${indexed_module_operational}
- \ ... AND Selenium2Library.Wait Until Page Contains Element ${MODULE_DETAIL_MODULE_NAME_LABEL}
- \ ${module_detail_module_name}= BuiltIn.Run Keyword If "${contains_operational}"=="True" Selenium2Library.Get Text ${MODULE_DETAIL_MODULE_NAME_LABEL}
- \ BuiltIn.Run Keyword If "${contains_operational}"=="True" BuiltIn.Run Keywords BuiltIn.Should Contain ${module_detail_module_name} ${module_list_module_name}
- \ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
- \ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operational}
- \ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_config}
- \ BuiltIn.Run Keyword If "${contains_config}"=="True" BuiltIn.Run Keywords GUIKeywords.Focus And Click Element ${indexed_module_config}
- \ ... AND Selenium2Library.Wait Until Page Contains Element ${MODULE_DETAIL_MODULE_NAME_LABEL}
- \ ${module_detail_module_name}= BuiltIn.Run Keyword If "${contains_config}"=="True" Selenium2Library.Get Text ${MODULE_DETAIL_MODULE_NAME_LABEL}
- \ BuiltIn.Run Keyword If "${contains_config}"=="True" BuiltIn.Run Keywords BuiltIn.Should Contain ${module_detail_module_name} ${module_list_module_name}
- \ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
- \ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_config}
+ FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
+ ${indexed_module}= YangmanKeywords.Return Module List Indexed Module ${index}
+ ${indexed_module_operations}= YangmanKeywords.Return Indexed Module Operations Label ${index}
+ ${indexed_module_operational}= YangmanKeywords.Return Indexed Module Operational Label ${index}
+ ${indexed_module_config}= YangmanKeywords.Return Indexed Module Config Label ${index}
+ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operational}
+ ${contains_operations}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operations}
+ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_config}
+ ${module_list_module_name}= Selenium2Library.Get Text ${indexed_module}//p
+ BuiltIn.Run Keyword If "${contains_operations}"=="True" BuiltIn.Run Keywords GUIKeywords.Focus And Click Element ${indexed_module_operations}
+ ... AND Selenium2Library.Wait Until Page Contains Element ${MODULE_DETAIL_MODULE_NAME_LABEL}
+ ${module_detail_module_name}= BuiltIn.Run Keyword If "${contains_operations}"=="True" Selenium2Library.Get Text ${MODULE_DETAIL_MODULE_NAME_LABEL}
+ BuiltIn.Run Keyword If "${contains_operations}"=="True" BuiltIn.Run Keywords BuiltIn.Should Contain ${module_detail_module_name} ${module_list_module_name}
+ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operations}
+ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_operational}
+ BuiltIn.Run Keyword If "${contains_operational}"=="True" BuiltIn.Run Keywords GUIKeywords.Focus And Click Element ${indexed_module_operational}
+ ... AND Selenium2Library.Wait Until Page Contains Element ${MODULE_DETAIL_MODULE_NAME_LABEL}
+ ${module_detail_module_name}= BuiltIn.Run Keyword If "${contains_operational}"=="True" Selenium2Library.Get Text ${MODULE_DETAIL_MODULE_NAME_LABEL}
+ BuiltIn.Run Keyword If "${contains_operational}"=="True" BuiltIn.Run Keywords BuiltIn.Should Contain ${module_detail_module_name} ${module_list_module_name}
+ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operational}
+ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Page Should Contain Element ${indexed_module_config}
+ BuiltIn.Run Keyword If "${contains_config}"=="True" BuiltIn.Run Keywords GUIKeywords.Focus And Click Element ${indexed_module_config}
+ ... AND Selenium2Library.Wait Until Page Contains Element ${MODULE_DETAIL_MODULE_NAME_LABEL}
+ ${module_detail_module_name}= BuiltIn.Run Keyword If "${contains_config}"=="True" Selenium2Library.Get Text ${MODULE_DETAIL_MODULE_NAME_LABEL}
+ BuiltIn.Run Keyword If "${contains_config}"=="True" BuiltIn.Run Keywords BuiltIn.Should Contain ${module_detail_module_name} ${module_list_module_name}
+ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_config}
+ END
Click Operations Or Operational And Config Of All Modules And Verify Chosen Tab Is Selected
[Arguments] ${number_of_modules_loaded}
- : FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
- \ ${indexed_module_operations}= YangmanKeywords.Return Indexed Module Operations Label ${index}
- \ ${indexed_module_operational}= YangmanKeywords.Return Indexed Module Operational Label ${index}
- \ ${indexed_module_config}= YangmanKeywords.Return Indexed Module Config Label ${index}
- \ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operational}
- \ ${contains_operations}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operations}
- \ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_config}
- \ BuiltIn.Run Keyword If "${contains_operations}"=="True" Run Keywords YangmanKeywords.Click Indexed Module Operations To Load Module Detail Operations Tab ${index}
- \ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
- \ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operations}
- \ BuiltIn.Run Keyword If "${contains_operational}"=="True" BuiltIn.Run Keywords YangmanKeywords.Click Indexed Module Operational To Load Module Detail Operational Tab ${index}
- \ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
- \ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operational}
- \ BuiltIn.Run Keyword If "${contains_config}"=="True" BuiltIn.Run Keywords YangmanKeywords.Click Indexed Module Config To Load Module Detail Config Tab ${index}
- \ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
- \ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_config}
+ FOR ${index} IN RANGE 0 ${number_of_modules_loaded}
+ ${indexed_module_operations}= YangmanKeywords.Return Indexed Module Operations Label ${index}
+ ${indexed_module_operational}= YangmanKeywords.Return Indexed Module Operational Label ${index}
+ ${indexed_module_config}= YangmanKeywords.Return Indexed Module Config Label ${index}
+ ${contains_operational}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operational}
+ ${contains_operations}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_operations}
+ ${contains_config}= BuiltIn.Run Keyword And Return Status Selenium2Library.Wait Until Page Contains Element ${indexed_module_config}
+ BuiltIn.Run Keyword If "${contains_operations}"=="True" Run Keywords YangmanKeywords.Click Indexed Module Operations To Load Module Detail Operations Tab ${index}
+ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operations}
+ BuiltIn.Run Keyword If "${contains_operational}"=="True" BuiltIn.Run Keywords YangmanKeywords.Click Indexed Module Operational To Load Module Detail Operational Tab ${index}
+ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_operational}
+ BuiltIn.Run Keyword If "${contains_config}"=="True" BuiltIn.Run Keywords YangmanKeywords.Click Indexed Module Config To Load Module Detail Config Tab ${index}
+ ... AND YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+ ... AND Selenium2Library.Wait Until Element Is Visible ${indexed_module_config}
+ END
Wait Until Keyword Succeeds 30s 10s Utils.Check For Elements At URI ${OPERATIONAL_API}/itm-config:tunnel-monitor-interval/ ${Bfd_updated_value}
Wait Until Keyword Succeeds 30s 10s Utils.Check For Elements At URI ${CONFIG_API}/itm-config:tunnel-monitor-interval/ ${Bfd_updated_value}
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${INTERFACE_DS_MONI_INT_5000} ${TUNNEL_MONI_PROTO}
- : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
- \ ${tun_names} Genius.Get Tunnels On OVS ${TOOLS_SYSTEM_ALL_CONN_IDS[${tool_system_index}]}
- \ Verify ovs-vsctl Output For Each Tunnel ${tun_names} ${tool_system_index}
+ FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ ${tun_names} Genius.Get Tunnels On OVS ${TOOLS_SYSTEM_ALL_CONN_IDS[${tool_system_index}]}
+ Verify ovs-vsctl Output For Each Tunnel ${tun_names} ${tool_system_index}
+ END
BFD_TC06 Verify that the tunnel state goes to UNKNOWN when DPN is disconnected
[Documentation] Verify that the tunnel state goes to UNKNOWN when DPN is disconnected
Verify ovs-vsctl Output For Each Tunnel
[Arguments] ${tun_names} ${tool_system_index}
${no of tunnels} = BuiltIn.Get Length ${tun_names}
- : FOR ${each_tun} IN RANGE ${no of tunnels}
- \ ${tun} Collections.Get From List ${tun_names} ${each_tun}
- \ BuiltIn.Wait Until Keyword Succeeds 20 5 OVSDB.Verify Ovs-vsctl Output list interface ${tun} 5000
- \ ... ovs_system=@{TOOLS_SYSTEM_ALL_IPS}[${tool_system_index}]
+ FOR ${each_tun} IN RANGE ${no of tunnels}
+ ${tun} Collections.Get From List ${tun_names} ${each_tun}
+ BuiltIn.Wait Until Keyword Succeeds 20 5 OVSDB.Verify Ovs-vsctl Output list interface ${tun} 5000
+ ... ovs_system=@{TOOLS_SYSTEM_ALL_IPS}[${tool_system_index}]
+ END
Delete and Verify VTEP -No Vlan
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
${tunnel_list} = Genius.Get Tunnels List
- : FOR ${dpn_id} IN @{DPN_ID_LIST}
- \ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
- \ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ FOR ${dpn_id} IN @{DPN_ID_LIST}
+ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ END
${output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
BuiltIn.Wait Until Keyword Succeeds 40 10 Get ITM IPV6 ${itm_created[0]}
${type} = BuiltIn.Set Variable odl-interface:tunnel-type-vxlan
Genius.Update Dpn id list and get tunnels ${type}
- : FOR ${dpn} IN @{DPN_ID_LIST}
- \ BuiltIn.Wait Until Keyword Succeeds 40 5 Utils.Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
- \ ... headers=${ACCEPT_XML}
+ FOR ${dpn} IN @{DPN_ID_LIST}
+ BuiltIn.Wait Until Keyword Succeeds 40 5 Utils.Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+ ... headers=${ACCEPT_XML}
+ END
BuiltIn.Wait Until Keyword Succeeds 40 10 OVS Verification Between IPV6
@{all_tunnels} = BuiltIn.Create List
- : FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
- \ ${tun_names} = Genius.Get Tunnels On OVS ${conn_id}
- \ Collections.Append To List ${all_tunnels} @{tun_names}
+ FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
+ ${tun_names} = Genius.Get Tunnels On OVS ${conn_id}
+ Collections.Append To List ${all_tunnels} @{tun_names}
+ END
@{network_topology_list} = BuiltIn.Create List @{all_tunnels}
@{network_topology_list} = Collections.Append To List ${network_topology_list} ${Bridge}
${resp} = BuiltIn.Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${OPERATIONAL_TOPO_API} ${network_topology_list}
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
${type} = BuiltIn.Set Variable odl-interface:tunnel-type-vxlan
${tunnel_list} = Genius.Get Tunnels List
- : FOR ${dpn_id} IN @{DPN_ID_LIST}
- \ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET_IPV6}%2F16/vteps/${dpn_id}/${port_name}
- \ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ FOR ${dpn_id} IN @{DPN_ID_LIST}
+ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET_IPV6}%2F16/vteps/${dpn_id}/${port_name}
+ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ END
${output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
BuiltIn.Run Keyword And Ignore Error Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
${type} = BuiltIn.Set Variable odl-interface:tunnel-type-vxlan
${tunnel_list} = Genius.Get Tunnels List
- : FOR ${dpn_id} IN @{DPN_ID_LIST}
- \ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
- \ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ FOR ${dpn_id} IN @{DPN_ID_LIST}
+ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ END
${output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
[Documentation] This testcase deletes the ITM tunnel created between 2 dpns.
${type} = BuiltIn.Set Variable odl-interface:tunnel-type-vxlan
${tunnel_list} = Genius.Get Tunnels List
- : FOR ${dpn_id} IN @{DPN_ID_LIST}
- \ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
- \ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ FOR ${dpn_id} IN @{DPN_ID_LIST}
+ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ END
${output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
OVS Verification Between IPV6
[Documentation] This keyword will verify tunnels available on ovs
- : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Genius.Ovs Verification For Each Dpn ${tools_ip} ${TOOLS_SYSTEM_IPV6_LIST}
+ FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Genius.Ovs Verification For Each Dpn ${tools_ip} ${TOOLS_SYSTEM_IPV6_LIST}
+ END
Verify Network Topology
[Documentation] This keyword will verify whether all tunnels and bridges are populated in network topology
Build Tools System IPV6 List
[Documentation] Create a list of tools system ips with IPV6.
@{TOOLS_SYSTEM_IPV6_LIST} = BuiltIn.Create List
- : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
- \ Collections.Append To List ${TOOLS_SYSTEM_IPV6_LIST} fd96:2a25:4ad3:3c7d:0:0:${tool_system_index}:1000
+ FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ Collections.Append To List ${TOOLS_SYSTEM_IPV6_LIST} fd96:2a25:4ad3:3c7d:0:0:${tool_system_index}:1000
+ END
BuiltIn.Set Suite Variable @{TOOLS_SYSTEM_IPV6_LIST}
Delete and Verify VTEP
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
${tunnel_list} = Genius.Get Tunnels List
- : FOR ${dpn_id} IN @{DPN_ID_LIST}
- \ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
- \ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ FOR ${dpn_id} IN @{DPN_ID_LIST}
+ CompareStream.Run_Keyword_If_Less_Than_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
+ CompareStream.Run_Keyword_If_At_Least_Sodium Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/vteps/${dpn_id}
+ END
${output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
[Documentation] Verify tunnel creation by enabling BFD monitoring.
${result} = BuiltIn.Run Keyword And Return Status Genius.Verify Tunnel Monitoring Status ${TUNNEL_MONITOR_ON}
BuiltIn.Run Keyword If '${result}' == 'False' Enable_Tunnel_monitoring
- : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Verify Tunnel State After OVS Restart ${tools_ip}
+ FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Verify Tunnel State After OVS Restart ${tools_ip}
+ END
Verify Tunnels By Disabling BFD
[Documentation] Verify tunnel creation by disabling BFD monitoring.
Verify TEP in controller and transport zone in OVSDB table of compute nodes
[Documentation] Set local ip in compute nodes and verify default transport zone tunnels are up in controller
@{LOCAL_IPS} = BuiltIn.Create List
- : FOR ${ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${localip} = Utils.Run Command On Remote System ${ip} ${SET_LOCAL_IP}${ip}
- : FOR ${node_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${ip} = OvsManager.Get OVS Local Ip ${node_ip}
- \ Collections.Append To List ${LOCAL_IPS} ${ip}
+ FOR ${ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${localip} = Utils.Run Command On Remote System ${ip} ${SET_LOCAL_IP}${ip}
+ END
+ FOR ${node_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${ip} = OvsManager.Get OVS Local Ip ${node_ip}
+ Collections.Append To List ${LOCAL_IPS} ${ip}
+ END
BuiltIn.Set Suite Variable @{LOCAL_IPS}
BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as Up
BuiltIn.Should Contain ${get_nohosted_data} ${TRANSPORT_ZONE}
BuiltIn.Should Contain ${get_nohosted_data} @{DPN_ID_LIST}[0]
Utils.Post Elements To URI From File ${TRANSPORTZONE_POST_URL} ${TZA_JSON}
- : FOR ${node_number} IN RANGE 2 ${NUM_TOOLS_SYSTEM}+1
- \ Change Transport Zone In Compute ${TOOLS_SYSTEM_${node_number}_IP} ${TRANSPORT_ZONE}
- : FOR ${node} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ ${output} = Utils.Run Command On Remote System ${node} ${GET_EXTERNAL_IDS}
- \ BuiltIn.Should Contain ${output} ${TRANSPORT_ZONE}
+ FOR ${node_number} IN RANGE 2 ${NUM_TOOLS_SYSTEM}+1
+ Change Transport Zone In Compute ${TOOLS_SYSTEM_${node_number}_IP} ${TRANSPORT_ZONE}
+ END
+ FOR ${node} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${output} = Utils.Run Command On Remote System ${node} ${GET_EXTERNAL_IDS}
+ BuiltIn.Should Contain ${output} ${TRANSPORT_ZONE}
+ END
${get_hosted_data} = BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Utils.Get Data From URI session ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
BuiltIn.Should Contain ${get_hosted_data} ${TRANSPORT_ZONE}
BuiltIn.Should Contain ${get_hosted_data} @{DPN_ID_LIST}[0]
Verify other-config-key and transport zone value in controller operational datastore
[Documentation] validate local_ip and transport-zone value from controller datastore and Verify value of external-id-key with transport_zone in Controller operational datastore
${controller-data} = Utils.Get Data From URI session ${GET_NETWORK_TOPOLOGY_URL}
- : FOR ${node_ip} IN @{LOCAL_IPS}
- \ BuiltIn.Should Contain ${controller-data} "other-config-value":"${node_ip}"
+ FOR ${node_ip} IN @{LOCAL_IPS}
+ BuiltIn.Should Contain ${controller-data} "other-config-value":"${node_ip}"
+ END
BuiltIn.Should Contain ${controller-data} "external-id-value":"${TRANSPORT_ZONE}"
Delete transport zone on OVS and check ovsdb update to controller
[Documentation] To verify transport zone moves to default zone after deleting zone name in compute nodes
- : FOR ${node} IN @{TOOLS_SYSTEM_ALL_IPS}
- \ Utils.Run Command On Remote System ${node} ${DELETE_TRANSPORT_ZONE}
+ FOR ${node} IN @{TOOLS_SYSTEM_ALL_IPS}
+ Utils.Run Command On Remote System ${node} ${DELETE_TRANSPORT_ZONE}
+ END
${tep_show_output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Contain ${tep_show_output} ${DEFAULT_TRANSPORT_ZONE}
BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as Up
OFT Create Vteps using Auto Tunnels
[Arguments] @{tools_ip_list}
[Documentation] Create VTEPs for selected tools systems in ODL using Auto Tunnels.
- : FOR ${tools_ip} IN @{tools_ip_list}
- \ Utils.Run Command On Remote System And Log ${tools_ip} ${SET_LOCAL_IP}${tools_ip}
+ FOR ${tools_ip} IN @{tools_ip_list}
+ Utils.Run Command On Remote System And Log ${tools_ip} ${SET_LOCAL_IP}${tools_ip}
+ END
OFT Verify Vteps Created
[Arguments] ${dpn_id_list} ${tools_ip_list}
BuiltIn.Wait Until Keyword Succeeds 60 5 Genius.Verify Tunnel Status As Up ${num_switches}
BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Tunnels Created @{tools_ip_list}
${tools_system_len} = BuiltIn.Get Length ${tools_ip_list}
- : FOR ${tools_system_index} IN RANGE ${tools_system_len}
- \ ${tun_ip_list} = BuiltIn.CreateList @{tools_ip_list}
- \ Collections.Remove From List ${tun_ip_list} ${tools_system_index}
- \ ${ports_output} = Utils.Run Command On Remote System And Log @{tools_ip_list}[${tools_system_index}] sudo ovs-ofctl -Oopenflow13 dump-ports-desc ${Bridge}
- \ ${port_numbers} = String.Get Regexp Matches ${ports_output} (\\d+).of.* ${1}
- \ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Ingress Flows Created per Switch @{tools_ip_list}[${tools_system_index}] ${tun_ip_list}
- \ ... ${port_numbers}
- \ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Egress Flows Created per Switch @{tools_ip_list}[${tools_system_index}] ${tun_ip_list}
- \ ... ${port_numbers}
+ FOR ${tools_system_index} IN RANGE ${tools_system_len}
+ ${tun_ip_list} = BuiltIn.CreateList @{tools_ip_list}
+ Collections.Remove From List ${tun_ip_list} ${tools_system_index}
+ ${ports_output} = Utils.Run Command On Remote System And Log @{tools_ip_list}[${tools_system_index}] sudo ovs-ofctl -Oopenflow13 dump-ports-desc ${Bridge}
+ ${port_numbers} = String.Get Regexp Matches ${ports_output} (\\d+).of.* ${1}
+ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Ingress Flows Created per Switch @{tools_ip_list}[${tools_system_index}] ${tun_ip_list}
+ ... ${port_numbers}
+ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Egress Flows Created per Switch @{tools_ip_list}[${tools_system_index}] ${tun_ip_list}
+ ... ${port_numbers}
+ END
OFT OVS Verify Tunnels Created
[Arguments] @{tools_ip_list}
[Documentation] Verify if tunnels are created in OVS for selected tools systems.
- : FOR ${tools_ip} IN @{tools_ip_list}
- \ ${output} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-vsctl show
- \ BuiltIn.Should Contain X Times ${output} local_ip="${tools_ip}", remote_ip=flow ${1}
+ FOR ${tools_ip} IN @{tools_ip_list}
+ ${output} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-vsctl show
+ BuiltIn.Should Contain X Times ${output} local_ip="${tools_ip}", remote_ip=flow ${1}
+ END
OFT OVS Verify Ingress Flows Created per Switch
[Arguments] ${tools_ip} ${tun_src_list} ${port_numbers}
[Documentation] Verify if Ingress flow rules are created in OVS for a given switch.
${flows_table0_output} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE0}
BuiltIn.Should Not Contain ${flows_table0_output} tun_src=${tools_ip},
- : FOR ${tun_src} IN @{tun_src_list}
- \ BuiltIn.Should Contain ${flows_table0_output} tun_src=${tun_src},
- : FOR ${port_number} IN @{port_numbers}
- \ BuiltIn.Should Contain ${flows_table0_output} in_port=${port_number}
+ FOR ${tun_src} IN @{tun_src_list}
+ BuiltIn.Should Contain ${flows_table0_output} tun_src=${tun_src},
+ END
+ FOR ${port_number} IN @{port_numbers}
+ BuiltIn.Should Contain ${flows_table0_output} in_port=${port_number}
+ END
OFT OVS Verify Egress Flows Created per Switch
[Arguments] ${tools_ip} ${tun_dst_list} ${port_numbers}
[Documentation] Verify if Egress flow rules are created in OVS for a given switch.
${flows_table95_output} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${Bridge} ${FLOWS_FILTER_TABLE95}
- : FOR ${tun_dst} IN @{tun_dst_list}
- \ ${tun_dst_hex} = BuiltIn.Evaluate hex(struct.unpack('!I',socket.inet_aton('${tun_dst}'))[0]) modules=socket,struct
- \ BuiltIn.Should Contain ${flows_table95_output} load:${tun_dst_hex}->NXM_NX_TUN_IPV4_DST[]
- : FOR ${port_number} IN @{port_numbers}
- \ BuiltIn.Should Contain ${flows_table95_output} output:${port_number}
+ FOR ${tun_dst} IN @{tun_dst_list}
+ ${tun_dst_hex} = BuiltIn.Evaluate hex(struct.unpack('!I',socket.inet_aton('${tun_dst}'))[0]) modules=socket,struct
+ BuiltIn.Should Contain ${flows_table95_output} load:${tun_dst_hex}->NXM_NX_TUN_IPV4_DST[]
+ END
+ FOR ${port_number} IN @{port_numbers}
+ BuiltIn.Should Contain ${flows_table95_output} output:${port_number}
+ END
OFT Delete Vteps using Auto Tunnels
[Arguments] @{tools_ip_list}
[Documentation] Delete VTEPs for selected tools systems in ODL using Auto Tunnel.
- : FOR ${tools_ip} IN @{tools_ip_list}
- \ Utils.Run Command On Remote System And Log ${tools_ip} ${REMOVE_LOCAL_IP}
+ FOR ${tools_ip} IN @{tools_ip_list}
+ Utils.Run Command On Remote System And Log ${tools_ip} ${REMOVE_LOCAL_IP}
+ END
OFT Verify Vteps Deleted
[Arguments] ${dpn_id_list} ${tools_ip_list}
BuiltIn.Run Keyword If ${existing_tep_len} > 0 BuiltIn.Wait Until Keyword Succeeds 60 5 Genius.Verify Tunnel Status As Up ${existing_tep_len}
${tep_show_output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
${tep_show_state_output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
- : FOR ${tools_system_index} IN RANGE ${deleted_tep_len}
- \ ${tep_show_state_output_1} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
- \ BuiltIn.Should Not Contain ${tep_show_output} @{tools_ip_list}[${tools_system_index}]
- \ BuiltIn.Should Not Contain ${tep_show_state_output} @{tools_ip_list}[${tools_system_index}]
- \ BuiltIn.Wait Until Keyword Succeeds 60 5 Utils.No Content From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/@{dpn_id_list}[${tools_system_index}]/
- \ ${dst_dpn_id_list} = BuiltIn.Create List @{DPN_ID_LIST}
- \ Collections.Remove From List ${dst_dpn_id_list} ${tools_system_index}
- \ BuiltIn.Wait Until Keyword Succeeds 60 5 OFT Verify Vteps Deleted at Dpn Teps State per Interface @{dpn_id_list}[${tools_system_index}] ${dst_dpn_id_list}
- \ ${ovs_vsctl_output} = BuiltIn.Wait Until Keyword Succeeds 40 10 Utils.Run Command On Remote System And Log @{tools_ip_list}[${tools_system_index}]
- \ ... sudo ovs-vsctl show
- \ BuiltIn.Should Not Contain ${ovs_vsctl_output} remote_ip=flow
- \ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Ingress Flows Deleted per Switch @{tools_ip_list}[${tools_system_index}]
- \ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Egress Flows Deleted per Switch @{tools_ip_list}[${tools_system_index}]
+ FOR ${tools_system_index} IN RANGE ${deleted_tep_len}
+ ${tep_show_state_output_1} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ BuiltIn.Should Not Contain ${tep_show_output} @{tools_ip_list}[${tools_system_index}]
+ BuiltIn.Should Not Contain ${tep_show_state_output} @{tools_ip_list}[${tools_system_index}]
+ BuiltIn.Wait Until Keyword Succeeds 60 5 Utils.No Content From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/@{dpn_id_list}[${tools_system_index}]/
+ ${dst_dpn_id_list} = BuiltIn.Create List @{DPN_ID_LIST}
+ Collections.Remove From List ${dst_dpn_id_list} ${tools_system_index}
+ BuiltIn.Wait Until Keyword Succeeds 60 5 OFT Verify Vteps Deleted at Dpn Teps State per Interface @{dpn_id_list}[${tools_system_index}] ${dst_dpn_id_list}
+ ${ovs_vsctl_output} = BuiltIn.Wait Until Keyword Succeeds 40 10 Utils.Run Command On Remote System And Log @{tools_ip_list}[${tools_system_index}]
+ ... sudo ovs-vsctl show
+ BuiltIn.Should Not Contain ${ovs_vsctl_output} remote_ip=flow
+ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Ingress Flows Deleted per Switch @{tools_ip_list}[${tools_system_index}]
+ BuiltIn.Wait Until Keyword Succeeds 40 10 OFT OVS Verify Egress Flows Deleted per Switch @{tools_ip_list}[${tools_system_index}]
+ END
OFT Verify Vteps Deleted at Dpn Teps State per Interface
[Arguments] ${src_dpn_id} ${dst_dpn_id_list}
[Documentation] Verify if vteps are deleted for all src-dst intf pair at dpn-teps-state in ODL for a given src intf.
- : FOR ${dst_dpn_id} IN @{dst_dpn_id_list}
- \ ${status} = BuiltIn.Run Keyword And Return Status Genius.Get Tunnel ${src_dpn_id} ${dst_dpn_id} odl-interface:tunnel-type-vxlan
- \ ... dpn-teps-state
- \ BuiltIn.Should Be True ${status} == ${False}
+ FOR ${dst_dpn_id} IN @{dst_dpn_id_list}
+ ${status} = BuiltIn.Run Keyword And Return Status Genius.Get Tunnel ${src_dpn_id} ${dst_dpn_id} odl-interface:tunnel-type-vxlan
+ ... dpn-teps-state
+ BuiltIn.Should Be True ${status} == ${False}
+ END
OFT OVS Verify Ingress Flows Deleted per Switch
[Arguments] ${tools_ip}
[Documentation] Start suite for OF Tunnels.
ClusterManagement.ClusterManagement_Setup
ClusterManagement.Stop_Members_From_List_Or_All
- : FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
- \ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
- \ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<use-of-tunnels>false/<use-of-tunnels>true/g' ${GENIUS_ITM_CONFIG_FLAG}
+ FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
+ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
+ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<use-of-tunnels>false/<use-of-tunnels>true/g' ${GENIUS_ITM_CONFIG_FLAG}
+ END
ClusterManagement.Start_Members_From_List_Or_All
Genius Suite Setup
OF Tunnels Stop Suite
[Documentation] Stop suite for OF Tunnels.
- : FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
- \ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
- \ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<use-of-tunnels>true/<use-of-tunnels>false/g' ${GENIUS_ITM_CONFIG_FLAG}
+ FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
+ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<use-of-tunnels>true/<use-of-tunnels>false/g' ${GENIUS_ITM_CONFIG_FLAG}
+ END
ClusterManagement.Stop_Members_From_List_Or_All
ClusterManagement.Start_Members_From_List_Or_All
Genius Suite Teardown
Create Session session http://${ODL}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Wait Until Keyword Succeeds 10x 30 s Get Data From URI session ${OF_OVERLAY_CONFIG_PATH} headers=${headers}
Delete All Sessions
- : FOR ${GBP} IN @{GBPs}
- \ ConnUtils.Connect and Login ${GBP} timeout=${timeout}
- \ ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False
- \ Should Be Empty ${stderr}
- \ SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
- \ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout}
- \ Should Be Equal As Numbers ${rc} 0
- \ SSHLibrary.Close Connection
+ FOR ${GBP} IN @{GBPs}
+ ConnUtils.Connect and Login ${GBP} timeout=${timeout}
+ ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False
+ Should Be Empty ${stderr}
+ SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
+ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout}
+ Should Be Equal As Numbers ${rc} 0
+ SSHLibrary.Close Connection
+ END
Init Variables
Teardown Everything
Log stop_suite_in_3_node
- : FOR ${GBP} IN @{GBPs}
- \ ConnUtils.Connect and Login ${GBP} timeout=${timeout}
- \ SSHLibrary.Execute Command sudo rm -rf ${VM_SCRIPTS_FOLDER}
- \ SSHLibrary.Close Connection
+ FOR ${GBP} IN @{GBPs}
+ ConnUtils.Connect and Login ${GBP} timeout=${timeout}
+ SSHLibrary.Execute Command sudo rm -rf ${VM_SCRIPTS_FOLDER}
+ SSHLibrary.Close Connection
+ END
Register Endpoints
[Documentation] Endpoints registration
@{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_GBP1_DIR} vethl*.*json absolute
- : FOR ${endpoint_file} IN @{endpoint_files}
- \ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ FOR ${endpoint_file} IN @{endpoint_files}
+ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ END
Put Tenant
[Documentation] Send GBP policy to ODL
*** Test Cases ***
Teardown Suite
Log Teardown suite in gbp1
- : FOR ${GBP} IN @{GBPs}
- \ GBP_3node.Teardown Node ${GBP} ${CURDIR} timeout=${timeout}
+ FOR ${GBP} IN @{GBPs}
+ GBP_3node.Teardown Node ${GBP} ${CURDIR} timeout=${timeout}
+ END
Register Endpoints
[Documentation] Endpoints registration
@{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_GBP2_DIR} vethl*.*json absolute
- : FOR ${endpoint_file} IN @{endpoint_files}
- \ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ FOR ${endpoint_file} IN @{endpoint_files}
+ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ END
Put Tenants
[Documentation] Send GBP policy to ODL
*** Test Cases ***
Teardown Suite
Log Teardown suite in gbp1
- : FOR ${GBP} IN @{GBPs}
- \ GBP_3node.Teardown Node ${GBP} ${CURDIR} timeout=${timeout}
+ FOR ${GBP} IN @{GBPs}
+ GBP_3node.Teardown Node ${GBP} ${CURDIR} timeout=${timeout}
+ END
Setup Nodes
[Arguments] ${GBPSFCs} ${init_scripts_dir}
${sw_index} Set Variable 0
- : FOR ${GBPSFC} IN @{GBPSFCs}
- \ Setup Node ${GBPSFC} ${sw_index} ${init_scripts_dir} timeout=10s
- \ ${sw_index} Evaluate ${sw_index} + 1
+ FOR ${GBPSFC} IN @{GBPSFCs}
+ Setup Node ${GBPSFC} ${sw_index} ${init_scripts_dir} timeout=10s
+ ${sw_index} Evaluate ${sw_index} + 1
+ END
Create Session session http://${ODL}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Wait Until Keyword Succeeds 10x 30 s Get Data From URI session ${OF_OVERLAY_CONFIG_PATH} headers=${headers}
Delete All Sessions
- : FOR ${GBPSFC} IN @{GBPSFCs}
- \ ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
- \ # TODO if something extra needs to be installed, please do it in virt-env
- \ ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False
- \ Should Be Empty ${stderr}
- \ SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
- \ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout}
- \ Should Be Equal As Numbers ${rc} 0
- \ SSHLibrary.Close Connection
+ FOR ${GBPSFC} IN @{GBPSFCs}
+ ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
+ # TODO if something extra needs to be installed, please do it in virt-env
+ ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False
+ Should Be Empty ${stderr}
+ SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755
+ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout}
+ Should Be Equal As Numbers ${rc} 0
+ SSHLibrary.Close Connection
+ END
Set ODL Variables
Teardown Everything
[Documentation] Clearing remote VM - removing copied scripts.
Log stop_suite_in_6_node
- : FOR ${GBPSFC} IN @{GBPSFCs}
- \ ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
- \ SSHLibrary.Execute Command sudo rm -rf ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}
- \ SSHLibrary.Close Connection
+ FOR ${GBPSFC} IN @{GBPSFCs}
+ ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
+ SSHLibrary.Execute Command sudo rm -rf ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}
+ SSHLibrary.Close Connection
+ END
Register Endpoints
[Documentation] Endpoints registration
@{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_ASYMM_DIR} vethl*.*json absolute
- : FOR ${endpoint_file} IN @{endpoint_files}
- \ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ FOR ${endpoint_file} IN @{endpoint_files}
+ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ END
${resp} RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}
Log ${resp.content}
*** Test Cases ***
Teardown Suite
Log Teardown suite in asymetric-chain
- : FOR ${GBPSFC} IN @{GBPSFCs}
- \ GBPSFC_6node.Teardown Node ${GBPSFC} ${CURDIR} timeout=${timeout}
+ FOR ${GBPSFC} IN @{GBPSFCs}
+ GBPSFC_6node.Teardown Node ${GBPSFC} ${CURDIR} timeout=${timeout}
+ END
Register Endpoints
[Documentation] Endpoints registration
@{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_SYMM_DIR} vethl*.*json absolute
- : FOR ${endpoint_file} IN @{endpoint_files}
- \ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ FOR ${endpoint_file} IN @{endpoint_files}
+ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
+ END
${resp} RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}
Log ${resp.content}
*** Test Cases ***
Teardown Suite
Log Teardown suite in symetric-chain
- : FOR ${GBPSFC} IN @{GBPSFCs}
- \ GBPSFC_6node.Teardown Node ${GBPSFC} ${CURDIR} timeout=${timeout}
+ FOR ${GBPSFC} IN @{GBPSFCs}
+ GBPSFC_6node.Teardown Node ${GBPSFC} ${CURDIR} timeout=${timeout}
+ END
${run_netconf_testtool_manually} BuiltIn.Get_Variable_Value ${run_netconf_testtool_manually} ${False}
${logfile} Utils.Get_Log_File_Name testtool
BuiltIn.Run_Keyword_If ${run_netconf_testtool_manually} BuiltIn.Set_Suite_Variable ${testtool_log} ${logfile}
- : FOR ${ssh_session} IN @{TOOLS_SESSIONS}
- \ SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
- \ BuiltIn.Run_Keyword_Unless ${run_netconf_testtool_manually} Install_And_Start_Testtool device-count=1 debug=false schemas=${IOS_XE_SCHEMAS_FOLDER}
- \ ... mdsal=true
+ FOR ${ssh_session} IN @{TOOLS_SESSIONS}
+ SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
+ BuiltIn.Run_Keyword_Unless ${run_netconf_testtool_manually} Install_And_Start_Testtool device-count=1 debug=false schemas=${IOS_XE_SCHEMAS_FOLDER}
+ ... mdsal=true
+ END
Teardown_Http_And_Netconf
[Documentation] Close http session, close ssh session to tools, stop netconf-testtool
- : FOR ${ssh_session} IN @{TOOLS_SESSIONS}
- \ BuiltIn.Log ${ssh_session}
- \ SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
- \ Stop_Testtool
+ FOR ${ssh_session} IN @{TOOLS_SESSIONS}
+ BuiltIn.Log ${ssh_session}
+ SSHKeywords.Restore_Current_Ssh_Connection_From_Index ${ssh_session}
+ Stop_Testtool
+ END
gbpsxp.Teardown_Ssh_Tooling ${TOOLS_SESSIONS}
RequestsLibrary.Delete_All_Sessions
Prepare_Renderer_Prerequisities
[Documentation] Prepare sfc configurations, connect netconf device
- : FOR ${INDEX} IN RANGE 0 2
- \ BuiltIn.Log ${INDEX}
- \ ${netconf_node_configuration_json} Utils.Json_Parse_From_File ${NETCONF_CONFIG_IOSXE_NODE_FILE}
- \ ${netconf_node_configuration} gbpsxp.Replace_Netconf_Node_Host ${netconf_node_configuration_json} ${IOS_XE_NODE_NAMES[${INDEX}]} ${IOS_XE_IP[${INDEX}]}
- \ BuiltIn.Log ${netconf_node_configuration} level=DEBUG
- \ Utils.Add_Elements_To_URI_And_Verify ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]} ${netconf_node_configuration}
- : FOR ${INDEX} IN RANGE 0 2
- \ BuiltIn.Log ${INDEX}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 30 2 Check_Netconf_Node_Status session ${NETCONF_OPERATIONAL_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 10x 3s TemplatedRequests.Get_From_Uri ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}/yang-ext:mount session=session
+ FOR ${INDEX} IN RANGE 0 2
+ BuiltIn.Log ${INDEX}
+ ${netconf_node_configuration_json} Utils.Json_Parse_From_File ${NETCONF_CONFIG_IOSXE_NODE_FILE}
+ ${netconf_node_configuration} gbpsxp.Replace_Netconf_Node_Host ${netconf_node_configuration_json} ${IOS_XE_NODE_NAMES[${INDEX}]} ${IOS_XE_IP[${INDEX}]}
+ BuiltIn.Log ${netconf_node_configuration} level=DEBUG
+ Utils.Add_Elements_To_URI_And_Verify ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]} ${netconf_node_configuration}
+ END
+ FOR ${INDEX} IN RANGE 0 2
+ BuiltIn.Log ${INDEX}
+ BuiltIn.Wait_Until_Keyword_Succeeds 30 2 Check_Netconf_Node_Status session ${NETCONF_OPERATIONAL_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}
+ BuiltIn.Wait_Until_Keyword_Succeeds 10x 3s TemplatedRequests.Get_From_Uri ${NETCONF_CONFIG_URI}/node/${IOS_XE_NODE_NAMES[${INDEX}]}/yang-ext:mount session=session
+ END
Utils.Add_Elements_To_URI_From_File ${SERVICE_FUNCTIONS_URI} ${SFC_SERVICE_FUNCTIONS_FILE}
&{ip_mgmt_map} BuiltIn.Create_Dictionary SFF1=${TOOLS_SYSTEM_2_IP} SFF2=${TOOLS_SYSTEM_IP}
${sfc_sf_forwarders_json} Utils.Json_Parse_From_File ${SFC_SF_FORWARDERS_FILE}
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${SERVICE_FUNCTION_PATHS_URI}
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${GBP_RENDERER_CONFIG_URI}
# clean netconf-device config (behind mountpoint) and disconnect by removing it from DS/config
- : FOR ${ios_xe_node_name} IN @{IOS_XE_NODE_NAMES}
- \ BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}/${MOUNTPOINT_IOSXE_SUFFIX}
- \ BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}
- : FOR ${ios_xe_node_name} IN @{IOS_XE_NODE_NAMES}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 5 1 Utils.No_Content_From_URI session ${NETCONF_OPERATIONAL_URI}/node/${ios_xe_node_name}
+ FOR ${ios_xe_node_name} IN @{IOS_XE_NODE_NAMES}
+ BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}/${MOUNTPOINT_IOSXE_SUFFIX}
+ BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${NETCONF_CONFIG_URI}/node/${ios_xe_node_name}
+ END
+ FOR ${ios_xe_node_name} IN @{IOS_XE_NODE_NAMES}
+ BuiltIn.Wait_Until_Keyword_Succeeds 5 1 Utils.No_Content_From_URI session ${NETCONF_OPERATIONAL_URI}/node/${ios_xe_node_name}
+ END
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${SXP_EP_PROVIDER_CONFIG_URI}
BuiltIn.Run_Keyword_And_Ignore_Error Utils.Remove_All_Elements_If_Exist ${GBP_TENANT_CONFIG_URI}
... rcn=1, 2, 3, 0 is legal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
${attr} = Set Variable "api":"jb","apn":"jb2","or":"http://hey/you","rr":true
- : FOR ${rcn} IN \ 1 2 3
+ FOR ${rcn} IN \ 1 2 3
... 0
- \ ${r} = Create Resource With Command ${iserver} InCSE1 ${rt_ae} rcn=${rcn}
- \ ... ${attr},"rn":"AeName${rcn}"
+ ${r} = Create Resource With Command ${iserver} InCSE1 ${rt_ae} rcn=${rcn}
+ ... ${attr},"rn":"AeName${rcn}"
+ END
1.10.2 REQ: Create: With Result Content parameter - illegal
[Documentation] NEGATIVE: Tests Create REQ with Result Content parameter set to illegal values.
... rcn=4, 5, 6, 7 is illegal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
${attr} = Set Variable "api":"jb","apn":"jb2","or":"http://hey/you","rr":true
- : FOR ${rcn} IN 4 5 6 7
- \ ${error} = Run Keyword And Expect Error * Create Resource With Command ${iserver} InCSE1
- \ ... ${rt_ae} rcn=${rcn} ${attr}
- \ Should Start with ${error} Cannot create this resource [400]
- \ Should Contain ${error} rcn
+ FOR ${rcn} IN 4 5 6 7
+ ${error} = Run Keyword And Expect Error * Create Resource With Command ${iserver} InCSE1
+ ... ${rt_ae} rcn=${rcn} ${attr}
+ Should Start with ${error} Cannot create this resource [400]
+ Should Contain ${error} rcn
+ END
1.11 REQ: Create: With Event Category parameter
[Documentation] Tests Create REQ with Event Category parameter
[Documentation] Tests Retrieve REQ with Result Content parameter set to legal values.
... rcn=1, 4, 5, 6 null is legal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
- : FOR ${rcn} IN \ 1 4 5
+ FOR ${rcn} IN \ 1 4 5
... 6
- \ ${r} = Retrieve Resource With Command ${iserver} InCSE1/AE1 rcn=${rcn}
- # when rcn=7 can be retrieved
+ ${r} = Retrieve Resource With Command ${iserver} InCSE1/AE1 rcn=${rcn}
+ # when rcn=7 can be retrieved
+ END
2.10.2 REQ: Retrieve: With Result Content parameter - illegal
[Documentation] NEGATIVE: Tests Retrieve REQ with Result Content parameter set to illegal values.
... rcn=0, 2, 3 is illegal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
- : FOR ${rcn} IN 0 2 3
- \ ${error} = Run Keyword And Expect Error * Retrieve Resource With Command ${iserver} InCSE1/AE1
- \ ... rcn=${rcn}
- \ Should Start with ${error} Cannot retrieve this resource [400]
- \ Should Contain ${error} rcn
+ FOR ${rcn} IN 0 2 3
+ ${error} = Run Keyword And Expect Error * Retrieve Resource With Command ${iserver} InCSE1/AE1
+ ... rcn=${rcn}
+ Should Start with ${error} Cannot retrieve this resource [400]
+ Should Contain ${error} rcn
+ END
2.11 REQ: Retrieve: With Event Category parameter
[Documentation] Tests Retrieve REQ with Event Category parameter
... rcn=1, 0/ null is legal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
${attr} = Set Variable "or":"http://hey/you"
- : FOR ${rcn} IN \ 0 1 5
+ FOR ${rcn} IN \ 0 1 5
... 6
- \ ${r} = Update Resource With Command ${iserver} InCSE1/AE1 ${rt_ae} rcn=${rcn}
- \ ... ${attr}
+ ${r} = Update Resource With Command ${iserver} InCSE1/AE1 ${rt_ae} rcn=${rcn}
+ ... ${attr}
+ END
3.10.2 REQ: Update: With Result Content parameter - illegal
[Documentation] NEGATIVE: Tests Update REQ with Result Content parameter set to illegal values.
... rcn=2, 3, 7 is illegal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
${attr} = Set Variable "or":"http://hey/you"
- : FOR ${rcn} IN 2 3 4 7
- \ ${error} = Run Keyword And Expect Error * Update Resource With Command ${iserver} InCSE1/AE1
- \ ... ${rt_ae} rcn=${rcn} ${attr}
- \ Should Start with ${error} Cannot update this resource [400]
- \ Should Contain ${error} rcn
+ FOR ${rcn} IN 2 3 4 7
+ ${error} = Run Keyword And Expect Error * Update Resource With Command ${iserver} InCSE1/AE1
+ ... ${rt_ae} rcn=${rcn} ${attr}
+ Should Start with ${error} Cannot update this resource [400]
+ Should Contain ${error} rcn
+ END
3.11 REQ: Update: With Event Category parameter
[Documentation] Tests Update REQ with Event Category parameter
... rcn=2, 3, 4, 5, 6, 7 is illegal
# TODO: check with TS-0004: 7.5.2 Elements contained in the Content primitive parameter
${attr} = Set Variable "or":"http://hey/you"
- : FOR ${rcn} IN 2 3 4 7
- \ ${error} = Run Keyword And Expect Error * Delete Resource With Command ${iserver} InCSE1/AE1
- \ ... rcn=${rcn}
- \ Should Start with ${error} Cannot delete this resource [400]
- \ Should Contain ${error} rcn
+ FOR ${rcn} IN 2 3 4 7
+ ${error} = Run Keyword And Expect Error * Delete Resource With Command ${iserver} InCSE1/AE1
+ ... rcn=${rcn}
+ Should Start with ${error} Cannot delete this resource [400]
+ Should Contain ${error} rcn
+ END
4.10.2 REQ: Delete: With Result Content parameter - illegal
[Documentation] NEGATIVE: Tests Delete REQ with Result Content parameter set to illegal values.
${attr} = Set Variable "mni":1,"rn":"Container3"
${r}= Create Resource ${iserver} InCSE1 ${rt_container} ${attr}
${container} = Location ${r}
- : FOR ${INDEX} IN RANGE 1 100
- \ Latest Con Test ${container}
+ FOR ${INDEX} IN RANGE 1 100
+ Latest Con Test ${container}
+ END
Delete the test Container1
[Documentation] Delete the test Container1
${container3} = Location ${r}
Response Is Correct ${r}
${attr} = Set Variable "cnf": "1","or": "http://hey/you","con":"101"
- : FOR ${conName} IN conIn1 conIn2 conIn3
- \ ${r} = Create Resource ${iserver} ${container1} ${rt_contentInstance} ${attr},"rn":${conName}
- \ Response Is Correct ${r}
- : FOR ${conName} IN conIn1 conIn2 conIn3
- \ ${r} = Create Resource ${iserver} ${container2} ${rt_contentInstance} ${attr},"rn":${conName}
- \ Response Is Correct ${r}
- : FOR ${conName} IN conIn1 conIn2 conIn3
- \ ${r} = Create Resource ${iserver} ${container3} ${rt_contentInstance} ${attr},"rn":${conName}
- \ Response Is Correct ${r}
- # ----------- Delete the parent AE --------------
+ FOR ${conName} IN conIn1 conIn2 conIn3
+ ${r} = Create Resource ${iserver} ${container1} ${rt_contentInstance} ${attr},"rn":${conName}
+ Response Is Correct ${r}
+ END
+ FOR ${conName} IN conIn1 conIn2 conIn3
+ ${r} = Create Resource ${iserver} ${container2} ${rt_contentInstance} ${attr},"rn":${conName}
+ Response Is Correct ${r}
+ END
+ FOR ${conName} IN conIn1 conIn2 conIn3
+ ${r} = Create Resource ${iserver} ${container3} ${rt_contentInstance} ${attr},"rn":${conName}
+ Response Is Correct ${r}
+ # ----------- Delete the parent AE --------------
+ END
${r} = Delete Resource ${iserver} InCSE1/AE1
Response Is Correct ${r}
# Delete the resource that does not exist/has been deleted should return error
${container3} = Location ${r}
Response Is Correct ${r}
${attr} = Set Variable "cnf": "1","or": "http://hey/you","con":"101"
- : FOR ${conName} IN conIn1 conIn2 conIn3
- \ ${r} = Create Resource ${iserver} ${container1} ${rt_contentInstance} ${attr},"rn":${conName}
- \ Response Is Correct ${r}
- : FOR ${conName} IN conIn1 conIn2 conIn3
- \ ${r} = Create Resource ${iserver} ${container2} ${rt_contentInstance} ${attr},"rn":${conName}
- \ Response Is Correct ${r}
- : FOR ${conName} IN conIn1 conIn2 conIn3
- \ ${r} = Create Resource ${iserver} ${container3} ${rt_contentInstance} ${attr},"rn":${conName}
- \ Response Is Correct ${r}
- # ----------- Delete the parent Container --------------
+ FOR ${conName} IN conIn1 conIn2 conIn3
+ ${r} = Create Resource ${iserver} ${container1} ${rt_contentInstance} ${attr},"rn":${conName}
+ Response Is Correct ${r}
+ END
+ FOR ${conName} IN conIn1 conIn2 conIn3
+ ${r} = Create Resource ${iserver} ${container2} ${rt_contentInstance} ${attr},"rn":${conName}
+ Response Is Correct ${r}
+ END
+ FOR ${conName} IN conIn1 conIn2 conIn3
+ ${r} = Create Resource ${iserver} ${container3} ${rt_contentInstance} ${attr},"rn":${conName}
+ Response Is Correct ${r}
+ # ----------- Delete the parent Container --------------
+ END
${r} = Delete Resource ${iserver} InCSE1/Con1
Response Is Correct ${r}
# Delete the resource that does not exist/has been deleted should return error
[Arguments] ${numnodes}
${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ Should Contain ${resp.content} openflow:${IND}
+ FOR ${IND} IN RANGE 1 ${numnodes+1}
+ Should Contain ${resp.content} openflow:${IND}
+ END
Check Every Nodes Stats
[Arguments] ${numnodes}
- : FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} flow-capable-node-connector-statistics
- \ Should Contain ${resp.content} flow-table-statistics
+ FOR ${IND} IN RANGE 1 ${numnodes+1}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} flow-capable-node-connector-statistics
+ Should Contain ${resp.content} flow-table-statistics
+ END
Check Every Nodes Nodeconnector
[Arguments] ${numnodes}
- : FOR ${IND} IN RANGE 2 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+ FOR ${IND} IN RANGE 2 ${numnodes+1}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+ END
Check conn loop
[Arguments] ${arg} ${outerind} ${content}
- : FOR ${var} IN RANGE 1 ${arg+1}
- \ Should Contain ${content} openflow:${outerind}:${var}
+ FOR ${var} IN RANGE 1 ${arg+1}
+ Should Contain ${content} openflow:${outerind}:${var}
+ END
${start}= BuiltIn.Convert to Integer ${MIN_HOSTS}
${stop}= BuiltIn.Convert to Integer ${MAX_HOSTS}
${step}= BuiltIn.Convert to Integer ${STEP_HOSTS}
- : FOR ${hosts} IN RANGE ${start} ${stop+1} ${step}
- \ ${status} ${error_message} ${host_discover_time} WorkflowsL2switch.Workflow Single Switch Multiple Hosts ${hosts}
- \ BuiltIn.Exit For Loop If '${status}' == 'FAIL'
- \ ${maximum_hosts}= BuiltIn.Set variable ${hosts}
- \ ${discover_time}= BuiltIn.Set Variable ${host_discover_time}
+ FOR ${hosts} IN RANGE ${start} ${stop+1} ${step}
+ ${status} ${error_message} ${host_discover_time} WorkflowsL2switch.Workflow Single Switch Multiple Hosts ${hosts}
+ BuiltIn.Exit For Loop If '${status}' == 'FAIL'
+ ${maximum_hosts}= BuiltIn.Set variable ${hosts}
+ ${discover_time}= BuiltIn.Set Variable ${host_discover_time}
+ END
BuiltIn.Log to console ${\n}
BuiltIn.Log To Console Execution stopped because: ${error_message}
BuiltIn.Log To Console Max Hosts: ${maximum_hosts}
SSHLibrary.Get_File settings.xml
${root} = XML.Parse_Xml settings.xml
${profiles} = Xml.Get_Elements ${root} xpath=profiles/profile
- : FOR ${profile} IN @{profiles}
- \ ${id} = XML.Get_Element_Text ${profile} xpath=id
- \ BuiltIn.Exit_For_Loop_If "${id}" == "opendaylight-release"
+ FOR ${profile} IN @{profiles}
+ ${id} = XML.Get_Element_Text ${profile} xpath=id
+ BuiltIn.Exit_For_Loop_If "${id}" == "opendaylight-release"
+ END
BuiltIn.Should_Be_Equal_As_Strings ${id} opendaylight-release
${profile} = Xml.Copy_Element ${profile}
XML.Set_Element_Text ${profile} opendaylight-autorelease xpath=id
Check_Netconf_Topology_Ready
[Documentation] Verifies the netconf readiness for every odl node.
- : FOR ${idx} IN @{ClusterManagement__member_index_list}
- \ Verify_Netconf_Topology_Ready_For_Node ${idx}
+ FOR ${idx} IN @{ClusterManagement__member_index_list}
+ Verify_Netconf_Topology_Ready_For_Node ${idx}
+ END
Verify_Netconf_Topology_Ready_For_Node
[Arguments] ${node_index}
Configure_Netconf_Device ${DEVICE_NAME} ${session} ${ODL_SYSTEM_${node_index}_IP}
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME}
Wait_Netconf_Device_Mounted ${DEVICE_NAME} ${session} ${mapping}
- : FOR ${idx} IN @{ClusterManagement__member_index_list}
- \ ${mod_session}= ClusterManagement.Resolve_Http_Session_For_Member member_index=${idx}
- \ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Xml_Templated ${NETCONF_FOLDER}${/}netconf-state mapping=${mapping}
- \ ... session=${mod_session}
+ FOR ${idx} IN @{ClusterManagement__member_index_list}
+ ${mod_session}= ClusterManagement.Resolve_Http_Session_For_Member member_index=${idx}
+ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Xml_Templated ${NETCONF_FOLDER}${/}netconf-state mapping=${mapping}
+ ... session=${mod_session}
+ END
[Teardown] Remove_Netconf_Device ${DEVICE_NAME} ${session}
Configure_Netconf_Device
SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP}
SSHKeywords.Flexible_Mininet_Login
SSHLibrary.Write python getter.py --odladdress=${ODL_SYSTEM_IP} --count=${DEVICE_COUNT} --name=${device_name_base} --workers=${WORKER_COUNT}
- : FOR ${number} IN RANGE 1 ${DEVICE_COUNT}+1
- \ Read_Python_Tool_Operation_Result ${number}
+ FOR ${number} IN RANGE 1 ${DEVICE_COUNT}+1
+ Read_Python_Tool_Operation_Result ${number}
+ END
SSHLibrary.Read_Until_Prompt
SSHLibrary.Close_Connection
SSHKeywords.Restore Current SSH Connection From Index ${current_ssh_connection.index}
${stop} = BuiltIn.Convert to Integer ${MAX_DEVICE_COUNT}
${increment} = BuiltIn.Convert to Integer ${DEVICE_INCREMENT}
Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
- : FOR ${devices} IN RANGE ${start} ${stop+1} ${increment}
- \ ${timeout} = BuiltIn.Evaluate ${devices}*${TIMEOUT_FACTOR}
- \ Log To Console Starting Iteration with ${devices} devices
- \ Run Keyword If "${INSTALL_TESTTOOL}"=="True" NetconfKeywords.Install_And_Start_Testtool device-count=${devices}
- \ ... ELSE NetconfKeywords.Start_Testtool ${TESTTOOL_EXECUTABLE} device-count=${devices}
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Configure_Device timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Wait_Connected timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error Issue_Requests_On_Devices ${TOOLS_SYSTEM_IP} ${devices}
- \ ... ${NUM_WORKERS}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Wait_Connected timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Deconfigure_Device timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Check_Device_Deconfigured timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${maximum_devices} = Set Variable ${devices}
- \ Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
- \ NetconfKeywords.Stop_Testtool
+ FOR ${devices} IN RANGE ${start} ${stop+1} ${increment}
+ ${timeout} = BuiltIn.Evaluate ${devices}*${TIMEOUT_FACTOR}
+ Log To Console Starting Iteration with ${devices} devices
+ Run Keyword If "${INSTALL_TESTTOOL}"=="True" NetconfKeywords.Install_And_Start_Testtool device-count=${devices}
+ ... ELSE NetconfKeywords.Start_Testtool ${TESTTOOL_EXECUTABLE} device-count=${devices}
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Configure_Device timeout=${timeout}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Wait_Connected timeout=${timeout}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error Issue_Requests_On_Devices ${TOOLS_SYSTEM_IP} ${devices}
+ ... ${NUM_WORKERS}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Wait_Connected timeout=${timeout}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Deconfigure_Device timeout=${timeout}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Check_Device_Deconfigured timeout=${timeout}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${maximum_devices} = Set Variable ${devices}
+ Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
+ NetconfKeywords.Stop_Testtool
+ END
[Teardown] Run Keywords NetconfKeywords.Stop_Testtool
... AND Collect_Data_Points ${maximum_devices}
... AND Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
SSHLibrary.Open_Connection ${client_ip}
SSHKeywords.Flexible_Mininet_Login
SSHLibrary.Write python getter.py --odladdress=${ODL_SYSTEM_IP} --count=${expected_count} --name=${device_name_base} --workers=${worker_count}
- : FOR ${number} IN RANGE 1 ${expected_count}+1
- \ Read_Python_Tool_Operation_Result ${number}
+ FOR ${number} IN RANGE 1 ${expected_count}+1
+ Read_Python_Tool_Operation_Result ${number}
+ END
SSHLibrary.Read_Until_Prompt
SSHLibrary.Close_Connection
SSHKeywords.Restore Current SSH Connection From Index ${current_ssh_connection.index}
Verify Datapath After OVS Restart
[Documentation] Verify datapath after OVS restart
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ OVSDB.Restart OVSDB ${ip}
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ BuiltIn.Wait Until Keyword Succeeds 30s 10s OVSDB.Verify OVS Reports Connected tools_system=${ip}
+ FOR ${ip} IN @{OS_CMP_IPS}
+ OVSDB.Restart OVSDB ${ip}
+ END
+ FOR ${ip} IN @{OS_CMP_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s OVSDB.Verify OVS Reports Connected tools_system=${ip}
+ END
${smac_cn1} = BuiltIn.Create List @{NET_1_MACS}[0]
${smac_cn2} = BuiltIn.Create List @{NET_1_MACS}[1]
BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify Flows Are Present For ELAN Service ${OS_CMP1_IP} ${smac_cn1} ${NET_1_MACS}
Delete All elan_net_1 VM And Verify Flow Table Updated
[Documentation] Verify Flow table after all VM instance deleted
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Verify Flows Are Removed For ELAN Service On All compute Nodes ${NET_1_MACS}
Verify Datapath for Multiple ELAN with Multiple DPN
BuiltIn.Should Contain ${flow_output} table=${ELAN_SMACTABLE}
${smac_output} = String.Get Lines Containing String ${flow_output} table=${ELAN_SMACTABLE}
Builtin.Log ${smac_output}
- : FOR ${smac} IN @{smacs}
- \ ${resp} = BuiltIn.Should Contain ${smac_output} ${smac}
+ FOR ${smac} IN @{smacs}
+ ${resp} = BuiltIn.Should Contain ${smac_output} ${smac}
+ END
BuiltIn.Should Contain ${flow_output} table=${ELAN_DMACTABLE}
${dmac_output} = String.Get Lines Containing String ${flow_output} table=${ELAN_DMACTABLE}
Builtin.Log ${dmac_output}
- : FOR ${dmac} IN @{dmacs}
- \ ${resp} = BuiltIn.Should Contain ${dmac_output} ${dmac}
+ FOR ${dmac} IN @{dmacs}
+ ${resp} = BuiltIn.Should Contain ${dmac_output} ${dmac}
+ END
BuiltIn.Should Contain ${flow_output} table=${ELAN_UNKNOWNMACTABLE}
${smac_output} = String.Get Lines Containing String ${flow_output} table=${ELAN_UNKNOWNMACTABLE}
Builtin.Log ${smac_output}
BuiltIn.Should Contain ${flow_output} table=${ELAN_SMACTABLE}
${smac_output} = String.Get Lines Containing String ${flow_output} table=${ELAN_SMACTABLE}
Builtin.Log ${smac_output}
- : FOR ${smac} IN @{smacs}
- \ ${resp} = BuiltIn.Should Not Contain ${smac_output} ${smac}
+ FOR ${smac} IN @{smacs}
+ ${resp} = BuiltIn.Should Not Contain ${smac_output} ${smac}
+ END
BuiltIn.Should Contain ${flow_output} table=${ELAN_DMACTABLE}
${dmac_output} = String.Get Lines Containing String ${flow_output} table=${ELAN_DMACTABLE}
Builtin.Log ${dmac_output}
- : FOR ${dmac} IN @{smacs}
- \ ${resp} = BuiltIn.Should Not Contain ${dmac_output} ${dmac}
+ FOR ${dmac} IN @{smacs}
+ ${resp} = BuiltIn.Should Not Contain ${dmac_output} ${dmac}
+ END
Verify Flows Are Removed For ELAN Service On All compute Nodes
[Arguments] ${smacs}
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${ip} ${smacs}
+ FOR ${ip} IN @{OS_CMP_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${ip} ${smacs}
+ END
Create Neutron Ports
[Documentation] Create required number of ports under previously created subnets
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
- \ OpenStackOperations.Create Port ${REQ_NETWORK} @{PORT_LIST}[${index}] sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Port ${REQ_NETWORK} @{PORT_LIST}[${index + 2}] sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
+ OpenStackOperations.Create Port ${REQ_NETWORK} @{PORT_LIST}[${index}] sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Port ${REQ_NETWORK} @{PORT_LIST}[${index + 2}] sg=${SECURITY_GROUP}
+ END
@{PORT_MAC_ADDR} = OpenStackOperations.Get Ports MacAddr ${PORT_LIST}
BuiltIn.Set Suite Variable @{PORT_MAC_ADDR}
Create Nova VMs
[Arguments] ${num_of_vms_per_dpn}
[Documentation] Create Vm instances on compute nodes
- : FOR ${index} IN RANGE 0 ${num_of_vms_per_dpn}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index}] @{NET_1_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index + 2}] @{NET_2_VMS}[${index}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 ${num_of_vms_per_dpn}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index}] @{NET_1_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index + 2}] @{NET_2_VMS}[${index}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ END
@{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
@{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
[Documentation] Creating subnet host route via openstack cli and verifying in controller and openstack.
OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDR}[0]${PREFIX24} --host-route destination=@{SUBNET_CIDR}[2]${PREFIX24},gateway=${NON_NEUTRON_NEXTHOP}
${SUBNET_GW_IP} BuiltIn.Create List
- : FOR ${subnet} IN @{SUBNETS}
- \ ${ip} = OpenStackOperations.Get Subnet Gateway Ip ${subnet}
- \ Collections.Append To List ${SUBNET_GW_IP} ${ip}
+ FOR ${subnet} IN @{SUBNETS}
+ ${ip} = OpenStackOperations.Get Subnet Gateway Ip ${subnet}
+ Collections.Append To List ${SUBNET_GW_IP} ${ip}
+ END
BuiltIn.Set Suite Variable ${SUBNET_GW_IP}
${elements} = BuiltIn.Create List "destination":"@{SUBNET_CIDR}[2]${PREFIX24}","nexthop":"${NON_NEUTRON_NEXTHOP}"
BuiltIn.Wait Until Keyword Succeeds 30s 5s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${elements}
[Documentation] Creates initial setup.
VpnOperations.Basic Suite Setup
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
- : FOR ${i} IN RANGE 1 4
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDR}[${i}]${PREFIX24}
- \ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{PORTS}[${i}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[${i}] @{NETWORK_${i+1}_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{PORTS}[${i+3}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[${i+3}] @{NETWORK_${i+1}_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{GATEWAY_PORTS}[${i}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
- \ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{GATEWAY_PORTS}[${i+3}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
+ FOR ${i} IN RANGE 1 4
+ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDR}[${i}]${PREFIX24}
+ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{PORTS}[${i}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[${i}] @{NETWORK_${i+1}_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{PORTS}[${i+3}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[${i+3}] @{NETWORK_${i+1}_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{GATEWAY_PORTS}[${i}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+ OpenStackOperations.Create Port @{NETWORKS}[${i}] @{GATEWAY_PORTS}[${i+3}] sg=${SECURITY_GROUP} allowed_address_pairs=${ALLOWED_ADDRESS_PAIR}
+ END
@{NETWORK_2_VM_IPS} ${NETWORK_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NETWORK_2_VMS}
BuiltIn.Set Suite Variable @{NETWORK_2_VM_IPS}
@{NETWORK_3_VM_IPS} ${NETWORK_3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NETWORK_3_VMS}
[Arguments] ${subnet_name} @{elements}
[Documentation] Show subnet with openstack request and verifies given hostroute in subnet.
${output} = OpenStackOperations.Show SubNet ${subnet_name}
- : FOR ${element} IN @{elements}
- \ BuiltIn.Should Match Regexp ${output} ${element}
+ FOR ${element} IN @{elements}
+ BuiltIn.Should Match Regexp ${output} ${element}
+ END
Verify No Hostroutes In Subnet
[Arguments] ${subnet_name} @{elements}
[Documentation] Show subnet with openstack request and verifies no given hostroute in subnet.
${output} = OpenStackOperations.Show SubNet ${subnet_name}
- : FOR ${element} IN @{elements}
- \ BuiltIn.Should Not Match Regexp ${output} ${element}
+ FOR ${element} IN @{elements}
+ BuiltIn.Should Not Match Regexp ${output} ${element}
+ END
Create Neutron Networks
[Arguments] ${NUM_OF_NETWORK}
[Documentation] Create required number of networks
- : FOR ${NET} IN @{REQ_NETWORKS}
- \ OpenStackOperations.Create Network ${NET}
+ FOR ${NET} IN @{REQ_NETWORKS}
+ OpenStackOperations.Create Network ${NET}
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${REQ_NETWORKS}
Create Neutron Subnets
[Arguments] ${NUM_OF_NETWORK}
[Documentation] Create required number of subnets for previously created networks
- : FOR ${index} IN RANGE 0 ${NUM_OF_NETWORK}
- \ OpenStackOperations.Create SubNet ${REQ_NETWORKS[${index}]} ${REQ_SUBNETS[${index}]} ${REQ_SUBNET_CIDR[${index}]}
+ FOR ${index} IN RANGE 0 ${NUM_OF_NETWORK}
+ OpenStackOperations.Create SubNet ${REQ_NETWORKS[${index}]} ${REQ_SUBNETS[${index}]} ${REQ_SUBNET_CIDR[${index}]}
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${REQ_SUBNETS}
Create Neutron Ports
[Documentation] Create required number of ports under previously created subnets
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
- \ OpenStackOperations.Create Port @{REQ_NETWORKS}[${index}] @{PORT_LIST}[${index}] sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Port @{REQ_NETWORKS}[${index}] @{PORT_LIST}[${index + 2}] sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
+ OpenStackOperations.Create Port @{REQ_NETWORKS}[${index}] @{PORT_LIST}[${index}] sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Port @{REQ_NETWORKS}[${index}] @{PORT_LIST}[${index + 2}] sg=${SECURITY_GROUP}
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${PORT_URL} ${PORT_LIST}
Create Nova VMs
[Arguments] ${NUM_OF_VMS_PER_DPN}
[Documentation] Create Vm instances on compute nodes
- : FOR ${index} IN RANGE 0 ${NUM_OF_VMS_PER_DPN}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node ${PORT_LIST[${index}]} ${VM_NAMES[${index}]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 ${NUM_OF_VMS_PER_DPN}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node ${PORT_LIST[${index}]} ${VM_NAMES[${index}]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ END
${start} = Evaluate ${index}+1
${NUM_OF_VMS_PER_DPN} = Evaluate ${start}+${NUM_OF_VMS_PER_DPN}
- : FOR ${index} IN RANGE ${start} ${NUM_OF_VMS_PER_DPN}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node ${PORT_LIST[${index}]} ${VM_NAMES[${index}]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE ${start} ${NUM_OF_VMS_PER_DPN}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node ${PORT_LIST[${index}]} ${VM_NAMES[${index}]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ END
@{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
@{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
Add Interfaces To Routers
[Documentation] Add Multiple Interfaces to Router and Verify
- : FOR ${INTERFACE} IN @{REQ_SUBNETS}
- \ OpenStackOperations.Add Router Interface ${REQ_ROUTER} ${INTERFACE}
+ FOR ${INTERFACE} IN @{REQ_SUBNETS}
+ OpenStackOperations.Add Router Interface ${REQ_ROUTER} ${INTERFACE}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${REQ_ROUTER}
- : FOR ${INTERFACE} IN @{REQ_SUBNETS}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
- \ BuiltIn.Should Contain ${interface_output} ${subnet_id}
+ FOR ${INTERFACE} IN @{REQ_SUBNETS}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
+ BuiltIn.Should Contain ${interface_output} ${subnet_id}
+ END
Verify Flows Are Present For ARP
[Arguments] ${arp_op_code} ${additional_args}=${EMPTY}
Verify CSC supports CLI for max path configuration
[Documentation] Verify CSC supports CLI for max path configuration
- : FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
- \ VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[${idx}] vpnid=@{VPN_ID}[${idx}] rd=@{L3VPN_RD_IRT_ERT}[${idx}] exportrt=@{L3VPN_RD_IRT_ERT}[${idx}] importrt=@{L3VPN_RD_IRT_ERT}[${idx}]
+ FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
+ VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[${idx}] vpnid=@{VPN_ID}[${idx}] rd=@{L3VPN_RD_IRT_ERT}[${idx}] exportrt=@{L3VPN_RD_IRT_ERT}[${idx}] importrt=@{L3VPN_RD_IRT_ERT}[${idx}]
+ END
VpnOperations.Verify L3VPN On ODL @{VPN_ID}
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
- \ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
- : FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
- \ Configure Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[${idx}]
- \ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[${idx}]
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ END
+ FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
+ Configure Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[${idx}]
+ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[${idx}]
+ END
BuiltIn.Wait Until Keyword Succeeds 60s 10s BgpOperations.Check BGP VPNv4 Nbr On ODL ${NUM_OF_DCGW} False
Verify max-path error message with invalid inputs
[Documentation] Verify max path error message while configuring maxpath with invalid range
VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[0] vpnid=@{VPN_ID}[0] rd=@{L3VPN_RD_IRT_ERT}[0] exportrt=@{L3VPN_RD_IRT_ERT}[0] importrt=@{L3VPN_RD_IRT_ERT}[0]
VpnOperations.Verify L3VPN On ODL @{VPN_ID}[0]
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
- \ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
- : FOR ${invalid} IN @{MAX_PATH_INVALID_LIST}
- \ Configure Maxpath ${invalid} @{DCGW_RD_IRT_ERT}[0]
- \ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath ${invalid} @{DCGW_RD_IRT_ERT}[0]
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ END
+ FOR ${invalid} IN @{MAX_PATH_INVALID_LIST}
+ Configure Maxpath ${invalid} @{DCGW_RD_IRT_ERT}[0]
+ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath ${invalid} @{DCGW_RD_IRT_ERT}[0]
+ END
BuiltIn.Wait Until Keyword Succeeds 60s 10s BgpOperations.Check BGP VPNv4 Nbr On ODL ${NUM_OF_DCGW} False
Verify ODL supports dynamic configuration changes for max path value
VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[0] vpnid=@{VPN_ID}[0] rd=@{L3VPN_RD_IRT_ERT}[0] exportrt=@{L3VPN_RD_IRT_ERT}[0] importrt=@{L3VPN_RD_IRT_ERT}[0]
VpnOperations.Verify L3VPN On ODL @{VPN_ID}[0]
VpnOperations.Associate VPN to Router routerid=@{router_id_list}[0] vpnid=@{VPN_ID}[0]
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
- \ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ END
Configure Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[0]
BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[0]
- : FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
- \ BgpOperations.Add Routes On DCGW @{DCGW_IP_LIST}[${idx}] @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0] @{LABEL}[${idx}]
+ FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
+ BgpOperations.Add Routes On DCGW @{DCGW_IP_LIST}[${idx}] @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0] @{LABEL}[${idx}]
+ END
BuiltIn.Wait Until Keyword Succeeds 60s 10s BgpOperations.Check BGP VPNv4 Nbr On ODL ${NUM_OF_DCGW}
BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify Routing Entry On ODL @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0] @{NUM_OF_ROUTES}[2]
BuiltIn.Wait Until Keyword Succeeds 30s 5s Verify FIB Entry On ODL @{NETWORK_IP}[0] @{NUM_OF_ROUTES}[2]
- : FOR ${index} IN RANGE 0 3
- \ Configure Maxpath @{MAX_PATH_LIST}[${index}] @{DCGW_RD_IRT_ERT}[0]
- \ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath @{MAX_PATH_LIST}[${index}] @{DCGW_RD_IRT_ERT}[0]
- \ BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify Routing Entry On ODL @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0]
- \ ... @{NUM_OF_ROUTES}[2]
- \ BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify FIB Entry On ODL @{NETWORK_IP}[0] @{NUM_OF_ROUTES}[${index}]
+ FOR ${index} IN RANGE 0 3
+ Configure Maxpath @{MAX_PATH_LIST}[${index}] @{DCGW_RD_IRT_ERT}[0]
+ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath @{MAX_PATH_LIST}[${index}] @{DCGW_RD_IRT_ERT}[0]
+ BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify Routing Entry On ODL @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0]
+ ... @{NUM_OF_ROUTES}[2]
+ BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify FIB Entry On ODL @{NETWORK_IP}[0] @{NUM_OF_ROUTES}[${index}]
+ END
Verify that ECMP path gets withdrawn by QBGP after disabling multipath
[Documentation] Verify that ECMP path gets withdrawn by QBGP after disabling multipath by setting multipath value to 1
VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[0] vpnid=@{VPN_ID}[0] rd=@{L3VPN_RD_IRT_ERT}[0] exportrt=@{L3VPN_RD_IRT_ERT}[0] importrt=@{L3VPN_RD_IRT_ERT}[0]
VpnOperations.Verify L3VPN On ODL @{VPN_ID}[0]
VpnOperations.Associate VPN to Router routerid=@{router_id_list}[0] vpnid=@{VPN_ID}[0]
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
- \ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BgpOperations.Create L3VPN on DCGW ${dcgw} ${AS_ID} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ BgpOperations.Verify L3VPN On DCGW ${dcgw} @{VPN_NAME}[0] @{DCGW_RD_IRT_ERT}[0]
+ END
Configure Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[0]
BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Maxpath @{MAX_PATH_LIST}[2] @{DCGW_RD_IRT_ERT}[0]
- : FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
- \ BgpOperations.Add Routes On DCGW @{DCGW_IP_LIST}[${idx}] @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0] @{LABEL}[${idx}]
+ FOR ${idx} IN RANGE ${START_VALUE} ${NUM_OF_DCGW}
+ BgpOperations.Add Routes On DCGW @{DCGW_IP_LIST}[${idx}] @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0] @{LABEL}[${idx}]
+ END
BuiltIn.Wait Until Keyword Succeeds 60s 10s BgpOperations.Check BGP VPNv4 Nbr On ODL ${NUM_OF_DCGW}
BuiltIn.Wait Until Keyword Succeeds 60s 10s Verify Routing Entry On ODL @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0] @{NUM_OF_ROUTES}[2]
BuiltIn.Wait Until Keyword Succeeds 30s 5s Verify FIB Entry On ODL @{NETWORK_IP}[0] @{NUM_OF_ROUTES}[2]
Test Cleanup
[Documentation] Posttest case cleanup
- : FOR ${l3vpn_rd} IN @{DCGW_RD_IRT_ERT}
- \ Configure Maxpath @{MAX_PATH_LIST}[0] ${l3vpn_rd}
- : FOR ${vpn} IN @{VPN_ID}
- \ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=${vpn}
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BuiltIn.Run Keyword And Ignore Error BgpOperations.Delete L3VPN on DCGW ${dcgw} ${AS_ID} ${VPN_NAME}
+ FOR ${l3vpn_rd} IN @{DCGW_RD_IRT_ERT}
+ Configure Maxpath @{MAX_PATH_LIST}[0] ${l3vpn_rd}
+ END
+ FOR ${vpn} IN @{VPN_ID}
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=${vpn}
+ END
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BuiltIn.Run Keyword And Ignore Error BgpOperations.Delete L3VPN on DCGW ${dcgw} ${AS_ID} ${VPN_NAME}
+ END
Create Setup
[Documentation] Starting BGP process on each DCGW and ODL
... Verifying BGP neighbor session status
... Creating 3 networks, 3 subnets, one router
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BgpOperations.Start Quagga Processes On DCGW ${dcgw}
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BgpOperations.Start Quagga Processes On DCGW ${dcgw}
+ END
BgpOperations.Start Quagga Processes On ODL ${ODL_SYSTEM_IP}
KarafKeywords.Issue Command On Karaf Console ${BGP_CONFIG_SERVER_CMD}
BgpOperations.Create BGP Configuration On ODL localas=${AS_ID} routerid=${ODL_SYSTEM_IP}
- : FOR ${dcgw} IN @{DCGW_IP_LIST}
- \ BgpOperations.AddNeighbor To BGP Configuration On ODL remoteas=${AS_ID} neighborAddr=${dcgw}
- \ ${output} = BgpOperations.Get BGP Configuration On ODL session
- \ BuiltIn.Should Contain ${output} ${dcgw}
- \ BgpOperations.Configure BGP And Add Neighbor On DCGW ${dcgw} ${AS_ID} ${dcgw} ${ODL_SYSTEM_IP} @{VPN_NAME}[0]
- \ ... @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0]
- \ BuiltIn.Wait Until Keyword Succeeds 120s 20s BgpOperations.Verify BGP Neighbor Status On Quagga ${dcgw} ${ODL_SYSTEM_IP}
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
+ FOR ${dcgw} IN @{DCGW_IP_LIST}
+ BgpOperations.AddNeighbor To BGP Configuration On ODL remoteas=${AS_ID} neighborAddr=${dcgw}
+ ${output} = BgpOperations.Get BGP Configuration On ODL session
+ BuiltIn.Should Contain ${output} ${dcgw}
+ BgpOperations.Configure BGP And Add Neighbor On DCGW ${dcgw} ${AS_ID} ${dcgw} ${ODL_SYSTEM_IP} @{VPN_NAME}[0]
+ ... @{DCGW_RD_IRT_ERT}[0] @{NETWORK_IP}[0]
+ BuiltIn.Wait Until Keyword Succeeds 120s 20s BgpOperations.Verify BGP Neighbor Status On Quagga ${dcgw} ${ODL_SYSTEM_IP}
+ END
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
BuiltIn.Wait Until Keyword Succeeds 10s 2s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
- : FOR ${index} IN RANGE 0 3
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDR}[${index}]
+ FOR ${index} IN RANGE 0 3
+ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDR}[${index}]
+ END
BuiltIn.Wait Until Keyword Succeeds 10s 2s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
${router_id_list} BuiltIn.Create List @{EMPTY}
- : FOR ${router} IN @{ROUTERS}
- \ OpenStackOperations.Create Router ${router}
- \ ${router_id} = OpenStackOperations.Get Router Id ${router}
- \ Collections.Append To List ${router_id_list} ${router_id}
+ FOR ${router} IN @{ROUTERS}
+ OpenStackOperations.Create Router ${router}
+ ${router_id} = OpenStackOperations.Get Router Id ${router}
+ Collections.Append To List ${router_id_list} ${router_id}
+ END
BuiltIn.Set Suite Variable ${router_id_list}
- : FOR ${index} IN RANGE 0 3
- \ OpenStackOperations.Add Router Interface @{ROUTERS}[${index}] @{SUBNETS}[${index}]
- \ ${output} = OpenStackOperations.Show Router Interface @{ROUTERS}[${index}]
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id @{SUBNETS}[${index}]
- \ BuiltIn.Should Contain ${output} ${subnet_id}
+ FOR ${index} IN RANGE 0 3
+ OpenStackOperations.Add Router Interface @{ROUTERS}[${index}] @{SUBNETS}[${index}]
+ ${output} = OpenStackOperations.Show Router Interface @{ROUTERS}[${index}]
+ ${subnet_id} = OpenStackOperations.Get Subnet Id @{SUBNETS}[${index}]
+ BuiltIn.Should Contain ${output} ${subnet_id}
+ END
Configure Multipath On ODL
[Arguments] ${setting}
BuiltIn.Wait Until Keyword Succeeds 30s 10s Utils.Check For Elements At URI ${FIB_ENTRY_URL} ${SUBNET_CIDRS}
OpenStackOperations.Create Network ${NET}
${length} = BuiltIn.Get Length ${REQ_SUBNETS_PREFIX}
- : FOR ${idx} IN RANGE ${length}
- \ OpenStackOperations.Create SubNet ${NET} @{REQ_SUBNETS_PREFIX}[${idx}] @{REQ_PREFIXLENGTHS}[${idx}]
+ FOR ${idx} IN RANGE ${length}
+ OpenStackOperations.Create SubNet ${NET} @{REQ_SUBNETS_PREFIX}[${idx}] @{REQ_PREFIXLENGTHS}[${idx}]
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${REQ_SUBNETS_PREFIX}
${net_id} = OpenStackOperations.Get Net Id ${NET}
VpnOperations.Associate L3VPN To Network networkid=${net_id} vpnid=@{VPN_INSTANCE_IDS}[0]
Verification Of Route Download With Three Vpns In SE And Qbgp With One-One Export Import Route Target
[Documentation] Check the datapath traffic with one-one export import route target with three vpns.
Create Multiple L3VPN @{NETWORKS}[0] ${3}
- : FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
- \ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
- \ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
+ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
+ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ END
VpnOperations.Associate L3VPNs To Networks ${VPN_INSTANCE_IDS} ${NETWORKS}
${fib_values} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{NET_3_VM_IPS} @{SUBNET_CIDRS} @{LOOPBACK_IPS}
BuiltIn.Wait Until Keyword Succeeds 30s 10s Utils.Check For Elements At URI ${FIB_ENTRY_URL} ${fib_values}
Verification Of Route Download With Three Vpns In SE And Qbgp With One-Many Export Import Route Target
[Documentation] Check the datapath traffic with one-many export import route target with three vpns.
VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] name=@{VPN_NAMES}[0] rd=@{RDS}[0] exportrt=${CREATE_RT} importrt=@{RDS}[0]
- : FOR ${index} IN RANGE 1 ${NUM_OF_L3VPN}
- \ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}] rd=@{RDS}[${index}] exportrt=@{RDS}[${index}] importrt=${RT_LIST_${index}}
- : FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
- \ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
- \ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ FOR ${index} IN RANGE 1 ${NUM_OF_L3VPN}
+ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}] rd=@{RDS}[${index}] exportrt=@{RDS}[${index}] importrt=${RT_LIST_${index}}
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
+ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
+ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ END
${networks} = BuiltIn.Create List @{NETWORKS}[0] @{NETWORKS}[1]
VpnOperations.Associate L3VPNs To Networks ${VPN_INSTANCE_IDS} ${networks}
${fib_values} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{SUBNET_CIDRS}[0] @{SUBNET_CIDRS}[1]
Verification Of Route Download With Three Vpns In SE And Qbgp With Many-One Export Import Route Target
[Documentation] Check the datapath traffic with many-one export import route target with three vpns.
VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] name=@{VPN_NAMES}[0] rd=@{RDS}[0] exportrt=@{RDS}[0] importrt=${CREATE_RT}
- : FOR ${index} IN RANGE 1 ${NUM_OF_L3VPN}
- \ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}] rd=@{RDS}[${index}] exportrt=${RT_LIST_${index}} importrt=@{RDS}[${index}]
- : FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
- \ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
- \ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ FOR ${index} IN RANGE 1 ${NUM_OF_L3VPN}
+ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}] rd=@{RDS}[${index}] exportrt=${RT_LIST_${index}} importrt=@{RDS}[${index}]
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
+ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
+ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ END
${networks} = BuiltIn.Create List @{NETWORKS}[0] @{NETWORKS}[1]
VpnOperations.Associate L3VPNs To Networks ${VPN_INSTANCE_IDS} ${networks}
${fib_values} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{SUBNET_CIDRS}[0] @{SUBNET_CIDRS}[1]
Verification Of Route Download With Three Vpns In SE And Qbgp With Many-Many Export Import Route Target
[Documentation] Check the datapath traffic with many-many export import route target with three vpns.
- : FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
- \ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}] rd=@{RDS}[${index}] exportrt=${CREATE_RT} importrt=${CREATE_RT}
- : FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
- \ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
- \ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
+ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}] rd=@{RDS}[${index}] exportrt=${CREATE_RT} importrt=${CREATE_RT}
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_L3VPN}
+ BgpOperations.Configure BGP And Add Neighbor On DCGW ${DCGW_SYSTEM_IP} ${AS_ID} ${DCGW_SYSTEM_IP} ${ODL_SYSTEM_IP} @{VPN_NAMES}[${index}]
+ ... @{DCGW_RD}[${index}] @{LOOPBACK_IPS}[${index}]
+ END
${networks} = BuiltIn.Create List @{NETWORKS}[0] @{NETWORKS}[1]
VpnOperations.Associate L3VPNs To Networks ${VPN_INSTANCE_IDS} ${networks}
${fib_values} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{SUBNET_CIDRS}[0] @{SUBNET_CIDRS}[1]
Create Nova VMs
VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] name=@{VPN_NAMES}[0] rd=@{RDS}[0] exportrt=@{RDS}[0] importrt=@{RDS}[0]
VpnOperations.Verify L3VPN On ODL @{VPN_INSTANCE_IDS}[0]
- : FOR ${network} IN @{NETWORKS}
- \ ${network_id} = OpenStackOperations.Get Net Id ${network}
- \ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=@{VPN_INSTANCE_IDS}[0]
+ FOR ${network} IN @{NETWORKS}
+ ${network_id} = OpenStackOperations.Get Net Id ${network}
+ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=@{VPN_INSTANCE_IDS}[0]
+ END
Create BGP Config On ODL
Create BGP Config On DCGW
Create External Tunnel Endpoint
Create Neutron Networks
[Documentation] Create required number of networks
- : FOR ${NET} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${NET}
+ FOR ${NET} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${NET}
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
Create Neutron Subnets
[Documentation] Create required number of subnets for previously created networks
${num_of_networks} = BuiltIn.Get Length ${NETWORKS}
- : FOR ${index} IN RANGE 0 ${num_of_networks}
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDRS}[${index}]
+ FOR ${index} IN RANGE 0 ${num_of_networks}
+ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDRS}[${index}]
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
Create Neutron Ports
[Documentation] Create required number of ports under previously created subnets
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
- \ OpenStackOperations.Create Port @{NETWORKS}[${index}] @{PORTS_HOST1}[${index}] sg=@{SECURITY_GROUP}[0]
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
- \ OpenStackOperations.Create Port @{NETWORKS}[${index}] @{PORTS_HOST2}[${index}] sg=@{SECURITY_GROUP}[0]
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
+ OpenStackOperations.Create Port @{NETWORKS}[${index}] @{PORTS_HOST1}[${index}] sg=@{SECURITY_GROUP}[0]
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_HOST}
+ OpenStackOperations.Create Port @{NETWORKS}[${index}] @{PORTS_HOST2}[${index}] sg=@{SECURITY_GROUP}[0]
+ END
OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS_HOST1}[3] @{SECURITY_GROUP}[1]
OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS_HOST1}[4] @{SECURITY_GROUP}[1]
OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS_HOST2}[3] @{SECURITY_GROUP}[1]
Create Nova VMs
[Documentation] Create Vm instances on compute nodes
- : FOR ${index} IN RANGE 0 ${NUM_OF_VMS_PER_HOST}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST1}[${index}] @{VMS_HOST1}[${index}] ${OS_CMP1_HOSTNAME} sg=@{SECURITY_GROUP}[0]
- : FOR ${index} IN RANGE 0 ${NUM_OF_VMS_PER_HOST}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST2}[${index}] @{VMS_HOST2}[${index}] ${OS_CMP2_HOSTNAME} sg=@{SECURITY_GROUP}[0]
+ FOR ${index} IN RANGE 0 ${NUM_OF_VMS_PER_HOST}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST1}[${index}] @{VMS_HOST1}[${index}] ${OS_CMP1_HOSTNAME} sg=@{SECURITY_GROUP}[0]
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_VMS_PER_HOST}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST2}[${index}] @{VMS_HOST2}[${index}] ${OS_CMP2_HOSTNAME} sg=@{SECURITY_GROUP}[0]
+ END
OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST1}[3] @{VMS_HOST1}[3] ${OS_CMP1_HOSTNAME} sg=@{SECURITY_GROUP}[1]
OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST1}[4] @{VMS_HOST1}[4] ${OS_CMP1_HOSTNAME} sg=@{SECURITY_GROUP}[1]
OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS_HOST2}[3] @{VMS_HOST2}[3] ${OS_CMP2_HOSTNAME} sg=@{SECURITY_GROUP}[1]
Create Multiple L3VPN
[Arguments] ${network} ${num_of_l3vpns}
[Documentation] Creates multiple L3VPNs and then verify the same
- : FOR ${index} IN RANGE 0 ${num_of_l3vpns}
- \ BuiltIn.Wait Until Keyword Succeeds 40s 10s VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}]
- \ ... rd=@{RDS}[${index}] exportrt=@{RDS}[${index}] importrt=@{RDS}[${index}]
- \ VpnOperations.Verify L3VPN On ODL @{VPN_INSTANCE_IDS}[${index}]
+ FOR ${index} IN RANGE 0 ${num_of_l3vpns}
+ BuiltIn.Wait Until Keyword Succeeds 40s 10s VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[${index}] name=@{VPN_NAMES}[${index}]
+ ... rd=@{RDS}[${index}] exportrt=@{RDS}[${index}] importrt=@{RDS}[${index}]
+ VpnOperations.Verify L3VPN On ODL @{VPN_INSTANCE_IDS}[${index}]
+ END
Security Group Rule with Remote SG
[Arguments] ${sec_grp}
Verify default punt timeout values and flows
[Documentation] Verify default time out for subnet route, SNAT and ARP in respective defualt openflow tables
${snat_napt_switch_ip} = Get NAPT Switch IP From DPID @{ROUTERS}[1]
- : FOR ${index} IN RANGE 0 3
- \ BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Verify Dump Flows For Specific Table ${snat_napt_switch_ip} @{OF_PUNT_TABLES}[${index}]
- \ ... True ${EMPTY} learn(table=@{OF_PUNT_TABLES}[${index}],hard_timeout=@{ORIGINAL_TIMEOUTS}[${index}]
+ FOR ${index} IN RANGE 0 3
+ BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Verify Dump Flows For Specific Table ${snat_napt_switch_ip} @{OF_PUNT_TABLES}[${index}]
+ ... True ${EMPTY} learn(table=@{OF_PUNT_TABLES}[${index}],hard_timeout=@{ORIGINAL_TIMEOUTS}[${index}]
+ END
Set punt timeout to zero and verify flows
[Documentation] Verify default flows in OVS for subnet route, SNAT and ARP after the changing the default punt timeout value to zero.
... Default subnet route, SNAT and ARP should get deleted after changing default timeout value to zero
- : FOR ${index} IN RANGE 0 3
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}] ${0}
- \ Verify Punt Values In XML File @{FILES_PATH}[${index}] ${0}
+ FOR ${index} IN RANGE 0 3
+ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}] ${0}
+ Verify Punt Values In XML File @{FILES_PATH}[${index}] ${0}
+ END
ClusterManagement.Stop_Members_From_List_Or_All
ClusterManagement.Start_Members_From_List_Or_All
${snat_napt_switch_ip} = Get NAPT Switch IP From DPID @{ROUTERS}[1]
BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Check OVS OpenFlow Connections ${OS_CMP1_IP} 2
- : FOR ${index} IN RANGE 0 3
- \ OVSDB.Verify Dump Flows For Specific Table ${snat_napt_switch_ip} @{OF_PUNT_TABLES}[${index}] False ${EMPTY} learn(table=@{OF_PUNT_TABLES}[${index}],hard_timeout=@{ORIGINAL_TIMEOUTS}[${index}]
+ FOR ${index} IN RANGE 0 3
+ OVSDB.Verify Dump Flows For Specific Table ${snat_napt_switch_ip} @{OF_PUNT_TABLES}[${index}] False ${EMPTY} learn(table=@{OF_PUNT_TABLES}[${index}],hard_timeout=@{ORIGINAL_TIMEOUTS}[${index}]
+ END
Set punt timeout to combination of valid ranges and verfiy flows
[Documentation] Verify the default flow in OVS for subnet route, SNAT and ARP after the changing the default value to different set of values.
... Default subnet route, SNAT and ARP flows should get changed after changing default timeout value to different set of values
Set Original TimeOut In Xml ${0}
- : FOR ${index} IN RANGE 0 3
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}] @{VALID_TIMEOUTS}[0]
- \ Verify Punt Values In XML File @{FILES_PATH}[${index}] @{VALID_TIMEOUTS}[0]
+ FOR ${index} IN RANGE 0 3
+ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}] @{VALID_TIMEOUTS}[0]
+ Verify Punt Values In XML File @{FILES_PATH}[${index}] @{VALID_TIMEOUTS}[0]
+ END
${count} = BuiltIn.Get length ${VALID_TIMEOUTS}
- : FOR ${index} IN RANGE 1 ${count}
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[0] @{VALID_TIMEOUTS}[${index - 1}] @{VALID_TIMEOUTS}[${index}]
- \ Verify Punt Values In XML File @{FILES_PATH}[0] @{VALID_TIMEOUTS}[${index}]
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[1] @{VALID_TIMEOUTS}[${index - 1}] @{VALID_TIMEOUTS}[${index}]
- \ Verify Punt Values In XML File @{FILES_PATH}[1] @{VALID_TIMEOUTS}[${index}]
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[2] @{VALID_TIMEOUTS}[${index - 1}] @{VALID_TIMEOUTS}[${index}]
- \ Verify Punt Values In XML File @{FILES_PATH}[2] @{VALID_TIMEOUTS}[${index}]
- \ ClusterManagement.Stop_Members_From_List_Or_All
- \ ClusterManagement.Start_Members_From_List_Or_All
- \ BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Check OVS OpenFlow Connections ${OS_CMP1_IP} 2
- \ ${snat_napt_switch_ip} = Get NAPT Switch IP From DPID @{ROUTERS}[1]
- \ BuiltIn.Wait Until Keyword Succeeds 120s 5s OVSDB.Verify Dump Flows For Specific Table ${OS_COMPUTE_1_IP} ${L3_PUNT_TABLE}
- \ ... True ${EMPTY} learn(table=${L3_PUNT_TABLE},hard_timeout=@{VALID_TIMEOUTS}[${index}]
- \ BuiltIn.Wait Until Keyword Succeeds 120s 5s OVSDB.Verify Dump Flows For Specific Table ${OS_COMPUTE_1_IP} ${ARP_PUNT_TABLE}
- \ ... True ${EMPTY} learn(table=${ARP_PUNT_TABLE},hard_timeout=@{VALID_TIMEOUTS}[${index}]
- \ BuiltIn.Wait Until Keyword Succeeds 180s 5s OVSDB.Verify Dump Flows For Specific Table ${snat_napt_switch_ip} ${SNAT_PUNT_TABLE}
- \ ... True ${EMPTY} learn(table=${SNAT_PUNT_TABLE},hard_timeout=@{VALID_TIMEOUTS}[${index}]
+ FOR ${index} IN RANGE 1 ${count}
+ Change Hard Timeout Value In XML File @{FILES_PATH}[0] @{VALID_TIMEOUTS}[${index - 1}] @{VALID_TIMEOUTS}[${index}]
+ Verify Punt Values In XML File @{FILES_PATH}[0] @{VALID_TIMEOUTS}[${index}]
+ Change Hard Timeout Value In XML File @{FILES_PATH}[1] @{VALID_TIMEOUTS}[${index - 1}] @{VALID_TIMEOUTS}[${index}]
+ Verify Punt Values In XML File @{FILES_PATH}[1] @{VALID_TIMEOUTS}[${index}]
+ Change Hard Timeout Value In XML File @{FILES_PATH}[2] @{VALID_TIMEOUTS}[${index - 1}] @{VALID_TIMEOUTS}[${index}]
+ Verify Punt Values In XML File @{FILES_PATH}[2] @{VALID_TIMEOUTS}[${index}]
+ ClusterManagement.Stop_Members_From_List_Or_All
+ ClusterManagement.Start_Members_From_List_Or_All
+ BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Check OVS OpenFlow Connections ${OS_CMP1_IP} 2
+ ${snat_napt_switch_ip} = Get NAPT Switch IP From DPID @{ROUTERS}[1]
+ BuiltIn.Wait Until Keyword Succeeds 120s 5s OVSDB.Verify Dump Flows For Specific Table ${OS_COMPUTE_1_IP} ${L3_PUNT_TABLE}
+ ... True ${EMPTY} learn(table=${L3_PUNT_TABLE},hard_timeout=@{VALID_TIMEOUTS}[${index}]
+ BuiltIn.Wait Until Keyword Succeeds 120s 5s OVSDB.Verify Dump Flows For Specific Table ${OS_COMPUTE_1_IP} ${ARP_PUNT_TABLE}
+ ... True ${EMPTY} learn(table=${ARP_PUNT_TABLE},hard_timeout=@{VALID_TIMEOUTS}[${index}]
+ BuiltIn.Wait Until Keyword Succeeds 180s 5s OVSDB.Verify Dump Flows For Specific Table ${snat_napt_switch_ip} ${SNAT_PUNT_TABLE}
+ ... True ${EMPTY} learn(table=${SNAT_PUNT_TABLE},hard_timeout=@{VALID_TIMEOUTS}[${index}]
+ END
Set Original TimeOut In Xml @{VALID_TIMEOUTS}[4]
Verify learnt flow for subnet route flow table
... Send subnet route traffic using Ping with packet count 5.
... Punt the first packet to controller and add new rule to stop pipeline processing.
... Check packet count before and after traffic for both(defualt and learnt tables).
- : FOR ${index} IN RANGE 0 3
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}] @{VALID_TIMEOUTS}[0]
- \ Verify Punt Values In XML File @{FILES_PATH}[${index}] @{VALID_TIMEOUTS}[0]
+ FOR ${index} IN RANGE 0 3
+ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}] @{VALID_TIMEOUTS}[0]
+ Verify Punt Values In XML File @{FILES_PATH}[${index}] @{VALID_TIMEOUTS}[0]
+ END
ClusterManagement.Stop_Members_From_List_Or_All
ClusterManagement.Start_Members_From_List_Or_All
BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Check OVS OpenFlow Connections ${OS_CMP1_IP} 2
Suite Setup
[Documentation] Create common setup related to openflow punt path protection
VpnOperations.Basic Suite Setup
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
OpenStackOperations.Create Network ${EXT_NETWORKS} additional_args=--external --provider-network-type gre
${elements} = BuiltIn.Create List ${EXT_NETWORKS}
${count} = BuiltIn.Get length ${SUBNETS}
- : FOR ${index} IN RANGE 0 ${count}
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNETS_CIDR}[${index}]
+ FOR ${index} IN RANGE 0 ${count}
+ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNETS_CIDR}[${index}]
+ END
OpenStackOperations.Create SubNet ${EXT_NETWORKS} ${EXT_SUBNETS} ${EXT_SUBNETS_CIDR} additional_args=--no-dhcp
- : FOR ${router} IN @{ROUTERS}
- \ OpenStackOperations.Create Router ${router}
- \ ${router_id} = OpenStackOperations.Get Router Id ${router}
- \ Collections.Append To List ${ROUTERS_ID} ${router_id}
+ FOR ${router} IN @{ROUTERS}
+ OpenStackOperations.Create Router ${router}
+ ${router_id} = OpenStackOperations.Get Router Id ${router}
+ Collections.Append To List ${ROUTERS_ID} ${router_id}
+ END
BuiltIn.Set Suite Variable @{ROUTERS_ID}
- : FOR ${index} IN RANGE 0 2
- \ OpenStackOperations.Add Router Interface @{ROUTERS}[0] @{SUBNETS}[${index}]
+ FOR ${index} IN RANGE 0 2
+ OpenStackOperations.Add Router Interface @{ROUTERS}[0] @{SUBNETS}[${index}]
+ END
OpenStackOperations.Add Router Interface @{ROUTERS}[1] @{SUBNETS}[2]
OpenStackOperations.Create And Configure Security Group ${SECURITY_GROUP}
${ext_net} = BuiltIn.Create List ${EXT_NETWORKS}
${NETWORKS_ALL} = Collections.Combine Lists ${NETWORKS} ${ext_net}
- : FOR ${index} IN RANGE 0 3
- \ OpenStackOperations.Create Port @{NETWORKS_ALL}[${index}] @{PORT_LIST}[${index + ${index}}] sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Port @{NETWORKS_ALL}[${index}] @{PORT_LIST}[${index + ${index + 1}}] sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 3
+ OpenStackOperations.Create Port @{NETWORKS_ALL}[${index}] @{PORT_LIST}[${index + ${index}}] sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Port @{NETWORKS_ALL}[${index}] @{PORT_LIST}[${index + ${index + 1}}] sg=${SECURITY_GROUP}
+ END
OpenStackOperations.Create Port @{NETWORKS}[0] @{EXTRA_PORTS}[0] sg=${SECURITY_GROUP} additional_args=--allowed-address ip-address=0.0.0.0 --fixed-ip subnet=@{SUBNETS}[0],ip-address=@{EXTRA_NW_IP}[0]
OpenStackOperations.Create Port @{NETWORKS}[1] @{EXTRA_PORTS}[1] sg=${SECURITY_GROUP} additional_args=--allowed-address ip-address=0.0.0.0 --fixed-ip subnet=@{SUBNETS}[1],ip-address=@{EXTRA_NW_IP}[1]
- : FOR ${index} IN RANGE 0 3
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index + ${index}}] @{VM_LIST}[${index + ${index}}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index + ${index + 1}}] @{VM_LIST}[${index + ${index + 1}}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 3
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index + ${index}}] @{VM_LIST}[${index + ${index}}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORT_LIST}[${index + ${index + 1}}] @{VM_LIST}[${index + ${index + 1}}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ END
@{VM_IPS} ${dhcp_ip} = OpenStackOperations.Get VM IPs @{VM_LIST}
BuiltIn.Set Suite Variable ${VM_IPS}
OpenStackOperations.Show Debugs @{VM_LIST}
BuiltIn.Should Not Contain ${VM_IPS} None
BuiltIn.Should Not Contain ${dhcp_ip} None
- : FOR ${index} IN RANGE 0 2
- \ VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[${index}] vpnid=@{VPN_ID}[${index}] rd=@{L3VPN_RD_IRT_ERT}[${index}] exportrt=@{L3VPN_RD_IRT_ERT}[${index}] importrt=@{L3VPN_RD_IRT_ERT}[${index}]
+ FOR ${index} IN RANGE 0 2
+ VpnOperations.VPN Create L3VPN name=@{VPN_NAME}[${index}] vpnid=@{VPN_ID}[${index}] rd=@{L3VPN_RD_IRT_ERT}[${index}] exportrt=@{L3VPN_RD_IRT_ERT}[${index}] importrt=@{L3VPN_RD_IRT_ERT}[${index}]
+ END
VpnOperations.Associate VPN to Router routerid=@{ROUTERS_ID}[0] vpnid=@{VPN_ID}[0]
${network_id} = OpenStackOperations.Get Net Id ${EXT_NETWORKS}
VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=@{VPN_ID}[1]
Set Original TimeOut In Xml
[Arguments] ${hard_timeout}
[Documentation] Set default timeout in XML for all the punt files
- : FOR ${index} IN RANGE 0 3
- \ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] ${hard_timeout} @{ORIGINAL_TIMEOUTS}[${index}]
- \ Verify Punt Values In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}]
+ FOR ${index} IN RANGE 0 3
+ Change Hard Timeout Value In XML File @{FILES_PATH}[${index}] ${hard_timeout} @{ORIGINAL_TIMEOUTS}[${index}]
+ Verify Punt Values In XML File @{FILES_PATH}[${index}] @{ORIGINAL_TIMEOUTS}[${index}]
+ END
ClusterManagement.Stop_Members_From_List_Or_All
ClusterManagement.Start_Members_From_List_Or_All
BuiltIn.Wait Until Keyword Succeeds 120s 20s OVSDB.Check OVS OpenFlow Connections ${OS_CMP1_IP} 2
Create Dictionary For DPN ID And Compute IP Mapping For All DPNS
[Documentation] Creating dictionary for DPN ID and compute IP mapping
- : FOR ${ip} IN @{OS_ALL_IPS}
- \ ${dpnid} OVSDB.Get DPID ${ip}
- \ Collections.Append To List ${DPN_IDS} ${dpnid}
+ FOR ${ip} IN @{OS_ALL_IPS}
+ ${dpnid} OVSDB.Get DPID ${ip}
+ Collections.Append To List ${DPN_IDS} ${dpnid}
+ END
${DPN_TO_COMPUTE_IP} = BuiltIn.Create Dictionary
${count} = BuiltIn.Get length ${OS_ALL_IPS}
- : FOR ${index} IN RANGE 0 ${count}
- \ Collections.Set To Dictionary ${DPN_TO_COMPUTE_IP} @{DPN_IDS}[${index}] @{OS_ALL_IPS}[${index}]
- : FOR ${dp_id} IN @{DPN_IDS}
- \ Collections.Dictionary Should Contain Key ${DPN_TO_COMPUTE_IP} ${dp_id}
+ FOR ${index} IN RANGE 0 ${count}
+ Collections.Set To Dictionary ${DPN_TO_COMPUTE_IP} @{DPN_IDS}[${index}] @{OS_ALL_IPS}[${index}]
+ END
+ FOR ${dp_id} IN @{DPN_IDS}
+ Collections.Dictionary Should Contain Key ${DPN_TO_COMPUTE_IP} ${dp_id}
+ END
BuiltIn.Set Suite Variable ${DPN_TO_COMPUTE_IP}
Get SNAT NAPT Switch DPID
Create Neutron Networks
[Documentation] Create required number of networks
- : FOR ${NET} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${NET}
+ FOR ${NET} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${NET}
+ END
OpenStackOperations.Create Network @{EXTERNAL_NETWORKS}[0] --external --provider-network-type ${NETWORK_TYPE}
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
Create Neutron Subnets
[Documentation] Create required number of subnets for previously created networks
${num_of_networks} = BuiltIn.Get Length ${NETWORKS}
- : FOR ${index} IN RANGE 0 ${num_of_networks}
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDRS}[${index}]
+ FOR ${index} IN RANGE 0 ${num_of_networks}
+ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDRS}[${index}]
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
Create Neutron Ports
Verify The Subnet Route When The Network Is Removed From The Vpn
[Documentation] Dissociate vpn from the network and verify the subnet route
- : FOR ${network} IN @{NETWORKS}
- \ ${network_id} = OpenStackOperations.Get Net Id ${network}
- \ VpnOperations.Dissociate L3VPN From Networks networkid=${network_id} vpnid=${VPN_INSTANCE_ID}
+ FOR ${network} IN @{NETWORKS}
+ ${network_id} = OpenStackOperations.Get Net Id ${network}
+ VpnOperations.Dissociate L3VPN From Networks networkid=${network_id} vpnid=${VPN_INSTANCE_ID}
+ END
${vm_ip_list} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{NET_3_VM_IPS}
Utils.Check For Elements Not At URI ${FIB_ENTRY_URL} ${vm_ip_list}
- : FOR ${network} IN @{NETWORKS}
- \ ${network_id} = OpenStackOperations.Get Net Id ${network}
- \ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=${VPN_INSTANCE_ID}
+ FOR ${network} IN @{NETWORKS}
+ ${network_id} = OpenStackOperations.Get Net Id ${network}
+ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=${VPN_INSTANCE_ID}
+ END
Utils.Check For Elements At URI ${FIB_ENTRY_URL} ${vm_ip_list}
Verify Ping between Inter Intra And Enterprise host
Create Nova VMs
Create Sub Interfaces And Verify
Create L3VPN
- : FOR ${network} IN @{NETWORKS}
- \ ${network_id} = OpenStackOperations.Get Net Id ${network}
- \ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=${VPN_INSTANCE_ID}
+ FOR ${network} IN @{NETWORKS}
+ ${network_id} = OpenStackOperations.Get Net Id ${network}
+ VpnOperations.Associate L3VPN To Network networkid=${network_id} vpnid=${VPN_INSTANCE_ID}
+ END
Create BGP Config On ODL
Create BGP Config On DCGW
BuiltIn.Wait Until Keyword Succeeds 60s 10s VpnOperations.Verify Tunnel Status as UP
Create Neutron Networks
[Documentation] Create required number of networks
- : FOR ${net} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${net}
+ FOR ${net} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${net}
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
Create Neutron Subnets
[Arguments] ${num_of_network} ${additional_args}=${EMPTY} ${verbose}=TRUE
[Documentation] Create required number of subnets for previously created networks
- : FOR ${index} IN RANGE 0 ${num_of_network}
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDR}[${index}]
+ FOR ${index} IN RANGE 0 ${num_of_network}
+ OpenStackOperations.Create SubNet @{NETWORKS}[${index}] @{SUBNETS}[${index}] @{SUBNET_CIDR}[${index}]
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
Create Neutron Ports
${allowed_address_pairs_args1} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
${allowed_address_pairs_args2} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[2]
${allowed_address_pairs_args3} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[2] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0]
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_NETWORK}
- \ OpenStackOperations.Create Port @{NETWORKS}[0] @{NET_1_PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args1}
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_NETWORK}
- \ OpenStackOperations.Create Port @{NETWORKS}[1] @{NET_2_PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args2}
- : FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_NETWORK}
- \ OpenStackOperations.Create Port @{NETWORKS}[2] @{NET_3_PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args3}
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_NETWORK}
+ OpenStackOperations.Create Port @{NETWORKS}[0] @{NET_1_PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args1}
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_NETWORK}
+ OpenStackOperations.Create Port @{NETWORKS}[1] @{NET_2_PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args2}
+ END
+ FOR ${index} IN RANGE 0 ${NUM_OF_PORTS_PER_NETWORK}
+ OpenStackOperations.Create Port @{NETWORKS}[2] @{NET_3_PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args3}
+ END
Create Nova VMs
[Documentation] Create Vm instances on compute nodes
- : FOR ${index} IN RANGE 0 2
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_1_PORTS}[${index}] @{NET_1_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_1_PORTS}[${index+2}] @{NET_1_VMS}[${index+2}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_2_PORTS}[${index}] @{NET_2_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_2_PORTS}[${index+2}] @{NET_2_VMS}[${index+2}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_3_PORTS}[${index}] @{NET_3_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_3_PORTS}[${index+2}] @{NET_3_VMS}[${index+2}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ FOR ${index} IN RANGE 0 2
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_1_PORTS}[${index}] @{NET_1_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_1_PORTS}[${index+2}] @{NET_1_VMS}[${index+2}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_2_PORTS}[${index}] @{NET_2_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_2_PORTS}[${index+2}] @{NET_2_VMS}[${index+2}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_3_PORTS}[${index}] @{NET_3_VMS}[${index}] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{NET_3_PORTS}[${index+2}] @{NET_3_VMS}[${index+2}] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ END
@{NET_1_VM_IPS} ${NET1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
@{NET_2_VM_IPS} ${NET2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
@{NET_3_VM_IPS} ${NET3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_3_VMS}
Disconnect OVS
[Documentation] Delete OVS manager, controller and groups and tun ports
- : FOR ${node} IN @{OS_ALL_IPS}
- \ OVSDB.Delete OVS Manager ${node}
- \ OVSDB.Delete OVS Controller ${node}
- \ OVSDB.Delete Groups On Bridge ${node} ${INTEGRATION_BRIDGE}
- \ OVSDB.Delete Ports On Bridge By Type ${node} ${INTEGRATION_BRIDGE} ${TYPE}
+ FOR ${node} IN @{OS_ALL_IPS}
+ OVSDB.Delete OVS Manager ${node}
+ OVSDB.Delete OVS Controller ${node}
+ OVSDB.Delete Groups On Bridge ${node} ${INTEGRATION_BRIDGE}
+ OVSDB.Delete Ports On Bridge By Type ${node} ${INTEGRATION_BRIDGE} ${TYPE}
+ END
Wipe Local Data
[Documentation] Delete data/, journal/, snapshots/
Set Upgrade Flag
${resp} = RequestsLibrary.Put Request session ${UPDATE_FLAG_PATH} {"upgrade-config":{"upgradeInProgress":true}}
BuiltIn.Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${node} IN @{OS_ALL_IPS}
- \ ${dpnid} = OVSDB.Get DPID ${node}
- \ ${body} = OperatingSystem.Get File ${COMMIT_ACTIVE_BUNDLE_DIR}/data.json
- \ ${body} = Replace String ${body} DPNID ${dpnid}
- \ ${resp} = RequestsLibrary.Post Request session ${COMMIT_ACTIVE_BUNDLE_URI} data=${body}
- \ BuiltIn.Log ${resp.content}
- \ BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
+ FOR ${node} IN @{OS_ALL_IPS}
+ ${dpnid} = OVSDB.Get DPID ${node}
+ ${body} = OperatingSystem.Get File ${COMMIT_ACTIVE_BUNDLE_DIR}/data.json
+ ${body} = Replace String ${body} DPNID ${dpnid}
+ ${resp} = RequestsLibrary.Post Request session ${COMMIT_ACTIVE_BUNDLE_URI} data=${body}
+ BuiltIn.Log ${resp.content}
+ BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
+ END
Set OVS Manager And Controller
[Documentation] Set controller and manager on each OpenStack node and check that egress flows are present
- : FOR ${node} IN @{OS_ALL_IPS}
- \ Utils.Run Command On Remote System And Log ${node} sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT} ${PASSIVE_MANAGER}
+ FOR ${node} IN @{OS_ALL_IPS}
+ Utils.Run Command On Remote System And Log ${node} sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT} ${PASSIVE_MANAGER}
+ END
Wait Until Keyword Succeeds 180s 15s Check OVS Nodes Have Egress Flows
UnSet Upgrade Flag
Create Resources
[Documentation] Create 2 VXLAN networks, subnets with 2 VMs each and a router. Ping all 4 VMs.
- : FOR ${net} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${net}
+ FOR ${net} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${net}
+ END
OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNETS_RANGE}[0]
OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNETS_RANGE}[1]
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
OpenStackOperations.Create Nano Flavor
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] ${vm} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- : FOR ${vm} IN @{NET_2_VMS}
- \ OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] ${vm} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] ${vm} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ END
+ FOR ${vm} IN @{NET_2_VMS}
+ OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] ${vm} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ END
OpenStackOperations.Create Router ${ROUTER}
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
@{NET1_VM_IPS} ${NET1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
@{NET2_VM_IPS} ${NET2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
BuiltIn.Set Suite Variable @{NET1_VM_IPS}
Check OVS Nodes Have Egress Flows
[Documentation] Loop over all openstack nodes to ensure they have the proper flows installed.
- : FOR ${node} IN @{OS_ALL_IPS}
- \ Does OVS Have Multiple Egress Flows ${node}
+ FOR ${node} IN @{OS_ALL_IPS}
+ Does OVS Have Multiple Egress Flows ${node}
+ END
Does OVS Have Multiple Egress Flows
[Arguments] ${ip}
[Arguments] ${tag}
[Documentation] Dump tons of debug logs for each OS node but also emit tags to make parsing easier
Builtin.Log Start dumping at phase ${tag}
- : FOR ${node} IN @{OS_ALL_IPS}
- \ ${conn_id} = DevstackUtils.Open Connection ${node}_CONNECTION_NAME ${node}
- \ Builtin.Log Start dumping for ${node} at phase ${tag}
- \ OpenStackOperations.Get DumpFlows And Ovsconfig ${conn_id}
- \ Builtin.Log End dumping for ${node} at phase ${tag}
- \ SSHLibrary.Close Connection
+ FOR ${node} IN @{OS_ALL_IPS}
+ ${conn_id} = DevstackUtils.Open Connection ${node}_CONNECTION_NAME ${node}
+ Builtin.Log Start dumping for ${node} at phase ${tag}
+ OpenStackOperations.Get DumpFlows And Ovsconfig ${conn_id}
+ Builtin.Log End dumping for ${node} at phase ${tag}
+ SSHLibrary.Close Connection
+ END
Builtin.Log End dumping at phase ${tag}
Canary Network Should Exist
... Create a Neutron Router and associate subnet1 and subnet2.
... Create an L3VPN instance and associate the L3VPN instance to the neutron router.
VpnOperations.Basic Suite Setup
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
${neutron_networks} = OpenStackOperations.List Networks
- : FOR ${network} IN @{NETWORKS}
- \ BuiltIn.Should Contain ${neutron_networks} ${network}
+ FOR ${network} IN @{NETWORKS}
+ BuiltIn.Should Contain ${neutron_networks} ${network}
+ END
${NET_ID} = OpenStackOperations.Get Net Id @{NETWORKS}[0]
BuiltIn.Set Suite Variable ${NET_ID}
- : FOR ${i} IN RANGE 0 3
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDRS}[${i}]
+ FOR ${i} IN RANGE 0 3
+ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDRS}[${i}]
+ END
${neutron_subnets} = OpenStackOperations.List Subnets
- : FOR ${subnet} IN @{SUBNETS}
- \ BuiltIn.Should Contain ${neutron_subnets} ${subnet}
+ FOR ${subnet} IN @{SUBNETS}
+ BuiltIn.Should Contain ${neutron_subnets} ${subnet}
+ END
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
@{vm_ips} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{NET_3_VM_IPS}
${resp} = Should Match regexp ${flow_output} table=0.*goto_table:36
${resp} = Should Match regexp ${flow_output} table=0.*goto_table:17
- : FOR ${ip} IN @{vm_ips}
- \ ${resp} = Should Match regexp ${flow_output} table=21.*nw_dst=${ip}
+ FOR ${ip} IN @{vm_ips}
+ ${resp} = Should Match regexp ${flow_output} table=21.*nw_dst=${ip}
+ END
Verify Flows Are Present On All Compute Nodes
[Documentation] Verify Flows Are Present On All Compute Nodes
- : FOR ${ip} IN @{OS_CMP_IPS}
- \ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Flows Are Present ${ip}
+ FOR ${ip} IN @{OS_CMP_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 10s 2s Verify Flows Are Present ${ip}
+ END
Verify Ping To Sub Interface
[Arguments] ${sub_interface_ip}
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${ROUTER_URL} ${router_list}
Add Interfaces To Router
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
${GWMAC_ADDRS} ${GWIP_ADDRS} = VpnOperations.Get Gateway MAC And IP Address ${ROUTER}
BuiltIn.Set Suite Variable ${GWMAC_ADDRS}
Remove Router Interfaces And Check L3_Datapath Traffic Across Networks
${router_id} = OpenStackOperations.Get Router Id ${ROUTER}
- : FOR ${INTERFACE} IN @{SUBNETS}
- \ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
- \ OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
- \ OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_2_VM_IPS} ping_should_succeed=False
+ FOR ${INTERFACE} IN @{SUBNETS}
+ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
+ OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_2_VM_IPS} ping_should_succeed=False
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${INTERFACE} IN @{SUBNETS}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
- \ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ FOR ${INTERFACE} IN @{SUBNETS}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
+ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ END
Delete Router
Delete Router ${ROUTER}
Add Router Ports
[Documentation] Add created subnets to router.
- : FOR ${PORT} IN @{SUBNETS4}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${PORT}
+ FOR ${PORT} IN @{SUBNETS4}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${PORT}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
${GW1_MAC_ADDRS} ${GW_IPV4_ADDRS} = VpnOperations.Get Gateway MAC And IP Address ${ROUTER}
- : FOR ${PORT} IN @{SUBNETS6}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${PORT}
+ FOR ${PORT} IN @{SUBNETS6}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${PORT}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
${GW2_MAC_ADDRS} ${GW_IPV6_ADDRS} = VpnOperations.Get Gateway MAC And IP Address ${ROUTER} ${IP6_REGEX}
${GW_MAC_ADDRS} = BuiltIn.Create List @{GW1_MAC_ADDRS} @{GW2_MAC_ADDRS}
@{tcpdump_conn_ids} = OpenStackOperations.Start Packet Capture On Nodes tcpdump_vpn_ds ${EMPTY} @{OS_ALL_IPS}
${vm_instances} = BuiltIn.Create List @{NET_1_VM_IPV4} @{NET_2_VM_IPV4} @{NET_1_VM_IPV6} @{NET_2_VM_IPV6}
BuiltIn.Wait Until Keyword Succeeds 30s 5s Utils.Check For Elements At URI ${FIB_ENTRY_URL} ${vm_instances}
- : FOR ${VM} IN ${vm_instances}
- \ BuiltIn.Wait Until Keyword Succeeds 30s 5s VpnOperations.Verify Flows Are Present For L3VPN ${OS_CMP1_IP} ${VM}
+ FOR ${VM} IN ${vm_instances}
+ BuiltIn.Wait Until Keyword Succeeds 30s 5s VpnOperations.Verify Flows Are Present For L3VPN ${OS_CMP1_IP} ${VM}
+ END
BuiltIn.Wait Until Keyword Succeeds 30s 5s VpnOperations.Verify GWMAC Entry On ODL ${GW_MAC_ADDRS}
Verify GWMAC Flow Entry On Flow Table On All Compute Nodes
BuiltIn.Log L3 Datapath test across the networks using router
Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
[Documentation] Add multiple extra routes and check data path before L3VPN creation.
BuiltIn.Log Add extraroutes to VM
- : FOR ${extra_ip} IN @{EXTRA_NW_IPV4}
- \ ${cmd} = BuiltIn.Catenate sudo ip addr add ${extra_ip}/24 dev eth0
- \ OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV4}[0] ${cmd}
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV4}[0] ip a
- \ BuiltIn.Should Contain ${output} ${extra_ip}/24
+ FOR ${extra_ip} IN @{EXTRA_NW_IPV4}
+ ${cmd} = BuiltIn.Catenate sudo ip addr add ${extra_ip}/24 dev eth0
+ OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV4}[0] ${cmd}
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV4}[0] ip a
+ BuiltIn.Should Contain ${output} ${extra_ip}/24
+ END
${ext_rt1} = BuiltIn.Set Variable destination=@{EXTRA_NW_SUBNET_IPV4}[0],gateway=@{NET_1_VM_IPV4}[0]
${ext_rt2} = BuiltIn.Set Variable destination=@{EXTRA_NW_SUBNET_IPV4}[1],gateway=@{NET_1_VM_IPV4}[0]
${cmd} = BuiltIn.Catenate ${RT_OPTIONS} ${ext_rt1} ${RT_OPTIONS} ${ext_rt2}
OpenStackOperations.Update Router ${ROUTER} ${cmd}
OpenStackOperations.Show Router ${ROUTER}
- : FOR ${extra_ip} IN @{EXTRA_NW_IPV6}
- \ ${cmd} = BuiltIn.Catenate sudo ip -6 addr add ${extra_ip}/64 dev eth0
- \ OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV6}[0] ${cmd}
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV6}[0] ip -6 a
- \ BuiltIn.Should Contain ${output} ${extra_ip}/64
+ FOR ${extra_ip} IN @{EXTRA_NW_IPV6}
+ ${cmd} = BuiltIn.Catenate sudo ip -6 addr add ${extra_ip}/64 dev eth0
+ OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV6}[0] ${cmd}
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPV6}[0] ip -6 a
+ BuiltIn.Should Contain ${output} ${extra_ip}/64
+ END
${ext_rt3} = BuiltIn.Set Variable destination=@{EXTRA_NW_SUBNET_IPV6}[0],gateway=@{NET_1_VM_IPV6}[0]
${ext_rt4} = BuiltIn.Set Variable destination=@{EXTRA_NW_SUBNET_IPV6}[1],gateway=@{NET_1_VM_IPV6}[0]
${cmd} = BuiltIn.Catenate ${RT_OPTIONS} ${ext_rt3} ${RT_OPTIONS} ${ext_rt4}
BuiltIn.Log Verify FIB table
${vm_ips} = BuiltIn.Create List @{EXTRA_NW_SUBNET_IPV4} @{EXTRA_NW_SUBNET_IPV6}
BuiltIn.Wait Until Keyword Succeeds 30s 5s Utils.Check For Elements At URI ${FIB_ENTRY_URL} ${vm_ips}
- : FOR ${extra_ip} IN @{EXTRA_NW_IPV4}
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[1]} ping -c 3 ${extra_ip}
- \ BuiltIn.Should Contain ${output} 64 bytes
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV4[0]} ping -c 3 ${extra_ip}
- \ BuiltIn.Should Contain ${output} 64 bytes
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV4[1]} ping -c 3 ${extra_ip}
- \ BuiltIn.Should Contain ${output} 64 bytes
- : FOR ${extra_ip} IN @{EXTRA_NW_IPV6}
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV6[1]} ping6 -c 3 ${extra_ip}
- \ BuiltIn.Should Contain ${output} 64 bytes
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV6[0]} ping6 -c 3 ${extra_ip}
- \ BuiltIn.Should Contain ${output} 64 bytes
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV6[1]} ping6 -c 3 ${extra_ip}
- \ BuiltIn.Should Contain ${output} 64 bytes
+ FOR ${extra_ip} IN @{EXTRA_NW_IPV4}
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[1]} ping -c 3 ${extra_ip}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV4[0]} ping -c 3 ${extra_ip}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV4[1]} ping -c 3 ${extra_ip}
+ BuiltIn.Should Contain ${output} 64 bytes
+ END
+ FOR ${extra_ip} IN @{EXTRA_NW_IPV6}
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV6[1]} ping6 -c 3 ${extra_ip}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV6[0]} ping6 -c 3 ${extra_ip}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV6[1]} ping6 -c 3 ${extra_ip}
+ BuiltIn.Should Contain ${output} 64 bytes
+ END
Delete And Recreate Extra Route
[Documentation] Delete IPv4 and IPv6 extra routes and recreate it.
OpenStackOperations.Update Router ${ROUTER} ${RT_CLEAR}
OpenStackOperations.Show Router ${ROUTER}
BuiltIn.Log Delete IPv6 subnet
- : FOR ${PORT} IN @{SUBNETS6}
- \ Remove Interface ${ROUTER} ${PORT}
+ FOR ${PORT} IN @{SUBNETS6}
+ Remove Interface ${ROUTER} ${PORT}
+ END
BuiltIn.Log Test L2 datapath
${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[0]} ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
BuiltIn.Should Contain ${output} 64 bytes
${resp} = VpnOperations.VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
BuiltIn.Should Contain ${resp} ${router_id}
# Delete Interface
- : FOR ${iface} IN @{SUBNETS4}
- \ Remove Interface ${ROUTER} ${iface}
- \ ${subnet_id} = Get Subnet Id ${iface}
- \ ${rt_port_list} = OpenStackOperations.Show Router Interface ${ROUTER}
- \ BuiltIn.Should Not Contain ${rt_port_list} ${subnet_id}
- # Delete Router and Interface to the subnets.
+ FOR ${iface} IN @{SUBNETS4}
+ Remove Interface ${ROUTER} ${iface}
+ ${subnet_id} = Get Subnet Id ${iface}
+ ${rt_port_list} = OpenStackOperations.Show Router Interface ${ROUTER}
+ BuiltIn.Should Not Contain ${rt_port_list} ${subnet_id}
+ # Delete Router and Interface to the subnets.
+ END
Delete Router ${ROUTER}
${router_output} = OpenStackOperations.List Routers
BuiltIn.Should Not Contain ${router_output} ${ROUTER}
${NET_1_VM_IPV6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_1_VM_INSTANCES} @{NETWORKS}[0] ${prefix_net10}
${NET_2_VM_IPV6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_2_VM_INSTANCES} @{NETWORKS}[1] ${prefix_net20}
${LOOP_COUNT} Get Length ${NET_1_VM_INSTANCES}
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${NET_1_VM_IPV6}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_1_VM_INSTANCES}[${index}] 30s
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${NET_2_VM_IPV6}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_2_VM_INSTANCES}[${index}] 30s
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${NET_1_VM_IPV6}[${index}] None
+ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_1_VM_INSTANCES}[${index}] 30s
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${NET_2_VM_IPV6}[${index}] None
+ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_2_VM_INSTANCES}[${index}] 30s
+ END
BuiltIn.Set Suite Variable ${NET_1_VM_IPV4}
BuiltIn.Set Suite Variable ${NET_2_VM_IPV4}
BuiltIn.Set Suite Variable ${NET_1_VM_IPV6}
BuiltIn.Should Contain ${flow_output} table=${GWMAC_TABLE}
${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
# Verify GWMAC address present in table ${L3_TABLE}
- : FOR ${macAdd} IN @{GW_MAC_ADDRS}
- \ BuiltIn.Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
- # Verify Miss entry
+ FOR ${macAdd} IN @{GW_MAC_ADDRS}
+ BuiltIn.Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
+ # Verify Miss entry
+ END
BuiltIn.Should Contain ${gwmac_table} actions=resubmit(,17)
# Verify ARP_CHECK_TABLE - ${ARP_CHECK_TABLE}
${arpchk_table} = Get Lines Containing String ${flow_output} table=${ARP_CHECK_TABLE}
BuiltIn.Should Contain ${flow_output} table=${IPV6_TABLE}
${icmp_ipv6_flows} = Get Lines Containing String ${flow_output} icmp_type=${ICMP_TYPE}
# Verify IPv6 icmp_type=135
- : FOR ${ip_addr} IN @{GW_IPV6_ADDRS}
- \ ${rule} = BuiltIn.Set Variable icmp_type=${ICMP_TYPE},icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
- \ BuiltIn.Should Match Regexp ${icmp_ipv6_flows} ${rule}
+ FOR ${ip_addr} IN @{GW_IPV6_ADDRS}
+ ${rule} = BuiltIn.Set Variable icmp_type=${ICMP_TYPE},icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
+ BuiltIn.Should Match Regexp ${icmp_ipv6_flows} ${rule}
+ END
VpnOperations.Verify ARP REQUEST in groupTable ${group_output} ${groupID[1]}
# Verify ARP_RESPONSE_TABLE - ${ARP_RESPONSE_TABLE}
BuiltIn.Should Contain ${flow_output} table=${ARP_RESPONSE_TABLE}
${arpResponder_table} = Get Lines Containing String ${flow_output} table=${ARP_RESPONSE_TABLE}
BuiltIn.Should Contain ${arpResponder_table} priority=0 actions=drop
- : FOR ${macAdd} ${ipAdd} IN ZIP ${GW1_MAC_ADDRS} ${GW_IPV4_ADDRS}
- \ ${ARP_RESPONSE_IP_MAC_REGEX} = BuiltIn.Set Variable arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
- \ BuiltIn.Should Match Regexp ${arpResponder_table} ${ARP_RESPONSE_IP_MAC_REGEX}
+ FOR ${macAdd} ${ipAdd} IN ZIP ${GW1_MAC_ADDRS} ${GW_IPV4_ADDRS}
+ ${ARP_RESPONSE_IP_MAC_REGEX} = BuiltIn.Set Variable arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
+ BuiltIn.Should Match Regexp ${arpResponder_table} ${ARP_RESPONSE_IP_MAC_REGEX}
+ END
[Documentation] Extra IPv4/IPv6 Address configuration on Interfaces
${VM_IPV6} = BuiltIn.Create List @{net_1_vm_ipv6}[0] @{net_1_vm_ipv6}[1] @{net_2_vm_ipv6}[0] @{net_2_vm_ipv6}[1]
${VM_IPV4} = BuiltIn.Create List @{net_1_vm_ipv4}[0] @{net_1_vm_ipv4}[1] @{net_2_vm_ipv4}[0] @{net_2_vm_ipv4}[1]
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV6}[${index}] sudo ip -6 addr add @{EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV4}[${index}] sudo ifconfig eth0:1 @{EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV6}[${index}] sudo ip -6 addr add @{EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
+ END
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV4}[${index}] sudo ifconfig eth0:1 @{EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
+ END
BuiltIn.Set Suite Variable ${VM_IPV6}
BuiltIn.Set Suite Variable ${VM_IPV4}
BuiltIn.Should Not Contain ${VM_IPV6} None
Delete the configured extra IPv4/IPv6 Addresss and verify traffic
[Documentation] Delete IPv4/IPv6 Address configuration on Interfaces and verify traffic
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV6}[${index}] sudo ip -6 addr del @{EXTRA_NW_IPV6}[${index}]/64 dev eth0
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV4}[${index}] sudo ifconfig eth0:1 down
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV6}[${index}] sudo ip -6 addr del @{EXTRA_NW_IPV6}[${index}]/64 dev eth0
+ END
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV4}[${index}] sudo ifconfig eth0:1 down
+ END
BuiltIn.Wait Until Keyword Succeeds 10x 30s Verify Ipv4 Data No Traffic
BuiltIn.Wait Until Keyword Succeeds 10x 30s Verify Ipv6 Data No Traffic
BuiltIn.Wait Until Keyword Succeeds 10x 40s Verify Table 21 for No VPN Routes
Configure Again Extra IPv4/IPv6 Addresss On Interface For Subnet Routing
[Documentation] Extra IPv4/IPv6 Address configuration on Interfaces
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV6}[${index}] sudo ip -6 addr add @{EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV4}[${index}] sudo ifconfig eth0:1 @{EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV6}[${index}] sudo ip -6 addr add @{EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
+ END
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Execute Command on VM Instance @{network_list}[${index}] @{VM_IPV4}[${index}] sudo ifconfig eth0:1 @{EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
+ END
BuiltIn.Wait Until Keyword Succeeds 10x 30s Verify Ipv4 Data Traffic
BuiltIn.Wait Until Keyword Succeeds 10x 30s Verify Ipv6 Data Traffic
Remove Interface From Router And Verify Traffic
[Documentation] Remove subnet from router and check data path verification
${router_id} = OpenStackOperations.Get Router Id ${ROUTER}
- : FOR ${interface} IN @{SUBNETS4}
- \ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ FOR ${interface} IN @{SUBNETS4}
+ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${interface} IN @{SUBNETS6}
- \ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ FOR ${interface} IN @{SUBNETS6}
+ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${interface} IN @{SUBNETS4}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
- \ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
- : FOR ${interface} IN @{SUBNETS6}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
- \ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ FOR ${interface} IN @{SUBNETS4}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
+ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ END
+ FOR ${interface} IN @{SUBNETS6}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
+ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ END
BuiltIn.Wait Until Keyword Succeeds 10x 30s Verify Ipv4 Data No Traffic
Add Interface To Router And Verify Traffic
[Documentation] Add interface router to again and check data path verification
- : FOR ${interface} IN @{SUBNETS4}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
- : FOR ${interface} IN @{SUBNETS6}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ FOR ${interface} IN @{SUBNETS4}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
+ FOR ${interface} IN @{SUBNETS6}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
BuiltIn.Wait Until Keyword Succeeds 10x 60s Verify Ipv4 Data Traffic
BuiltIn.Wait Until Keyword Succeeds 10x 60s Verify Ipv6 Data Traffic
OpenStackOperations.Create Router ${ROUTER}
@{router_list} = BuiltIn.Create List ${ROUTER}
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${ROUTER_URL} ${router_list}
- : FOR ${port} IN @{SUBNETS4}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${port}
+ FOR ${port} IN @{SUBNETS4}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${port}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${port} IN @{SUBNETS6}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${port}
+ FOR ${port} IN @{SUBNETS6}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${port}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
Create Allow All SecurityGroup ${SECURITY_GROUP} IPv4 True
${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[1]
${network_list} = BuiltIn.Create List @{NETWORKS}[0] @{NETWORKS}[0] @{NETWORKS}[1] @{NETWORKS}[1]
BuiltIn.Set Suite Variable ${network_list}
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OpenStackOperations.Create Port @{network_list}[${index}] @{PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OpenStackOperations.Create Port @{network_list}[${index}] @{PORTS}[${index}] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ END
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${PORT_URL} ${PORTS}
OpenStackOperations.Update Port @{PORTS}[0] additional_args=--name ${UPDATE_PORT}
${output} = Show Port ${UPDATE_PORT}
${net_1_vm_ipv6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_1_VMS} @{NETWORKS}[0] ${prefix_net10}
${net_2_vm_ipv6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_2_VMS} @{NETWORKS}[1] ${prefix_net20}
${loop_count} Get Length ${NET_1_VMS}
- : FOR ${index} IN RANGE 0 ${loop_count}
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${net_1_vm_ipv6}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_1_VMS}[${index}] 30s
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${net_2_vm_ipv6}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_2_VMS}[${index}] 30s
+ FOR ${index} IN RANGE 0 ${loop_count}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${net_1_vm_ipv6}[${index}] None
+ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_1_VMS}[${index}] 30s
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${net_2_vm_ipv6}[${index}] None
+ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_2_VMS}[${index}] 30s
+ END
BuiltIn.Set Suite Variable ${net_1_vm_ipv4}
BuiltIn.Set Suite Variable ${net_2_vm_ipv4}
BuiltIn.Set Suite Variable ${net_1_vm_ipv6}
BuiltIn.Should Contain ${output} ${NO_PING_REGEXP}
Verify Table 21 for VPN Routes
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} True ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV6}[${index}]
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} True ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV4}[${index}]
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} True ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV6}[${index}]
+ END
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} True ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV4}[${index}]
+ END
Verify Table 21 for No VPN Routes
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} False ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV6}[${index}]
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} False ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV4}[${index}]
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} False ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV6}[${index}]
+ END
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ OVSDB.Verify Dump Flows For Specific Table ${OS_CMP1_IP} ${TABLE_NO_21} False ${EMPTY} ipv6_dst=@{EXTRA_NW_IPV4}[${index}]
+ END
Suite Teardown
[Documentation] Delete the setup
VpnOperations.Associate VPN to Router routerid=${router_id} vpnid=@{VPN_INSTANCE_IDS}[0]
${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
BuiltIn.Should Contain ${resp} ${router_id}
- : FOR ${INTERFACE} IN @{SUBNETS}
- \ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ FOR ${INTERFACE} IN @{SUBNETS}
+ OpenStackOperations.Remove Interface ${ROUTER} ${INTERFACE}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${INTERFACE} IN @{SUBNETS}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
- \ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ FOR ${INTERFACE} IN @{SUBNETS}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${INTERFACE}
+ BuiltIn.Should Not Contain ${interface_output} ${subnet_id}
+ END
OpenStackOperations.Delete Router ${ROUTER}
${router_output} = OpenStackOperations.List Routers
BuiltIn.Should Not Contain ${router_output} ${ROUTER}
OpenStackOperations.Create Router ${ROUTER}
${router_list} = BuiltIn.Create List ${ROUTER}
BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${ROUTER_URL} ${router_list}
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${interface} IN @{SUBNETS}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${interface}
- \ BuiltIn.Should Contain ${interface_output} ${subnet_id}
+ FOR ${interface} IN @{SUBNETS}
+ ${subnet_id} = OpenStackOperations.Get Subnet Id ${interface}
+ BuiltIn.Should Contain ${interface_output} ${subnet_id}
+ END
${GWMAC_ADDRS} ${GWIP_ADDRS} = VpnOperations.Get Gateway MAC And IP Address ${ROUTER} ${IP6_REGEX}
BuiltIn.Set Suite Variable ${GWMAC_ADDRS}
BuiltIn.Set Suite Variable ${GWIP_ADDRS}
OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
${vms}= BuiltIn.Create List @{NET_1_VMS} @{NET_2_VMS}
- : FOR ${vm} IN @{vms}
- \ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ FOR ${vm} IN @{vms}
+ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ END
BuiltIn.Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNET_CIDRS}
${prefix_net10} = Replace String @{SUBNET_CIDRS}[0] ::/64 (:[a-f0-9]{,4}){,4}
${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
${VM_INSTANCES} = Collections.Combine Lists ${NET_1_VMS} ${NET_2_VMS}
${VM_IPS}= Collections.Combine Lists ${VM_IP_NET10} ${VM_IP_NET20}
${LOOP_COUNT} BuiltIn.Get Length ${NET_1_VMS}
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${VM_IPS}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' OpenStack CLI openstack console log show @{VM_INSTANCES}[${index}] 30s
+ FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain ${VM_IPS}[${index}] None
+ Run Keyword If '${status}' == 'FAIL' OpenStack CLI openstack console log show @{VM_INSTANCES}[${index}] 30s
+ END
OpenStackOperations.Copy DHCP Files From Control Node
BuiltIn.Set Suite Variable ${VM_IP_NET10}
BuiltIn.Set Suite Variable ${VM_IP_NET20}
Should Contain ${resp.content} ietf-restconf
Verify REST Command Add, Update and Remove
- : FOR ${intent} IN @{all_intents_bad}
- \ ${intent_id}= REST Add Intent @{intent}
- \ Append To List ${all_intents_ids} ${intent_id}
+ FOR ${intent} IN @{all_intents_bad}
+ ${intent_id}= REST Add Intent @{intent}
+ Append To List ${all_intents_ids} ${intent_id}
+ END
${resp}= REST Get List of Intents
- : FOR ${intent_id} IN @{all_intents_ids}
- \ Should Contain ${resp} ${intent_id}
+ FOR ${intent_id} IN @{all_intents_ids}
+ Should Contain ${resp} ${intent_id}
+ END
${size}= Get Length ${all_intents_correct}
- : FOR ${index} IN RANGE ${size}
- \ ${intent}= Get From List ${all_intents_correct} ${index}
- \ ${intent_id}= Get From List ${all_intents_ids} ${index}
- \ REST Update Intent By Id ${intent_id} @{intent}
- \ ${intent_from}= Get From List ${intent} 0
- \ ${intent_to}= Get From List ${intent} 1
- \ ${intent_permission}= Get From List ${intent} 2
- \ ${resp}= REST Get Intent From Id ${intent_id}
- \ Should Contain ${resp} ${intent_from}
- \ Should Contain ${resp} ${intent_to}
- \ Should Contain ${resp} ${intent_permission}
- : FOR ${id} IN @{all_intents_ids}
- \ REST Delete Intent By Id ${id}
+ FOR ${index} IN RANGE ${size}
+ ${intent}= Get From List ${all_intents_correct} ${index}
+ ${intent_id}= Get From List ${all_intents_ids} ${index}
+ REST Update Intent By Id ${intent_id} @{intent}
+ ${intent_from}= Get From List ${intent} 0
+ ${intent_to}= Get From List ${intent} 1
+ ${intent_permission}= Get From List ${intent} 2
+ ${resp}= REST Get Intent From Id ${intent_id}
+ Should Contain ${resp} ${intent_from}
+ Should Contain ${resp} ${intent_to}
+ Should Contain ${resp} ${intent_permission}
+ END
+ FOR ${id} IN @{all_intents_ids}
+ REST Delete Intent By Id ${id}
+ END
*** Keywords ***
REST Get List of Intents
... until the intent:add command is available for the test case to be run.
[Tags] NIC
Wait Until Keyword Succeeds 1 min 5 sec Verify Intent:Add Command is Available
- : FOR ${intent} IN @{all_intents}
- \ ${id}= Add Intent @{intent}
- \ Append To List ${all_intents_ids} ${id}
+ FOR ${intent} IN @{all_intents}
+ ${id}= Add Intent @{intent}
+ Append To List ${all_intents_ids} ${id}
+ END
${size}= Get Length ${all_intents}
- : FOR ${index} IN RANGE ${size}
- \ ${intent}= Get From List ${all_intents} ${index}
- \ ${intent_id}= Get From List ${all_intents_ids} ${index}
- \ Verify Intent Added ${intent_id} ${intent}
+ FOR ${index} IN RANGE ${size}
+ ${intent}= Get From List ${all_intents} ${index}
+ ${intent_id}= Get From List ${all_intents_ids} ${index}
+ Verify Intent Added ${intent_id} ${intent}
+ END
${output}= Issue Command On Karaf Console intent:compile
${size}= Get Length ${all_intent_validations}
- : FOR ${index} IN RANGE ${size}
- \ ${compiled_intent_validation}= Get From List ${all_intent_validations} ${index}
- \ ${intent_validation_line}= Get Lines Containing String ${output} ${compiled_intent_validation}
- \ ${policy}= Get From List ${all_intent_validations_policies} ${index}
- \ Should Contain ${intent_validation_line} ${policy}
- : FOR ${intent_id} IN @{all_intents_ids}
- \ Remove Intent ${intent_id}
+ FOR ${index} IN RANGE ${size}
+ ${compiled_intent_validation}= Get From List ${all_intent_validations} ${index}
+ ${intent_validation_line}= Get Lines Containing String ${output} ${compiled_intent_validation}
+ ${policy}= Get From List ${all_intent_validations_policies} ${index}
+ Should Contain ${intent_validation_line} ${policy}
+ END
+ FOR ${intent_id} IN @{all_intents_ids}
+ Remove Intent ${intent_id}
+ END
${output}= Issue Command On Karaf Console intent:list -c
- : FOR ${intent_id} IN @{all_intents_ids}
- \ Should Not Contain ${output} ${id}
+ FOR ${intent_id} IN @{all_intents_ids}
+ Should Not Contain ${output} ${id}
+ END
*** Keywords ***
Setup NIC Console Environment
[Documentation] OCPPLUGIN get param
[Tags] OCPPLUGIN get
${NODE_AMOUNT}= Convert To Integer ${NODE_AMOUNT}
- : FOR ${NODE_NUM} IN RANGE 1 ${NODE_AMOUNT+1}
- \ ${resp} Post Request session ${REST_GET_PARAM} data={"input":{"nodeId":"ocp:TST-${NODE_NUM}","objId":"ALL","paramName":"ALL"}}
- \ Should Be Equal As Strings ${resp.status_code} 200
+ FOR ${NODE_NUM} IN RANGE 1 ${NODE_AMOUNT+1}
+ ${resp} Post Request session ${REST_GET_PARAM} data={"input":{"nodeId":"ocp:TST-${NODE_NUM}","objId":"ALL","paramName":"ALL"}}
+ Should Be Equal As Strings ${resp.status_code} 200
+ END
Stop Emulator And Exit ${mininet_conn_id}
*** Test Cases ***
Add Delete Same Flow
[Documentation] Iterate on add and delete flow until alien ID is found in Operational Datastore.
- : FOR ${i} IN RANGE ${iteration}
- \ Run Keyword And Continue On Failure Add And Delete Flow f21.xml
+ FOR ${i} IN RANGE ${iteration}
+ Run Keyword And Continue On Failure Add And Delete Flow f21.xml
+ END
[Teardown] Report_Failure_Due_To_Bug 6917
Add Multiple Flows
TC03_Reconciliation check by pushing group dependent flows
[Documentation] Verify the Bundle based reconciliation by pushing multiple group dependent flows
${switch_idx} OVSDB.Get DPID ${TOOLS_SYSTEM_2_IP}
- : FOR ${index} IN RANGE 1 3
- \ Push Groups Via Restcall ${switch_idx} ${index}
- : FOR ${index} IN RANGE 1 6
- \ Push Flow Via Restcall ${switch_idx} ${FLOWFILE[${index}]}
- \ Set Test Variable ${flowbody[${index}]} ${data}
+ FOR ${index} IN RANGE 1 3
+ Push Groups Via Restcall ${switch_idx} ${index}
+ END
+ FOR ${index} IN RANGE 1 6
+ Push Flow Via Restcall ${switch_idx} ${FLOWFILE[${index}]}
+ Set Test Variable ${flowbody[${index}]} ${data}
+ END
Utils.Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo service openvswitch-switch restart
- : FOR ${index} IN RANGE 1 6
- \ Wait Until Keyword Succeeds 5s 1s FlowLib.Check Operational Flow ${True} ${flowbody[${index}]}
+ FOR ${index} IN RANGE 1 6
+ Wait Until Keyword Succeeds 5s 1s FlowLib.Check Operational Flow ${True} ${flowbody[${index}]}
+ END
Log Check if flows are pushed as bundle messages
${Resyncdone_msg}= BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}"
Check_Karaf_Log_Message_Count ${Resyncdone_msg} 2
Check Switches Generate Slave Connection
[Documentation] Check switches are connected to new Slave.
${original_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${original_owner}_IP}
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ BuiltIn.Wait Until Keyword Succeeds 50s 1s OvsManager.Should Be Slave s${switch} ${original_master}
- \ ... update_data=${True}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ BuiltIn.Wait Until Keyword Succeeds 50s 1s OvsManager.Should Be Slave s${switch} ${original_master}
+ ... update_data=${True}
+ END
Disconnect Mininet From Successor
[Documentation] Disconnect mininet from the Successor.
Check Switch Is Not Connected
[Documentation] Check switch s1 is not connected to any controller.
- : FOR ${index} IN @{cluster_index_list}
- \ BuiltIn.Wait Until Keyword Succeeds 10s 1s OvsManager.Should Be Disconnected s1 ${ODL_SYSTEM_${index}_IP}
- \ ... update_data=${True}
+ FOR ${index} IN @{cluster_index_list}
+ BuiltIn.Wait Until Keyword Succeeds 10s 1s OvsManager.Should Be Disconnected s1 ${ODL_SYSTEM_${index}_IP}
+ ... update_data=${True}
+ END
Reconnect Mininet To Cluster
[Documentation] Reconnect mininet to cluster by removing Iptables drop rules that were used to disconnect
[Arguments] ${iter}=1 ${member_index}=1
[Documentation] Add ${ITER} groups type 1 & 2 and flows in every switch.
${session} = Resolve_Http_Session_For_Member member_index=${member_index}
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-1 mapping={"SWITCH":"${switch}"} session=${session} iterations=${iter}
- \ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-2 mapping={"SWITCH":"${switch}"} session=${session} iterations=${iter}
- \ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-flow mapping={"SWITCH":"${switch}"} session=${session} iterations=${iter}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-1 mapping={"SWITCH":"${switch}"} session=${session} iterations=${iter}
+ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-2 mapping={"SWITCH":"${switch}"} session=${session} iterations=${iter}
+ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-flow mapping={"SWITCH":"${switch}"} session=${session} iterations=${iter}
+ END
Add Single Group And Flow On Member
[Arguments] ${member_index}=1
[Arguments] ${member_index}=1
[Documentation] Remove 1 group 1&2 and 1 flow in every switch.
${session} = Resolve_Http_Session_For_Member member_index=${member_index}
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
- \ RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
- \ RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
+ RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
+ RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
+ END
Check Flow Stats Are Not Frozen
[Arguments] ${member_index}=1 ${period_in_seconds}=5
Reconnect Extra Switches To Successors And Check OVS Connections
[Documentation] Connect switches s2 and s3 to successor instances.
${controller_opt} = BuiltIn.Set Variable
- : FOR ${index} IN @{original_successor_list}
- \ ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT}
- \ Log ${controller_opt}
+ FOR ${index} IN @{original_successor_list}
+ ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT}
+ Log ${controller_opt}
+ END
OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 ${controller_opt}
OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s3 ${controller_opt}
BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 7
Reconnect Extra Switches To Successors And Check OVS Connections
[Documentation] Connect switches s2 and s3 to successor instances.
${controller_opt} = BuiltIn.Set Variable
- : FOR ${index} IN @{original_successor_list}
- \ ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT}
- \ Log ${controller_opt}
+ FOR ${index} IN @{original_successor_list}
+ ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT}
+ Log ${controller_opt}
+ END
OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 ${controller_opt}
OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s3 ${controller_opt}
BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 7
Delete and Add ten percent of the flows for 5 iterations
[Documentation] Performeing 5 iterations for Delete and Add ten Percentage of the flows
- : FOR ${index} IN RANGE 1 6
- \ Log ${index}
- \ BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del_ten_percent} ${Follower_Node_1} ${operation_timeout}
- \ BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del_ten_percent} ${Inventory_Leader_List}
- \ BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add_ten_percent} ${Follower_Node_1} ${operation_timeout}
- \ BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List}
+ FOR ${index} IN RANGE 1 6
+ Log ${index}
+ BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del_ten_percent} ${Follower_Node_1} ${operation_timeout}
+ BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del_ten_percent} ${Inventory_Leader_List}
+ BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add_ten_percent} ${Follower_Node_1} ${operation_timeout}
+ BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List}
+ END
Current Term Verification After Continuous Deletion and Addition Of Flows for 5 iterations
[Documentation] Verifying current term for Leader Node after continuous deletion and addition of ten percent of the flows
SSHLibrary.Read Until mininet>
${cntls_list} BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP}
${switch_list} BuiltIn.Create List
- : FOR ${i} IN RANGE 0 ${SWITCHES}
- \ ${sid}= BuiltIn.Evaluate ${i}+1
- \ Collections.Append To List ${switch_list} s${sid}
+ FOR ${i} IN RANGE 0 ${SWITCHES}
+ ${sid}= BuiltIn.Evaluate ${i}+1
+ Collections.Append To List ${switch_list} s${sid}
+ END
BuiltIn.Set Suite Variable ${active_member} 1
OvsManager.Setup Clustered Controller For Switches ${switch_list} ${cntls_list}
BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Verify Switch Connections Running On Member ${SWITCHES} 1
Check All Switches Connected To All Cluster Nodes
[Documentation] Verifies all switches are connected to all cluster nodes
OvsManager.Get Ovsdb Data
- : FOR ${i} IN RANGE 0 ${SWITCHES}
- \ ${sid}= BuiltIn.Evaluate ${i}+1
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_1_IP} update_data=${False}
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_2_IP} update_data=${False}
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_3_IP} update_data=${False}
+ FOR ${i} IN RANGE 0 ${SWITCHES}
+ ${sid}= BuiltIn.Evaluate ${i}+1
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_1_IP} update_data=${False}
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_2_IP} update_data=${False}
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_3_IP} update_data=${False}
+ END
Reconnecting Switch Scenario
[Arguments] ${switch_name}
SSHLibrary.Read Until mininet>
${cntls_list} BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP}
${switch_list} BuiltIn.Create List
- : FOR ${i} IN RANGE 0 ${SWITCHES}
- \ ${sid}= BuiltIn.Evaluate ${i}+1
- \ Collections.Append To List ${switch_list} s${sid}
+ FOR ${i} IN RANGE 0 ${SWITCHES}
+ ${sid}= BuiltIn.Evaluate ${i}+1
+ Collections.Append To List ${switch_list} s${sid}
+ END
BuiltIn.Set Suite Variable ${active_member} 1
OvsManager.Setup Clustered Controller For Switches ${switch_list} ${cntls_list}
BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Verify Switch Connections Running On Member ${SWITCHES} 1
Check All Switches Connected To All Cluster Nodes
[Documentation] Verifies all switches are connected to all cluster nodes
OvsManager.Get Ovsdb Data
- : FOR ${i} IN RANGE 0 ${SWITCHES}
- \ ${sid}= BuiltIn.Evaluate ${i}+1
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_1_IP} update_data=${False}
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_2_IP} update_data=${False}
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_3_IP} update_data=${False}
+ FOR ${i} IN RANGE 0 ${SWITCHES}
+ ${sid}= BuiltIn.Evaluate ${i}+1
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_1_IP} update_data=${False}
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_2_IP} update_data=${False}
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_3_IP} update_data=${False}
+ END
Restarting Karaf Scenario
[Arguments] ${switch_name}
SSHLibrary.Read Until mininet>
${cntls_list} BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP}
${switch_list} BuiltIn.Create List
- : FOR ${i} IN RANGE 0 ${SWITCHES}
- \ ${sid}= BuiltIn.Evaluate ${i}+1
- \ Collections.Append To List ${switch_list} s${sid}
+ FOR ${i} IN RANGE 0 ${SWITCHES}
+ ${sid}= BuiltIn.Evaluate ${i}+1
+ Collections.Append To List ${switch_list} s${sid}
+ END
BuiltIn.Set Suite Variable ${active_member} 1
OvsManager.Setup Clustered Controller For Switches ${switch_list} ${cntls_list}
BuiltIn.Wait Until Keyword Succeeds 15s 1s ClusterOpenFlow.Verify Switch Connections Running On Member ${SWITCHES} 1
Check All Switches Connected To All Cluster Nodes
[Documentation] Verifies all switches are connected to all cluster nodes
OvsManager.Get Ovsdb Data
- : FOR ${i} IN RANGE 0 ${SWITCHES}
- \ ${sid}= BuiltIn.Evaluate ${i}+1
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_1_IP} update_data=${False}
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_2_IP} update_data=${False}
- \ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_3_IP} update_data=${False}
+ FOR ${i} IN RANGE 0 ${SWITCHES}
+ ${sid}= BuiltIn.Evaluate ${i}+1
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_1_IP} update_data=${False}
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_2_IP} update_data=${False}
+ OvsManager.Should Be Connected s${sid} ${ODL_SYSTEM_3_IP} update_data=${False}
+ END
Isolating Node Scenario
[Arguments] ${switch_name}
Test Add Flows Group 0
[Documentation] Add all flows and waits for SM to collect data
[Template] NONE
- : FOR ${flowfile} IN @{flowlist0}
- \ Log ${flowfile}
- \ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
- \ Run Keyword And Continue On Failure Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
+ # Lets wait for ofp to collect stats
+ END
${flows}= Get Length ${flowlist0}
Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow:1 ${flows}
# Show switch content (for debug purposes if needed)
Test Update Flows Group 0
[Documentation] Update all flows and waits for SM to collect data
[Template] NONE
- : FOR ${flowfile} IN @{flowlist0}
- \ Log ${flowfile}
- \ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
- \ Run Keyword And Continue On Failure Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${upddata}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${upddata}
+ # Lets wait for ofp to collect stats
+ END
Sleep ${flow_update_time}
# Show switch content (for debug purposes if needed)
Write dpctl dump-flows -O OpenFlow13
Test Delete Flows Group 0
[Documentation] Delete all flows and waits for SM to collect data
[Template] NONE
- : FOR ${flowfile} IN @{flowlist0}
- \ Log ${flowfile}
- \ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
- \ Run Keyword And Continue On Failure Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
+ # Lets wait for ofp to collect stats
+ END
Sleep ${flow_update_time}
# Show switch content (for debug purposes if needed)
Write dpctl dump-flows -O OpenFlow13
Test Add Flows Group 0
[Documentation] Add all flows and waits for SM to collect data
[Template] NONE
- : FOR ${flowfile} IN @{flowlist0}
- \ Log ${flowfile}
- \ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
- \ Run Keyword And Continue On Failure Add Flow Via RPC ${switch_idx} ${xmlroot}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Add Flow Via RPC ${switch_idx} ${xmlroot}
+ # Lets wait for ofp to collect stats
+ END
${flows}= Get Length ${flowlist0}
Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow:1 ${flows}
# Show switch content (for debug purposes if needed)
Test Update Flows Group 0
[Documentation] Update all flows and waits for SM to collect data
[Template] NONE
- : FOR ${flowfile} IN @{flowlist0}
- \ Log ${flowfile}
- \ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
- \ Run Keyword And Continue On Failure Update Flow Via RPC ${switch_idx} ${data} ${upddata}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Update Flow Via RPC ${switch_idx} ${data} ${upddata}
+ # Lets wait for ofp to collect stats
+ END
Sleep ${flow_update_time}
# Show switch content (for debug purposes if needed)
Write dpctl dump-flows -O OpenFlow13
Test Delete Flows Group 0
[Documentation] Delete all flows and waits for SM to collect data
[Template] NONE
- : FOR ${flowfile} IN @{flowlist0}
- \ Log ${flowfile}
- \ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
- \ Run Keyword And Continue On Failure Delete Flow Via RPC ${switch_idx} ${xmlroot}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Delete Flow Via RPC ${switch_idx} ${xmlroot}
+ # Lets wait for ofp to collect stats
+ END
Sleep ${flow_update_time}
# Show switch content (for debug purposes if needed)
Write dpctl dump-flows -O OpenFlow13
*** Test Cases ***
Test Add Flows
[Documentation] Add all flows and waits for SM to collect data
- : FOR ${flowfile} IN @{xml_files}
- \ Log ${flowfile}
- \ Init Flow Variables ${flowfile}
- \ Run Keyword And Continue On Failure Add Flow
+ FOR ${flowfile} IN @{xml_files}
+ Log ${flowfile}
+ Init Flow Variables ${flowfile}
+ Run Keyword And Continue On Failure Add Flow
+ END
Test Is Flow 1 Added
[Documentation] Checks if flow is configured and operational
Test Delete Flows
[Documentation] Delete all flows and waits for SM to collect data
- : FOR ${flowfile} IN @{xml_files}
- \ Log ${flowfile}
- \ Init Flow Variables ${flowfile}
- \ Run Keyword And Continue On Failure Delete Flow
+ FOR ${flowfile} IN @{xml_files}
+ Log ${flowfile}
+ Init Flow Variables ${flowfile}
+ Run Keyword And Continue On Failure Delete Flow
+ END
Test Is Flow 1 Deleted
[Documentation] Checks if flow is not configured and operational
Delete All Flows
[Documentation] Deletes all flows
- : FOR ${flowfile} IN @{xml_files}
- \ Log ${flowfile}
- \ Init Flow Variables ${flowfile}
- \ Delete Flow
+ FOR ${flowfile} IN @{xml_files}
+ Log ${flowfile}
+ Init Flow Variables ${flowfile}
+ Delete Flow
+ END
Initialization Phase
[Documentation] Initiate tcp connection with controller
[Arguments] ${numnodes}
${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ Should Contain ${resp.content} openflow:${IND}
+ FOR ${IND} IN RANGE 1 ${numnodes+1}
+ Should Contain ${resp.content} openflow:${IND}
+ END
Check Every Nodes Stats
[Arguments] ${numnodes}
- : FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} flow-capable-node-connector-statistics
- \ Should Contain ${resp.content} flow-table-statistics
+ FOR ${IND} IN RANGE 1 ${numnodes+1}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} flow-capable-node-connector-statistics
+ Should Contain ${resp.content} flow-table-statistics
+ END
Check Every Nodes Nodeconnector
[Arguments] ${numnodes}
- : FOR ${IND} IN RANGE 2 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+ FOR ${IND} IN RANGE 2 ${numnodes+1}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+ END
Check conn loop
[Arguments] ${arg} ${outerind} ${content}
- : FOR ${var} IN RANGE 1 ${arg+1}
- \ Should Contain ${content} openflow:${outerind}:${var}
+ FOR ${var} IN RANGE 1 ${arg+1}
+ Should Contain ${content} openflow:${outerind}:${var}
+ END
[Arguments] ${numnodes}
${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}
Should Be Equal As Strings ${resp.status_code} 200
- : FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ Should Contain ${resp.content} openflow:${IND}
+ FOR ${IND} IN RANGE 1 ${numnodes+1}
+ Should Contain ${resp.content} openflow:${IND}
+ END
Check Every Nodes Stats
[Arguments] ${numnodes}
- : FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} flow-capable-node-connector-statistics
- \ Should Contain ${resp.content} flow-table-statistics
+ FOR ${IND} IN RANGE 1 ${numnodes+1}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} flow-capable-node-connector-statistics
+ Should Contain ${resp.content} flow-table-statistics
+ END
Check Every Nodes Nodeconnector
[Arguments] ${numnodes}
- : FOR ${IND} IN RANGE 2 ${numnodes+1}
- \ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+ FOR ${IND} IN RANGE 2 ${numnodes+1}
+ ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+ END
Check conn loop
[Arguments] ${arg} ${outerind} ${content}
- : FOR ${var} IN RANGE 1 ${arg+1}
- \ Should Contain ${content} openflow:${outerind}:${var}
+ FOR ${var} IN RANGE 1 ${arg+1}
+ Should Contain ${content} openflow:${outerind}:${var}
+ END
${max_duration}= DateTime.Convert Time ${TEST_LENGTH} number
${start_time}= DateTime.Get Current Date
# This loop is not infinite, so going "sufficiently large" for now.
- : FOR ${i} IN RANGE 1 65536
- \ ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches} ${SUSTAIN_TIME}
- \ ${current_time}= DateTime.Get Current Date
- \ ${duration}= DateTime.Subtract Date From Date ${current_time} ${start_time} number
- \ Exit For Loop If '${status}' == 'FAIL'
- \ Exit For Loop If ${duration} > ${max_duration}
+ FOR ${i} IN RANGE 1 65536
+ ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches} ${SUSTAIN_TIME}
+ ${current_time}= DateTime.Get Current Date
+ ${duration}= DateTime.Subtract Date From Date ${current_time} ${start_time} number
+ Exit For Loop If '${status}' == 'FAIL'
+ Exit For Loop If ${duration} > ${max_duration}
+ END
${duration_compact}= DateTime.Convert Time ${duration} compact
Log to console ${\n}
Log To Console Execution stopped because: ${error_message}
${error_message}= Set Variable Fail initializing suite
${maximum_links}= Set Variable ${0}
${discover_time}= Set Variable 0
- : FOR ${switches} IN @{SWITCH_LIST}
- \ ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${maximum_links}= Evaluate ${switches} * ${switches-1}
- \ ${discover_time}= Set Variable ${topology_discover_time}
+ FOR ${switches} IN @{SWITCH_LIST}
+ ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${maximum_links}= Evaluate ${switches} * ${switches-1}
+ ${discover_time}= Set Variable ${topology_discover_time}
+ END
Log to console ${\n}
Log To Console Execution stopped because: ${error_message}
Log To Console Max Links: ${maximum_links}
${start}= Convert to Integer ${MIN_SWITCHES}
${stop}= Convert to Integer ${MAX_SWITCHES}
${step}= Convert to Integer ${STEP_SWITCHES}
- : FOR ${switches} IN RANGE ${start} ${stop+1} ${step}
- \ ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Linear Topology ${switches}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${maximum_switches}= Set variable ${switches}
- \ ${discover_time}= Set Variable ${topology_discover_time}
+ FOR ${switches} IN RANGE ${start} ${stop+1} ${step}
+ ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Linear Topology ${switches}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${maximum_switches}= Set variable ${switches}
+ ${discover_time}= Set Variable ${topology_discover_time}
+ END
Log to console ${\n}
Log To Console Execution stopped because: ${error_message}
Log To Console Max Switches: ${maximum_switches}
${init_sw} Convert to Integer ${init_sw}
${max_sw} Convert to Integer ${max_sw}
${step_sw} Convert to Integer ${step_sw}
- : FOR ${exp_sw} IN RANGE ${init_sw} ${max_sw+1} ${step_sw}
- \ BuiltIn.Wait Until Keyword Succeeds 120s 1s Verify Switches Connected ${exp_sw}
- \ ${max_found}= Set Variable ${exp_sw}
- \ Set Suite variable ${max_found}
- \ Add Switches 10
+ FOR ${exp_sw} IN RANGE ${init_sw} ${max_sw+1} ${step_sw}
+ BuiltIn.Wait Until Keyword Succeeds 120s 1s Verify Switches Connected ${exp_sw}
+ ${max_found}= Set Variable ${exp_sw}
+ Set Suite variable ${max_found}
+ Add Switches 10
+ END
[Teardown] Log Store Max Found
*** Keywords ***
@{result_name_list}= Split String ${results_list[5]} /
@{result_value_list}= Split String ${results_list[7]} /
${num_stats}= Get Length ${result_name_list}
- : FOR ${i} IN RANGE 0 ${num_stats}
- \ Log ${result_name_list[${i}]} :: ${result_value_list[${i}]}
+ FOR ${i} IN RANGE 0 ${num_stats}
+ Log ${result_name_list[${i}]} :: ${result_value_list[${i}]}
+ END
${min}= Set Variable ${result_value_list[${0}]}
${max}= Set Variable ${result_value_list[${1}]}
${average}= Set Variable ${result_value_list[${2}]}
*** Test Cases ***
Add Group 1 In Every Switch
[Documentation] Add ${ITER} groups of type 1 in every switch.
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-1 mapping={"SWITCH":"${switch}"} session=session iterations=${iter}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-1 mapping={"SWITCH":"${switch}"} session=session iterations=${iter}
+ END
Add Group 2 In Every Switch
[Documentation] Add ${ITER} groups of type 2 in every switch.
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-2 mapping={"SWITCH":"${switch}"} session=session iterations=${iter}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-2 mapping={"SWITCH":"${switch}"} session=session iterations=${iter}
+ END
Add Flow to Group 2 In Every Switch
[Documentation] Add ${ITER} flows to group type 2 in every switch.
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-flow mapping={"SWITCH":"${switch}"} session=session iterations=${ITER}
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-flow mapping={"SWITCH":"${switch}"} session=session iterations=${ITER}
+ END
Start Mininet Linear
[Documentation] Start Mininet Linear with ${SWITCHES} switches.
Remove Flows And Groups After Mininet Reconnects
[Documentation] Remove some groups and flows while network is down.
- : FOR ${switch} IN RANGE 1 ${switches+1}
- \ RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
- \ RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
- \ RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
+ FOR ${switch} IN RANGE 1 ${switches+1}
+ RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
+ RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
+ RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
+ END
Check Flows In Operational DS After Mininet Reconnects
[Documentation] Check Flows after mininet starts.
Delete Vm Instances In net_1
[Documentation] Delete Vm instances using instance names in network_1.
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Vm Instances In net_2
[Documentation] Delete Vm instances using instance names in network_2.
- : FOR ${vm} IN @{NET_2_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_2_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Sub Networks In net_1
[Documentation] Delete Sub Nets for the Networks with neutron request.
Delete Networks
[Documentation] Delete Networks with neutron request.
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Delete Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Delete Network ${network}
+ END
Delete Security Group
[Documentation] Delete security groups with neutron request
Create Networks
[Documentation] Create Network with neutron request.
- : FOR ${NetworkElement} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${NetworkElement}
+ FOR ${NetworkElement} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${NetworkElement}
+ END
Create Subnets For net_1
[Documentation] Create Sub Nets for the Networks with neutron request.
Add Interfaces To Router
[Documentation] Add Interfaces
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface @{ROUTERS}[2] ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface @{ROUTERS}[2] ${interface}
+ END
Verify Created Routers
[Documentation] Check created routers using northbound rest calls
Delete Vm Instances In net_1
[Documentation] Delete Vm instances using instance names in net_1.
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Vm Instances In net_2
[Documentation] Delete Vm instances using instance names in net_2.
- : FOR ${vm} IN @{NET_2_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_2_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Router Interfaces
[Documentation] Remove Interface to the subnets.
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Remove Interface @{ROUTERS}[2] ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Remove Interface @{ROUTERS}[2] ${interface}
+ END
Delete Routers
[Documentation] Delete Router and Interface to the subnets.
Delete Networks
[Documentation] Delete Networks with neutron request.
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Delete Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Delete Network ${network}
+ END
Delete Security Group
[Documentation] Delete security groups with neutron request
Create Networks
[Documentation] Create Network with neutron request.
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
Create Subnets For net_1
[Documentation] Create Sub Nets for the Networks with neutron request.
Add Interfaces To Router
[Documentation] Add Interfaces
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface @{ROUTERS}[2] ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface @{ROUTERS}[2] ${interface}
+ END
Verify Created Routers
[Documentation] Check created routers using northbound rest calls
Delete Vm Instances In net_1
[Documentation] Delete Vm instances using instance names in net_1.
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Vm Instances In net_2
[Documentation] Delete Vm instances using instance names in net_2.
- : FOR ${vm} IN @{NET_2_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_2_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Router Interfaces
[Documentation] Remove Interface to the subnets.
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Remove Interface @{ROUTERS}[2] ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Remove Interface @{ROUTERS}[2] ${interface}
+ END
Delete Routers
[Documentation] Delete Router and Interface to the subnets.
Delete Networks
[Documentation] Delete Networks with neutron request.
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Delete Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Delete Network ${network}
+ END
Delete Security Group
[Documentation] Delete security groups with neutron request
*** Keywords ***
Suite Setup
OpenStackOperations.OpenStack Suite Setup
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
- : FOR ${network} ${subnet} ${cidr} IN ZIP ${NETWORKS} ${SUBNETS}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
+ FOR ${network} ${subnet} ${cidr} IN ZIP ${NETWORKS} ${SUBNETS}
... ${SUBNET_CIDRS}
- \ OpenStackOperations.Create SubNet ${network} ${subnet} ${cidr}
+ OpenStackOperations.Create SubNet ${network} ${subnet} ${cidr}
+ END
OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET1_FIP_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET1_FIP_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
OpenStackOperations.Create Network ${EXTERNAL_NET_NAME} --provider-network-type flat --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK}
OpenStackOperations.Update Network ${EXTERNAL_NET_NAME} --external
OpenStackOperations.Create Subnet ${EXTERNAL_NET_NAME} ${EXTERNAL_SUBNET_NAME} ${EXTERNAL_SUBNET} --gateway ${EXTERNAL_GATEWAY} --allocation-pool ${EXTERNAL_SUBNET_ALLOCATION_POOL}
- : FOR ${router} IN @{ROUTERS}
- \ OpenStackOperations.Create Router ${router}
- : FOR ${router} ${interface} IN ZIP ${ROUTERS} ${SUBNETS}
- \ OpenStackOperations.Add Router Interface ${router} ${interface}
- : FOR ${router} IN @{ROUTERS}
- \ OpenStackOperations.Add Router Gateway ${router} ${EXTERNAL_NET_NAME}
+ FOR ${router} IN @{ROUTERS}
+ OpenStackOperations.Create Router ${router}
+ END
+ FOR ${router} ${interface} IN ZIP ${ROUTERS} ${SUBNETS}
+ OpenStackOperations.Add Router Interface ${router} ${interface}
+ END
+ FOR ${router} IN @{ROUTERS}
+ OpenStackOperations.Add Router Gateway ${router} ${EXTERNAL_NET_NAME}
+ END
${data} Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API}
BuiltIn.Log ${data}
- : FOR ${router} IN @{ROUTERS}
- \ Should Contain ${data} ${router}
+ FOR ${router} IN @{ROUTERS}
+ Should Contain ${data} ${router}
+ END
OpenStackOperations.Show Debugs @{NET1_FIP_VMS} @{NET1_SNAT_VMS} @{NET2_SNAT_VMS}
OpenStackOperations.Get Suite Debugs
Delete Vm Instances In net_1
[Documentation] Delete Vm instances using instance names in net_1.
[Tags] NON_GATE
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Vm Instances In net_2
[Documentation] Delete Vm instances using instance names in net_2.
[Tags] NON_GATE
- : FOR ${vm} IN @{NET_2_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_2_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Delete Vm Instances In net_3
[Documentation] Delete Vm instances using instance names in net_3.
[Tags] NON_GATE
- : FOR ${vm} IN @{NET_3_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_3_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Create Vm Instances For net_4
[Documentation] Create VM instances using flavor and image names for a network.
BuiltIn.Should Not Contain ${NET_2_L3_DHCP_IP} None
BuiltIn.Should Not Contain ${NET_3_L3_DHCP_IP} None
OpenStackOperations.Create Router @{ROUTER}[0]
- : FOR ${interface} IN @{SUBNETS_1}
- \ OpenStackOperations.Add Router Interface @{ROUTER}[0] ${interface}
+ FOR ${interface} IN @{SUBNETS_1}
+ OpenStackOperations.Add Router Interface @{ROUTER}[0] ${interface}
+ END
OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} @{NET_3_VMS}
OpenStackOperations.Get Suite Debugs
${vm_host_before_migration} = OpenStackOperations.Get Hypervisor Host Of Vm @{NET_1_VMS}[0]
OpenStackOperations.Server Live Migrate @{NET_1_VMS}[0]
${vm_list} = BuiltIn.Create List @{NET_1_VMS}[0]
- : FOR ${vm} IN @{vm_list}
- \ BuiltIn.Wait Until Keyword Succeeds 6x 20s OpenStackOperations.Check If Migration Is Complete ${vm}
+ FOR ${vm} IN @{vm_list}
+ BuiltIn.Wait Until Keyword Succeeds 6x 20s OpenStackOperations.Check If Migration Is Complete ${vm}
+ END
${vm_host_after_migration} = OpenStackOperations.Get Hypervisor Host Of Vm @{NET_1_VMS}[0]
BuiltIn.Run Keyword If "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp" BuiltIn.Should Match ${vm_host_after_migration} ${vm_host_before_migration}
... ELSE BuiltIn.Should Not Match ${vm_host_after_migration} ${vm_host_before_migration}
OpenStackOperations.Create Router ${ROUTER}
Add Interfaces To Router
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
Ping From Vm Instance1 To Vm Instance3
[Documentation] Login to the vm instance and test some operations
#TODO Remove this after the Newton jobs are removed, Openstack CLI with Newton lacks support to configure rule with remote_ip_prefix
OpenStackOperations.Neutron Security Group Rule Create additional-sg direction=ingress protocol=icmp remote_ip_prefix=${NET_1_DHCP_IP}/32
OpenStackOperations.Neutron Security Group Show additional-sg
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Add Security Group To VM ${vm} additional-sg
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Add Security Group To VM ${vm} additional-sg
+ END
Ping From DHCP To Vm Instance1
[Documentation] Check reachability of vm instances by pinging to them from DHCP.
OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${vm_ips}
Remove Router Interfaces
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Remove Interface ${ROUTER} ${interface}
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Remove Interface ${ROUTER} ${interface}
+ END
Delete Router
OpenStackOperations.Delete Router ${ROUTER}
OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${vm_ips}
Delete Vm Instances In net_2
- : FOR ${vm} IN @{NET_2_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_2_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
Repeat Ping From Vm Instance1 To Vm Instance2 With net_2 VM Deleted
[Documentation] Login to the vm instance and test some operations
... of the Suite Teardown, all steps will be attempted. This prevents robot framework from bailing
... on the rest of a test case if one step intermittently has trouble and fails. The goal is to attempt
... to leave the test environment as clean as possible upon completion of this suite.
- : FOR ${vm} IN @{NET_1_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
+ FOR ${vm} IN @{NET_1_VMS}
+ OpenStackOperations.Delete Vm Instance ${vm}
+ END
OpenStackOperations.Delete SFC Port Chain SFPSYM
OpenStackOperations.Delete SFC Port Pair Group SFPPG1
OpenStackOperations.Delete SFC Port Pair SFPP1
OpenStackOperations.Delete SFC Flow Classifier FC_101_103
OpenStackOperations.Delete SFC Flow Classifier FC_SYM
- : FOR ${port} IN @{PORTS}
- \ OpenStackOperations.Delete Port ${port}
+ FOR ${port} IN @{PORTS}
+ OpenStackOperations.Delete Port ${port}
+ END
OpenStackOperations.Delete SubNet l2_subnet_1
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Delete Network ${network}
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Delete Network ${network}
+ END
OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
*** Keywords ***
OpenStackOperations.Get Suite Debugs
Create Ports For Testing
- : FOR ${port} IN @{PORTS}
- \ OpenStackOperations.Create Port @{NETWORKS}[0] ${port} sg=${SECURITY_GROUP}
+ FOR ${port} IN @{PORTS}
+ OpenStackOperations.Create Port @{NETWORKS}[0] ${port} sg=${SECURITY_GROUP}
+ END
OpenStackOperations.Update Port p1in additional_args=--no-security-group
OpenStackOperations.Update Port p1in additional_args=--disable-port-security
OpenStackOperations.Update Port p1out additional_args=--no-security-group
Verify ARP request generated from Spoofed MAC for the VM
[Documentation] Verifying ARP resquest generated for Spoofed MAC with Valid IP and Validate the ARP packet drop at the VM Egress Table
${count} = String.Get Line Count ${ARP_CONFIG}
- : FOR ${index} IN RANGE 0 ${count}
- \ ${cmd} = String.Get Line ${ARP_CONFIG} ${index}
- \ ${output} = OpenStackOperations.Execute Command on VM Instance @{REQ_NETWORKS}[1] @{VM_IP_DPN1}[1] ${cmd}
+ FOR ${index} IN RANGE 0 ${count}
+ ${cmd} = String.Get Line ${ARP_CONFIG} ${index}
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{REQ_NETWORKS}[1] @{VM_IP_DPN1}[1] ${cmd}
+ END
${get_pkt_count_before_arp} = OvsManager.Get Packet Count From Table ${OS_CMP1_IP} ${INTEGRATION_BRIDGE} table=@{DEFAULT_FLOW_TABLES}[15] | grep ${VM1_METADATA}.*${ARP_SHA}
${get_arp_drop_pkt_before} = OvsManager.Get Packet Count From Table ${OS_CMP1_IP} ${INTEGRATION_BRIDGE} table=@{DEFAULT_FLOW_TABLES}[15] | grep ${ARP}.*${TABLE}
${arping_cli} = BuiltIn.Set Variable sudo arping -I eth0 -c ${PACKET_COUNT} \ ${RANDOM_IP}
OpenStackOperations.Neutron Security Group Rule Create @{SECURITY_GROUP}[0] direction=egress port_range_max=65535 port_range_min=1 protocol=tcp remote-ip=0.0.0.0/0
OpenStackOperations.Create Vm Instance With Ports On Compute Node @{PORTS}[0] @{PORTS}[1] @{VM_NAMES}[0] ${OS_CMP1_HOSTNAME} flavor=m1.tiny sg=@{SECURITY_GROUP}[0]
OpenStackOperations.Create Vm Instance With Ports On Compute Node @{PORTS}[2] @{PORTS}[3] @{VM_NAMES}[1] ${OS_CMP2_HOSTNAME} flavor=m1.tiny sg=@{SECURITY_GROUP}[0]
- : FOR ${vm} IN @{VM_NAMES}
- \ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ FOR ${vm} IN @{VM_NAMES}
+ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ END
@{VM_IP_DPN1} = BuiltIn.Wait Until Keyword Succeeds 300 sec 15 sec OpenStackOperations.Get All VM IP Addresses ${OS_CMP1_CONN_ID} @{VM_NAMES}[0]
@{VM_IP_DPN2} = BuiltIn.Wait Until Keyword Succeeds 300 sec 15 sec OpenStackOperations.Get All VM IP Addresses ${OS_CMP2_CONN_ID} @{VM_NAMES}[1]
BuiltIn.Set Suite Variable @{VM_IP_DPN1}
BuiltIn.Set Suite Variable @{VM_IP_DPN2}
- : FOR ${ip} IN @{VM_IP_DPN1}
- \ BuiltIn.Should Not Contain ${ip} None
- : FOR ${ip} IN @{VM_IP_DPN2}
- \ BuiltIn.Should Not Contain ${ip} None
+ FOR ${ip} IN @{VM_IP_DPN1}
+ BuiltIn.Should Not Contain ${ip} None
+ END
+ FOR ${ip} IN @{VM_IP_DPN2}
+ BuiltIn.Should Not Contain ${ip} None
+ END
${VM1_PORT} = Get VMs OVS Port Number ${OS_CMP1_IP} @{PORTS}[0]
${VM1_METADATA} = OVSDB.Get Port Metadata ${OS_CMP1_IP} ${VM1_PORT}
BuiltIn.Set Suite Variable ${VM1_METADATA}
${SUBNET2_BCAST_IP} 56.0.0.255
${ENABLE_BCAST} echo 0 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
-*** Test case ***
+*** Test Case ***
Verify Network Broadcast traffic between the VMs hosted in Single Network
[Documentation] This TC is to verify Network Broadcast traffic between the VMs hosted in Same Network on same/different compute node
${pkt_check} = BuiltIn.Set Variable If "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp" 10 5
OpenStackOperations.Get Suite Debugs
Create Setup
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
- : FOR ${i} IN RANGE len(${NETWORKS})
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDRS}[${i}]
+ FOR ${network} IN @{NETWORKS}
+ OpenStackOperations.Create Network ${network}
+ END
+ FOR ${i} IN RANGE len(${NETWORKS})
+ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDRS}[${i}]
+ END
OpenStackOperations.Create Allow All SecurityGroup @{SECURITY_GROUP}[0]
OpenStackOperations.Create Router ${ROUTER}
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
- : FOR ${port_net1} IN @{NET_1_PORTS}
- \ OpenStackOperations.Create Port @{NETWORKS}[0] ${port_net1} sg=@{SECURITY_GROUP}[0]
- : FOR ${port_net2} IN @{NET_2_PORTS}
- \ OpenStackOperations.Create Port @{NETWORKS}[1] ${port_net2} sg=@{SECURITY_GROUP}[0]
+ FOR ${interface} IN @{SUBNETS}
+ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ END
+ FOR ${port_net1} IN @{NET_1_PORTS}
+ OpenStackOperations.Create Port @{NETWORKS}[0] ${port_net1} sg=@{SECURITY_GROUP}[0]
+ END
+ FOR ${port_net2} IN @{NET_2_PORTS}
+ OpenStackOperations.Create Port @{NETWORKS}[1] ${port_net2} sg=@{SECURITY_GROUP}[0]
+ END
@{ports} = BuiltIn.Create List @{NET_1_PORTS}[0] @{NET_1_PORTS}[1] @{NET_1_PORTS}[2] @{NET_2_PORTS}[0] @{NET_2_PORTS}[1]
@{vms} = BuiltIn.Create List @{NET_1_VMS}[0] @{NET_1_VMS}[1] @{NET_1_VMS}[2] @{NET_2_VMS}[0] @{NET_2_VMS}[1]
@{nodes} = BuiltIn.Create List ${OS_CMP1_HOSTNAME} ${OS_CMP1_HOSTNAME} ${OS_CMP2_HOSTNAME} ${OS_CMP1_HOSTNAME} ${OS_CMP2_HOSTNAME}
- : FOR ${port} ${vm} ${node} IN ZIP ${ports} ${vms}
+ FOR ${port} ${vm} ${node} IN ZIP ${ports} ${vms}
... ${nodes}
- \ OpenStackOperations.Create Vm Instance With Port On Compute Node ${port} ${vm} ${node} sg=@{SECURITY_GROUP}[0]
+ OpenStackOperations.Create Vm Instance With Port On Compute Node ${port} ${vm} ${node} sg=@{SECURITY_GROUP}[0]
+ END
@{vms} = Collections.Combine Lists ${NET_1_VMS} ${NET_2_VMS}
@{VM_IPS} = OpenStackOperations.Get VM IPs @{vms}
BuiltIn.Should Not Contain ${VM_IPS} None
${cmd2} = Utils.Run Command On Remote System And Log ${OS_CMP2_IP} ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata:
${output2} = String.Get Regexp Matches ${cmd2} reg6=(\\w+) 1
${metalist} = Collections.Combine Lists ${output1} ${output2}
- : FOR ${meta} IN @{metalist}
- \ ${metadata_check_status} = Run Keyword And Return Status should contain ${vm_metadata} ${meta}
- \ Return From Keyword if ${metadata_check_status} == True ${meta}
+ FOR ${meta} IN @{metalist}
+ ${metadata_check_status} = Run Keyword And Return Status should contain ${vm_metadata} ${meta}
+ Return From Keyword if ${metadata_check_status} == True ${meta}
+ END
Verify L3Broadcast With Antispoofing Table
[Arguments] ${OS_COMPUTE_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} ${vm_ip} ${subnet_var} ${ping_response}='pingsuccess'
${output}= Issue Command On Karaf Console networkdevice:get-reachable
${output}= Split To Lines ${output}
${length}= Get Length ${output}
- : FOR ${INDEX} IN RANGE 0 ${length}
- \ ${line}= Get From List ${output} ${INDEX}
- \ ${data}= Fetch From Right ${line} ipAddress=IpAddress{value=
- \ ${data}= Split String ${data} },
- \ ${data}= Get From List ${data} 0
- \ Run Keyword If '${data}' == '${device_ip}' Exit For Loop
+ FOR ${INDEX} IN RANGE 0 ${length}
+ ${line}= Get From List ${output} ${INDEX}
+ ${data}= Fetch From Right ${line} ipAddress=IpAddress{value=
+ ${data}= Split String ${data} },
+ ${data}= Get From List ${data} 0
+ Run Keyword If '${data}' == '${device_ip}' Exit For Loop
+ END
[Return] ${line}
Find Device Id
Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
Should Contain ${resp.content} SFC1-400
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
${path} Get From Dictionary ${result} service-function-paths
Lists Should be Equal ${path} ${paths}
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Check For Elements At URI ${SFF_SFFLOG_URI} ${elements}
Check For Elements At URI ${SERVICE_FORWARDERS_URI} ${elements}
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variable. Logical SFFs
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Check For Elements At URI ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2/sff-sff-data-plane-locator ${elements}
Check For Elements At URI ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2 ${elements}
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Check For Elements At URI ${SN_NODE100_URI} ${elements}
Check For Elements At URI ${SERVICE_NODES_URI} ${elements}
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Check For Elements At URI ${SERVICE_CHAIN100_URI} ${elements}
Check For Elements At URI ${SERVICE_CHAINS_URI} ${elements}
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Check For Elements At URI ${SERVICE_WSP_SCHED_TYPE_URI} ${elements}
Check For Elements At URI ${SERVICE_SCHED_TYPES_URI} ${elements}
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
Should Contain ${resp.content} SFC1-400
-*** keywords ***
+*** Keywords ***
Init Suite
[Documentation] Initialize session and ODL version specific variables
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Test Nodes
[Arguments] ${version} ${PASSWORD} @{versions}
[Documentation] Setup connection Speaker => Listener / Listener => Speaker / Both <=> Both for specific versions
- : FOR ${r_version} IN @{versions}
- \ ${cmp_version} Lower Version ${r_version} ${version}
- \ BuiltIn.Log ${r_version}
- \ SxpLib.Add Connection ${r_version} listener 127.0.0.2 64999 127.0.0.1
- \ ... ${PASSWORD}
- \ SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
- \ ... ${PASSWORD}
- \ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} listener
- \ ... 127.0.0.2 64999 127.0.0.1
- \ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} speaker
- \ ... 127.0.0.1 64999 127.0.0.2
- \ BuiltIn.Log OK ${r_version}:listener ${version}:speaker
- \ SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.3
- \ ... ${PASSWORD}
- \ SxpLib.Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.2
- \ ... ${PASSWORD}
- \ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} listener
- \ ... 127.0.0.2 64999 127.0.0.3
- \ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} speaker
- \ ... 127.0.0.3 64999 127.0.0.2
- \ BuiltIn.Log OK ${version}:listener ${r_version}:speaker
- \ BuiltIn.Run Keyword If '${version}' == 'version4' and '${r_version}' == 'version4' Test Both ${version} ${r_version} ${PASSWORD}
- \ Clean Nodes
+ FOR ${r_version} IN @{versions}
+ ${cmp_version} Lower Version ${r_version} ${version}
+ BuiltIn.Log ${r_version}
+ SxpLib.Add Connection ${r_version} listener 127.0.0.2 64999 127.0.0.1
+ ... ${PASSWORD}
+ SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
+ ... ${PASSWORD}
+ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} listener
+ ... 127.0.0.2 64999 127.0.0.1
+ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} speaker
+ ... 127.0.0.1 64999 127.0.0.2
+ BuiltIn.Log OK ${r_version}:listener ${version}:speaker
+ SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.3
+ ... ${PASSWORD}
+ SxpLib.Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.2
+ ... ${PASSWORD}
+ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} listener
+ ... 127.0.0.2 64999 127.0.0.3
+ BuiltIn.Wait Until Keyword Succeeds 120x 1s SxpLib.Verify Connection ${cmp_version} speaker
+ ... 127.0.0.3 64999 127.0.0.2
+ BuiltIn.Log OK ${version}:listener ${r_version}:speaker
+ BuiltIn.Run Keyword If '${version}' == 'version4' and '${r_version}' == 'version4' Test Both ${version} ${r_version} ${PASSWORD}
+ Clean Nodes
+ END
Test Both
[Arguments] ${version} ${r_version} ${PASSWORD}
RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} timeout=${DEFAULT_TIMEOUT_HTTP} max_retries=0
SSHKeywords.Open_Connection_To_ODL_System
${ODL_SYSTEM_JAVA_HOME} SSHLibrary.Execute_Command java -XshowSettings:properties -version 2>&1 | grep java.home | sed 's/.*= //'
- : FOR ${node} IN RANGE 1 ${node_range}+1
- \ SSHKeywords.Execute_Command_Should_Pass ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -genkeypair -alias odl-sxp-${node} -keyalg RSA -storepass ${password} -keypass ${password} -dname "CN=www.opendaylight.org, OU=csit, O=ODL, L=N/A, S=N/A, C=N/A" -keystore csit-keystore-${node}
- \ SSHKeywords.Execute_Command_Should_Pass ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -exportcert -keystore csit-keystore-${node} -alias odl-sxp-${node} -storepass ${password} -file odl-sxp-${node}.cer
- # Node-1 TRUSTS Node-2, Node-5
+ FOR ${node} IN RANGE 1 ${node_range}+1
+ SSHKeywords.Execute_Command_Should_Pass ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -genkeypair -alias odl-sxp-${node} -keyalg RSA -storepass ${password} -keypass ${password} -dname "CN=www.opendaylight.org, OU=csit, O=ODL, L=N/A, S=N/A, C=N/A" -keystore csit-keystore-${node}
+ SSHKeywords.Execute_Command_Should_Pass ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -exportcert -keystore csit-keystore-${node} -alias odl-sxp-${node} -storepass ${password} -file odl-sxp-${node}.cer
+ # Node-1 TRUSTS Node-2, Node-5
+ END
SSHKeywords.Execute_Command_Should_Pass ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-1 -alias odl-sxp-2 -storepass ${password} -keypass ${password} -file odl-sxp-2.cer -noprompt
SSHKeywords.Execute_Command_Should_Pass ${ODL_SYSTEM_JAVA_HOME}/bin/keytool -importcert -keystore csit-truststore-1 -alias odl-sxp-5 -storepass ${password} -keypass ${password} -file odl-sxp-5.cer -noprompt
# Node-2 TRUSTS Node-1
SSHKeywords.Execute_Command_Should_Pass mv ./csit-keystore-* ${ssl_stores}
SSHKeywords.Execute_Command_Should_Pass mv ./csit-truststore-* ${ssl_stores}
SSHLibrary.Close Connection
- : FOR ${node} IN RANGE 1 ${node_range}+1
- \ ${SSL} BuiltIn.Create Dictionary truststore=${ssl_stores}/csit-truststore-${node} keystore=${ssl_stores}/csit-keystore-${node} password=${password}
- \ ${rnd_retry_time} = BuiltIn.Evaluate random.randint(1, 5) modules=random
- \ SxpLib.Add Node 127.0.0.${node} ${EMPTY} ssl_stores=${SSL} retry_open_timer=${rnd_retry_time}
- \ BuiltIn.Wait Until Keyword Succeeds 20x 10s SxpLib.Check Node started 127.0.0.${node} system=${ODL_SYSTEM_IP}
- \ SxpLib.Add Bindings ${node}00 1.1.1.${node}/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}00 2.2.2.${node}/32 127.0.0.${node}
+ FOR ${node} IN RANGE 1 ${node_range}+1
+ ${SSL} BuiltIn.Create Dictionary truststore=${ssl_stores}/csit-truststore-${node} keystore=${ssl_stores}/csit-keystore-${node} password=${password}
+ ${rnd_retry_time} = BuiltIn.Evaluate random.randint(1, 5) modules=random
+ SxpLib.Add Node 127.0.0.${node} ${EMPTY} ssl_stores=${SSL} retry_open_timer=${rnd_retry_time}
+ BuiltIn.Wait Until Keyword Succeeds 20x 10s SxpLib.Check Node started 127.0.0.${node} system=${ODL_SYSTEM_IP}
+ SxpLib.Add Bindings ${node}00 1.1.1.${node}/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}00 2.2.2.${node}/32 127.0.0.${node}
+ END
Verify Topology Bindings
[Arguments] ${node_range}
[Documentation] Create session to Controller
${resp} SxpLib.Get Bindings 127.0.0.5
- : FOR ${node} IN RANGE 1 ${node_range}+1
- \ SxpLib.Should Contain Binding ${resp} ${node}00 1.1.1.${node}/32
- \ SxpLib.Should Contain Binding ${resp} ${node}00 2.2.2.${node}/32
+ FOR ${node} IN RANGE 1 ${node_range}+1
+ SxpLib.Should Contain Binding ${resp} ${node}00 1.1.1.${node}/32
+ SxpLib.Should Contain Binding ${resp} ${node}00 2.2.2.${node}/32
+ END
Clean Nodes
[Documentation] Cleanup of resources alocated by test suite
[Documentation] Setup custom SXP cluster topology with ${NUM_ODL_SYSTEM} nodes and one device
SxpClusterLib.Check Shards Status
SxpClusterLib.Setup SXP Cluster ${mode}
- : FOR ${i} IN RANGE 1 25
- \ SxpLib.Add Bindings ${i}0 ${i}.${i}.${i}.${i}/32 node=${node} session=${session}
+ FOR ${i} IN RANGE 1 25
+ SxpLib.Add Bindings ${i}0 ${i}.${i}.${i}.${i}/32 node=${node} session=${session}
+ END
Isolate SXP Controller
[Arguments] ${controller_index} ${node} ${session}=ClusterManagement__session_${controller_index}
[Arguments] ${node} ${session}
[Documentation] Checks that bindings were propagated to Peer
${resp} = SxpLib.Get Bindings node=${node} session=${session}
- : FOR ${i} IN RANGE 1 25
- \ SxpLib.Should Contain Binding ${resp} ${i}0 ${i}.${i}.${i}.${i}/32
+ FOR ${i} IN RANGE 1 25
+ SxpLib.Should Contain Binding ${resp} ${i}0 ${i}.${i}.${i}.${i}/32
+ END
Add Bindings To Node
[Arguments] ${node} ${session}
[Documentation] Setup initial bindings to SXP device/controller ${node} with ${session}
- : FOR ${i} IN RANGE 1 ${BINDINGS}
- \ SxpLib.Add Bindings ${i}0 ${i}.${i}.${i}.${i}/32 node=${node} session=${session}
+ FOR ${i} IN RANGE 1 ${BINDINGS}
+ SxpLib.Add Bindings ${i}0 ${i}.${i}.${i}.${i}/32 node=${node} session=${session}
+ END
Isolate SXP Controller
[Arguments] ${controller_index}
[Arguments] ${node} ${session}
[Documentation] Check that bindings were propagated to the peer ${node}
${resp} = SxpLib.Get Bindings node=${node} session=${session}
- : FOR ${i} IN RANGE 1 ${BINDINGS}
- \ SxpLib.Should Contain Binding ${resp} ${i}0 ${i}.${i}.${i}.${i}/32
+ FOR ${i} IN RANGE 1 ${BINDINGS}
+ SxpLib.Should Contain Binding ${resp} ${i}0 ${i}.${i}.${i}.${i}/32
+ END
SxpLib.Add PeerGroup GROUP peers=${EMPTY} node=${INADDR_ANY} session=ClusterManagement__session_1
${resp} = SxpLib.Get Peer Groups ${INADDR_ANY} session=ClusterManagement__session_2
@{groups} = Sxp.Parse Peer Groups ${resp}
- : FOR ${group} IN @{groups}
- \ SxpLib.Delete Peer Group ${group['name']} node=${INADDR_ANY} session=ClusterManagement__session_3
+ FOR ${group} IN @{groups}
+ SxpLib.Delete Peer Group ${group['name']} node=${INADDR_ANY} session=ClusterManagement__session_3
+ END
[Teardown] Delete Node And Check It Is Stopped
Test Add/Delete Domain Filter
[Arguments] ${controller_index}
[Documentation] Isolate one of cluster nodes and perform check that RPC changes were performed afterwards reverts isolation
${owner_controller} = SxpClusterLib.Get Owner Controller
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Add Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ SxpLib.Add Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
+ END
@{running_members} = ClusterManagement.Isolate_Member_From_List_Or_All ${controller_index}
BuiltIn.Wait Until Keyword Succeeds 120x 1s ClusterManagement.Verify_Members_Are_Ready member_index_list=${running_members} verify_cluster_sync=True verify_restconf=True
... verify_system_status=False service_list=${EMPTY_LIST}
${running_member} = Collections.Get From List ${running_members} 0
${owner_controller} = SxpClusterLib.Get Owner Controller ${running_member}
BuiltIn.Wait Until Keyword Succeeds 60x 1s Check Bindings Exist ${owner_controller}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Delete Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ SxpLib.Delete Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
+ END
ClusterManagement.Flush_Iptables_From_List_Or_All
BuiltIn.Wait Until Keyword Succeeds 120x 1s ClusterManagement.Verify_Members_Are_Ready member_index_list=${EMPTY} verify_cluster_sync=True verify_restconf=True
... verify_system_status=False service_list=${EMPTY_LIST}
[Arguments] ${owner_controller}
[Documentation] Check that bindings exists in Cluster datastore
${resp} = SxpLib.Get Bindings node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Should Contain Binding ${resp} ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ SxpLib.Should Contain Binding ${resp} ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
+ END
Check Bindings Does Not Exist
[Arguments] ${owner_controller}
[Documentation] Check that bindings does not exist in Cluster datastore
${resp} = SxpLib.Get Bindings node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Should Not Contain Binding ${resp} ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ SxpLib.Should Not Contain Binding ${resp} ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
+ END
*** Keywords ***
Setup Nodes
[Arguments] ${version}=version4 ${password}=none
- : FOR ${node} IN RANGE 2 5
- \ SxpLib.Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
- \ ... ${password}
- \ SxpLib.Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
- \ ... ${password}
- \ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
- \ ... 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 2 5
+ SxpLib.Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
+ ... ${password}
+ SxpLib.Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
+ ... ${password}
+ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
+ ... 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} both 127.0.0.5 64999 127.0.0.3 ${password}
SxpLib.Add Connection ${version} both 127.0.0.3 64999 127.0.0.5 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.5
Setup Nodes Legacy Par One
[Arguments] ${version}=version3 ${password}=none
- : FOR ${node} IN RANGE 1 6
- \ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 1 6
+ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} listener 127.0.0.1 64999 127.0.0.2 ${password}
SxpLib.Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.1 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.2
Setup Nodes Legacy Par Two
[Arguments] ${version}=version3 ${password}=none
- : FOR ${node} IN RANGE 1 6
- \ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 1 6
+ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2 ${password}
SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
[Documentation] Test PeerSequence filter combined with PrefixList filter
[Tags] SXP Filtering
@{scopes} = BuiltIn.Create List inbound inbound-discarding
- : FOR ${scope} IN @{scopes}
- \ SxpLib.Add PeerGroup GROUP
- \ ${entry1} = Sxp.Get Filter Entry 10 permit ps=le,1
- \ ${entries} = Common.Combine Strings ${entry1}
- \ SxpLib.Add Filter GROUP ${scope} ${entries}
- \ Setup Nodes Inbound Test
- \ ${peers} = Sxp.Add Peers 127.0.0.2
- \ SxpLib.Add PeerGroup GROUP2 ${peers}
- \ ${entry1} = Sxp.Get Filter Entry 10 permit pl=1.1.0.0/16
- \ ${entries} = Common.Combine Strings ${entry1}
- \ SxpLib.Add Filter GROUP2 ${scope} ${entries}
- \ BuiltIn.Wait Until Keyword Succeeds 4 2 Check Inbound PL Combinations Filtering
- \ Clean Nodes
+ FOR ${scope} IN @{scopes}
+ SxpLib.Add PeerGroup GROUP
+ ${entry1} = Sxp.Get Filter Entry 10 permit ps=le,1
+ ${entries} = Common.Combine Strings ${entry1}
+ SxpLib.Add Filter GROUP ${scope} ${entries}
+ Setup Nodes Inbound Test
+ ${peers} = Sxp.Add Peers 127.0.0.2
+ SxpLib.Add PeerGroup GROUP2 ${peers}
+ ${entry1} = Sxp.Get Filter Entry 10 permit pl=1.1.0.0/16
+ ${entries} = Common.Combine Strings ${entry1}
+ SxpLib.Add Filter GROUP2 ${scope} ${entries}
+ BuiltIn.Wait Until Keyword Succeeds 4 2 Check Inbound PL Combinations Filtering
+ Clean Nodes
+ END
Inbound ACL Combinations Filtering
[Documentation] Test PeerSequence filter combined with ACL filter
[Tags] SXP Filtering
@{scopes} = BuiltIn.Create List inbound inbound-discarding
- : FOR ${scope} IN @{scopes}
- \ ${peers} = Sxp.Add Peers 127.0.0.2
- \ SxpLib.Add PeerGroup GROUP2 ${peers}
- \ ${entry1} = Sxp.Get Filter Entry 10 permit ps=le,2
- \ ${entries} Common.Combine Strings ${entry1}
- \ SxpLib.Add Filter GROUP2 ${scope} ${entries}
- \ Setup Nodes Inbound Test
- \ ${entry1} = Sxp.Get Filter Entry 10 permit acl=1.1.1.0,0.0.0.255
- \ ${entries} = Common.Combine Strings ${entry1}
- \ SxpLib.Add Filter GROUP2 ${scope} ${entries}
- \ ${peers} = Sxp.Add Peers 127.0.0.5
- \ SxpLib.Add PeerGroup GROUP5 ${peers}
- \ ${entry1} = Sxp.Get Filter Entry 10 permit sgt=40
- \ ${entries} = Common.Combine Strings ${entry1}
- \ SxpLib.Add Filter GROUP5 ${scope} ${entries}
- \ BuiltIn.Wait Until Keyword Succeeds 4 2 Check Inbound ACL Combinations Filtering
- \ Clean Nodes
+ FOR ${scope} IN @{scopes}
+ ${peers} = Sxp.Add Peers 127.0.0.2
+ SxpLib.Add PeerGroup GROUP2 ${peers}
+ ${entry1} = Sxp.Get Filter Entry 10 permit ps=le,2
+ ${entries} Common.Combine Strings ${entry1}
+ SxpLib.Add Filter GROUP2 ${scope} ${entries}
+ Setup Nodes Inbound Test
+ ${entry1} = Sxp.Get Filter Entry 10 permit acl=1.1.1.0,0.0.0.255
+ ${entries} = Common.Combine Strings ${entry1}
+ SxpLib.Add Filter GROUP2 ${scope} ${entries}
+ ${peers} = Sxp.Add Peers 127.0.0.5
+ SxpLib.Add PeerGroup GROUP5 ${peers}
+ ${entry1} = Sxp.Get Filter Entry 10 permit sgt=40
+ ${entries} = Common.Combine Strings ${entry1}
+ SxpLib.Add Filter GROUP5 ${scope} ${entries}
+ BuiltIn.Wait Until Keyword Succeeds 4 2 Check Inbound ACL Combinations Filtering
+ Clean Nodes
+ END
Outbound PL Combinations Filtering
[Documentation] Test PeerSequence filter combined with PrefixList filter
SxpLib.Add Bindings 10 10.10.10.0/24 127.0.0.1
SxpLib.Add Bindings 10 10.10.0.0/16 127.0.0.1
SxpLib.Add Bindings 10 10.0.0.0/8 127.0.0.1
- : FOR ${node} IN RANGE 2 6
- \ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 2 6
+ SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} listener 127.0.0.1 64999 127.0.0.2 ${password}
SxpLib.Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.1 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 SxpLib.Verify Connection ${version} speaker 127.0.0.2
Setup Nodes Inbound Test
[Arguments] ${version}=version4 ${password}=none
[Documentation] Setup Topology for inbound PeerSequence and other filters tests
- : FOR ${node} IN RANGE 2 6
- \ SxpLib.Add Bindings ${node}0 1.1.1.${node}/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 1.1.${node}.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 1.${node}.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 2 6
+ SxpLib.Add Bindings ${node}0 1.1.1.${node}/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 1.1.${node}.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 1.${node}.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2 ${password}
SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 SxpLib.Verify Connection ${version} listener 127.0.0.2
SxpLib.Add Bindings 10 1.1.1.0/24 127.0.0.1
SxpLib.Add Bindings 10 1.1.0.0/16 127.0.0.1
SxpLib.Add Bindings 10 1.0.0.0/8 127.0.0.1
- : FOR ${node} IN RANGE 3 6
- \ SxpLib.Add Bindings ${node}0 1.1.1.${node}/32 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 1.1.${node}.0/24 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 1.${node}.0.0/16 127.0.0.${node}
- \ SxpLib.Add Bindings ${node}0 ${node}.0.0.0/8 127.0.0.${node}
+ FOR ${node} IN RANGE 3 6
+ SxpLib.Add Bindings ${node}0 1.1.1.${node}/32 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 1.1.${node}.0/24 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 1.${node}.0.0/16 127.0.0.${node}
+ SxpLib.Add Bindings ${node}0 ${node}.0.0.0/8 127.0.0.${node}
+ END
SxpLib.Add Connection ${version} listener 127.0.0.1 64999 127.0.0.2 ${password}
SxpLib.Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.1 ${password}
BuiltIn.Wait Until Keyword Succeeds 15 1 SxpLib.Verify Connection ${version} speaker 127.0.0.2
SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
- : FOR ${node} IN RANGE 3 6
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.10.${node}0/32
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.${node}0.0/24
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.${node}0.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 ${node}0.0.0.0/8
+ FOR ${node} IN RANGE 3 6
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.10.${node}0/32
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.${node}0.0/24
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.${node}0.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 ${node}0.0.0.0/8
+ END
Check PeerSequence Two
[Documentation] Node 127.0.0.2 should contain only bindings with peer sequence lower or equals 2
SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
- : FOR ${node} IN RANGE 4 6
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.10.${node}0/32
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.${node}0.0/24
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.${node}0.0.0/16
- \ SxpLib.Should Not Contain Binding ${resp} ${node}0 ${node}0.0.0.0/8
+ FOR ${node} IN RANGE 4 6
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.10.${node}0/32
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.10.${node}0.0/24
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 10.${node}0.0.0/16
+ SxpLib.Should Not Contain Binding ${resp} ${node}0 ${node}0.0.0.0/8
+ END
Check PeerSequence Three
[Documentation] Node 127.0.0.2 should contain only bindings with peer sequence lower or equals 3
Wait Until Keyword Succeeds 15 1 Check Initialized
Add Filters
Wait Until Keyword Succeeds 15 1 Check Domain Sharing
- : FOR ${node} IN RANGE 2 5
- \ Delete Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
- \ Delete Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ FOR ${node} IN RANGE 2 5
+ Delete Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
+ Delete Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ END
Wait Until Keyword Succeeds 15 1 Check Domain Sharing After Update
- : FOR ${node} IN RANGE 2 5
- \ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ FOR ${node} IN RANGE 2 5
+ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ END
Wait Until Keyword Succeeds 15 1 Check Domain Sharing
Local Binding Non Transitivity Test
Setup Nodes Local
[Documentation] Setups Multi domain topology consisting of 3 specific domains and 1 default, data will be shared by filter.
Setup SXP Environment 9
- : FOR ${node} IN RANGE 2 5
- \ Add Bindings ${node}0 ${node}0.${node}0.${node}0.${node}0/32 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
- \ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
- \ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
- : FOR ${node} IN RANGE 5 10
- \ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
+ FOR ${node} IN RANGE 2 5
+ Add Bindings ${node}0 ${node}0.${node}0.${node}0.${node}0/32 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.${node}0.${node}0.0/24 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.${node}0.0.0/16 127.0.0.${node}
+ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
+ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
+ END
+ FOR ${node} IN RANGE 5 10
+ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
+ END
Add Domain ${DOMAIN_1}
Add Domain ${DOMAIN_2}
Add Domain ${DOMAIN_3}
Should Contain Binding ${resp} 40 40.40.40.0/24
Should Contain Binding ${resp} 40 40.40.0.0/16
Should Contain Binding ${resp} 40 40.0.0.0/8
- : FOR ${node} IN RANGE 8 10
- \ ${resp} Get Bindings 127.0.0.${node}
- \ Should Not Contain Binding ${resp} 20 20.20.20.20/32
- \ Should Not Contain Binding ${resp} 20 20.20.20.0/24
- \ Should Not Contain Binding ${resp} 20 20.20.0.0/16
- \ Should Not Contain Binding ${resp} 20 20.0.0.0/8
- \ Should Not Contain Binding ${resp} 30 30.30.30.30/32
- \ Should Not Contain Binding ${resp} 30 30.30.30.0/24
- \ Should Not Contain Binding ${resp} 30 30.30.0.0/16
- \ Should Not Contain Binding ${resp} 30 30.0.0.0/8
- \ Should Not Contain Binding ${resp} 40 40.40.40.40/32
- \ Should Not Contain Binding ${resp} 40 40.40.40.0/24
- \ Should Not Contain Binding ${resp} 40 40.40.0.0/16
- \ Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ FOR ${node} IN RANGE 8 10
+ ${resp} Get Bindings 127.0.0.${node}
+ Should Not Contain Binding ${resp} 20 20.20.20.20/32
+ Should Not Contain Binding ${resp} 20 20.20.20.0/24
+ Should Not Contain Binding ${resp} 20 20.20.0.0/16
+ Should Not Contain Binding ${resp} 20 20.0.0.0/8
+ Should Not Contain Binding ${resp} 30 30.30.30.30/32
+ Should Not Contain Binding ${resp} 30 30.30.30.0/24
+ Should Not Contain Binding ${resp} 30 30.30.0.0/16
+ Should Not Contain Binding ${resp} 30 30.0.0.0/8
+ Should Not Contain Binding ${resp} 40 40.40.40.40/32
+ Should Not Contain Binding ${resp} 40 40.40.40.0/24
+ Should Not Contain Binding ${resp} 40 40.40.0.0/16
+ Should Not Contain Binding ${resp} 40 40.0.0.0/8
+ END
Check Initialized Local
[Documentation] Checks that Local Bindings are not shared between domains
Should Not Contain Binding ${resp} 30 30.30.5.5/32
Should Contain Binding ${resp} 40 40.40.40.5/32
Should Contain Binding ${resp} 40 40.40.5.5/32
- : FOR ${node} IN RANGE 8 10
- \ ${resp} Get Bindings 127.0.0.${node}
- \ Should Not Contain Binding ${resp} 20 20.20.20.5/32
- \ Should Not Contain Binding ${resp} 20 20.20.5.5/32
- \ Should Not Contain Binding ${resp} 30 30.30.30.5/32
- \ Should Not Contain Binding ${resp} 30 30.30.5.5/32
- \ Should Not Contain Binding ${resp} 40 40.40.40.5/32
- \ Should Not Contain Binding ${resp} 40 40.40.5.5/32
+ FOR ${node} IN RANGE 8 10
+ ${resp} Get Bindings 127.0.0.${node}
+ Should Not Contain Binding ${resp} 20 20.20.20.5/32
+ Should Not Contain Binding ${resp} 20 20.20.5.5/32
+ Should Not Contain Binding ${resp} 30 30.30.30.5/32
+ Should Not Contain Binding ${resp} 30 30.30.5.5/32
+ Should Not Contain Binding ${resp} 40 40.40.40.5/32
+ Should Not Contain Binding ${resp} 40 40.40.5.5/32
+ END
Check Initialized After Update
[Documentation] Checks that Local Bindings are not shared between domains
[Arguments] ${version}=version4 ${PASSWORD}=none
[Documentation] Reconnect all peers connected to node containing filters
Clean Connections 127.0.0.1
- : FOR ${node} IN RANGE 2 6
- \ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
- \ ... ${PASSWORD}
+ FOR ${node} IN RANGE 2 6
+ Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1
+ ... ${PASSWORD}
+ END
Setup Topology
[Arguments] ${connections} ${PASSWORD} ${version}
[Documentation] Adds connections to local and remote nodes
- : FOR ${num} IN RANGE 0 ${connections}
- \ ${address} Get Ip From Number ${num} 2130771968
- \ Add Connection ${version} listener ${address} 64999 password=${PASSWORD}
- \ ConnectionTestLibrary.Add Node ${address} ${version} 64999 ${PASSWORD}
- \ ConnectionTestLibrary.Add Connection ${version} speaker 127.0.0.1 64999 ${PASSWORD}
- \ ... ${address}
+ FOR ${num} IN RANGE 0 ${connections}
+ ${address} Get Ip From Number ${num} 2130771968
+ Add Connection ${version} listener ${address} 64999 password=${PASSWORD}
+ ConnectionTestLibrary.Add Node ${address} ${version} 64999 ${PASSWORD}
+ ConnectionTestLibrary.Add Connection ${version} speaker 127.0.0.1 64999 ${PASSWORD}
+ ... ${address}
+ END
Check Connectivity
[Arguments] ${peers} ${min_peers} ${min_speed} ${PASSWORD}=${EMPTY} ${version}=version4
[Documentation] Starts SXP nodes and checks if peers are already connected, this is repeated N times
@{ITEMS} Create List
- : FOR ${num} IN RANGE 0 ${TEST_SAMPLES}
- \ Setup Topology ${peers} ${PASSWORD} ${version}
- \ ConnectionTestLibrary.Start Nodes
- \ ConnectionTestLibrary.Initiate Connecting ${min_peers}
- \ ${ELEMENT} Wait Until Keyword Succeeds 120 1 Check Connections Connected
- \ Append To List ${ITEMS} ${ELEMENT}
- \ Test Clean
+ FOR ${num} IN RANGE 0 ${TEST_SAMPLES}
+ Setup Topology ${peers} ${PASSWORD} ${version}
+ ConnectionTestLibrary.Start Nodes
+ ConnectionTestLibrary.Initiate Connecting ${min_peers}
+ ${ELEMENT} Wait Until Keyword Succeeds 120 1 Check Connections Connected
+ Append To List ${ITEMS} ${ELEMENT}
+ Test Clean
+ END
${connectivity_speed} Get Average Of Items ${ITEMS}
Log Average connectivity speed ${connectivity_speed} connection/s.
Should Be True ${connectivity_speed} > ${min_speed}
Binding Outbound Filter Export Test
[Documentation] Test binding export speed with Outbound filter and multiple passrates.
Add Bindings Range 112 84213760 ${EXPORT_AMOUNT}
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate int(math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 )) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Setup Filter ${num} outbound
- \ ${export_speed} Simple Export ${exported_bindings} ${TEST_SAMPLES}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate int(math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 )) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Setup Filter ${num} outbound
+ ${export_speed} Simple Export ${exported_bindings} ${TEST_SAMPLES}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
Binding Inbound Filter Forwarding Export Test
[Documentation] Test binding forwarding speed with Inbound filter and multiple passrates.
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Setup Filter ${num} inbound-discarding
- \ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Setup Filter ${num} inbound-discarding
+ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
Binding Inbound-Discarding Filter Forwarding Export Test
[Documentation] Test binding forwarding speed with Inbound-discarding filter and multiple passrates.
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Setup Filter ${num} inbound-discarding
- \ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Setup Filter ${num} inbound-discarding
+ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
Binding Domain Filter Export Test
[Documentation] Test binding export speed with domain filter and multiple passrates.
Add Bindings Range 112 84213760 ${EXPORT_AMOUNT}
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
- \ ${export_speed} Simple Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
+ ${export_speed} Simple Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
Binding Domain Filter Forwarding Export Test
[Documentation] Test binding forward speed with domain filter and multiple passrates.
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
- \ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
+ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
Binding Combined Filter Export Test
[Documentation] Test binding export speed with domain filter, Outbound filter and multiple passrates.
Add Bindings Range 112 84213760 ${EXPORT_AMOUNT}
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
- \ Setup Filter ${num} outbound
- \ ${export_speed} Simple Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
+ Setup Filter ${num} outbound
+ ${export_speed} Simple Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
Binding Combined Filter Forwarding Export Test
[Documentation] Test binding forward speed with domain filter, Inbound-discarding filter and multiple passrates.
- : FOR ${num} IN RANGE 16 20
- \ ${passrate} Evaluate 100.0/(2**(${num} - 16))
- \ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
- \ ${exported_bindings} Convert To String ${exported_bindings}
- \ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
- \ Setup Filter ${num} inbound-discarding
- \ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
- \ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
- \ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ FOR ${num} IN RANGE 16 20
+ ${passrate} Evaluate 100.0/(2**(${num} - 16))
+ ${exported_bindings} Evaluate math.ceil( ${EXPORT_AMOUNT}*${passrate}/100 ) modules=math
+ ${exported_bindings} Convert To String ${exported_bindings}
+ Run Keyword And Ignore Error Setup Domain Filter ${num} ${DOMAIN_1}
+ Setup Filter ${num} inbound-discarding
+ ${export_speed} Forwarding Export ${exported_bindings} ${TEST_SAMPLES} ${DOMAIN_1}
+ Log Outbound Export speed ${export_speed} with passrate ${passrate}%.
+ Should Be True ${export_speed} > ${MINIMAL_SPEED}
+ END
*** Keywords ***
Setup Binding Export Topology
[Arguments] ${version}=version4 ${PASSWORD}=${EMPTY} ${destination_nodes}=3 ${destination_domain}=global
[Documentation] Adds connections to local and remote nodes and wait until they are connected
Setup Simple Binding Export Topology ${version} ${PASSWORD} ${destination_nodes} 1 ${destination_domain}
- : FOR ${num} IN RANGE 0 ${destination_nodes}
- \ ${DESTINATION_NODE} Get Ip From Number And Ip ${num} ${DESTINATION_IP}
- \ ExportLibrary.Add Connection ${version} listener 127.0.0.1 64999 ${PASSWORD}
- \ ... ${DESTINATION_NODE}
- \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker
- \ ... ${DESTINATION_NODE} 64999 domain=${destination_domain}
+ FOR ${num} IN RANGE 0 ${destination_nodes}
+ ${DESTINATION_NODE} Get Ip From Number And Ip ${num} ${DESTINATION_IP}
+ ExportLibrary.Add Connection ${version} listener 127.0.0.1 64999 ${PASSWORD}
+ ... ${DESTINATION_NODE}
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker
+ ... ${DESTINATION_NODE} 64999 domain=${destination_domain}
+ END
Setup Simple Binding Export Topology
[Arguments] ${version}=version4 ${PASSWORD}=${EMPTY} ${destination_nodes}=3 ${source_nodes}=1 ${destination_domain}=global
[Documentation] Adds connections to local and remote nodes and wait until they are connected
- : FOR ${num} IN RANGE 0 ${source_nodes}
- \ ${SOURCE_NODE} Get Ip From Number And Ip ${num} ${SOURCE_IP}
- \ ExportLibrary.Add Node ${SOURCE_NODE} ${version} 64999 ${PASSWORD}
- \ ExportLibrary.Add Connection ${version} speaker 127.0.0.1 64999 ${PASSWORD}
- \ ... ${SOURCE_NODE}
- : FOR ${num} IN RANGE 0 ${destination_nodes}
- \ ${DESTINATION_NODE} Get Ip From Number And Ip ${num} ${DESTINATION_IP}
- \ ExportLibrary.Add Destination Node ${DESTINATION_NODE} ${version} 64999 ${PASSWORD}
- \ Add Connection ${version} speaker ${DESTINATION_NODE} 64999 password=${PASSWORD}
- \ ... domain=${destination_domain}
+ FOR ${num} IN RANGE 0 ${source_nodes}
+ ${SOURCE_NODE} Get Ip From Number And Ip ${num} ${SOURCE_IP}
+ ExportLibrary.Add Node ${SOURCE_NODE} ${version} 64999 ${PASSWORD}
+ ExportLibrary.Add Connection ${version} speaker 127.0.0.1 64999 ${PASSWORD}
+ ... ${SOURCE_NODE}
+ END
+ FOR ${num} IN RANGE 0 ${destination_nodes}
+ ${DESTINATION_NODE} Get Ip From Number And Ip ${num} ${DESTINATION_IP}
+ ExportLibrary.Add Destination Node ${DESTINATION_NODE} ${version} 64999 ${PASSWORD}
+ Add Connection ${version} speaker ${DESTINATION_NODE} 64999 password=${PASSWORD}
+ ... domain=${destination_domain}
+ END
ExportLibrary.Start Nodes
- : FOR ${num} IN RANGE 0 ${source_nodes}
- \ ${SOURCE_NODE} Get Ip From Number And Ip ${num} ${SOURCE_IP}
- \ Add Connection ${version} listener ${SOURCE_NODE} 64999 password=${PASSWORD}
- \ Wait Until Keyword Succeeds 60 2 Verify Connection ${version} listener
- \ ... ${SOURCE_NODE} 64999
+ FOR ${num} IN RANGE 0 ${source_nodes}
+ ${SOURCE_NODE} Get Ip From Number And Ip ${num} ${SOURCE_IP}
+ Add Connection ${version} listener ${SOURCE_NODE} 64999 password=${PASSWORD}
+ Wait Until Keyword Succeeds 60 2 Verify Connection ${version} listener
+ ... ${SOURCE_NODE} 64999
+ END
Simple Export
[Arguments] ${check_amount} ${samples}=10 ${destination_domain}=global
[Documentation] Starts SXP nodes and checks if bindings are already exported, this is repeated N times
@{ITEMS} Create List
- : FOR ${num} IN RANGE 0 ${samples}
- \ Setup Simple Binding Export Topology destination_domain=${destination_domain}
- \ ExportLibrary.Set Export Amount ${check_amount}
- \ ExportLibrary.Initiate Simple Export 127.0.0.1
- \ ${ELEMENT} Wait Until Keyword Succeeds 120 1 Check Bindings Exported
- \ Append To List ${ITEMS} ${ELEMENT}
- \ Test Clean
+ FOR ${num} IN RANGE 0 ${samples}
+ Setup Simple Binding Export Topology destination_domain=${destination_domain}
+ ExportLibrary.Set Export Amount ${check_amount}
+ ExportLibrary.Initiate Simple Export 127.0.0.1
+ ${ELEMENT} Wait Until Keyword Succeeds 120 1 Check Bindings Exported
+ Append To List ${ITEMS} ${ELEMENT}
+ Test Clean
+ END
Log ${ITEMS}
${export_speed} Get Average Of Items ${ITEMS}
[Return] ${export_speed}
[Arguments] ${check_amount} ${samples}=10 ${destination_domain}=global
[Documentation] Starts SXP nodes and checks if bindings are already forwarded, this is repeated N times
@{ITEMS} Create List
- : FOR ${num} IN RANGE 0 ${samples}
- \ Setup Binding Export Topology destination_domain=${destination_domain}
- \ ExportLibrary.Set Export Amount ${check_amount}
- \ ExportLibrary.Initiate Export 132.5.0.0/16 112
- \ ${ELEMENT} Wait Until Keyword Succeeds 360 1 Check Bindings Exported
- \ Append To List ${ITEMS} ${ELEMENT}
- \ Test Clean
+ FOR ${num} IN RANGE 0 ${samples}
+ Setup Binding Export Topology destination_domain=${destination_domain}
+ ExportLibrary.Set Export Amount ${check_amount}
+ ExportLibrary.Initiate Export 132.5.0.0/16 112
+ ${ELEMENT} Wait Until Keyword Succeeds 360 1 Check Bindings Exported
+ Append To List ${ITEMS} ${ELEMENT}
+ Test Clean
+ END
Log ${ITEMS}
${export_speed} Get Average Of Items ${ITEMS}
[Return] ${export_speed}
[Documentation] Test behaviour after shutting down connections in Legacy versions
[Tags] SXP TopoBuiltIn.Logy
@{list} = Create List version1
- : FOR ${version} IN @{list}
- \ Setup TopoBuiltIn.Logy Triangel ${version}
- \ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part One
- \ SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.3
- \ SxpLib.Delete Connections 127.0.0.3 64999 127.0.0.1
- \ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Two
- \ SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.2
- \ SxpLib.Delete Connections 127.0.0.2 64999 127.0.0.1
- \ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Three
- \ Clean Nodes
+ FOR ${version} IN @{list}
+ Setup TopoBuiltIn.Logy Triangel ${version}
+ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part One
+ SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.3
+ SxpLib.Delete Connections 127.0.0.3 64999 127.0.0.1
+ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Two
+ SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.2
+ SxpLib.Delete Connections 127.0.0.2 64999 127.0.0.1
+ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Three
+ Clean Nodes
+ END
Forwarding Test V2=>V1
[Documentation] Version 2 => 1 functionality
Text Bindings export
[Documentation] Stress test that consist of exporting 500 Bindings under 5s
[Tags] SXP Scalability
- : FOR ${num} IN RANGE 2 502
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ SxpLib.Add Bindings ${num} ${ip}/32 127.0.0.2
+ FOR ${num} IN RANGE 2 502
+ ${ip} = Sxp.Get Ip From Number ${num}
+ SxpLib.Add Bindings ${num} ${ip}/32 127.0.0.2
+ END
SxpLib.Add Connection version4 listener 127.0.0.2 64999 127.0.0.1
SxpLib.Add Connection version4 speaker 127.0.0.1 64999 127.0.0.2
BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection version4 listener 127.0.0.2
*** Keywords ***
Setup Mega Topology
[Arguments] ${version}=version4
- : FOR ${num} IN RANGE 2 22
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ SxpLib.Add Bindings ${num} ${ip}/32 ${ip}
- \ SxpLib.Add Connection ${version} listener ${ip} 64999 127.0.0.1
- \ SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 ${ip}
- \ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
- \ ... ${ip}
+ FOR ${num} IN RANGE 2 22
+ ${ip} = Sxp.Get Ip From Number ${num}
+ SxpLib.Add Bindings ${num} ${ip}/32 ${ip}
+ SxpLib.Add Connection ${version} listener ${ip} 64999 127.0.0.1
+ SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 ${ip}
+ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
+ ... ${ip}
+ END
Setup Complex Mega Topology
[Arguments] ${version}=version4
Setup Mega Topology ${version}
${second_num} Convert To Integer 2
- : FOR ${num} IN RANGE 22 32
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ ${second_ip} = Sxp.Get Ip From Number ${second_num}
- \ SxpLib.Add Bindings ${num} ${ip}/32 ${ip}
- \ SxpLib.Add Connection ${version} listener ${ip} 64999 ${second_ip}
- \ SxpLib.Add Connection ${version} speaker ${second_ip} 64999 ${ip}
- \ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
- \ ... ${ip} 64999 ${second_ip}
- \ ${second_num} = Set Variable ${second_num + 1}
- \ ${second_ip} = Sxp.Get Ip From Number ${second_num}
- \ SxpLib.Add Connection ${version} listener ${ip} 64999 ${second_ip}
- \ SxpLib.Add Connection ${version} speaker ${second_ip} 64999 ${ip}
- \ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
- \ ... ${ip} 64999 ${second_ip}
+ FOR ${num} IN RANGE 22 32
+ ${ip} = Sxp.Get Ip From Number ${num}
+ ${second_ip} = Sxp.Get Ip From Number ${second_num}
+ SxpLib.Add Bindings ${num} ${ip}/32 ${ip}
+ SxpLib.Add Connection ${version} listener ${ip} 64999 ${second_ip}
+ SxpLib.Add Connection ${version} speaker ${second_ip} 64999 ${ip}
+ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
+ ... ${ip} 64999 ${second_ip}
+ ${second_num} = Set Variable ${second_num + 1}
+ ${second_ip} = Sxp.Get Ip From Number ${second_num}
+ SxpLib.Add Connection ${version} listener ${ip} 64999 ${second_ip}
+ SxpLib.Add Connection ${version} speaker ${second_ip} 64999 ${ip}
+ BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener
+ ... ${ip} 64999 ${second_ip}
+ END
Check Binding Range
[Arguments] ${start} ${end} ${node}=127.0.0.1
[Documentation] Check if binding range is contained by node
${resp} = SxpLib.Get Bindings ${node}
- : FOR ${num} IN RANGE ${start} ${end}
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ Should Contain Binding ${resp} ${num} ${ip}/32
+ FOR ${num} IN RANGE ${start} ${end}
+ ${ip} = Sxp.Get Ip From Number ${num}
+ Should Contain Binding ${resp} ${num} ${ip}/32
+ END
Clean Nodes
- : FOR ${num} IN RANGE 1 32
- \ ${ip} = Sxp.Get Ip From Number ${num}
- \ SxpLib.Clean Bindings ${ip}
- \ SxpLib.Clean Connections ${ip}
+ FOR ${num} IN RANGE 1 32
+ ${ip} = Sxp.Get Ip From Number ${num}
+ SxpLib.Clean Bindings ${ip}
+ SxpLib.Clean Connections ${ip}
+ END
Export Separation Node 8-9 Test
[Documentation] Test if Nodes 8,9 contains only bindings from guest domain
[Tags] SXP Domains
- : FOR ${node} IN RANGE 8 10
- \ Check Binding Range Negative 20 2000 2300 127.0.0.${node}
- \ Check Binding Range 30 3000 3300 127.0.0.${node}
- \ Check Binding Range 40 4000 3300 127.0.0.${node}
- \ Check Binding Range Negative 50 5000 5300 127.0.0.${node}
- \ Check Binding Range Negative 60 6000 6300 127.0.0.${node}
- \ Check Binding Range Negative 110 11000 11300 127.0.0.${node}
- \ Check Binding Range Negative 120 12000 12300 127.0.0.${node}
- \ Check Binding Range Negative 130 13000 13300 127.0.0.${node}
- \ Check Binding Range Negative 140 14000 14300 127.0.0.${node}
+ FOR ${node} IN RANGE 8 10
+ Check Binding Range Negative 20 2000 2300 127.0.0.${node}
+ Check Binding Range 30 3000 3300 127.0.0.${node}
+ Check Binding Range 40 4000 3300 127.0.0.${node}
+ Check Binding Range Negative 50 5000 5300 127.0.0.${node}
+ Check Binding Range Negative 60 6000 6300 127.0.0.${node}
+ Check Binding Range Negative 110 11000 11300 127.0.0.${node}
+ Check Binding Range Negative 120 12000 12300 127.0.0.${node}
+ Check Binding Range Negative 130 13000 13300 127.0.0.${node}
+ Check Binding Range Negative 140 14000 14300 127.0.0.${node}
+ END
Export Separation Node 10 Test
[Documentation] Test if Node 10 contains only bindings from trusted domain
Export Separation Node 11-14 Test
[Documentation] Test if Nodes 11-14 contains only bindings from secure domain
[Tags] SXP Domains
- : FOR ${node} IN RANGE 11 15
- \ Check Binding Range Negative 20 2000 2300 127.0.0.${node}
- \ Check Binding Range Negative 30 3000 3300 127.0.0.${node}
- \ Check Binding Range Negative 40 4000 4300 127.0.0.${node}
- \ Check Binding Range Negative 50 5000 5300 127.0.0.${node}
- \ Check Binding Range Negative 60 6000 6300 127.0.0.${node}
- \ Check Binding Range 110 11000 11300 127.0.0.${node}
- \ Check Binding Range 120 12000 12300 127.0.0.${node}
- \ Check Binding Range 130 13000 13300 127.0.0.${node}
- \ Check Binding Range 140 14000 14300 127.0.0.${node}
+ FOR ${node} IN RANGE 11 15
+ Check Binding Range Negative 20 2000 2300 127.0.0.${node}
+ Check Binding Range Negative 30 3000 3300 127.0.0.${node}
+ Check Binding Range Negative 40 4000 4300 127.0.0.${node}
+ Check Binding Range Negative 50 5000 5300 127.0.0.${node}
+ Check Binding Range Negative 60 6000 6300 127.0.0.${node}
+ Check Binding Range 110 11000 11300 127.0.0.${node}
+ Check Binding Range 120 12000 12300 127.0.0.${node}
+ Check Binding Range 130 13000 13300 127.0.0.${node}
+ Check Binding Range 140 14000 14300 127.0.0.${node}
+ END
*** Keywords ***
Setup Nodes Local
[Arguments] ${version}=version4
[Documentation] Setups Multi domain topology consisting of 3 specific domains and 1 default, data between domains must remain separated.
Setup SXP Environment 14
- : FOR ${node} IN RANGE 2 7
- \ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
- \ Add Bindings Range ${node}0 ${node}000 300 127.0.0.${node}
- : FOR ${node} IN RANGE 7 11
- \ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
- : FOR ${node} IN RANGE 11 15
- \ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
- \ Add Bindings Range ${node}0 ${node}000 300 127.0.0.${node}
+ FOR ${node} IN RANGE 2 7
+ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
+ Add Bindings Range ${node}0 ${node}000 300 127.0.0.${node}
+ END
+ FOR ${node} IN RANGE 7 11
+ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
+ END
+ FOR ${node} IN RANGE 11 15
+ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
+ Add Bindings Range ${node}0 ${node}000 300 127.0.0.${node}
+ END
Add Domain ${DOMAIN_1}
Add Domain ${DOMAIN_2}
Add Domain ${DOMAIN_3}
Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.10
... domain=${DOMAIN_2}
# DOMAIN 3
- : FOR ${node} IN RANGE 11 15
- \ Add Connection ${version} both 127.0.0.${node} 64999 domain=${DOMAIN_3}
- \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
- \ ... 127.0.0.${node} domain=${DOMAIN_3}
+ FOR ${node} IN RANGE 11 15
+ Add Connection ${version} both 127.0.0.${node} 64999 domain=${DOMAIN_3}
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
+ ... 127.0.0.${node} domain=${DOMAIN_3}
+ END
Export Separation Node 8-9 Test
[Documentation] Test if Nodes 8,9 contains consistent data during its update
[Tags] SXP Domains
- : FOR ${node} IN RANGE 8 10
- \ Check Binding Range Negative 20 0 300 127.0.0.${node}
- \ Check Binding Range 40 0 300 127.0.0.${node}
- \ Check Binding Range Negative 60 0 300 127.0.0.${node}
- \ Check Binding Range Negative 120 0 300 127.0.0.${node}
+ FOR ${node} IN RANGE 8 10
+ Check Binding Range Negative 20 0 300 127.0.0.${node}
+ Check Binding Range 40 0 300 127.0.0.${node}
+ Check Binding Range Negative 60 0 300 127.0.0.${node}
+ Check Binding Range Negative 120 0 300 127.0.0.${node}
+ END
Delete Bindings Range 60 0 300 127.0.0.6
- : FOR ${node} IN RANGE 8 10
- \ Wait Until Keyword Succeeds 15 1 Check Binding Range 40 0
- \ ... 300 127.0.0.${node}
+ FOR ${node} IN RANGE 8 10
+ Wait Until Keyword Succeeds 15 1 Check Binding Range 40 0
+ ... 300 127.0.0.${node}
+ END
Delete Bindings Range 40 0 300 127.0.0.4
- : FOR ${node} IN RANGE 8 10
- \ Wait Until Keyword Succeeds 15 1 Check Binding Range Negative 40 0
- \ ... 300 127.0.0.${node}
+ FOR ${node} IN RANGE 8 10
+ Wait Until Keyword Succeeds 15 1 Check Binding Range Negative 40 0
+ ... 300 127.0.0.${node}
+ END
Export Separation Node 10 Test
[Documentation] Test if Node 10 contains consistent data during its update
Export Separation Node 11-14 Test
[Documentation] Test if Nodes 11-14 contains consistent data during its update
[Tags] SXP Domains
- : FOR ${node} IN RANGE 11 15
- \ Check Binding Range Negative 20 0 300 127.0.0.${node}
- \ Check Binding Range Negative 40 0 300 127.0.0.${node}
- \ Check Binding Range Negative 60 0 300 127.0.0.${node}
- \ Check Binding Range 120 0 300 127.0.0.${node}
+ FOR ${node} IN RANGE 11 15
+ Check Binding Range Negative 20 0 300 127.0.0.${node}
+ Check Binding Range Negative 40 0 300 127.0.0.${node}
+ Check Binding Range Negative 60 0 300 127.0.0.${node}
+ Check Binding Range 120 0 300 127.0.0.${node}
+ END
Delete Bindings Range 60 0 300 127.0.0.6
- : FOR ${node} IN RANGE 11 15
- \ Wait Until Keyword Succeeds 15 1 Check Binding Range 120 0
- \ ... 300 127.0.0.${node}
+ FOR ${node} IN RANGE 11 15
+ Wait Until Keyword Succeeds 15 1 Check Binding Range 120 0
+ ... 300 127.0.0.${node}
+ END
Delete Bindings Range 120 0 300 127.0.0.12
- : FOR ${node} IN RANGE 11 15
- \ Wait Until Keyword Succeeds 15 1 Check Binding Range Negative 120 0
- \ ... 300 127.0.0.${node}
+ FOR ${node} IN RANGE 11 15
+ Wait Until Keyword Succeeds 15 1 Check Binding Range Negative 120 0
+ ... 300 127.0.0.${node}
+ END
*** Keywords ***
Setup Nodes Local
[Arguments] ${version}=version4
[Documentation] Setups Multi domain topology consisting of 3 specific domains and 1 default, data between domains must remain separated.
Setup SXP Environment 14
- : FOR ${node} IN RANGE 2 7
- \ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
- : FOR ${node} IN RANGE 7 11
- \ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
- : FOR ${node} IN RANGE 11 15
- \ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
+ FOR ${node} IN RANGE 2 7
+ Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.${node}
+ END
+ FOR ${node} IN RANGE 7 11
+ Add Connection ${version} listener 127.0.0.1 64999 127.0.0.${node}
+ END
+ FOR ${node} IN RANGE 11 15
+ Add Connection ${version} both 127.0.0.1 64999 127.0.0.${node}
+ END
Add Domain ${DOMAIN_1}
Add Domain ${DOMAIN_2}
Add Domain ${DOMAIN_3}
Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.10
... domain=${DOMAIN_2}
# DOMAIN 3
- : FOR ${node} IN RANGE 11 15
- \ Add Connection ${version} both 127.0.0.${node} 64999 domain=${DOMAIN_3}
- \ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
- \ ... 127.0.0.${node} domain=${DOMAIN_3}
+ FOR ${node} IN RANGE 11 15
+ Add Connection ${version} both 127.0.0.${node} 64999 domain=${DOMAIN_3}
+ Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both
+ ... 127.0.0.${node} domain=${DOMAIN_3}
+ END
Basic Request Put ${node} network-topology:network-topology/topology/network-topo:1/node/bgp:1
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10
... tp_count=11 tp-ref_count=11
- : FOR ${index} IN RANGE 1 11
- \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ FOR ${index} IN RANGE 1 11
+ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ END
Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2 bgp:1
#Update a unified node, expecting creation of a new overlay node
${node} Create Isis Node bgp:3 router-id-ipv4=192.168.3.1
Basic Request Put ${node} network-topology:network-topology/topology/network-topo:1/node/bgp:3
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=10
... tp_count=9 tp-ref_count=9
- : FOR ${index} IN RANGE 1 11
- \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ FOR ${index} IN RANGE 1 11
+ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ END
Unification Node Inventory
[Documentation] Test processing of updates using unification operation on Inventory model
Basic Request Put ${node} opendaylight-inventory:nodes/node/openflow:2
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=6 supporting-node_count=10
... tp_count=12 tp-ref_count=12
- : FOR ${index} IN RANGE 1 11
- \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ FOR ${index} IN RANGE 1 11
+ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ END
Check Aggregated Node in Topology ${model} ${resp.content} 5 of-node:2 of-node:6 of-node:1
#Update a unified node, expecting creation of a new overlay node
${node} Create Openflow Node openflow:4 192.168.3.1
Basic Request Put ${node} opendaylight-inventory:nodes/node/openflow:4
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10
... tp_count=12 tp-ref_count=12
- : FOR ${index} IN RANGE 1 11
- \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ FOR ${index} IN RANGE 1 11
+ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ END
Filtration Range Number Node Update Network Topology Model
${model} Set Variable network-topology-model
Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3
... node-ref_count=3 tp_count=3 tp-ref_count=3
- : FOR ${index} IN RANGE 8 11
- \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ FOR ${index} IN RANGE 8 11
+ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ END
Should Not Contain ${resp.content} <node-ref>bgp:7</node-ref>
${topology_id} Set Variable network-topo:2
Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:8 tp:8:1 tp:8:1
Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4
... node-ref_count=4 tp_count=4 tp-ref_count=4
- : FOR ${index} IN RANGE 7 11
- \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ FOR ${index} IN RANGE 7 11
+ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ END
Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:7 tp:7:1 tp:7:1
Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:8 tp:8:1 tp:8:1
Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:9 tp:9:1 tp:9:1
Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:7
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4
... node-ref_count=4 tp_count=0 tp-ref_count=0
- : FOR ${index} IN RANGE 7 11
- \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
- #Update a Node so it is filtered out
+ FOR ${index} IN RANGE 7 11
+ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ #Update a Node so it is filtered out
+ END
${request} Create Openflow Node openflow:7 192.168.2.3 17
Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:7
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3
... node-ref_count=3 tp_count=0 tp-ref_count=0
- : FOR ${index} IN RANGE 8 11
- \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ FOR ${index} IN RANGE 8 11
+ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ END
Should Not Contain ${resp.content} <node-ref>of-node:7</node-ref>
Filtration Range Number Termination Point Update NT
Basic Request Put ${request} network-topology:network-topology/topology/network-topo:4/node/bgp:17
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4
... node-ref_count=4 tp_count=0 tp-ref_count=0
- : FOR ${index} IN RANGE 17 21
- \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ FOR ${index} IN RANGE 17 21
+ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ END
Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:17 bgp:20
${request} Create Isis Node bgp:17 10 192.168.1.2
Basic Request Put ${request} network-topology:network-topology/topology/network-topo:4/node/bgp:17
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3
... node-ref_count=3 tp_count=0 tp-ref_count=0
- : FOR ${index} IN RANGE 18 21
- \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ FOR ${index} IN RANGE 18 21
+ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
+ END
Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:20
Unification Filtration Node Update Inside Inventory model
Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:17
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3
... node-ref_count=3 tp_count=0 tp-ref_count=0
- : FOR ${index} IN RANGE 18 21
- \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ FOR ${index} IN RANGE 18 21
+ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ END
${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:19']/..
${node} Element to String ${node}
Should Contain X Times ${node} <supporting-node> 2
Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:17
${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4
... node-ref_count=4 tp_count=0 tp-ref_count=0
- : FOR ${index} IN RANGE 17 21
- \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ FOR ${index} IN RANGE 17 21
+ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
+ END
Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:17 of-node:19 of-node:20
Link Computation Aggregation Inside Update NT
Storing Statistics from Openflow REST
[Documentation] Store openflow PortStats metrics using REST.
- : FOR ${item} IN @{xpath}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:2 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:LOCAL ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:1 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:2 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:3 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:LOCAL ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/node-connector/openflow:3:1 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/node-connector/openflow:3:2 ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
- \ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/node-connector/openflow:3:LOCAL ${item}
- \ Append To List ${xml_list} ${ret_val}
- \ ${ret_val}= Set Variable -1
+ FOR ${item} IN @{xpath}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:2 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:LOCAL ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:1 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:2 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:3 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:LOCAL ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/node-connector/openflow:3:1 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/node-connector/openflow:3:2 ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ ${ret_val}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/node-connector/openflow:3:LOCAL ${item}
+ Append To List ${xml_list} ${ret_val}
+ ${ret_val}= Set Variable -1
+ END
Log List ${xml_list}
Verification of InterfaceMetrics-Attributes on Cassandra Client
[Documentation] Verify the InterfaceMetrics has been updated on Cassandra Data Store
Copy TSDR tables
- : FOR ${list} IN @{INTERFACE_METRICS}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:1
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:2
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:LOCAL
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:1
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:2
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:3
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:LOCAL
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:3 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:3,NodeConnector:openflow:3:1
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:3 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:3,NodeConnector:openflow:3:2
- \ Append To List ${tsdr_list} ${ret_val1}
- \ ${ret_val1}= Extract From DB Table grep NID=openflow:3 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:3,NodeConnector:openflow:3:LOCAL
- \ Append To List ${tsdr_list} ${ret_val1}
+ FOR ${list} IN @{INTERFACE_METRICS}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:1
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:2
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:LOCAL
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:1
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:2
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:3
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:2 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:2,NodeConnector:openflow:2:LOCAL
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:3 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:3,NodeConnector:openflow:3:1
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:3 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:3,NodeConnector:openflow:3:2
+ Append To List ${tsdr_list} ${ret_val1}
+ ${ret_val1}= Extract From DB Table grep NID=openflow:3 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:3,NodeConnector:openflow:3:LOCAL
+ Append To List ${tsdr_list} ${ret_val1}
+ END
Comparing Mertics
[Documentation] Compare openflow Interface metrics between data collected from openflow Plugin and TSDR
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${xml_list} ${tsdr_list}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${xml_list} ${tsdr_list}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
*** Keywords ***
Extract From DB Table
Verification of FlowStats-Attributes on Cassandra Data Store
[Documentation] Verify the InterfaceMetrics has been updated on Cassandra Data Store
Copy TSDR tables
- : FOR ${flow} IN @{openflow_1}
- \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
- \ Append To List ${tsdr_op1_pc} ${ret_val1}
- : FOR ${flow} IN @{openflow_2}
- \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
- \ Append To List ${tsdr_op2_pc} ${ret_val1}
- : FOR ${flow} IN @{openflow_3}
- \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
- \ Append To List ${tsdr_op3_pc} ${ret_val1}
- : FOR ${flow} IN @{openflow_1}
- \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
- \ Append To List ${tsdr_op1_bc} ${ret_val1}
- : FOR ${flow} IN @{openflow_2}
- \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
- \ Append To List ${tsdr_op2_bc} ${ret_val1}
- : FOR ${flow} IN @{openflow_3}
- \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
- \ Append To List ${tsdr_op3_bc} ${ret_val1}
+ FOR ${flow} IN @{openflow_1}
+ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
+ Append To List ${tsdr_op1_pc} ${ret_val1}
+ END
+ FOR ${flow} IN @{openflow_2}
+ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
+ Append To List ${tsdr_op2_pc} ${ret_val1}
+ END
+ FOR ${flow} IN @{openflow_3}
+ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
+ Append To List ${tsdr_op3_pc} ${ret_val1}
+ END
+ FOR ${flow} IN @{openflow_1}
+ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
+ Append To List ${tsdr_op1_bc} ${ret_val1}
+ END
+ FOR ${flow} IN @{openflow_2}
+ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
+ Append To List ${tsdr_op2_bc} ${ret_val1}
+ END
+ FOR ${flow} IN @{openflow_3}
+ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
+ Append To List ${tsdr_op3_bc} ${ret_val1}
+ END
Set Suite Variable @{tsdr_op1_pc}
Set Suite Variable @{tsdr_op2_pc}
Set Suite Variable @{tsdr_op3_pc}
Comparing Packet Count Metrics
[Documentation] Comparing Packet count values between Cassandra and openflow plugin
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_packetcount} ${tsdr_op1_pc}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_packetcount} ${tsdr_op2_pc}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_packetcount} ${tsdr_op3_pc}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_packetcount} ${tsdr_op1_pc}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_packetcount} ${tsdr_op2_pc}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_packetcount} ${tsdr_op3_pc}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
Comparing Byte Count Metrics
[Documentation] Comparing byte count values between Cassandra and openflow plugin
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_bytecount} ${tsdr_op1_bc}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_bytecount} ${tsdr_op2_bc}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_bytecount} ${tsdr_op3_bc}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_bytecount} ${tsdr_op1_bc}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_bytecount} ${tsdr_op2_bc}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_bytecount} ${tsdr_op3_bc}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
*** Keywords ***
Initialize the Tsdr Suite
Comparing Flow Table Metrics
[Documentation] Comparing Flow table values between Cassandra and openflow plugin.
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_packetlookup} ${tsdr_pl}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_activeflows} ${tsdr_af}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_packetmatched} ${tsdr_pm}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_packetlookup} ${tsdr_pl}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_activeflows} ${tsdr_af}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_packetmatched} ${tsdr_pm}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
+ END
*** Keywords ***
Initialize the Tsdr Suite
Comparing Queue Metrics
[Documentation] Comparing Queue metrics between Cassandra and OF plugin
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_q0} ${tsdr_q0}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_q1} ${tsdr_q1}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
- : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_q2} ${tsdr_q2}
- \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_q0} ${tsdr_q0}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_q1} ${tsdr_q1}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
+ FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_q2} ${tsdr_q2}
+ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
+ END
*** Keyword ***
Configuration of Queue on Switch
Sending syslog to ODL Syslog collector using Logger command
[Documentation] Sending Syslogs to collector.
- : FOR ${key} IN ZIP &{syslog_facility}
- \ ${value}= Get From Dictionary ${syslog_facility} ${key}
- \ ${f_value}= Evaluate ${value} * 8
- \ Generate Syslog ${f_value}
+ FOR ${key} IN ZIP &{syslog_facility}
+ ${value}= Get From Dictionary ${syslog_facility} ${key}
+ ${f_value}= Evaluate ${value} * 8
+ Generate Syslog ${f_value}
+ END
Verifying TSDR Data Store For Syslog Entries
[Documentation] Verifying if syslogs is getting stored.
${metric_log}= Verify the Metrics Syslog on Cassandra Client grep DC=SYSLOG
@{Syslogs}= Split to lines ${metric_log}
${iterator}= Set Variable 0
- : FOR ${key} IN ZIP &{syslog_facility}
- \ ${value}= Get From Dictionary ${syslog_facility} ${key}
- \ ${f_value}= Evaluate ${value} * 8
- \ Should Contain ${syslogs}[${iterator}] ${MESSAGE}
- \ Should Contain ${syslogs}[${iterator}] <${f_value}>
- \ ${iterator}= Evaluate ${iterator} + 1
+ FOR ${key} IN ZIP &{syslog_facility}
+ ${value}= Get From Dictionary ${syslog_facility} ${key}
+ ${f_value}= Evaluate ${value} * 8
+ Should Contain ${syslogs}[${iterator}] ${MESSAGE}
+ Should Contain ${syslogs}[${iterator}] <${f_value}>
+ ${iterator}= Evaluate ${iterator} + 1
+ END
Should Contain ${output} tsdr:list
Should Contain ${output} tsdr:purgeall
${output}= Issue Command On Karaf Console tsdr:list\t\t
- : FOR ${list} IN @{CATEGORY}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{CATEGORY}
+ Should Contain ${output} ${list}
+ END
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_PORTSTATS} openflow
Verify PortStats On Karaf console
[Documentation] Verify the InterfaceMetrics(PortStats),attributes using ${TSDR_PORTSTATS}
- : FOR ${list} IN @{INTERFACE_METRICS}
- \ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
- \ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{INTERFACE_METRICS}
+ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
+ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
+ Should Contain ${output} ${list}
+ END
Verify PortStats-Attributes on H2 Datastore using JDBC Client
[Documentation] Verify the PortStats,attributes on H2 Datastore using JDBC Client
- : FOR ${list} IN @{INTERFACE_METRICS}
- \ ${output}= Query Metrics on H2 Datastore PORTSTATS ${list}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{INTERFACE_METRICS}
+ ${output}= Query Metrics on H2 Datastore PORTSTATS ${list}
+ Should Contain ${output} ${list}
+ END
[Documentation] Verify the TSDR FlowStats
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_FLOWSTATS} PacketCount
${output}= Issue Command On Karaf Console ${TSDR_FLOWSTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{FLOW_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOW_METRICS}
+ Should Contain ${output} ${list}
+ END
Verify FlowStats-Attributes on H2 Datastore using JDBC Client
[Documentation] Verify the PortStats,attributes on H2 Datastore using JDBC Client
- : FOR ${list} IN @{FLOW_METRICS}
- \ ${output}= Query Metrics on H2 Datastore FLOWSTATS ${list}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOW_METRICS}
+ ${output}= Query Metrics on H2 Datastore FLOWSTATS ${list}
+ Should Contain ${output} ${list}
+ END
[Documentation] Verify the TSDR FlowiTableStats
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_FLOWTABLE_STATS}| grep ActiveFlow FLOWTABLESTATS
${output}= Issue Command On Karaf Console ${TSDR_FLOWTABLE_STATS}| grep openflow:1 | head ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 180
- : FOR ${list} IN @{FLOWTABLE_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWTABLE_METRICS}
+ Should Contain ${output} ${list}
+ END
Verify FlowTableStats-Attributes on H2 Datastore using JDBC Client
[Documentation] Verify the PortStats,attributes on H2 Datastore using JDBC Client
- : FOR ${list} IN @{FLOWTABLE_METRICS}
- \ ${output}= Query Metrics on H2 Datastore FLOWTABLESTATS ${list}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWTABLE_METRICS}
+ ${output}= Query Metrics on H2 Datastore FLOWTABLESTATS ${list}
+ Should Contain ${output} ${list}
+ END
[Documentation] Verify the QueueMetrics attributes exist on Karaf Console
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_QUEUE_STATS} Transmitted
${output}= Issue Command On Karaf Console ${TSDR_QUEUE_STATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{QUEUE_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{QUEUE_METRICS}
+ Should Contain ${output} ${list}
+ END
Verify QueueStats-Attributes on H2 Datastore using JDBC Client
[Documentation] Verify the QueueStats,attributes on H2 Datastore using JDBC Client
- : FOR ${list} IN @{QUEUE_METRICS}
- \ ${output}= Query Metrics on H2 Datastore QUEUESTATS ${list}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{QUEUE_METRICS}
+ ${output}= Query Metrics on H2 Datastore QUEUESTATS ${list}
+ Should Contain ${output} ${list}
+ END
Verify tsdr:purgeall command
[Documentation] Verify the tsdr:purgeall command
Issue Command On Karaf Console tsdr:purgeall ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT}
- : FOR ${list} IN @{CMD_LIST}
- \ ${out}= Issue Command On Karaf Console tsdr:list ${list} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT}
- \ Should Contain ${out} no data of this category
- : FOR ${list} IN @{QUEUE_METRICS}
- \ ${out}= Query Metrics on H2 Datastore QUEUESTATS ${list}
- \ Should not Contain ${out} ${list}
+ FOR ${list} IN @{CMD_LIST}
+ ${out}= Issue Command On Karaf Console tsdr:list ${list} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT}
+ Should Contain ${out} no data of this category
+ END
+ FOR ${list} IN @{QUEUE_METRICS}
+ ${out}= Query Metrics on H2 Datastore QUEUESTATS ${list}
+ Should not Contain ${out} ${list}
+ END
*** Keyword ***
Configuration of Queue on Switch
[Documentation] Verify the FlowGroupStats attributes exist on Karaf Console
Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWGROUPSTATS} ByteCount
${output}= Issue Command On Karaf Console ${TSDR_FLOWGROUPSTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{FLOWGROUP_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWGROUP_METRICS}
+ Should Contain ${output} ${list}
+ END
Verification of FlowGroupStats-ByteCount on Karaf Console
[Documentation] Verify the FlowGroupStats has been updated thru tsdr:list command on karaf console
Should Contain ${output} ByteCount
Should Contain ${output} FLOWGROUPSTATS
Should not Contain ${output} null
- : FOR ${list} IN @{FLOWGROUP_HEADER}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWGROUP_HEADER}
+ Should Contain ${output} ${list}
+ END
Verify FlowGroupStats-Attributes on H2 Datastore using JDBC Client
[Documentation] Verify the GroupStats,attributes on H2 Datastore using JDBC Client
- : FOR ${list} IN @{FLOWGROUP_METRICS}
- \ ${output}= Query Metrics on H2 Datastore FLOWGROUPSTATS ${list}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWGROUP_METRICS}
+ ${output}= Query Metrics on H2 Datastore FLOWGROUPSTATS ${list}
+ Should Contain ${output} ${list}
+ END
*** Keyword ***
Start TSDR suite with CPqD Switch
[Documentation] Verify the FlowMeterStats attributes exist on Karaf Console
Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWMETERSTATS} ByteInCount
${output}= Issue Command On Karaf Console ${TSDR_FLOWMETERSTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{FLOWMETER_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWMETER_METRICS}
+ Should Contain ${output} ${list}
+ END
Verification of FlowMeterStats-ByteInCount on Karaf Console
[Documentation] Verify the FlowMeterStats has been updated thru tsdr:list command on karaf console
Should Contain ${output} ByteInCount
Should Contain ${output} FLOWMETERSTATS
Should not Contain ${output} null
- : FOR ${list} IN @{FLOWMETER_HEADER}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWMETER_HEADER}
+ Should Contain ${output} ${list}
+ END
Verify FlowMeterStats-Attributes on H2 Datastore using JDBC Client
[Documentation] Verify the FlowMeterStats,attributes on H2 Datastore using JDBC Client
- : FOR ${list} IN @{FLOWMETER_METRICS}
- \ ${output}= Query Metrics on H2 Datastore FLOWMETERSTATS ${list}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWMETER_METRICS}
+ ${output}= Query Metrics on H2 Datastore FLOWMETERSTATS ${list}
+ Should Contain ${output} ${list}
+ END
Uninstall all TSDR H2 Feature
[Documentation] UnInstall all TSDR H2 Features
${output}= Issue Command On Karaf Console tsdr\t
Should Contain ${output} tsdr:list
${output}= Issue Command On Karaf Console tsdr:list\t\t
- : FOR ${list} IN @{CATEGORY}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{CATEGORY}
+ Should Contain ${output} ${list}
+ END
Wait Until Keyword Succeeds 620s 1s Verify the Metric is Collected? ${TSDR_PORTSTATS} openflow
Verification of TSDR PortStats
[Documentation] Verify the TSDR InterfaceMetrics
- : FOR ${list} IN @{INTERFACE_METRICS}
- \ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
- \ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{INTERFACE_METRICS}
+ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
+ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
+ Should Contain ${output} ${list}
+ END
Verification of InterfaceMetrics-Attributes on HBase Client
[Documentation] Verify the InterfaceMetrics has been updated on HBase Datastore
- : FOR ${list} IN @{INTERFACE_METRICS}
- \ Verify the Metrics Attributes on Hbase Client ${list} ${node_connector} ${portstats}
+ FOR ${list} IN @{INTERFACE_METRICS}
+ Verify the Metrics Attributes on Hbase Client ${list} ${node_connector} ${portstats}
+ END
Verify Configuration Interval-change
[Documentation] Verify the TSDR Collection configuration changes
[Documentation] Verify the TSDR FlowStats
Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWSTATS} PacketCount
${output}= Issue Command On Karaf Console ${TSDR_FLOWSTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{FLOW_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOW_METRICS}
+ Should Contain ${output} ${list}
+ END
Verification of FlowMetrics-PacketCount on HBase Client
[Documentation] Verify the FlowStats-Packetcount on both Karaf console and Hbase client
[Documentation] Verify the QueueMetrics attributes exist on Karaf Console
Wait Until Keyword Succeeds 180s 1s Verify the Metric is Collected? ${TSDR_QUEUESTATS} Transmitted
${output}= Issue Command On Karaf Console ${TSDR_QUEUESTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 90
- : FOR ${list} IN @{QUEUE_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{QUEUE_METRICS}
+ Should Contain ${output} ${list}
+ END
Verification of QueueMetrics-TransmittedPackets on Karaf Console
[Documentation] Verify the QueueMetrics has been updated thru tsdr:list command on karaf console
Sending syslog to ODL Syslog collector using Logger command
[Documentation] Verifying if syslogs is collected and getting stored.
Query the Data from HBaseClient truncate 'SYSLOG'
- : FOR ${key} IN ZIP &{syslog_facility}
- \ ${value}= Get From Dictionary ${syslog_facility} ${key}
- \ ${f_value}= Evaluate ${value} * 8
- \ Generate Syslog ${f_value}
+ FOR ${key} IN ZIP &{syslog_facility}
+ ${value}= Get From Dictionary ${syslog_facility} ${key}
+ ${f_value}= Evaluate ${value} * 8
+ Generate Syslog ${f_value}
+ END
${output}= Query the Data from HBaseClient scan 'SYSLOG'
Should Contain X Times ${output} ${MESSAGE_PATTERN} 1
- : FOR ${key} IN ZIP &{syslog_facility}
- \ ${value}= Get From Dictionary ${syslog_facility} ${key}
- \ ${f_value}= Evaluate ${value} * 8
- \ Should Match ${output} *${f_value}>*
+ FOR ${key} IN ZIP &{syslog_facility}
+ ${value}= Get From Dictionary ${syslog_facility} ${key}
+ ${f_value}= Evaluate ${value} * 8
+ Should Match ${output} *${f_value}>*
+ END
${output}= Issue Command On Karaf Console tsdr\t
Should Contain ${output} tsdr:list
${output}= Issue Command On Karaf Console tsdr:list\t\t
- : FOR ${list} IN @{CATEGORY}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{CATEGORY}
+ Should Contain ${output} ${list}
+ END
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_PORTSTATS} openflow
Verify PortStats On Karaf console
[Documentation] Verify the InterfaceMetrics(PortStats),attributes using ${TSDR_PORTSTATS}
- : FOR ${list} IN @{INTERFACE_METRICS}
- \ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
- \ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{INTERFACE_METRICS}
+ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
+ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
+ Should Contain ${output} ${list}
+ END
*** Keywords ***
Init Variables Master
[Documentation] Verify the TSDR FLOWSTATS
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_FLOWSTATS} PacketCount
${output}= Issue Command On Karaf Console ${TSDR_FLOWSTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{FLOW_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOW_METRICS}
+ Should Contain ${output} ${list}
+ END
*** Keywords ***
Init Variables Master
[Documentation] Verify the TSDR FlowiTableStats
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_FLOWTABLE_STATS}| grep ActiveFlow | grep openflow:1 FLOWTABLESTATS
${output}= Issue Command On Karaf Console ${TSDR_FLOWTABLE_STATS}| grep openflow:1 | head ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 180
- : FOR ${list} IN @{FLOWTABLE_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{FLOWTABLE_METRICS}
+ Should Contain ${output} ${list}
+ END
*** Keywords ***
Init Variables Master
[Documentation] Verify the QueueMetrics attributes exist on Karaf Console
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_QUEUE_STATS} Transmitted
${output}= Issue Command On Karaf Console ${TSDR_QUEUE_STATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- : FOR ${list} IN @{QUEUE_METRICS}
- \ Should Contain ${output} ${list}
+ FOR ${list} IN @{QUEUE_METRICS}
+ Should Contain ${output} ${list}
+ END
*** Keyword ***
Configuration of Queue on Switch
Sending syslog to ODL Syslog collector using Logger command
[Documentation] Verifying if syslogs is getting generated.
- : FOR ${key} IN ZIP &{syslog_facility}
- \ ${value}= Get From Dictionary ${syslog_facility} ${key}
- \ ${f_value}= Evaluate ${value} * 8
- \ Generate Syslog ${f_value}
+ FOR ${key} IN ZIP &{syslog_facility}
+ ${value}= Get From Dictionary ${syslog_facility} ${key}
+ ${f_value}= Evaluate ${value} * 8
+ Generate Syslog ${f_value}
+ END
Wait Until Keyword Succeeds 24x 10 sec Check HSQLDB 1 SYSLOG | grep SYSLOG | wc -l
Verifying TSDR Data Store For Syslog Entries
${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${ECHO_SERVER_PORT} tcp=true content=${TEST_MESSAGE}
${channel} Create Dictionary channel=${content}
${input} Create Dictionary input=${channel}
- : FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to send request
+ FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to send request
+ END
View Bytes In and Bytes Out
[Documentation] Check if the number of Bytes In and Bytes Out are correct
*** Test Cases ***
Add Channel
[Documentation] Add multiple USC TLS channels
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=true remote=false
- \ ${channel} Create Dictionary channel=${content}
- \ ${input} Create Dictionary input=${channel}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_ADD_CHANNEL} data=${data}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to connect
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=true remote=false
+ ${channel} Create Dictionary channel=${content}
+ ${input} Create Dictionary input=${channel}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_ADD_CHANNEL} data=${data}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to connect
+ END
Check added Channel
[Documentation] Check if the channels are correct
Send Messages
[Documentation] Send test messages multiple times
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=true content=${TEST_MESSAGE}
- \ ${channel} Create Dictionary channel=${content}
- \ ${input} Create Dictionary input=${channel}
- \ Send Now ${input}
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=true content=${TEST_MESSAGE}
+ ${channel} Create Dictionary channel=${content}
+ ${input} Create Dictionary input=${channel}
+ Send Now ${input}
+ END
View Bytes In and Bytes Out
[Documentation] Check if the number of Bytes In and Bytes Out are correct
Remove Sessions
[Documentation] Remove the channels
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=true
- \ ${channel} Create Dictionary channel=${content}
- \ ${input} Create Dictionary input=${channel}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_REMOVE_SESSION} data=${data}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to remove
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=true
+ ${channel} Create Dictionary channel=${content}
+ ${input} Create Dictionary input=${channel}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_REMOVE_SESSION} data=${data}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to remove
+ END
Remove Channel
[Documentation] Remove the channels
*** Keywords ***
Send Now
[Arguments] ${body}
- : FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
- \ ${data} json.dumps ${body}
- \ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to send request
+ FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
+ ${data} json.dumps ${body}
+ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to send request
+ END
${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${ECHO_SERVER_PORT} tcp=true content=${TEST_MESSAGE}
${channel} Create Dictionary channel=${content}
${input} Create Dictionary input=${channel}
- : FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to send request
+ FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to send request
+ END
View Bytes In and Bytes Out
[Documentation] Check if the number of Bytes In and Bytes Out are correct
${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${ECHO_SERVER_PORT} tcp=false content=${TEST_MESSAGE}
${channel} Create Dictionary channel=${content}
${input} Create Dictionary input=${channel}
- : FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to send request
+ FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to send request
+ END
View Bytes In and Bytes Out
[Documentation] Check if the number of Bytes In and Bytes Out are correct
*** Test Cases ***
Add Channel
[Documentation] Add multiple USC DTLS channels
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=false remote=false
- \ ${channel} Create Dictionary channel=${content}
- \ ${input} Create Dictionary input=${channel}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_ADD_CHANNEL} data=${data}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to connect
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=false remote=false
+ ${channel} Create Dictionary channel=${content}
+ ${input} Create Dictionary input=${channel}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_ADD_CHANNEL} data=${data}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to connect
+ END
Check added Channel
[Documentation] Check if the channels are correct
Send Messages
[Documentation] Send test messages multiple times
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=false content=${TEST_MESSAGE}
- \ ${channel} Create Dictionary channel=${content}
- \ ${input} Create Dictionary input=${channel}
- \ Send Now ${input}
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=false content=${TEST_MESSAGE}
+ ${channel} Create Dictionary channel=${content}
+ ${input} Create Dictionary input=${channel}
+ Send Now ${input}
+ END
View Bytes In and Bytes Out
[Documentation] Check if the number of Bytes In and Bytes Out are correct
Remove Sessions
[Documentation] Remove the channels
- : FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
- \ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=false
- \ ${channel} Create Dictionary channel=${content}
- \ ${input} Create Dictionary input=${channel}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_REMOVE_SESSION} data=${data}
- \ Log ${resp.content}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to remove
+ FOR ${port_index} IN @{LIST_ECHO_SERVER_PORT}
+ ${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${port_index} tcp=false
+ ${channel} Create Dictionary channel=${content}
+ ${input} Create Dictionary input=${channel}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_REMOVE_SESSION} data=${data}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to remove
+ END
Remove Channel
[Documentation] Remove the channels
*** Keywords ***
Send Now
[Arguments] ${body}
- : FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
- \ ${data} json.dumps ${body}
- \ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to send request
+ FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
+ ${data} json.dumps ${body}
+ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to send request
+ END
${content} Create Dictionary hostname=${TOOLS_SYSTEM_IP} port=${ECHO_SERVER_PORT} tcp=false content=${TEST_MESSAGE}
${channel} Create Dictionary channel=${content}
${input} Create Dictionary input=${channel}
- : FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
- \ ${data} json.dumps ${input}
- \ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} Succeed to send request
+ FOR ${index} IN RANGE 0 ${NUM_OF_MESSAGES}
+ ${data} json.dumps ${input}
+ ${resp} Post Request session ${REST_SEND_MESSAGE} data=${data}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} Succeed to send request
+ END
View Bytes In and Bytes Out
[Documentation] Check if the number of Bytes In and Bytes Out are correct
Verify if the VPN Service features are installed for vpnservice
[Documentation] Executes command "feature list -i | grep <feature_name>" in karaf console and checks if output \ contain \ the specific features.
[Tags] Verify Feature
- : FOR ${feature} IN @{FEATURE_LIST}
- \ Verify Feature Is Installed ${feature}
+ FOR ${feature} IN @{FEATURE_LIST}
+ Verify Feature Is Installed ${feature}
+ END
Verify if the VPN Service bundles are loaded
[Documentation] Executes command "bundle:list -s | grep <bundle name>" and checks in the output for the specific bundles
[Tags] Verify VPN bundles
- : FOR ${bundle} IN @{BUNDLE_LIST}
- \ Verify Bundle Is Installed ${bundle}
+ FOR ${bundle} IN @{BUNDLE_LIST}
+ Verify Bundle Is Installed ${bundle}
+ END
Verify if the sessions for bundles got initiated
[Documentation] Executes"log:display | grep vpnservice" command in karaf console and verifies the logs for session initiation
${resp} RequestsLibrary.Get Request session ${REST_CON}l3vpn:vpn-instances/vpn-instance/${vpn_inst_values[0]}/ headers=${ACCEPT_XML}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
- : FOR ${value} IN @{vpn_inst_values}
- \ Should Contain ${resp.content} ${value}
+ FOR ${value} IN @{vpn_inst_values}
+ Should Contain ${resp.content} ${value}
+ END
Create ietf vm interface
[Documentation] Creates ietf interface through the restconf
${resp} RequestsLibrary.Get Request session ${REST_CON}ietf-interfaces:interfaces/interface/${vm_int_values[0]}/ headers=${ACCEPT_XML}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
- : FOR ${value} IN @{vm_int_values}
- \ Should Contain ${resp.content} ${value}
+ FOR ${value} IN @{vm_int_values}
+ Should Contain ${resp.content} ${value}
+ END
Create VPN interface
[Documentation] Creates vpn interface for the corresponding ietf interface
${resp} RequestsLibrary.Get Request session ${REST_CON}l3vpn:vpn-interfaces/ headers=${ACCEPT_XML}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
- : FOR ${value} IN @{vm_vpnint_values}
- \ Should Contain ${resp.content} ${value}
+ FOR ${value} IN @{vm_vpnint_values}
+ Should Contain ${resp.content} ${value}
+ END
Verify FIB entry after create
[Documentation] Verifies the fib entry for the corresponding vpn interface
Verify flows after delete
[Documentation] Verify if the flows are deleted from the switch
[Tags] verify in switch
- [Template]
Wait Until Keyword Succeeds 12s 2s Ensure Flows Are Removed ${mininet1_conn_id_1}
Wait Until Keyword Succeeds 12s 2s Ensure Flows Are Removed ${mininet2_conn_id_1}
Should Contain X Times ${output} goto_table:21 2
Should Contain X Times ${output} table=20 2
Should Contain X Times ${output} table=21 4
- : FOR ${i} IN @{flow_elements}
- \ Should Contain ${output} ${i}
+ FOR ${i} IN @{flow_elements}
+ Should Contain ${output} ${i}
+ END
Ensure Groups Are Present
[Arguments] ${conn_id} ${group_elements} ${gre_port_id}
${output}= Read Until mininet>
Log ${output}
Should Contain X Times ${output} actions=output:${gre_port_id} 1
- : FOR ${i} IN @{group_elements}
- \ Should Contain ${output} actions=pop_mpls:0x0800,set_field:${i}
+ FOR ${i} IN @{group_elements}
+ Should Contain ${output} actions=pop_mpls:0x0800,set_field:${i}
+ END
Ensure Flows Are Removed
[Arguments] ${conn_id}
... and run it for each single yang file in the prepared set.
... The version is either given by ${EXPLICIT_YANG_SYSTEM_TEST_URL},
... or constructed from Jenkins-shaped ${BUNDLE_URL}, or downloaded from Nexus based on ODL version.
- : FOR ${yang_file} IN @{yang_files_to_validate}
- \ ${logfile} = NexusKeywords.Install_And_Start_Java_Artifact component=yangtools artifact=${TEST_TOOL_NAME} suffix=jar-with-dependencies tool_options=-p ${p_option_value} ${yang_file}
- \ ... explicit_url=${EXPLICIT_YANG_SYSTEM_TEST_URL}
- \ BuiltIn.Set_Suite_Variable \${logfile}
- \ Wait_Until_Utility_Finishes
- \ Check_Return_Code
+ FOR ${yang_file} IN @{yang_files_to_validate}
+ ${logfile} = NexusKeywords.Install_And_Start_Java_Artifact component=yangtools artifact=${TEST_TOOL_NAME} suffix=jar-with-dependencies tool_options=-p ${p_option_value} ${yang_file}
+ ... explicit_url=${EXPLICIT_YANG_SYSTEM_TEST_URL}
+ BuiltIn.Set_Suite_Variable \${logfile}
+ Wait_Until_Utility_Finishes
+ Check_Return_Code
+ END
Collect_Files_To_Archive
[Documentation] Download created files so Releng scripts would archive it.
... This implementation returns absolute paths as that is easier.
${depth_1} = SSHLibrary.List_Directories_In_Directory path=${root} absolute=True
${subtrees} = BuiltIn.Create_List
- : FOR ${subdir} IN @{depth_1}
- \ ${tree} = Get_Recursive_Dirs root=${subdir}
- \ # Relative paths would require prepending ${subdir}${/} to each @{tree} element.
- \ Collections.Append_To_List ${subtrees} ${tree}
+ FOR ${subdir} IN @{depth_1}
+ ${tree} = Get_Recursive_Dirs root=${subdir}
+ # Relative paths would require prepending ${subdir}${/} to each @{tree} element.
+ Collections.Append_To_List ${subtrees} ${tree}
+ END
${flat_list} = Collections.Combine_Lists ${depth_1} @{subtrees}
[Return] ${flat_list}
[Arguments] ${dirs_to_process}
[Documentation] Return list of yang files from provided directories
${collected_yang_files} = BuiltIn.Create_List
- : FOR ${dir} IN @{dirs_to_process}
- \ ${yang_files_in_dir} = SSHLibrary.List_Files_In_Directory path=${dir} pattern=*.yang absolute=True
- \ ${collected_yang_files} = Collections.Combine_Lists ${collected_yang_files} ${yang_files_in_dir}
+ FOR ${dir} IN @{dirs_to_process}
+ ${yang_files_in_dir} = SSHLibrary.List_Files_In_Directory path=${dir} pattern=*.yang absolute=True
+ ${collected_yang_files} = Collections.Combine_Lists ${collected_yang_files} ${yang_files_in_dir}
+ END
[Return] ${collected_yang_files}
Wait_Until_Utility_Finishes
... mysql
Grant Privileges To Mysql Database ${os_node_cxn} root mysql *.* ${hostuser} ${HAPROXY_HOSTNAME}
... mysql #Grant Process To Mysql Database ${os_node_cxn} root mysql *.*
- ... # clustercheck_user localhost # my_clustercheck_password
+ ... # clustercheck_user localhost # my_clustercheck_password
Execute MySQL STATUS Query ${os_node_cxn} root mysql wsrep_cluster_size
Enable MySQL non-root nodes
... mysql
Grant Privileges To Mysql Database ${os_node_cxn} root mysql *.* ${hostuser} ${HAPROXY_HOSTNAME}
... mysql #Grant Process To Mysql Database ${os_node_cxn} root mysql *.*
- ... # clustercheck_user localhost # my_clustercheck_password
+ ... # clustercheck_user localhost # my_clustercheck_password
Execute MySQL STATUS Query ${os_node_cxn} root mysql wsrep_cluster_size
Add HAPROXY Entry for DB
[Arguments] ${external_net} @{vm_list}
[Documentation] Create and associate floating IPs to VMs with nova request
${ip_list} = BuiltIn.Create List @{EMPTY}
- : FOR ${vm} IN @{vm_list}
- \ ${output} = OpenStack CLI openstack floating ip create ${external_net}
- \ @{ip} = String.Get Regexp Matches ${output} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
- \ ${ip_length} = BuiltIn.Get Length ${ip}
- \ BuiltIn.Run Keyword If ${ip_length}>0 Collections.Append To List ${ip_list} @{ip}[0]
- \ ... ELSE Collections.Append To List ${ip_list} None
- \ ${output} = OpenStack CLI openstack server add floating ip ${vm} @{ip}[0]
+ FOR ${vm} IN @{vm_list}
+ ${output} = OpenStack CLI openstack floating ip create ${external_net}
+ @{ip} = String.Get Regexp Matches ${output} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
+ ${ip_length} = BuiltIn.Get Length ${ip}
+ BuiltIn.Run Keyword If ${ip_length}>0 Collections.Append To List ${ip_list} @{ip}[0]
+ ... ELSE Collections.Append To List ${ip_list} None
+ ${output} = OpenStack CLI openstack server add floating ip ${vm} @{ip}[0]
+ END
[Return] ${ip_list}
Delete Floating IP
[Documentation] Create X Vm Instance with the net id of the Netowrk.
${image} BuiltIn.Set Variable If "${image}"=="${EMPTY}" ${CIRROS_${OPENSTACK_BRANCH}} ${image}
${net_id} = OpenStackOperations.Get Net Id ${net_name}
- : FOR ${vm} IN @{vm_instance_names}
- \ ${output} = OpenStack CLI openstack server create --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${vm} --security-group ${sg} --min ${min} --max ${max}
+ FOR ${vm} IN @{vm_instance_names}
+ ${output} = OpenStack CLI openstack server create --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${vm} --security-group ${sg} --min ${min} --max ${max}
+ END
Create Vm Instance On Compute Node
[Arguments] ${net_name} ${vm_name} ${node_hostname} ${image}=${EMPTY} ${flavor}=m1.nano ${sg}=default
... if available in the console-log output. The keyword will also return a list of the learned ips as it
... finds them in the console log output, and will have "None" for Vms that no ip was found.
${ip_list} Create List @{EMPTY}
- : FOR ${vm} IN @{vm_list}
- \ ${rc} ${vm_ip_line}= Run And Return Rc And Output openstack console log show ${vm} | grep -i "obtained"
- \ @{vm_ip} Get Regexp Matches ${vm_ip_line} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
- \ ${vm_ip_length} Get Length ${vm_ip}
- \ Run Keyword If ${vm_ip_length}>0 Append To List ${ip_list} @{vm_ip}[0]
- \ ... ELSE Append To List ${ip_list} None
- \ ${rc} ${dhcp_ip_line}= Run And Return Rc And Output openstack console log show ${vm} | grep "^nameserver"
- \ ${dhcp_ip} Get Regexp Matches ${dhcp_ip_line} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
- \ ${dhcp_ip_length} Get Length ${dhcp_ip}
- \ Run Keyword If ${dhcp_ip_length}<=0 Append To List ${dhcp_ip} None
- \ ${vm_console_output}= Run openstack console log show ${vm}
- \ Log ${vm_console_output}
+ FOR ${vm} IN @{vm_list}
+ ${rc} ${vm_ip_line}= Run And Return Rc And Output openstack console log show ${vm} | grep -i "obtained"
+ @{vm_ip} Get Regexp Matches ${vm_ip_line} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
+ ${vm_ip_length} Get Length ${vm_ip}
+ Run Keyword If ${vm_ip_length}>0 Append To List ${ip_list} @{vm_ip}[0]
+ ... ELSE Append To List ${ip_list} None
+ ${rc} ${dhcp_ip_line}= Run And Return Rc And Output openstack console log show ${vm} | grep "^nameserver"
+ ${dhcp_ip} Get Regexp Matches ${dhcp_ip_line} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
+ ${dhcp_ip_length} Get Length ${dhcp_ip}
+ Run Keyword If ${dhcp_ip_length}<=0 Append To List ${dhcp_ip} None
+ ${vm_console_output}= Run openstack console log show ${vm}
+ Log ${vm_console_output}
+ END
${dhcp_length} Get Length ${dhcp_ip}
Run Keyword If '${fail_on_none}' == 'true' Should Not Contain ${ip_list} None
Run Keyword If '${fail_on_none}' == 'true' Should Not Contain ${dhcp_ip} None
... TODO: there is a potential issue for a caller that passes in VMs belonging to different networks that
... may have different dhcp server addresses. Not sure what TODO about that, but noting it here for reference.
@{vm_ips} BuiltIn.Create List @{EMPTY}
- : FOR ${vm} IN @{vms}
- \ OpenStackOperations.Poll VM Is ACTIVE ${vm}
- \ ${status} ${ips_and_console_log} BuiltIn.Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 180s 15s
- \ ... OpenStackOperations.Get VM IP true ${vm}
- \ # If there is trouble with Get VM IP, the status will be FAIL and the return value will be a string of what went
- \ # wrong. We need to handle both the PASS and FAIL cases. In the FAIL case we know we wont have access to the
- \ # console log, as it would not be returned; so we need to grab it again to log it. We also can append 'None' to
- \ # the vm ip list if status is FAIL.
- \ BuiltIn.Run Keyword If "${status}" == "PASS" BuiltIn.Log ${ips_and_console_log[2]}
- \ BuiltIn.Run Keyword If "${status}" == "PASS" Collections.Append To List ${vm_ips} ${ips_and_console_log[0]}
- \ BuiltIn.Run Keyword If "${status}" == "FAIL" Collections.Append To List ${vm_ips} None
- \ ${vm_console_output} = BuiltIn.Run Keyword If "${status}" == "FAIL" OpenStack CLI openstack console log show ${vm}
- \ BuiltIn.Run Keyword If "${status}" == "FAIL" BuiltIn.Log ${vm_console_output}
+ FOR ${vm} IN @{vms}
+ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ ${status} ${ips_and_console_log} BuiltIn.Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 180s 15s
+ ... OpenStackOperations.Get VM IP true ${vm}
+ # If there is trouble with Get VM IP, the status will be FAIL and the return value will be a string of what went
+ # wrong. We need to handle both the PASS and FAIL cases. In the FAIL case we know we wont have access to the
+ # console log, as it would not be returned; so we need to grab it again to log it. We also can append 'None' to
+ # the vm ip list if status is FAIL.
+ BuiltIn.Run Keyword If "${status}" == "PASS" BuiltIn.Log ${ips_and_console_log[2]}
+ BuiltIn.Run Keyword If "${status}" == "PASS" Collections.Append To List ${vm_ips} ${ips_and_console_log[0]}
+ BuiltIn.Run Keyword If "${status}" == "FAIL" Collections.Append To List ${vm_ips} None
+ ${vm_console_output} = BuiltIn.Run Keyword If "${status}" == "FAIL" OpenStack CLI openstack console log show ${vm}
+ BuiltIn.Run Keyword If "${status}" == "FAIL" BuiltIn.Log ${vm_console_output}
+ END
OpenStackOperations.Copy DHCP Files From Control Node
[Return] @{vm_ips} ${ips_and_console_log[1]}
... Returns an empty list if no IPv6 addresses found or if SSH connection fails.
... Otherwise, returns a list of IPv6 addresses.
${ipv6_list} = BuiltIn.Create List @{EMPTY}
- : FOR ${vm} IN @{vm_list}
- \ ${output} = OpenStack CLI openstack server show ${vm} -f shell
- \ ${pattern} = String.Replace String ${subnet} ::/64 (:[a-f0-9]{,4}){,4}
- \ @{vm_ipv6} = String.Get Regexp Matches ${output} ${pattern}
- \ ${vm_ip_length} = BuiltIn.Get Length ${vm_ipv6}[0]
- \ ${ipv6_data_from_vm} = BuiltIn.Run Keyword If ${vm_ip_length}>0 OpenStackOperations.Execute Command on VM Instance ${network} ${vm_ipv6[0]}
- \ ... ip -6 a
- \ @{ipv6} = String.Get Regexp Matches ${ipv6_data_from_vm} ${pattern}
- \ ${ipv6_addr_list_length} BuiltIn.Get Length @{ipv6}
- \ BuiltIn.Run Keyword If ${ipv6_addr_list_length}>0 Collections.Append To List ${ipv6_list} ${ipv6[0]}
- \ ... ELSE Collections.Append To List ${ipv6_list} None
+ FOR ${vm} IN @{vm_list}
+ ${output} = OpenStack CLI openstack server show ${vm} -f shell
+ ${pattern} = String.Replace String ${subnet} ::/64 (:[a-f0-9]{,4}){,4}
+ @{vm_ipv6} = String.Get Regexp Matches ${output} ${pattern}
+ ${vm_ip_length} = BuiltIn.Get Length ${vm_ipv6}[0]
+ ${ipv6_data_from_vm} = BuiltIn.Run Keyword If ${vm_ip_length}>0 OpenStackOperations.Execute Command on VM Instance ${network} ${vm_ipv6[0]}
+ ... ip -6 a
+ @{ipv6} = String.Get Regexp Matches ${ipv6_data_from_vm} ${pattern}
+ ${ipv6_addr_list_length} BuiltIn.Get Length @{ipv6}
+ BuiltIn.Run Keyword If ${ipv6_addr_list_length}>0 Collections.Append To List ${ipv6_list} ${ipv6[0]}
+ ... ELSE Collections.Append To List ${ipv6_list} None
+ END
[Return] ${ipv6_list}
View Vm Console
[Arguments] ${vm_instance_names}
[Documentation] View Console log of the created vm instances using nova show.
- : FOR ${vm} IN @{vm_instance_names}
- \ ${output} = OpenStack CLI openstack server show ${vm}
- \ ${output} = OpenStack CLI openstack console log show ${vm}
+ FOR ${vm} IN @{vm_instance_names}
+ ${output} = OpenStack CLI openstack server show ${vm}
+ ${output} = OpenStack CLI openstack console log show ${vm}
+ END
Ping Vm From DHCP Namespace
[Arguments] ${net_name} ${vm_ip}
BuiltIn.Run Keyword If ${rcode} Utils.Write Commands Until Expected Prompt route -A inet6 ${OS_SYSTEM_PROMPT}
BuiltIn.Run Keyword If ${rcode} Utils.Write Commands Until Expected Prompt arp -an ${OS_SYSTEM_PROMPT}
BuiltIn.Run Keyword If ${rcode} Utils.Write Commands Until Expected Prompt ip -f inet6 neigh show ${OS_SYSTEM_PROMPT}
- : FOR ${dest_ip} IN @{dest_ips}
- \ ${string_empty} = BuiltIn.Run Keyword And Return Status Should Be Empty ${dest_ip}
- \ BuiltIn.Run Keyword If ${string_empty} Continue For Loop
- \ BuiltIn.Run Keyword If ${rcode} and "${ping_should_succeed}" == "True" OpenStackOperations.Check Ping ${dest_ip} ttl=${ttl}
- \ ... ELSE OpenStackOperations.Check No Ping ${dest_ip} ttl=${ttl}
+ FOR ${dest_ip} IN @{dest_ips}
+ ${string_empty} = BuiltIn.Run Keyword And Return Status Should Be Empty ${dest_ip}
+ BuiltIn.Run Keyword If ${string_empty} Continue For Loop
+ BuiltIn.Run Keyword If ${rcode} and "${ping_should_succeed}" == "True" OpenStackOperations.Check Ping ${dest_ip} ttl=${ttl}
+ ... ELSE OpenStackOperations.Check No Ping ${dest_ip} ttl=${ttl}
+ END
${ethertype} = String.Get Regexp Matches ${src_ip} ${IP_REGEX}
BuiltIn.Run Keyword If ${rcode} and "${check_metadata}" and ${ethertype} == "True" OpenStackOperations.Check Metadata Access
[Teardown] Exit From Vm Console
[Arguments] ${list_of_external_dst_ips}
[Documentation] Check reachability with other network's instances.
${rcode} = BuiltIn.Run Keyword And Return Status OpenStackOperations.Check If Console Is VmInstance
- : FOR ${dest_ip} IN @{list_of_external_dst_ips}
- \ OpenStackOperations.Check Ping ${dest_ip}
+ FOR ${dest_ip} IN @{list_of_external_dst_ips}
+ OpenStackOperations.Check Ping ${dest_ip}
+ END
Create Router
[Arguments] ${router_name}
Utils.Write Commands Until Expected Prompt arp -an ${DEFAULT_LINUX_PROMPT_STRICT}
${nslist} = Utils.Write Commands Until Expected Prompt ip netns list | awk '{print $1}' ${DEFAULT_LINUX_PROMPT_STRICT}
@{lines} Split To Lines ${nslist} end=-1
- : FOR ${line} IN @{lines}
- \ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o link ${DEFAULT_LINUX_PROMPT_STRICT}
- \ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o addr ${DEFAULT_LINUX_PROMPT_STRICT}
- \ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip route ${DEFAULT_LINUX_PROMPT_STRICT}
+ FOR ${line} IN @{lines}
+ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o link ${DEFAULT_LINUX_PROMPT_STRICT}
+ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o addr ${DEFAULT_LINUX_PROMPT_STRICT}
+ Utils.Write Commands Until Expected Prompt sudo ip netns exec ${line} ip route ${DEFAULT_LINUX_PROMPT_STRICT}
+ END
Utils.Write Commands Until Expected Prompt sudo ovs-vsctl show ${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Write Commands Until Expected Prompt sudo ovs-vsctl list Open_vSwitch ${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Write Commands Until Expected Prompt sudo ovs-ofctl show br-int -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT}
Get Karaf Log Types From Test Start
[Arguments] ${ip} ${test_name} ${types} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
... ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
- : FOR ${type} IN @{types}
- \ OpenStackOperations.Get Karaf Log Type From Test Start ${ip} ${test_name} ${type} ${user} ${password}
- \ ... ${prompt} ${log_file}
+ FOR ${type} IN @{types}
+ OpenStackOperations.Get Karaf Log Type From Test Start ${ip} ${test_name} ${type} ${user} ${password}
+ ... ${prompt} ${log_file}
+ END
Get Karaf Log Events From Test Start
[Arguments] ${test_name} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
[Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node
OpenStackOperations.Get ControlNode Connection
${output} = DevstackUtils.Write Commands Until Prompt And Log sudo ip netns list
- : FOR ${index} IN @{vm_indices}
- \ ${rc} ${output} = OperatingSystem.Run And Return Rc And Output nova show ${index}
- \ BuiltIn.Log ${output}
+ FOR ${index} IN @{vm_indices}
+ ${rc} ${output} = OperatingSystem.Run And Return Rc And Output nova show ${index}
+ BuiltIn.Log ${output}
+ END
OpenStackOperations.List Nova VMs
OpenStackOperations.List Routers
OpenStackOperations.List Networks
[Documentation] Delete all security rules from a specified security group
${sg_rules_output} = OpenStack CLI openstack security group rule list ${sg_name} -cID -fvalue
@{sg_rules} = String.Split String ${sg_rules_output} \n
- : FOR ${rule} IN @{sg_rules}
- \ ${output} = OpenStack CLI openstack security group rule delete ${rule}
+ FOR ${rule} IN @{sg_rules}
+ ${output} = OpenStack CLI openstack security group rule delete ${rule}
+ END
Create Allow All SecurityGroup
[Arguments] ${sg_name} ${ether_type}=IPv4
[Arguments] ${ports}
[Documentation] Retrieve the port MacAddr for the given list of port name and return the MAC address list.
${macs} BuiltIn.Create List
- : FOR ${port} IN @{ports}
- \ ${mac} = OpenStackOperations.Get Port Mac ${port}
- \ Collections.Append To List ${macs} ${mac}
+ FOR ${port} IN @{ports}
+ ${mac} = OpenStackOperations.Get Port Mac ${port}
+ Collections.Append To List ${macs} ${mac}
+ END
[Return] ${macs}
Get Port Ip
[Arguments] ${networks} ${subnets}
[Documentation] Check propagated routes
OpenStackOperations.Get ControlNode Connection
- : FOR ${INDEX} IN RANGE 0 1
- \ ${net_id} = OpenStackOperations.Get Net Id @{networks}[${INDEX}]
- \ ${is_ipv6} = String.Get Regexp Matches @{subnets}[${INDEX}] ${IP6_REGEX}
- \ ${length} = BuiltIn.Get Length ${is_ipv6}
- \ ${cmd} = BuiltIn.Set Variable If ${length} == 0 ip route ip -6 route
- \ ${output} = Utils.Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ${cmd} ]>
- \ BuiltIn.Should Contain ${output} @{subnets}[${INDEX}]
+ FOR ${INDEX} IN RANGE 0 1
+ ${net_id} = OpenStackOperations.Get Net Id @{networks}[${INDEX}]
+ ${is_ipv6} = String.Get Regexp Matches @{subnets}[${INDEX}] ${IP6_REGEX}
+ ${length} = BuiltIn.Get Length ${is_ipv6}
+ ${cmd} = BuiltIn.Set Variable If ${length} == 0 ip route ip -6 route
+ ${output} = Utils.Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ${cmd} ]>
+ BuiltIn.Should Contain ${output} @{subnets}[${INDEX}]
+ END
Neutron Cleanup
[Arguments] ${vms}=@{EMPTY} ${networks}=@{EMPTY} ${subnets}=@{EMPTY} ${ports}=@{EMPTY} ${sgs}=@{EMPTY}
- : FOR ${vm} IN @{vms}
- \ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm}
- : FOR ${port} IN @{ports}
- \ BuiltIn.Run Keyword And Ignore Error Delete Port ${port}
- : FOR ${subnet} IN @{subnets}
- \ BuiltIn.Run Keyword And Ignore Error Delete SubNet ${subnet}
- : FOR ${network} IN @{networks}
- \ BuiltIn.Run Keyword And Ignore Error Delete Network ${network}
- : FOR ${sg} IN @{sgs}
- \ BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${sg}
+ FOR ${vm} IN @{vms}
+ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm}
+ END
+ FOR ${port} IN @{ports}
+ BuiltIn.Run Keyword And Ignore Error Delete Port ${port}
+ END
+ FOR ${subnet} IN @{subnets}
+ BuiltIn.Run Keyword And Ignore Error Delete SubNet ${subnet}
+ END
+ FOR ${network} IN @{networks}
+ BuiltIn.Run Keyword And Ignore Error Delete Network ${network}
+ END
+ FOR ${sg} IN @{sgs}
+ BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${sg}
+ END
OpenStack List All
[Documentation] Get a list of different OpenStack resources that might be in use.
@{modules} = BuiltIn.Create List server port network subnet security group
... security group rule floating ip router
- : FOR ${module} IN @{modules}
- \ ${output} = OpenStack CLI openstack ${module} list
+ FOR ${module} IN @{modules}
+ ${output} = OpenStack CLI openstack ${module} list
+ END
OpenStack CLI Get List
[Arguments] ${cmd}
[Documentation] Cleanup all Openstack resources with best effort. The keyword will query for all resources
... in use and then attempt to delete them. Errors are ignored to allow the cleanup to continue.
@{fips} = OpenStack CLI Get List openstack floating ip list -f json
- : FOR ${fip} IN @{fips}
- \ BuiltIn.Run Keyword And Ignore Error Delete Floating IP ${fip['ID']}
+ FOR ${fip} IN @{fips}
+ BuiltIn.Run Keyword And Ignore Error Delete Floating IP ${fip['ID']}
+ END
@{vms} = OpenStack CLI Get List openstack server list -f json
- : FOR ${vm} IN @{vms}
- \ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm['ID']}
+ FOR ${vm} IN @{vms}
+ BuiltIn.Run Keyword And Ignore Error Delete Vm Instance ${vm['ID']}
+ END
@{routers} = OpenStack CLI Get List openstack router list -f json
- : FOR ${router} IN @{routers}
- \ BuiltIn.Run Keyword And Ignore Error Cleanup Router ${router['ID']}
+ FOR ${router} IN @{routers}
+ BuiltIn.Run Keyword And Ignore Error Cleanup Router ${router['ID']}
+ END
@{ports} = OpenStack CLI Get List openstack port list -f json
- : FOR ${port} IN @{ports}
- \ BuiltIn.Run Keyword And Ignore Error Delete Port ${port['ID']}
+ FOR ${port} IN @{ports}
+ BuiltIn.Run Keyword And Ignore Error Delete Port ${port['ID']}
+ END
@{networks} = OpenStack CLI Get List openstack network list -f json
- : FOR ${network} IN @{networks}
- \ BuiltIn.Run Keyword And Ignore Error Delete Subnet ${network['Subnets']}
- \ BuiltIn.Run Keyword And Ignore Error Delete Network ${network['ID']}
+ FOR ${network} IN @{networks}
+ BuiltIn.Run Keyword And Ignore Error Delete Subnet ${network['Subnets']}
+ BuiltIn.Run Keyword And Ignore Error Delete Network ${network['ID']}
+ END
@{security_groups} = OpenStack CLI Get List openstack security group list -f json
- : FOR ${security_group} IN @{security_groups}
- \ BuiltIn.Run Keyword If "${security_group['Name']}" != "default" BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${security_group['ID']}
+ FOR ${security_group} IN @{security_groups}
+ BuiltIn.Run Keyword If "${security_group['Name']}" != "default" BuiltIn.Run Keyword And Ignore Error Delete SecurityGroup ${security_group['ID']}
+ END
OpenStack List All
Cleanup Router
[Arguments] ${id}
[Documentation] Delete a router, but first remove any interfaces or gateways so that the delete will be successful.
@{ports} = OpenStack CLI Get List openstack port list --router ${id} -f json --long
- : FOR ${port} IN @{ports}
- \ ${subnet_id} = OpenStackOperations.Get Match ${port['Fixed IP Addresses']} ${REGEX_UUID} 0
- \ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_gateway" BuiltIn.Run Keyword And Ignore Error Remove Gateway ${id}
- \ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_interface" BuiltIn.Run Keyword And Ignore Error Remove Interface ${id} ${subnet_id}
+ FOR ${port} IN @{ports}
+ ${subnet_id} = OpenStackOperations.Get Match ${port['Fixed IP Addresses']} ${REGEX_UUID} 0
+ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_gateway" BuiltIn.Run Keyword And Ignore Error Remove Gateway ${id}
+ BuiltIn.Run Keyword If "${port['Device Owner']}" == "network:router_interface" BuiltIn.Run Keyword And Ignore Error Remove Interface ${id} ${subnet_id}
+ END
BuiltIn.Run Keyword And Ignore Error Delete Router ${id}
OpenStack Suite Setup
Is Feature Installed
[Arguments] ${features}=none
- : FOR ${feature} IN @{features}
- \ ${status} ${output} BuiltIn.Run Keyword And Ignore Error BuiltIn.Should Contain ${CONTROLLERFEATURES} ${feature}
- \ Return From Keyword If "${status}" == "PASS" True
+ FOR ${feature} IN @{features}
+ ${status} ${output} BuiltIn.Run Keyword And Ignore Error BuiltIn.Should Contain ${CONTROLLERFEATURES} ${feature}
+ Return From Keyword If "${status}" == "PASS" True
+ END
[Return] False
Add OVS Logging On All OpenStack Nodes