rest-api/v1: adapt to new Ceph df output (total_bytes etc.)

Ceph changed the units (kB -> B) and name (total_space -> total_bytes,
etc.) with ee2dbdb0f5e54fe6f9c5999c032063b084424c4c in Firefly.  Look
for the new names, and use if present; otherwise use the old names.

Fixes: #10127
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Merge pull request #219 from ceph/wip-10127

rest-api/v1: adapt to new Ceph df output (total_bytes etc.)
Rewrite regular expression to avoid salt-minon exception

If ceph-fuse is deployed, a socket named "ceph-client.admin.asok" would appear under
`/var/run/ceph`, and cause current code AttributeError. So this patch rewrites the regular
expression and adds some fault tolerance code. Also note that the first two groups of the
regular expression are made non-greedy to parse names like "ceph-mon.www-2.abc.com.asok"
correctly.
Merge pull request #227 from cannium/master

Add more service types to avoid salt-minon exception
calamari_ctl: read test.conf

Signed-off-by: Dan Mick <dan.mick@redhat.com>
calamari_ctl: find calamari node, construct api_url from it

For External, parse info.yaml; Embedded assumes localhost.
Allow override from test.conf if necessary.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: MinionSim is needed only for EmbeddedCephControl

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: let cluster_distro be optional (only needed for bootstrap)

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: prefix ceph with sudo for External clusters

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: allow bootstrap to be optional

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: make get_service_fqdns search for servers with given role

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: use new get_service_fqdns

Reimplement get_server_fqdns and _get_admin_node() to use the
new get_service_fqdns (_get_admin_node now returns the first target
that has a role of type 'mon')

Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph_ctl: remove 'only three hosts' test from ExternalCephCtl

Signed-off-by: Dan Mick <dan.mick@redhat.com>
tests/test_monitoring: skip test_mon_down if < 3 mons

There will never be any update from a cluster with < 3 mons when
you take one down.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
tests: change 2.7-only constructs to 2.6-compatible ones

Signed-off-by: Dan Mick <dan.mick@redhat.com>
tests/test_pool_management: avoid mutable default arg

Signed-off-by: Dan Mick <dan.mick@redhat.com>