Skip to content

find_pool in vsphere_helper tends to throw instead of returning nil for missing pools #209

Description

@glennsarti

In find_pool in lib/vmpooler/vsphere_helper.rb if the poolname is not found the base object turns into nil (Assuming it's on the same hierarchy). However due to https://github.com/puppetlabs/vmpooler/blob/master/lib/vmpooler/vsphere_helper.rb#L292

 base = base.resourcePool unless base.is_a?(RbVmomi::VIM::ResourcePool) && base.respond_to?(:resourcePool)

If base == nil then the unless is not trigged and and an error is thrown that resourcePool is a missing method on nil

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions