Hi Luis/Jamo
As discussed in last clustering meeting, I am getting below error when I run
following highlighted function
Test Case:
=========
Check Shards Status Before Leader Restart
[Documentation] Check Status for all shards in OpenFlow application.
Check OpenFlow Shards Status ${original_cluster_list}
The problem comes because below function is called in side Check OpenFlow
Shards Status
Get Cluster Shard Status
[Arguments] ${controller_index_list} ${shard_type} ${shard}
[Documentation] Checks ${shard} status and returns Leader index and a
list of Followers from a ${controller_index_list}.
... ${shard_type} is either config or operational.
${lenght}= Get Length ${controller_index_list}
Run Keyword If '${shard_type}' == 'config' Set Test Variable
${type} DistributedConfigDatastore
Run Keyword If '${shard_type}' == 'operational' Set Test Variable
${type} DistributedOperationalDatastore
Should Not Be Empty ${type} Wrong type, valid values are config and
operational.
${leader}= Set Variable 0
${follower_list}= Create List
: FOR ${i} IN @{controller_index_list}
\ ${data}= Get Data From URI controller${i}
${jolokia_read}:Category=Shards,name=member-${i}-shard-${shard}-${shard_type},type=${type}
\ Log ${data}
\ ${json}= To Json ${data}
\ ${status}= Get From Dictionary &{json}[value] RaftState
\ Log Controller ${ODL_SYSTEM_${i}_IP} is ${status} for shard ${shard}
root@mininet-vm:/home/mininet/integration/test/csit/suites/openflowplugin/Clustering#
pybot -L TRACE -v KARAF_HOME:/home/mininet/controller-Li/deploy/current/odl -v
MININET_USER:mininet -v USER_HOME:/home/mininet -v CONTROLLER:10.183.181.51 -v
CONTROLLER1:10.183.181.52 -v CONTROLLER2:10.183.181.53 -v USER:root -v
PASSWORD:rootroot -v WORKSPACE:/home/mininet -v
BUNDLEFOLDER:controller-Li/deploy/current/ -v DEFAULT_LINUX_PROMPT:\# -v
CONTROLLER_STOP_TIMEOUT:300 -v NUM_ODL_SYSTEM:3 -v MININET_PASSWORD:rootroot
020__Cluster_HA_Leader_Follower_Failover.robot
==============================================================================
Cluster HA Leader Follower Failover :: Test suite for Cluster HA - Device L...
==============================================================================
Create Original Cluster List :: Create original cluster list. | PASS |
------------------------------------------------------------------------------
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
Check Shards Status Before Leader Restart :: Check Status for all ... | FAIL |
TypeError: string indices must be integers
------------------------------------------------------------------------------
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
[ WARN ] Syntax '&{json}' is reserved for future use. Please escape it like
'\&{json}'.
Get Inventory Leader Before Leader Restart :: Find leader in the I... ^CSecond
signal will force exit.
The issue does not go away if I use “\” as reported in above error, it result
in another error “TypeError: string indices must be integers”
\ ${status}= Get From Dictionary \&{json}[value] RaftState
------------------------------------------------------------------------------
Check Shards Status Before Leader Restart :: Check Status for all ... | FAIL |
TypeError: string indices must be integers
-------------------------------------------------------------------------------
The issue is solved by adding below two lines and commenting the above line.
# Added below two lines and commented above line
\ ${value}= Get From Dictionary ${json} value
\ ${status}= Get From Dictionary ${value} RaftState
Please let me know your views.
Thanks
Sanjib
_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev