]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: pass filter_for_batch as keyword argument
authorJan Fajerski <jfajerski@suse.com>
Mon, 5 Oct 2020 10:56:26 +0000 (12:56 +0200)
committerJan Fajerski <jfajerski@suse.com>
Mon, 5 Oct 2020 13:40:57 +0000 (15:40 +0200)
This PR also removes an unused ctor argument in the Devices class.

Fixes: 7d168ad7bdbb6d6d5231a4ae540ab03040b49a38
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit c5a711e5b6499915b7c2a7b7869f890fa7dc7e2d)

src/ceph-volume/ceph_volume/inventory/main.py
src/ceph-volume/ceph_volume/util/device.py

index f4b392e4173dd51357913831cb0568fe1e6f11bc..7053a3ebf8f83e83ad5373e7f99791af7c4c1305 100644 (file)
@@ -42,13 +42,13 @@ class Inventory(object):
         if self.args.path:
             self.format_report(Device(self.args.path))
         else:
-            self.format_report(Devices(self.args.filter_for_batch))
+            self.format_report(Devices(filter_for_batch=self.args.filter_for_batch))
 
     def get_report(self):
         if self.args.path:
             return Device(self.args.path).json_report()
         else:
-            return Devices(self.args.filter_for_batch).json_report()
+            return Devices(filter_for_batch=self.args.filter_for_batch).json_report()
 
     def format_report(self, inventory):
         if self.args.format == 'json':
index c6888e159a21b1751dfa022f0bcd75ec7e4956e0..b77d0f2cad467a828284abb658cc062cb9bcf731 100644 (file)
@@ -26,7 +26,7 @@ class Devices(object):
     A container for Device instances with reporting
     """
 
-    def __init__(self, devices=None, filter_for_batch=False):
+    def __init__(self, filter_for_batch=False):
         if not sys_info.devices:
             sys_info.devices = disk.get_devices()
         self.devices = [Device(k) for k in