extract drain script from drain action

Drain Action still uses concrete implementation for now and tests are integrationy

Signed-off-by: Nick Wade <nwade@pivotallabs.com>