Example #1
0
 def get_bdevs(self, bdev_type):
     self.current_bdevs = rpc.bdev.get_bdevs(self.client, an(name=""))
     # Following replace needs to be done in order for some of the bdev
     # listings to work.
     # For example logical volumes: listing in menu is "Logical_Volume"
     # (cannot have space), but the product name in SPDK is "Logical Volume"
     bdev_type = bdev_type.replace("_", " ")
     for bdev in filter(lambda x: bdev_type in x["product_name"],
                        self.current_bdevs):
         test = Bdev(bdev)
         yield test
Example #2
0
 def create_nvme_bdev(self, **kwargs):
     response = rpc.bdev.construct_nvme_bdev(self.client, an(**kwargs))
     return self.print_array(response)
Example #3
0
 def delete_bdev(self, name):
     rpc.bdev.delete_bdev(self.client, an(bdev_name=name))