ansible ovirt_template: follow as replacement of nested_attributes

Hello, I was familiar with the ansible fetch_nested/nested_attributes to get additionnal information from API. Recently it has been deprecated in order to be replaced by the "follow(s)" verb. I understand it will follow the links into the schema definition of the object like: <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/permissions" rel="permissions"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/tags" rel="tags"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/cdroms" rel="cdroms"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/nics" rel="nics"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/watchdogs" rel="watchdogs"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/diskattachments" rel="diskattachments"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/graphicsconsoles" rel="graphicsconsoles"/> but I can't get fetch nested (name of cluster) of : <cluster href="/ovirt-engine/api/clusters/bbeb38a4-79f0-11ec-86cb-00163e6d6a50" id="bbeb38a4-79f0-11ec-86cb-00163e6d6a50"/> I was used to do this query with: fetch_nested: yes nested_attribute: - name Is it possible to do the same with "follow(s)"? -- Nathanaël Blanchet Supervision réseau SIRE 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr

Okay, the issue came from ovirt.ovirt 1.6.5 collection, upgrading to 1.6.6 manage to fetch the cluster name as follow: - ovirt_template_info: auth: "{{ ovirt_auth }}" pattern: name=centos8-stream.x follows: ['cluster'] # fetch_nested: yes # nested_attributes: ['name'] - debug: msg: "{{result.ovirt_templates|map(attribute='cluster.name')}}" Le 16/02/2022 à 16:35, Nathanaël Blanchet a écrit :
Hello,
I was familiar with the ansible fetch_nested/nested_attributes to get additionnal information from API.
Recently it has been deprecated in order to be replaced by the "follow(s)" verb.
I understand it will follow the links into the schema definition of the object like:
<link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/permissions" rel="permissions"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/tags" rel="tags"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/cdroms" rel="cdroms"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/nics" rel="nics"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/watchdogs" rel="watchdogs"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/diskattachments" rel="diskattachments"/> <link href="/ovirt-engine/api/templates/e020281a-f5f0-4d98-91e3-4f3a9fc069b1/graphicsconsoles" rel="graphicsconsoles"/>
but I can't get fetch nested (name of cluster) of :
<cluster href="/ovirt-engine/api/clusters/bbeb38a4-79f0-11ec-86cb-00163e6d6a50" id="bbeb38a4-79f0-11ec-86cb-00163e6d6a50"/>
I was used to do this query with:
fetch_nested: yes nested_attribute: - name
Is it possible to do the same with "follow(s)"?
-- Nathanaël Blanchet Supervision réseau SIRE 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr
participants (1)
-
Nathanaël Blanchet