cluster/lib/cluster/commands_generator.rb in sct-0.1.22 vs cluster/lib/cluster/commands_generator.rb in sct-0.1.23
- old
+ new
@@ -7,11 +7,11 @@
def self.start
self.new.run
end
- def run
+ def run
program :name, 'cluster'
program :version, Sct::VERSION
program :description, 'CLI for \'cluster\' - Manage your local kubernetes cluster'
global_option('--verbose') { $verbose = true }
@@ -20,12 +20,12 @@
c.syntax = "sct cluster up"
c.description = "Start the cluster"
c.option '--clean', 'start a clean cluster. Old cluster will be purged if available.'
- c.action do |args, options|
- if options.clean
+ c.action do |args, options|
+ if options.clean
Cluster::Runner.new.reset
else
Cluster::Runner.new.launch
end
end
@@ -35,21 +35,21 @@
command :down do |c|
c.syntax = 'sct cluster down'
c.description = 'stop the cluster'
- c.action do |args, options|
+ c.action do |args, options|
Cluster::Runner.new.down
end
end
- command :reset do |c|
+ command :reset do |c|
c.syntax = 'sct cluster reset'
c.description = 'reset your cluster and start with a clean cluster'
- c.action do |args, options|
+ c.action do |args, options|
Cluster::Runner.new.reset
end
end
alias_command :'setup', :'reset'
@@ -57,17 +57,17 @@
command :status do |c|
c.syntax = 'sct cluster status'
c.description = 'see the status of your cluster'
- c.action do |args, options|
+ c.action do |args, options|
Cluster::Runner.new.status
end
end
command :'update config' do |c|
-
+
c.syntax = 'sct cluster update config'
c.description = 'update the cluster configuration'
c.action do |args, options|
Cluster::Runner.new.update_config
@@ -82,11 +82,11 @@
c.action do |args, options|
Cluster::Runner.new.delete_stalled_pods if options.stalled
Cluster::Runner.new.delete_all_pods if options.all
-
+
Cluster::Runner.new.delete_pods(args) if !args.empty?
end
end
@@ -104,6 +104,6 @@
default_command :status
run!
end
end
-end
+end
\ No newline at end of file