proc ApplyChangesOnTheFly {{timeout 90}} { set count 0 set status [ixNet getAttr /globals/topology -applyOnTheFlyState] puts "Aplying changes on the fly -> $status" while {$status == "notAllowed"} { puts " $count: /globals/topology -applyOnTheFlyState --> $status" set status [ixNet getAttr /globals/topology -applyOnTheFlyState] after 1000 incr count if {$count > $timeout } { error "Waited for $count sec, '/globals/topology -applyOnTheFlyState' still not in 'allowed' status... " } } set status [ixNet getAttr /globals/topology -applyOnTheFlyState] if {$status == "allowed"} { ixNet exec applyOnTheFly /globals/topology return 0 } elseif {$status == "nothingToApply"} { ixNet exec applyOnTheFly /globals/topology return 0 } else { error "Status unknown '$status'" return 1 } }