vmware_custom_attribute_manager: Enhance custom attribute management#2344
Conversation
|
Build failed. ✔️ ansible-tox-linters SUCCESS in 5m 03s |
d54279d to
5f9d7c0
Compare
|
Build succeeded. ✔️ ansible-tox-linters SUCCESS in 4m 33s |
| It supports creating/updating custom attributes (state=present) and clearing them (state=absent). | ||
| """ | ||
|
|
||
| from ansible.module_utils._text import to_native |
There was a problem hiding this comment.
It looks like ansible.module_utils._text will be deprecated in ansible-core 2.20 and we've just got rid of it (#2504). I don't think it's a good idea to introduce it again.
| from ansible_collections.community.vmware.plugins.module_utils.vmware import ( | ||
| PyVmomi, | ||
| find_obj, | ||
| vmware_argument_spec, |
There was a problem hiding this comment.
Since #2459 we're re-using code from vmware.vmware, including the argument specs. I suggest to have a look at this.
|
Sorry for the late reply, somehow it's a lot of work to keep this collection at least basically healthy so I don't find much time to work on feature requests... sometimes not even on bugfixes :-/ BTW please add a changelog fragment. I think this would probably be a case of Additionally, there seem to be some conflicts that need to be resolved. |
…ement – extended object types, refactored code
Add changelog entry for PR ansible-collections#2344 documenting the addition of Network and VirtualApp object type support and code refactoring improvements.
5f9d7c0 to
e08673f
Compare
|
Build failed.
|
- Replace deprecated ansible.module_utils._text import with ansible.module_utils.common.text.converters - Use base_argument_spec from vmware.vmware collection - Update documentation fragment to vmware.vmware.base_options - Remove unused vmware_argument_spec import Addresses review feedback from PR ansible-collections#2344
|
Build succeeded. ✔️ ansible-tox-linters SUCCESS in 5m 22s |
…anager - Split long description strings into multiple lines to comply with 160 character limit - Fixed lines 39 and 47 that exceeded the maximum line length
|
Build succeeded. ✔️ ansible-tox-linters SUCCESS in 5m 11s |
SUMMARY
Extended support for additional object types and refactored the code to improve maintainability and readability. This update includes consistent parameter naming, the introduction of type hints and enhanced validations, and a more structured error handling approach. These changes enable a more robust integration with vCenter/vSphere.
ISSUE TYPE
COMPONENT NAME
vmware_custom_attribute_manager
ADDITIONAL INFORMATION
The changes include:
minor_changes.ansible.module_utils._textimport withansible.module_utils.common.text.converters.base_argument_specand documentation fragments fromvmware.vmwarecollection.