def testList(self): """ List should succeed and contain the same number of entries as devices in pool. """ (result, rc, _) = checked_call(Pool.ListDevs(self._pool_object), PoolSpec.OUTPUT_SIGS[_PN.ListDevs]) self.assertEqual(len(result), len(self._devs)) self.assertEqual(rc, self._errors.OK)
def list_pool(namespace): """ List devices in a pool. """ proxy = get_object(TOP_OBJECT) pool_object = get_pool(proxy, namespace.name) (result, rc, message) = Pool.ListDevs(pool_object) if rc != StratisdErrorsGen.get_object().OK: raise StratisCliRuntimeError(rc, message) for item in result: print(item) return