Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1418768

Summary: [ovirt-ansible-modules] missing ovirt_disks_facts module
Product: [oVirt] ovirt-distribution Reporter: Petr Kubica <pkubica>
Component: GeneralAssignee: Ondra Machacek <omachace>
Status: CLOSED UPSTREAM QA Contact: Petr Kubica <pkubica>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, lsvaty, mperina, omachace
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-10 10:46:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1405975    

Description Petr Kubica 2017-02-02 16:46:35 UTC
Description of problem:
missing ovirt_disks_facts module

- get information about disk

- user can't check if disk of some name is already attached in VM of some name

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

Comment 1 Sandro Bonazzola 2017-02-02 16:51:19 UTC
Ondra, do you want me to add an ovirt-ansible-modules component in ovirt-distribution? Or do you want to close this with resolution upstream and open an issue on https://github.com/ansible/ansible-modules-extras/issues ?

Comment 2 Ondra Machacek 2017-02-02 16:56:53 UTC
In my opinion we should close this as upstream and issue should be opened at github, but QE wants to track the issues in BZ.

Martin, can we somehow agree on reasonable process?

Comment 3 Lukas Svaty 2017-02-03 09:31:04 UTC
Sandro, adding new component as ovirt-ansible-modules would be preferable, QE needs to track these issues, and I doubt anyone will check github issues, thus BZ.

However bugzilla does not have any external tracker interface for github issue, so created github issues has to be linked within comment.

Comment 4 Yaniv Kaul 2017-02-03 11:54:58 UTC
(In reply to Lukas Svaty from comment #3)
> Sandro, adding new component as ovirt-ansible-modules would be preferable,
> QE needs to track these issues, and I doubt anyone will check github issues,
> thus BZ.
> 
> However bugzilla does not have any external tracker interface for github
> issue, so created github issues has to be linked within comment.

I prefer upstream. Find a way to track it (using a label, for example). Or create a tracker bug with all links, or just a spreadsheet. We are not providing the modules.

Comment 5 Ondra Machacek 2017-02-03 18:09:30 UTC
Just a note that user can still fetch info about what disk IDs are attached to vm, which is IMO much more important:

  - name: Fetch VM disk IDs
    ovirt_vms_facts:
      auth: "{{ ovirt_auth }}"
      pattern: name=vm
      fetch_nested: true
      nested_attributes: disk
  
  - name: Print VM disks IDs
    debug:
      var: item.disk.id
    with_items: "{{ ovirt_vms[0].disk_attachments }}"

Or to print VM disks names:

  - name: Get VM disks names
    ovirt_disks:
      auth: "{{ ovirt_auth }}"
      id: "{{ item.disk.id }}"
    with_items: "{{ ovirt_vms[0].disk_attachments }}"
    register: disks
  
  - name: Print VM disks names
    debug:
      var: item.disk.name
    with_items: "{{ disks.results }}"

Need to check out what searches our backend for disks support to see if it worth to implement ovirt_disks_facts.

Comment 6 Ondra Machacek 2017-02-10 10:46:19 UTC
As agreed please open this issue at github.