Skip to content

Commit

Permalink
update references to depreacted library item info module in examples …
Browse files Browse the repository at this point in the history
…and tests
  • Loading branch information
mikemorency committed Dec 2, 2024
1 parent c93fe26 commit ab340dd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion plugins/modules/vcenter_ovf_libraryitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
register: ovf_item
- name: Get the list of items of the NFS library
vmware.vmware_rest.content_library_item_info:
vmware.vmware.content_library_item_info:
library_id: '{{ nfs_lib.id }}'
register: lib_items
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/vcenter_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@
register: nfs_lib
- name: Get the list of items of the NFS library
vmware.vmware_rest.content_library_item_info:
vmware.vmware.content_library_item_info:
library_id: '{{ nfs_lib.id }}'
register: lib_items
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/vcenter_vmtemplate_libraryitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
register: mylib_item
- name: Get the list of items of the NFS library
vmware.vmware_rest.content_library_item_info:
vmware.vmware.content_library_item_info:
library_id: '{{ nfs_lib.id }}'
register: lib_items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
description: automated
publish_info:
published: true
authentication_method: 'NONE'
authentication_method: "NONE"
storage_backings:
- storage_uri: 'nfs://datastore.test/srv/share/content-library'
type: 'OTHER'
- storage_uri: "nfs://datastore.test/srv/share/content-library"
type: "OTHER"
state: present
register: nfs_lib

Expand All @@ -32,10 +32,10 @@
description: automated
publish_info:
published: true
authentication_method: 'NONE'
authentication_method: "NONE"
storage_backings:
- storage_uri: 'nfs://datastore.test/srv/share/content-library'
type: 'OTHER'
- storage_uri: "nfs://datastore.test/srv/share/content-library"
type: "OTHER"
state: present
register: nfs_lib

Expand All @@ -53,10 +53,10 @@
description: automated
publish_info:
published: true
authentication_method: 'NONE'
authentication_method: "NONE"
storage_backings:
- storage_uri: 'nfs://datastore.test/srv/share/content-library'
type: 'OTHER'
- storage_uri: "nfs://datastore.test/srv/share/content-library"
type: "OTHER"
state: present
with_sequence: 0-10

Expand Down Expand Up @@ -92,7 +92,6 @@
that:
- ovf_item is changed


- name: _Export againt the VM as an OVF on the library
vmware.vmware_rest.vcenter_ovf_libraryitem:
session_timeout: 2900
Expand All @@ -113,8 +112,8 @@
- _result.id

- name: Get the list of items of the NFS library
vmware.vmware_rest.content_library_item_info:
library_id: '{{ nfs_lib.id }}'
vmware.vmware.content_library_item_info:
library_id: "{{ nfs_lib.id }}"
register: lib_items

- name: _Create a new VM from the OVF with a wrong folder
Expand Down Expand Up @@ -170,16 +169,16 @@
description: automated
publish_info:
published: true
authentication_method: 'NONE'
authentication_method: "NONE"
storage_backings:
- datastore_id: "{{ lookup('vmware.vmware_rest.datastore_moid', '/my_dc/datastore/rw_datastore') }}"
type: 'DATASTORE'
type: "DATASTORE"
state: present
register: ds_lib

- name: Retrieve the local content library information based upon id check mode
vmware.vmware_rest.content_locallibrary_info:
library_id: '{{ ds_lib.id }}'
library_id: "{{ ds_lib.id }}"
register: result
check_mode: true

Expand All @@ -201,7 +200,7 @@

- name: _Retrieve the local content library information based upon id
vmware.vmware_rest.content_locallibrary_info:
library_id: '{{ ds_lib.id }}'
library_id: "{{ ds_lib.id }}"
register: result

- ansible.builtin.debug: var=result
Expand All @@ -222,13 +221,13 @@
- result.value['type'] == 'LOCAL'

- name: Get the list of items of the NFS library
vmware.vmware_rest.content_library_item_info:
library_id: '{{ nfs_lib.id }}'
vmware.vmware.content_library_item_info:
library_id: "{{ nfs_lib.id }}"
register: result

- name: Get the (empty) list of items of the library
vmware.vmware_rest.content_library_item_info:
library_id: '{{ ds_lib.id }}'
vmware.vmware.content_library_item_info:
library_id: "{{ ds_lib.id }}"
register: result

- ansible.builtin.assert:
Expand All @@ -245,7 +244,7 @@
on_demand: true
storage_backings:
- datastore_id: "{{ lookup('vmware.vmware_rest.datastore_moid', '/my_dc/datastore/rw_datastore') }}"
type: 'DATASTORE'
type: "DATASTORE"
register: sub_lib

- name: Create subscribed library (again)
Expand All @@ -258,7 +257,7 @@
on_demand: true
storage_backings:
- datastore_id: "{{ lookup('vmware.vmware_rest.datastore_moid', '/my_dc/datastore/rw_datastore') }}"
type: 'DATASTORE'
type: "DATASTORE"
register: result
- name: Assert the resource has not been changed
ansible.builtin.assert:
Expand All @@ -267,8 +266,8 @@
ignore_errors: true

- name: Ensure the OVF is here
vmware.vmware_rest.content_library_item_info:
library_id: '{{ sub_lib.id }}'
vmware.vmware.content_library_item_info:
library_id: "{{ sub_lib.id }}"
register: result
- ansible.builtin.assert:
that:
Expand Down

0 comments on commit ab340dd

Please sign in to comment.