Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmware_custom_attribute_manager: Enhance custom attribute management #2344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbaerlocher
Copy link

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
  • Feature Pull Request
COMPONENT NAME

vmware_custom_attribute_manager

ADDITIONAL INFORMATION

The changes include:

  • Extended Object Types:
    • Expanding the supported vSphere object types by adding "Network" and "VirtualApp".
  • Standardizing the parameter naming to "attributes" in the module documentation, options, and code.
    • Refactoring the module to consolidate setting and clearing custom attributes into a single method (process_custom_attributes) and providing an alias (update) for backward compatibility.
    • Adding enhanced validations for required parameters (ensuring that object_name and object_type are non-empty strings and that attributes is a non-empty list).
    • Implementing structured exception handling to catch and report specific errors more clearly.

…ement – extended object types, refactored code
@sbaerlocher sbaerlocher force-pushed the feature/refactor-vmware-custom-manager-attribute branch from d54279d to 5f9d7c0 Compare March 5, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant