(POOLER-92) Add the alias information in the API status page for each pool

Before this change if a pool had an alias configured, the information would not be
made public in the API. This commit adds the alias key in the pool object for each
pool if configured. The alias key can be abscent, a string or an one or multiple
array of strings. The value of the alias is copied from the configuration and can
represent another name for the pool, or another configured pool.
This commit is contained in:
Samuel Beaulieu 2017-10-18 12:26:39 -05:00
parent 0b5abd9bd3
commit f10bcadf7e
3 changed files with 95 additions and 5 deletions

View file

@ -0,0 +1,74 @@
---
:providers:
:dummy:
filename: '/tmp/dummy-backing.yaml'
:redis:
server: 'localhost'
:auth:
provider: 'dummy'
:tagfilter:
url: '(.*)\/'
:config:
site_name: 'vmpooler'
logfile: '/Users/samuel/workspace/vmpooler/vmpooler.log'
task_limit: 10
timeout: 15
vm_checktime: 15
vm_lifetime: 12
vm_lifetime_auth: 24
allowed_tags:
- 'created_by'
- 'project'
domain: 'company.com'
prefix: 'poolvm-'
:pools:
- name: 'debian-7-i386'
alias: [ 'debian-7-32' ]
template: 'Templates/debian-7-i386'
folder: 'Pooled VMs/debian-7-i386'
datastore: 'vmstorage'
size: 5
timeout: 15
ready_ttl: 1440
provider: dummy
- name: 'debian-7-i386-stringalias'
alias: 'debian-7-32-stringalias'
template: 'Templates/debian-7-i386'
folder: 'Pooled VMs/debian-7-i386'
datastore: 'vmstorage'
size: 5
timeout: 15
ready_ttl: 1440
provider: dummy
- name: 'debian-7-x86_64'
alias: [ 'debian-7-64', 'debian-7-amd64' ]
template: 'Templates/debian-7-x86_64'
folder: 'Pooled VMs/debian-7-x86_64'
datastore: 'vmstorage'
size: 5
timeout: 15
ready_ttl: 1440
provider: dummy
- name: 'debian-7-i386-noalias'
template: 'Templates/debian-7-i386'
folder: 'Pooled VMs/debian-7-i386'
datastore: 'vmstorage'
size: 5
timeout: 15
ready_ttl: 1440
provider: dummy
- name: 'debian-7-x86_64-alias-otherpool-extended'
alias: [ 'debian-7-x86_64' ]
template: 'Templates/debian-7-x86_64'
folder: 'Other Pooled VMs/debian-7-x86_64'
datastore: 'other-vmstorage'
size: 5
timeout: 15
ready_ttl: 1440
provider: dummy