Class: Exec::ClusterDelete

Inherits:
ExecutableCommand show all
Defined in:
lib/exec/cluster_delete.rb

Overview

Allows the user to delete a cluster

Instance Attribute Summary

Attributes inherited from ExecutableCommand

#argv, #command_name, #logger, #options, #stderr, #stdin, #stdout, #values

Instance Method Summary collapse

Methods inherited from ExecutableCommand

#check_parameters, #create_logger, #initialize, #run

Constructor Details

This class inherits a constructor from Exec::ExecutableCommand

Instance Method Details

#execObject (private)

TODO:

Implement ClusterDelete Exec body

The execution of the command.

Raises:

Author:

  • tnoguer



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/exec/cluster_delete.rb', line 26

def exec
  cluster_name = @values['cluster']

  Color::print_log("NONE", "Delete the cluster '#{cluster_name}'...", @stdout)
  Color::echo_fail(@stdout)

  raise ClusterDeleteError.new("Not implemented command...")

  #cmd = Command::ClusterDelete.new(cluster_name)
  #cmd.exec()
end

#set_optionsObject (private)

Parse and check the parameters of the function.

Author:

  • tnoguer



19
20
21
# File 'lib/exec/cluster_delete.rb', line 19

def set_options
  @options.add_option("C", "cluster", "The name of the vcluster .", true, true, method(:check_cluster_name))
end