mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
Adding delete and get active requests
This commit is contained in:
parent
7e27542670
commit
d963e357d3
9 changed files with 109 additions and 75 deletions
|
|
@ -88,8 +88,8 @@ class Utils
|
|||
when 'ABS'
|
||||
# For ABS, 'hostname' variable is the jobID
|
||||
if host_data['state'] == 'allocated' || host_data['state'] == 'filled'
|
||||
host_data['allocated_resources'].each do |vm_name, i|
|
||||
puts "- [JobID:#{host_data['request']['job']['id']}] #{vm_name["hostname"]} (#{vm_name["type"]}) <#{host_data['state']}>"
|
||||
host_data['allocated_resources'].each do |vm_name, _i|
|
||||
puts "- [JobID:#{host_data['request']['job']['id']}] #{vm_name['hostname']} (#{vm_name['type']}) <#{host_data['state']}>"
|
||||
end
|
||||
end
|
||||
when 'Pooler'
|
||||
|
|
@ -155,6 +155,9 @@ class Utils
|
|||
puts "#{name.ljust(width)} #{e.red}"
|
||||
end
|
||||
end
|
||||
when 'ABS'
|
||||
puts "ABS Not OK".red unless status_response
|
||||
puts "ABS is OK".green if status_response
|
||||
else
|
||||
raise "Invalid service type #{service.type}"
|
||||
end
|
||||
|
|
@ -205,6 +208,7 @@ class Utils
|
|||
end
|
||||
|
||||
# Prioritize an explicitly specified url, user, or token if the user provided one
|
||||
service_config['priority'] = options.priority unless options.priority.nil?
|
||||
service_config['url'] = options.url unless options.url.nil?
|
||||
service_config['token'] = options.token unless options.token.nil?
|
||||
service_config['user'] = options.user unless options.user.nil?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue