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

Support for nested resource pools #1789

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

Conversation

IlyaTsoi
Copy link

@IlyaTsoi IlyaTsoi commented Jul 6, 2023

SUMMARY

I propose to change the logic of defining the target resource pool. In the current logic, nested resource pools cannot be defined, and the virtual machine is deployed in the first pool found by name, nesting is not considered.

Fixes #1360

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

I changed a part of get_resource_pool() function

ADDITIONAL INFORMATION

I get an array of nodes from a string (resource_pool parameter, eg resource_pool:/prod/web/app) Then iterate over each node in a loop. I first take the root resource pool and look for the first element from the array among its children. I then search for the next element from the array among the children of the found node, and so on.

resource_pool parameter before:

resource_pool: TST

resource_pool parameter after:

resource_pool: DEVELOP/TST/DB

I propose to change the logic of defining the target resource pool. In the current logic, nested resource pools cannot be defined, and the virtual machine is deployed in the first pool found by name, nesting is not considered. Issue ansible-collections#1360
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.

Specify a child resource pool in vmware_guest
1 participant