Class: Rhelm::Subcommand::List

Inherits:
Base
  • Object
show all
Defined in:
lib/rhelm/subcommand/list.rb

Overview

Helm list subcommand: ‘helm list [flags]`. docs: helm.sh/docs/helm/helm_list/

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #debug, #kube_apiserver, #kube_as_group, #kube_as_user, #kube_context, #kube_token, #kubeconfig, #namespace, #registry_config, #repository_cache, #repository_config

Instance Method Summary collapse

Methods inherited from Base

#args, #full_cli_call, #report_failure, #run

Constructor Details

#initialize(options = {}) ⇒ List

Returns a new instance of List.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/rhelm/subcommand/list.rb', line 27

def initialize(options = {})
  super(options)

  @all = options[:all]
  @all_namespaces = options[:all_namespaces]
  @date = options[:date]
  @deployed = options[:deployed]
  @failed = options[:failed]
  @filter = options[:filter]
  @help = options[:help]
  @max = options[:max]
  @offset = options[:offset]
  @output = options[:output]
  @pending = options[:pending]
  @reverse = options[:reverse]
  @selector = options[:selector]
  @short = options[:short]
  @superseded = options[:superseded]
  @time_format = options[:time_format]
  @uninstalled = options[:uninstalled]
  @uninstalling = options[:uninstalling]
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def all
  @all
end

#all_namespacesObject (readonly)

Returns the value of attribute all_namespaces.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def all_namespaces
  @all_namespaces
end

#dateObject (readonly)

Returns the value of attribute date.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def date
  @date
end

#deployedObject (readonly)

Returns the value of attribute deployed.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def deployed
  @deployed
end

#failedObject (readonly)

Returns the value of attribute failed.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def failed
  @failed
end

#filterObject (readonly)

Returns the value of attribute filter.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def filter
  @filter
end

#helpObject (readonly)

Returns the value of attribute help.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def help
  @help
end

#maxObject (readonly)

Returns the value of attribute max.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def max
  @max
end

#offsetObject (readonly)

Returns the value of attribute offset.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def offset
  @offset
end

#outputObject (readonly)

Returns the value of attribute output.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def output
  @output
end

#pendingObject (readonly)

Returns the value of attribute pending.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def pending
  @pending
end

#reverseObject (readonly)

Returns the value of attribute reverse.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def reverse
  @reverse
end

#selectorObject (readonly)

Returns the value of attribute selector.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def selector
  @selector
end

#shortObject (readonly)

Returns the value of attribute short.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def short
  @short
end

#supersededObject (readonly)

Returns the value of attribute superseded.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def superseded
  @superseded
end

#time_formatObject (readonly)

Returns the value of attribute time_format.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def time_format
  @time_format
end

#uninstalledObject (readonly)

Returns the value of attribute uninstalled.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def uninstalled
  @uninstalled
end

#uninstallingObject (readonly)

Returns the value of attribute uninstalling.



8
9
10
# File 'lib/rhelm/subcommand/list.rb', line 8

def uninstalling
  @uninstalling
end

Instance Method Details

#cli_argsObject



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/rhelm/subcommand/list.rb', line 54

def cli_args
  super.tap do |args|
    args << '--all' if all
    args << '--all-namespaces' if all_namespaces
    args << '--date' if date
    args << '--deployed' if deployed
    args << '--failed' if failed
    args << ['--filter', filter] if filter
    args << '--help' if help
    args << ['--max', max] if max
    args << ['--offset', offset] if offset
    args << ['--output', output] if output
    args << '--pending' if pending
    args << '--reverse' if reverse
    args << ['--selector', selector] if selector
    args << '--short' if short
    args << '--superseded' if superseded
    args << ['--time-format', time_format] if time_format
    args << '--uninstalled' if uninstalled
    args << '--uninstalling' if uninstalling
  end.flatten
end

#subcommand_nameObject



50
51
52
# File 'lib/rhelm/subcommand/list.rb', line 50

def subcommand_name
  'ls'
end