Open balnbibarbi opened 1 year ago
I'm intending to add this functionality, but I want to make certain it's not already present first, and to design it consistently with the existing modules.
It looks like we don't have this functionality in this collection yet. I've checked vmware.vmware_rest, and it looks like it's missing there also. That said, I think it would be a good idea to implement this :-)
One thing, though: I think both the UI and the API use the word item, not object. So maybe vmware_content_library_items
might be a better name for the module.
Thanks Mario, got it, items not objects.
Workarounds until implemented:
New-ContentLibraryItem
/ Set-ContentLibraryItem
in PowerCLIThis would be super useful to have, going the rest api route now :(
I updated object
-> item
.
This:
community.vmware.vmware_content_library_items:
- content_library: "abc123"
- item: "my_awesome_template.ova"
- state: present
- file: "my_local_file.ova"
should probably look like this:
community.vmware.vmware_content_library_item:
content_library: "abc123"
name: "my_awesome_template.ova"
state: present
file: "my_local_file.ova"
s
from items as you will loop over this module for multiple itemsitem
to name
to be more consistent with other modules (could also be an alias)type
to specify ItemType (as in PowerCLI)description
Heya @mbx64 , I agree, these seem like great improvements. However, no offence meant, these are somewhat cosmetic. Are you therefore generally ok with the overall design? I ask because one of the things I was wondering about was unifying this content library API and other existing APIs that deal with files/blobs, forming some kind of abstraction layer over the underlying vmware APIs. I'm not at all sure this is a good idea. I'm seeking guidance.
@balnbibarbi Yes, it looks OK to me.
A quick notification if this is still being worked on:
Content types in a Content Library are important: For instance OVA vs. Template is an exceptionally important item since with separated VCenters it's our experience that Templates CANNOT be synchronized across dispirit content libraries (content libraries on different VCenters) while OVA/OVF Content CAN be synchronized.
The capability to handle Template and OVF/OVA files makes this slightly more complicated but very much needed.
Hello, me and my team would benefit from this module. Is someone activly working on this? Are there any workaround for this that are ansible native?
@neevnuv Hello, as far as I know, no one is currently working on this module. This requires writing a module from scratch. Current maintainers simply don’t have time for this.
A workaround could be to work with CL through the REST API using the uri or get_url ansible modules. (But as noted in the discussion above, it hurts.)
SUMMARY
Ability to add/remove/replace/retrieve items in a given Content Library
ISSUE TYPE
COMPONENT NAME
community.vmware.vmware_content_library_items
ADDITIONAL INFORMATION
How it would be used:
Why it is needed:
To upload an item:
To retrieve an item:
To delete an item: