
class TestOSDs(object):

    def test_ceph_osd_package_is_installed(self, node, Package):
        assert Package("ceph-osd").is_installed

    def test_osd_listens_on_6800(self, node, Socket):
        assert Socket("tcp://%s:6800" % node["address"]).is_listening

    def test_osd_services_are_running(self, node, Service):
        # TODO: figure out way to paramaterize node['osd_ids'] for this test
        for osd_id in node["osd_ids"]:
            assert Service("ceph-osd@%s" % osd_id).is_running

    def test_osd_services_are_enabled(self, node, Service):
        # TODO: figure out way to paramaterize node['osd_ids'] for this test
        for osd_id in node["osd_ids"]:
            assert Service("ceph-osd@%s" % osd_id).is_enabled

    def test_osd_are_mounted(self, node, MountPoint):
        # TODO: figure out way to paramaterize node['osd_ids'] for this test
        for osd_id in node["osd_ids"]:
            osd_path = "/var/lib/ceph/osd/{cluster}-{osd_id}".format(
                cluster=node["cluster_name"],
                osd_id=osd_id,
            )
            assert MountPoint(osd_path).exists

@@ -153,24 +153,34 @@
 _osd
+s
 _listen
-s
 _on_
-6800
+public_network
 (sel
@@ -209,55 +209,286 @@
     
-assert Socket(%22tcp://%25s:6800%22 %25 node%5B%22address%22%5D
+# TODO: figure out way to paramaterize this test%0A        for x in range(0, node%5B%22num_devices%22%5D * 2):%0A            port = %22680%7B%7D%22.format(x)%0A            assert Socket(%22tcp://%7Baddress%7D:%7Bport%7D%22.format(%0A                address=node%5B%22address%22%5D,%0A                port=port,%0A            )
 ).is

test that all osds are listening on the public network