ceph/calamari — pull request #192 by tserong (2014-09-09 05:23:44+00:00)
Title: tests: cope better with `ceph pg stat` output

Most of the time, `ceph pg stat` gives output like:

"v211: 192 pgs: 192 active+clean; 16 bytes data, 232 MB used, 11154 GB /
11154 GB avail"

The current code splits on ':' and ';', and expects this to result in
four parts. Occasionally though, `ceph pg stat` has some extra
information about recovery, which gives five parts:

"v136: 192 pgs: 192 active+clean; 16 bytes data, 239 MB used, 11154 GB /
11154 GB avail; 5 B/s, 0 objects/s recovering"

The way the splitting and assignment was implemented, the second output
would raise ValueError: too many values to unpack. This change slices
the split to only grab total_stat and pg_stat, which is what we actually
care about.

Signed-off-by: Tim Serong