mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
Merge pull request #104 from nwolfe/maint/dont-require-fallback-config
(maint) Don't require configuration file for get
This commit is contained in:
commit
6d1130bc8b
1 changed files with 6 additions and 2 deletions
|
|
@ -249,7 +249,6 @@ class ABS
|
|||
conn.headers['X-AUTH-TOKEN'] = token if token
|
||||
|
||||
saved_job_id = user + "-" + DateTime.now.strftime('%Q')
|
||||
vmpooler_config = Utils.get_vmpooler_service_config(config['vmpooler_fallback'])
|
||||
req_obj = {
|
||||
:resources => os_types,
|
||||
:job => {
|
||||
|
|
@ -258,9 +257,14 @@ class ABS
|
|||
:user => user,
|
||||
},
|
||||
},
|
||||
:vm_token => vmpooler_config['token'] # request with this token, on behalf of this user
|
||||
}
|
||||
|
||||
if config['vmpooler_fallback'] # optional and not available as cli flag
|
||||
vmpooler_config = Utils.get_vmpooler_service_config(config['vmpooler_fallback'])
|
||||
# request with this token, on behalf of this user
|
||||
req_obj[:vm_token] = vmpooler_config['token']
|
||||
end
|
||||
|
||||
if config['priority']
|
||||
req_obj[:priority] = if config['priority'] == 'high'
|
||||
1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue