]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: pass filter_for_batch as keyword argument 37545/head
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 11:58:59 +0000 (13:58 +0200)
This PR also removes an unused ctor argument in the Devices class.

Fixes: 7d168ad7bdbb6d6d5231a4ae540ab03040b49a38
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
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 f046f282233e33e16545ec7f8d623f8803831cbd..708227e831413581fef6e10ddd587100e96926f3 100644 (file)
@@ -27,7 +27,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