API & CLI for partition tables

We have to wait with the merge until fixes on Foreman's side land in the master.