mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
(maint) Support any vmpooler for ABS via vmpooler_fallback
Before this change, the fallback vmpooler for ABS had to be named 'vmpooler' and it only supported one. With this new code, users can set a key within an 'abs' service type called vmpooler_fallback that points to any other service configured in the ~/.vmfloaty.yml config file. If not set, the appropriate error message is returned, with an example configuration. Added the various use cases for the config to the unit tests
This commit is contained in:
parent
512adb4af1
commit
5333158bdc
4 changed files with 74 additions and 13 deletions
|
|
@ -141,11 +141,11 @@ class Service
|
|||
def maybe_use_vmpooler
|
||||
if @service_object.is_a?(ABS.class)
|
||||
if !self.silent
|
||||
FloatyLogger.info "The service in use is ABS, but the requested method should run against vmpooler directly, using vmpooler config from ~/.vmfloaty.yml"
|
||||
FloatyLogger.info "The service in use is ABS, but the requested method should run against vmpooler directly, using fallback_vmpooler config from ~/.vmfloaty.yml"
|
||||
self.silent = true
|
||||
end
|
||||
|
||||
@config = Utils.get_vmpooler_service_config
|
||||
@config = Utils.get_vmpooler_service_config(@config['vmpooler_fallback'])
|
||||
@service_object = Pooler
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue