Adding command to list pools out of ABS

This commit is contained in:
Mikker Gimenez-Peterson 2019-10-17 16:09:08 -07:00
parent d8dd0885ab
commit de7d0fdeab
5 changed files with 237 additions and 2 deletions

View file

@ -1,7 +1,8 @@
# frozen_string_literal: true
require 'vmfloaty/pooler'
require 'vmfloaty/abs'
require 'vmfloaty/nonstandard_pooler'
require 'vmfloaty/pooler'
class Utils
# TODO: Takes the json response body from an HTTP GET
@ -155,8 +156,11 @@ class Utils
def self.get_service_object(type = '')
nspooler_strings = %w[ns nspooler nonstandard nonstandard_pooler]
abs_strings = %w[abs alwaysbescheduling always_be_scheduling]
if nspooler_strings.include? type.downcase
NonstandardPooler
elsif abs_strings.include? type.downcase
ABS
else
Pooler
end