示例#1
0
文件: hdl.py 项目: openebs/Mayastor
 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
示例#2
0
文件: hdl.py 项目: openebs/Mayastor
 def pool_list(self):
     """Only list pools"""
     return self.ms.ListPools(pb.Null(), wait_for_ready=True)
示例#3
0
文件: hdl.py 项目: openebs/Mayastor
 def nexus_list_v2(self):
     """List all the nexus devices, with separate name and uuid."""
     return self.ms.ListNexusV2(pb.Null()).nexus_list
示例#4
0
文件: hdl.py 项目: openebs/Mayastor
 def bdev_list(self):
     """List all bdevs found within the system."""
     return self.bdev.List(pb.Null(), wait_for_ready=True).bdevs
示例#5
0
文件: hdl.py 项目: openebs/Mayastor
 def replica_list_v2(self):
     """List existing replicas along with their UUIDs"""
     return self.ms.ListReplicasV2(pb.Null())
示例#6
0
文件: hdl.py 项目: openebs/Mayastor
 def nexus_list(self):
     """List all the nexus devices."""
     return self.ms.ListNexus(pb.Null()).nexus_list
示例#7
0
 def find(name):
     for pool in get_mayastor_instance.ms.ListPools(pb.Null()).pools:
         if pool.name == name:
             return pool
     return None
示例#8
0
def list_nexuses(mayastor_mod, nexus_instance):
    return mayastor_mod[nexus_instance].ms.ListNexus(pb.Null()).nexus_list
示例#9
0
def list_replicas(mayastor_instance):
    return mayastor_instance.ms.ListReplicas(pb.Null()).replicas
示例#10
0
def list_pools(get_mayastor_instance):
    return get_mayastor_instance.ms.ListPools(pb.Null(),
                                              wait_for_ready=True).pools
示例#11
0
def stat_replicas(mayastor_instance):
    return mayastor_instance.ms.StatReplicas(pb.Null()).replicas
示例#12
0
 def find(uuid):
     for replica in mayastor_instance.ms.ListReplicas(pb.Null()).replicas:
         if replica.uuid == uuid:
             return replica
     return None
示例#13
0
 def count():
     return len(mayastor_mod[nexus_instance].ms.ListNexus(
         pb.Null()).nexus_list)
示例#14
0
文件: hdl.py 项目: openebs/Mayastor
 def stat_nvme_controllers(self):
     """Statistics for all nvmx controllers"""
     return self.ms.StatNvmeControllers(pb.Null()).controllers
示例#15
0
文件: hdl.py 项目: openebs/Mayastor
 def replica_list(self):
     """List existing replicas"""
     return self.ms.ListReplicas(pb.Null())
示例#16
0
文件: hdl.py 项目: openebs/Mayastor
 def mayastor_info(self):
     """Get information about Mayastor instance"""
     return self.ms.GetMayastorInfo(pb.Null())
示例#17
0
 def find(uuid):
     for nexus in mayastor_mod[nexus_instance].ms.ListNexus(pb.Null()).nexus_list:
         if nexus.uuid == uuid:
             return nexus
     return None