Merge pull request #23129 from alfredodeza/wip-rm24952

ceph-volume lvm.listing only include devices if they exist

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
This commit is contained in:
Alfredo Deza 2018-07-19 12:36:40 -04:00 committed by GitHub
commit 12f1ffe784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,8 +49,15 @@ def pretty_report(report):
value=value
)
)
output.append(
device_metadata_item_template.format(tag_name='devices', value=','.join(device['devices'])))
if not device.get('devices'):
continue
else:
output.append(
device_metadata_item_template.format(
tag_name='devices',
value=','.join(device['devices'])
)
)
print(''.join(output))