Skip to content

Commit

Permalink
ovirt_disk add warning for DiskAttachments params (#347)
Browse files Browse the repository at this point in the history
* ovirt_disk add warning for DiskAttachments params

* add changelogs

* fix pep8

* fix flake8

* fix pep8
  • Loading branch information
mnecas authored Sep 20, 2021
1 parent 1278733 commit 35a60e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ovirt_disk - Add warning for disk attachments (https://github.com/oVirt/ovirt-ansible-collection/pull/347).
7 changes: 7 additions & 0 deletions plugins/modules/ovirt_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,13 @@ def main():
)
elif state == 'detached':
ret = disk_attachments_module.remove()
elif any([
module.params.get('interface'),
module.params.get('activate'),
module.params.get('bootable'),
module.params.get('uses_scsi_reservation'),
module.params.get('pass_discard'), ]):
module.warn("Cannot use 'interface', 'activate', 'bootable', 'uses_scsi_reservation' or 'pass_discard' without specifing VM.")

# When the host parameter is specified and the disk is not being
# removed, refresh the information about the LUN.
Expand Down

0 comments on commit 35a60e6

Please sign in to comment.