Update rbd_workflow_tools.py

Refactor a bit