def pools_as_uris(self): """Return a list of pools as found on the system.""" uris = [] pools = self.ms.ListPools(pb.Null(), wait_for_ready=True) for p in pools.pools: uri = "pool://{0}/{1}".format(self.ip_v4, p.name) uris.append(uri) return uris
def pool_list(self): """Only list pools""" return self.ms.ListPools(pb.Null(), wait_for_ready=True)
def nexus_list_v2(self): """List all the nexus devices, with separate name and uuid.""" return self.ms.ListNexusV2(pb.Null()).nexus_list
def bdev_list(self): """List all bdevs found within the system.""" return self.bdev.List(pb.Null(), wait_for_ready=True).bdevs
def replica_list_v2(self): """List existing replicas along with their UUIDs""" return self.ms.ListReplicasV2(pb.Null())
def nexus_list(self): """List all the nexus devices.""" return self.ms.ListNexus(pb.Null()).nexus_list
def find(name): for pool in get_mayastor_instance.ms.ListPools(pb.Null()).pools: if pool.name == name: return pool return None
def list_nexuses(mayastor_mod, nexus_instance): return mayastor_mod[nexus_instance].ms.ListNexus(pb.Null()).nexus_list
def list_replicas(mayastor_instance): return mayastor_instance.ms.ListReplicas(pb.Null()).replicas
def list_pools(get_mayastor_instance): return get_mayastor_instance.ms.ListPools(pb.Null(), wait_for_ready=True).pools
def stat_replicas(mayastor_instance): return mayastor_instance.ms.StatReplicas(pb.Null()).replicas
def find(uuid): for replica in mayastor_instance.ms.ListReplicas(pb.Null()).replicas: if replica.uuid == uuid: return replica return None
def count(): return len(mayastor_mod[nexus_instance].ms.ListNexus( pb.Null()).nexus_list)
def stat_nvme_controllers(self): """Statistics for all nvmx controllers""" return self.ms.StatNvmeControllers(pb.Null()).controllers
def replica_list(self): """List existing replicas""" return self.ms.ListReplicas(pb.Null())
def mayastor_info(self): """Get information about Mayastor instance""" return self.ms.GetMayastorInfo(pb.Null())
def find(uuid): for nexus in mayastor_mod[nexus_instance].ms.ListNexus(pb.Null()).nexus_list: if nexus.uuid == uuid: return nexus return None