Adding delete and get active requests

This commit is contained in:
Mikker Gimenez-Peterson 2019-11-04 11:41:49 -08:00
parent a77ea84092
commit 7e27542670
5 changed files with 106 additions and 20 deletions

View file

@ -85,6 +85,13 @@ class Utils
host_data = response[hostname]
case service.type
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']}>"
end
end
when 'Pooler'
tag_pairs = []
tag_pairs = host_data['tags'].map { |key, value| "#{key}: #{value}" } unless host_data['tags'].nil?