*** Variables ***
${ADD_BULK_CONFIG_NODES_API} /restconf/operations/sal-bulk-flow:flow-test
${GET_BULK_CONFIG_NODES_API} /restconf/operations/sal-bulk-flow:read-flow-test
+${ADD_TABLE_NODEs_API} /restconf/operations/sal-bulk-flow:table-test
${jolokia_write_op_status} /jolokia/read/org.opendaylight.openflowplugin.applications.bulk.o.matic:type=FlowCounter/WriteOpStatus
${jolokia_read_op_status} /jolokia/read/org.opendaylight.openflowplugin.applications.bulk.o.matic:type=FlowCounter/ReadOpStatus
${jolokia_flow_count_status} /jolokia/read/org.opendaylight.openflowplugin.applications.bulk.o.matic:type=FlowCounter/FlowCount
[Documentation] Add Bulk Flow in member ${controller_index} according to \${json_body_add}.
${resp} ClusterManagement.Post As Json To Member ${ADD_BULK_CONFIG_NODES_API} ${json_body_add} ${controller_index}
+Add Table Flow
+ [Arguments] ${json_body_add} ${controller_index}
+ [Documentation] Add Table in member ${controller_index} according to \${json_body_add}.
+ ${resp} ClusterManagement.Post As Json To Member ${ADD_TABLE_NODEs_API} ${json_body_add} ${controller_index}
+
Delete Bulk Flow
[Arguments] ${json_body_del} ${controller_index}
[Documentation] Delete Bulk Flow in member ${controller_index} according to \${json_body_del}.
Add Bulk Flow ${json_body_add} ${controller_index}
Wait Until Write Finishes ${controller_index} ${timeout}
+Add Table In Node
+ [Arguments] ${json_body_add} ${controller_index} ${timeout}
+ [Documentation] Add Table Flow in member ${controller_index} and wait until operation is completed.
+ Add Table Flow ${json_body_add} ${controller_index}
+ Wait Until Write Finishes ${controller_index} ${timeout}
+
Delete Bulk Flow In Node
[Arguments] ${json_body_del} ${controller_index} ${timeout}
[Documentation] Delete Bulk Flow in member ${controller_index} and wait until operation is completed.
Get Bulk Flow And Verify Count In Cluster
[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__Given_Or_Internal_Index_List 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}
+ ${index_list} = ClusterManagement.List Indices Or All given_list=${controller_index_list}
+ 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}
${get_string}= Set Variable "sal-bulk-flow:flows-per-dpn" : "1000"
${put_string}= Set Variable "sal-bulk-flow:flows-per-dpn" : "${flows_count}"
${json_body_add} Replace String Using Regexp ${str} ${get_string} ${put_string}
+ ${get_string}= Set Variable "sal-bulk-flow:batch-size" : "1"
+ ${put_string}= Set Variable "sal-bulk-flow:batch-size" : "${flows_count}"
+ ${json_body_add} Replace String Using Regexp ${json_body_add} ${get_string} ${put_string}
Log ${json_body_add}
[Return] ${json_body_add}
${get_string}= Set Variable "sal-bulk-flow:flows-per-dpn" : "1000"
${put_string}= Set Variable "sal-bulk-flow:flows-per-dpn" : "${flows_count}"
${json_body_del} Replace String Using Regexp ${str} ${get_string} ${put_string}
+ ${get_string}= Set Variable "sal-bulk-flow:batch-size" : "1"
+ ${put_string}= Set Variable "sal-bulk-flow:batch-size" : "${flows_count}"
+ ${json_body_del} Replace String Using Regexp ${json_body_del} ${get_string} ${put_string}
Log ${json_body_del}
[Return] ${json_body_del}