From: Jan Fajerski Date: Mon, 5 Oct 2020 10:56:26 +0000 (+0200) Subject: ceph-volume: pass filter_for_batch as keyword argument X-Git-Tag: v16.1.0~916^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37545%2Fhead;p=ceph.git ceph-volume: pass filter_for_batch as keyword argument This PR also removes an unused ctor argument in the Devices class. Fixes: 7d168ad7bdbb6d6d5231a4ae540ab03040b49a38 Signed-off-by: Jan Fajerski --- diff --git a/src/ceph-volume/ceph_volume/inventory/main.py b/src/ceph-volume/ceph_volume/inventory/main.py index f4b392e4173d..7053a3ebf8f8 100644 --- a/src/ceph-volume/ceph_volume/inventory/main.py +++ b/src/ceph-volume/ceph_volume/inventory/main.py @@ -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': diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index f046f282233e..708227e83141 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -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