mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
Add service command
This change creates the `floaty service` command with two valid arguemnts: types and examples - `floaty service types` prints out a list of valid types for use in a service definition in ~/.vmfloaty.yml - `floaty service examples` prints out example configuration files for both a single service and multiple services.
This commit is contained in:
parent
512adb4af1
commit
9e61247cfe
5 changed files with 93 additions and 88 deletions
|
|
@ -203,12 +203,15 @@ class Utils
|
|||
end
|
||||
|
||||
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
|
||||
nspooler_strings = %w[ns nspooler nonstandard nonstandard_pooler]
|
||||
vmpooler_strings = %w[vmpooler]
|
||||
if abs_strings.include? type.downcase
|
||||
ABS
|
||||
elsif nspooler_strings.include? type.downcase
|
||||
NonstandardPooler
|
||||
elsif vmpooler_strings.include? type.downcase
|
||||
Pooler
|
||||
else
|
||||
Pooler
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue