Bug 1885542 - Cannot see the current CD image using ovirt_vm_info module
Summary: Cannot see the current CD image using ovirt_vm_info module
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-ansible-collection
Version: 4.4.2
Hardware: All
OS: Linux
low
low
Target Milestone: ovirt-4.4.3
: ---
Assignee: Martin Necas
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-06 10:47 UTC by nijin ashok
Modified: 2020-11-24 00:05 UTC (History)
1 user (show)

Fixed In Version: ovirt-ansible-collection-1.2.0-0.2
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-22 14:32:26 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-collection pull 144 0 None Closed NFS is not auto mounting after rebooting the server 2022-06-09 13:48:48 UTC

Description nijin ashok 2020-10-06 10:47:41 UTC
Description of problem:

Tried with the below task to get the CDROM devices attached to the VM.

===
  - ovirt_vm_info:
       auth: "{{ ovirt_auth }}"
       pattern: "centos"
       all_content: yes
       fetch_nested: true
       next_run: false
       nested_attributes: cdroms,file
    register: result
===

The above task will provide the information of persistent cdrom attached to the VM. However, there is no way we can see a cdrom attached during runtime. In Python SDK, we can do this by passing "current=True" as below.

===
  vm_service = vms_service.vm_service(vm.id)
  cdroms_service = vm_service.cdroms_service()
  cdrom_device = cdroms_service.list()[0]
  cdrom_service = cdroms_service.cdrom_service(cdrom_device.id)
  cdrom = cdrom_service.get(current=True)
  if cdrom.file is not None:
    print("VM: %s cdrom: %s" % (vm.name,cdrom.file.id))
===

However, it's not possible to pass the "current=True" through Ansible modules.

Version-Release number of selected component (if applicable):

rhvm-4.4.1.10-0.1.el8ev.noarch

How reproducible:

100%

Steps to Reproduce:

Try using  ovirt_vm_info to get the current CD of any VMs.


Actual results:

Cannot see the current CD image using ovirt_vm_info module

Expected results:

Provide some solution to view the current CD using Ansible.

Additional info:

Comment 1 Martin Perina 2020-10-12 08:56:31 UTC
This change will be part of oVirt Ansible Collection only, it can't be backported to Ansible 2.9.z

Comment 2 Martin Necas 2020-10-12 11:06:48 UTC
Merged and will be released in ovirt-ansible-collection 1.2.0


Note You need to log in before you can comment on or make changes to this bug.