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

(POOLER-40) Do not return folders with get_pool_vms #272

Merged
merged 1 commit into from
Jul 9, 2018

Conversation

mattkirby
Copy link
Contributor

This commit updates get_pool_vms to only return if the object is a VirtualMachine. Without this change a folder wtihin a VM target folder can be discovered and destroyed as though it were a VM.

This commit updates get_pool_vms to only return if the object is a VirtualMachine. Without this change a folder wtihin a VM target folder can be discovered and destroyed as though it were a VM.
end

it 'should return the vms without the folder' do
result = subject.vms_in_pool(poolname)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that looks good, do you want it to also return VMs inside the folder 'pool2' or is it supposed to skip these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's supposed to skip those and just evaluate the objects that are VMs in the base folder object. Previously it would treat the folder as though it was a VM and try to discover and destroy it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I've seen that before. I wonder why we would have subfolders though

@mchllweeks mchllweeks merged commit afc5a33 into puppetlabs:master Jul 9, 2018
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.

3 participants