mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-70) Add get_pool_name_for_vm for VM Provider
Previously there was no simple way to calculate which pool a VM was a member of. This commit adds a helper method which queries redis for the pool name for a given VM.
This commit is contained in:
parent
c7b37dec75
commit
c09035cfcb
2 changed files with 23 additions and 0 deletions
|
|
@ -348,6 +348,11 @@ module Vmpooler
|
|||
result
|
||||
end
|
||||
|
||||
def get_pool_name_for_vm(vm_name)
|
||||
# the 'template' is a bad name. Should really be 'poolname'
|
||||
$redis.hget('vmpooler__vm__' + vm_name, 'template')
|
||||
end
|
||||
|
||||
def check_disk_queue(maxloop = 0, loop_delay = 5)
|
||||
$logger.log('d', "[*] [disk_manager] starting worker thread")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue