i added the 2nd line here for debugging:
set snatpool_member [class nextelement -value $clname $searchID]
log local0.info "clname:=$clname ; searchID=$searchID ; snatpool_member=$snatpool_member"
And indeed according to the log it seems that the snatpool_member var remains empty:
Mar 23 08:46:11 local/tmm2 info tmm2[5251]: Rule Snat_Persist : clname:=snatpool_example ; searchID=class_iter:snatpool_example1 ; snatpool_member=
(snatpool_example is the name I gave to the class i created)
I guess it's because the class doesnt contains values, only keys/names.
So I changes "-value" to be "-name" and now the log looks better:
Mar 23 08:55:47 local/tmm2 info tmm2[5251]: Rule Snat_Persist : Snat assignment of 10.107.200.202/32 made to ccc
I'll keep looking into that...
Thanks