(POOLER-83) Add ability to specify a datacenter for vsphere

Previously the vsphere provider assumed that there was one and only one
datacenter (DC) in the vsphere instance.  However this is simply not true for
many vSphere installations.  This commit:
- Adds the ability to define a vSphere datacenter at the Pool or Provider level
  whereby the Pool setting takes precedence
- If no datacenter is specified the default behaviour of picking the first DC
  in the vSphere instance
- Updated all tests for the new setting
- Update the vmpooler configuration file example with relevant setting name
  and expected behaviour
- Fixed a bug in the rvmomi_helper whereby if no DC was found it would return
  all DCs.  This is opposite behaviour of the real RBVMOMI library as it returns
  nil
This commit is contained in:
Glenn Sarti 2017-06-14 17:39:14 -07:00
parent 58b580d3eb
commit 7077eadc65
4 changed files with 483 additions and 175 deletions

View file

@ -123,6 +123,7 @@ MockServiceInstance = Struct.new(
return child if path.nil? || child.name == path
end
end
nil
end
end