Skip to content

Commit

Permalink
Merge pull request ceph#23129 from alfredodeza/wip-rm24952
Browse files Browse the repository at this point in the history
ceph-volume lvm.listing only include devices if they exist

Reviewed-by: Andrew Schoen <[email protected]>
  • Loading branch information
alfredodeza authored Jul 19, 2018
2 parents fa4c030 + 37565f8 commit 12f1ffe
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ceph-volume/ceph_volume/devices/lvm/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 12f1ffe

Please sign in to comment.